Document the Core API v2 surface - #10
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- resolve-dispute: distributions must equal the exact target (full balance on single-release; combined amount of the named milestones on multi) - withdraw-remaining-funds: full sweep on both types, not partial - update-escrow: milestones in the payload are ignored; lock is the cumulative funded amount (FundedAmount), not a zero live balance - multi manage-milestones: all edits frozen once funded, not just amounts - single release: zero-milestone escrows cannot release Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The update lock is the cumulative funded amount, which never decreases, not a zero live balance. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- fix stale unsignedTransaction field name in single-release intro - drop milestone-receiver rule from single-release manage-milestones (single-release milestones have no receiver; the rule is multi-only) - split read amount types by surface: read model returns decimal strings, versioned v2 reads return numbers - submit response: code is absent on successful factory deploys, which return contractId + escrow instead - update: the API requires escrow.milestones (1-50) even though the contract ignores it - add DTO limits: dispute reason 500, newStatus 50, newEvidence 500, newDescription 500, escrow-balances max 20 addresses Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- approveAndReleaseMilestones is multi-release only in both SDKs (hardcoded to the multi route, no type argument); the API does expose the single-release route, the SDKs just do not wrap it - extend-ttl has no SDK method in either package; call the API route - React package also exports mainNet/development constants that point at the beta backend's internal URL: warn against reading them as environments and prefer an explicit baseURL Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
JoelVR17
approved these changes
Sep 11, 2026
Document the React and JavaScript SDKs for v2
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 a reference for the Core API v2 surface, which the skill did not cover at all. Everything here was read from the Core API source rather than from existing documentation.
Three new files under
skills/api/v2/:core-concepts.md— base URL, auth, the build/sign/submit pattern, the sharedroles/trustline/milestoneshapes, type rules, field limits, and a v1→v2 comparison.single-release.mdandmulti-release.md— all 14 endpoints per variant, with an example payload, the required signer and the preconditions for each.The existing V1 markers now point here, and
SKILL.mdroutes to the new files.Facts worth flagging to reviewers
Several of these contradict what a reader would assume from the V1 docs:
https://beta.api.trustlesswork.com. Neitherapi.trustlesswork.comnordev.api.trustlesswork.comserves it.unsignedXdr, notunsignedTransaction, and it comes withtxHash.deployalso returns the predictedcontractIdbefore you submit.POST /stellar/send-transaction. There is nohelpercontroller in this API./deploy,/fund,/dispute, and update isPUT /update.milestoneIndexesisnumber[], where v1 used a single stringmilestoneIndex.title100→200,description500→2000.trustlineaccepts either form — acontractId(C…) orsymbol+ issueraddress(G…).STELLAR_TX_SUBMITTED_INDEXER_LAGGINGon submit means the transaction succeeded and only the read model is behind. Retrying it is the most expensive mistake available.Two read surfaces
Worth calling out because it is easy to get wrong: reads exist in two places. The v2 transaction controllers expose
GET /escrow/{type}/v2/:contractIdand/escrow-balances, while a separate read model serves/escrows/...with no version or type segment. Both SDKs use the second one. The document explains the split so nobody adds/v2/to a read-model path.Scope
Contract-level V2 semantics stay in
skills/protocol/v2.md; this PR is the API layer only. The V2 React SDK and JS SDK are documented in a follow-up PR that builds on this one.