Repository navigation
feat(data): add range-event activity types - #404
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Activity Threshold compose/decompose rows move line tokens without collateral: the feed serves the amount in size and 0 in usdc_size. Expose it as shares instead of an always-zero USDC amount. UnknownActivity gains is_combo, amount, condition_id, title, slug, icon and event_slug, parsed leniently, so callers can tell Combo rows apart without reading raw. Matches the TypeScript SDK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 5, 2026
Drop is_combo, amount, condition_id and the display fields added to UnknownActivity so callers do not build on fields of types the SDK does not model yet. raw still keeps the full row. Matches the TypeScript SDK, where unlisted rows carry only the shared account fields. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kartojal
marked this pull request as ready for review
November 5, 2026 12:07
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cesarenaldi
approved these changes
Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
DIRECTIONAL_SPLIT,DIRECTIONAL_MERGE,THRESHOLD_COMPOSEandTHRESHOLD_DECOMPOSEactivity types and accepts them in activity filters.Threshold compose and decompose rows move no collateral, so they report
sharesand have noamount. These rows used to come back asUnknownActivity, so code that readsamounton every typed row now needs to handle them:The
list_activitydocstrings on all four clients now say this.Note
Low Risk
Additive data-model and parsing changes with tests; no auth, trading, or payment logic touched.
Overview
Adds four range-event wallet activity kinds—
DIRECTIONAL_SPLIT,DIRECTIONAL_MERGE,THRESHOLD_COMPOSE, andTHRESHOLD_DECOMPOSE—toActivityType, activity filters, parsing, and public exports.Directional split/merge rows are modeled as event-level activity with a USDC
amount(no per-marketcondition_id). Threshold compose/decompose rows are tied to a line market (condition_id, outcome) and expose moved tokens assharesinstead of collateralamount.list_activitydocs on all sync/async public and secure clients now call out threshold rows and that unrecognized types still deserialize asUnknownActivitywith the full payload inraw. Unit tests cover parsing shapes and adjust the generic activity-variant test so threshold types are not forced through the USDC-only path.Reviewed by Cursor Bugbot for commit e5191e6. Bugbot is set up for automated code reviews on this repo. Configure here.