Add escrow fund(), disputeEscrow(), ProfileClient, and Typedoc config - #93
Merged
meshackyaro merged 5 commits intoAug 28, 2026
Conversation
…stflow-protocol#4) Adds TrustFlowEscrowClient.fund() to transfer and lock an asset (e.g. USDC via its Soroban token contract) into an existing escrow, encoding the contract call arguments via the new buildFundArgs. tokenAddress is optional and defaults to the escrow's native asset.
…ow-protocol#5) Adds a type-safe Axios-based ProfileClient (getProfile/updateProfile) for the backend's /profiles endpoints, following the same retry-aware SDKResult pattern as DisputeClient/JurorClient. Profile and UpdateProfileParams types live in src/types/profile.ts, exported from the package root.
…col#6) examples/dispute.ts already imported disputeEscrow from src/escrow/dispute.ts, but the function was never implemented. Adds it as the on-chain counterpart to DisputeClient.raiseDispute (which posts to the backend API instead): it simplifies the XDR construction for alerting the smart contract of a dispute via the existing buildDisputeArgs.
…ustflow-protocol#7) Adds typedoc.json plus npm run docs / docs:watch to auto-generate an HTML API reference from JSDoc comments into docs/reference (generated on demand, gitignored). skipErrorChecking is enabled so doc generation isn't blocked by pre-existing unrelated compiler diagnostics elsewhere in the codebase (e.g. window usage without a DOM lib).
Updates README, docs/API.md, and CHANGELOG to cover the new escrow.fund() wrapper, the on-chain disputeEscrow() helper, ProfileClient, and the generated API reference (trustflow-protocol#4, trustflow-protocol#5, trustflow-protocol#6, trustflow-protocol#7).
|
@CillaSam Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Closed
10 tasks
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.
Summary
TrustFlowEscrowClient.fund()to lock an asset transfer (e.g. a USDC Soroban token contract) into an existing escrow, via a newbuildFundArgscontract-argument encoderProfileClientwithgetProfile/updateProfilewrappers for the backend's/profilesendpoints, following the existing retry-awareSDKResultpatterndisputeEscrow()insrc/escrow/dispute.ts, fixingexamples/dispute.tswhich already imported it even though it was never implementedtypedoc.json,npm run docs/docs:watch) for generating an HTML API reference from JSDoc commentsTest plan
npx jest— 203/203 tests passing (new coverage forfund,disputeEscrow,buildFundArgs, andProfileClient)npm run build— CJS/ESM/DTS all build successfullynpm run lint— 0 errorsnpm run format:check— passesnpx typedoc— generates docs successfully intodocs/reference(gitignored)Closes #4, Closes #5, Closes #6, Closes #7