Skip to content

Add escrow fund(), disputeEscrow(), ProfileClient, and Typedoc config - #93

Merged
meshackyaro merged 5 commits into
trustflow-protocol:mainfrom
CillaSam:feat/escrow-fund-dispute-profiles-typedoc-4-5-6-7
Aug 28, 2026
Merged

Add escrow fund(), disputeEscrow(), ProfileClient, and Typedoc config#93
meshackyaro merged 5 commits into
trustflow-protocol:mainfrom
CillaSam:feat/escrow-fund-dispute-profiles-typedoc-4-5-6-7

Conversation

@CillaSam

Copy link
Copy Markdown
Contributor

Summary

  • Add TrustFlowEscrowClient.fund() to lock an asset transfer (e.g. a USDC Soroban token contract) into an existing escrow, via a new buildFundArgs contract-argument encoder
  • Add ProfileClient with getProfile/updateProfile wrappers for the backend's /profiles endpoints, following the existing retry-aware SDKResult pattern
  • Implement disputeEscrow() in src/escrow/dispute.ts, fixing examples/dispute.ts which already imported it even though it was never implemented
  • Add a Typedoc configuration (typedoc.json, npm run docs / docs:watch) for generating an HTML API reference from JSDoc comments

Test plan

  • npx jest — 203/203 tests passing (new coverage for fund, disputeEscrow, buildFundArgs, and ProfileClient)
  • npm run build — CJS/ESM/DTS all build successfully
  • npm run lint — 0 errors
  • npm run format:check — passes
  • npx typedoc — generates docs successfully into docs/reference (gitignored)

Closes #4, Closes #5, Closes #6, Closes #7

…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).
@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@meshackyaro
meshackyaro merged commit 095ca6c into trustflow-protocol:main Aug 28, 2026
@grantfox-oss grantfox-oss Bot mentioned this pull request Aug 28, 2026
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create Typedoc configuration Add dispute.raise() wrapper Implement API wrapper for /profiles Add escrow.fund() wrapper

2 participants