> For the complete documentation index, see [llms.txt](https://docs.trustlesswork.com/trustless-work/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk.md).

# ESCROW JS SDK

- [Introduction](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/introduction.md): Framework-agnostic JavaScript/TypeScript client for Trustless Work Core API v2 escrows.
- [Getting Started](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/getting-started.md): Install @trustless-work/escrow-js and create a TrustlessWorkClient.
- [Architecture](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/architecture.md): Entry points, client layers, and the build → sign → send flow.
- [sendTransaction](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/sendtransaction.md): Submit a signed Stellar XDR via POST /stellar/send-transaction.
- [Escrows](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/escrows.md): REST operate methods — build unsigned XDR, sign with your wallet, then send.
- [deployEscrow](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/escrows/deployescrow.md): Build an unsigned deploy transaction for a new single- or multi-release escrow.
- [updateEscrow](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/escrows/updateescrow.md): Build an unsigned update transaction (full replace of platform-controlled fields).
- [fundEscrow](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/escrows/fundescrow.md): Build an unsigned fund transaction for an escrow.
- [approveMilestones](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/escrows/approvemilestones.md): Batch approve one or more milestones (v2).
- [changeMilestoneStatus](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/escrows/changemilestonestatus.md): Batch change milestone status / evidence (v2).
- [approveAndReleaseMilestones](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/escrows/approveandreleasemilestones.md): Multi-release only. Atomic approve + release for the given milestone indexes.
- [manageMilestones](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/escrows/managemilestones.md): Add new milestones and/or edit existing milestone descriptions (and amounts for multi).
- [releaseFunds](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/escrows/releasefunds.md): Build an unsigned release transaction.
- [startDispute](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/escrows/startdispute.md): Start a dispute on a single-release escrow or selected multi-release milestones.
- [resolveDispute](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/escrows/resolvedispute.md): Resolve a dispute with address → amount distributions.
- [withdrawRemainingFunds](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/escrows/withdrawremainingfunds.md): Withdraw remaining funds after resolution / completion.
- [Escrow Information](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/escrow-information.md): REST read methods for GET /escrows\* — list, detail, events, milestones, financial.
- [listEscrows](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/escrow-information/listescrows.md): List escrows with keyset pagination and filters (GET /escrows).
- [getEscrow](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/escrow-information/getescrow.md): Get a single escrow detail (GET /escrows/:contractId).
- [getEscrowDetails](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/escrow-information/getescrowdetails.md): Batch escrow details (GET /escrows/details).
- [listEscrowEvents](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/escrow-information/listescrowevents.md): Paginated escrow event timeline (GET /escrows/:contractId/events).
- [getEscrowsFinancial](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/escrow-information/getescrowsfinancial.md): Batch financial summaries (GET /escrows/financial).
- [getEscrowMilestones](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/escrow-information/getescrowmilestones.md): Milestones for one escrow (GET /escrows/:contractId/milestones).
- [getEscrowsMilestones](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/escrow-information/getescrowsmilestones.md): Batch milestones (GET /escrows/milestones).
- [GraphQL](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/graphql.md): GraphQL read surface — POST /graphql for escrow and escrows queries.
- [getEscrow](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/graphql/getescrow.md): GraphQL escrow(contractId) — detail with financial, deposits, events.
- [listEscrows](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/graphql/listescrows.md): GraphQL escrows(...) — same filters as REST list.
- [Types](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/types.md): Plain shapes for the most important \`@trustless-work/escrow-js\` types — entities, payloads, responses, and the read model.
- [Entities](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/types/entities.md): Roles, milestones, trustline, and on-chain escrow entity shapes.
- [Payloads](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/types/payloads.md): Operate payloads — deploy, update, fund, release, dispute, and milestone management.
- [Responses](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/types/responses.md): Read-model rows, snapshots, list params, and build/send transaction responses.
- [Errors](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/errors.md): RFC 9457 Problem Details — TrustlessWorkApiError, TrustlessWorkNetworkError, and helpers.
- [Runtimes](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk/runtimes.md): Use @trustless-work/escrow-js in Node, NestJS, Angular, and the browser.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.trustlesswork.com/trustless-work/v2-en/escrow-js-sdk.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
