Introduction
Framework-agnostic JavaScript/TypeScript client for Trustless Work Core API v2 escrows.
@trustless-work/escrow-js — Framework-agnostic JavaScript/TypeScript client for Trustless Work Core API v2 escrows.
REST operate
Build unsigned XDR → you sign → sendTransaction
REST reads
GET /escrows* (list, detail, events, milestones, financial)
GraphQL reads
POST /graphql (escrow / escrows)
Identity is always contractId (Soroban C…). Escrow types: single-release | multi-release.
Works in Node.js 18+, NestJS, Angular, Vue, browser, and any JS runtime with fetch. Zero runtime dependencies.
Quick links
What you'll do with the SDK
Deploy escrows with
deployEscrow— single-release or multi-release.Fund, update, manage milestones, approve, release, dispute, resolve, and withdraw.
Read escrows via REST or GraphQL.
Submit signed XDR with
sendTransaction.
Environment
development and mainNet currently both point at:
Pass any Core API baseURL string when you need another host. Get an API key from the Trustless Work dApp.
Coming from React?
See Migration from React SDK for the hook → method map and shared Core v2 contract.
Last updated