Escrows
REST operate methods — build unsigned XDR, sign with your wallet, then send.
Operate methods call Core build endpoints. Each returns an unsigned XDR. You sign it, then submit with sendTransaction.
Import from @trustless-work/escrow-js or @trustless-work/escrow-js/rest.
Methods
deployEscrow
Create escrow (unsignedXdr + predicted contractId)
fundEscrow
Fund
updateEscrow
Update properties
changeMilestoneStatus
Status / evidence (batch)
approveMilestones
Approve (batch)
approveAndReleaseMilestones
Approve + release (multi-release)
manageMilestones
Add / edit milestones
releaseFunds
Release
startDispute
Start dispute
resolveDispute
Resolve dispute (distributions)
withdrawRemainingFunds
Withdraw remaining
Pattern
const { unsignedXdr } = await client.rest.fundEscrow(payload, "single-release");
const signedXdr = await signWithWallet(unsignedXdr);
const result = await client.rest.sendTransaction(signedXdr);Response types
Deploy build
DeployEscrowResponse → { unsignedXdr, txHash, contractId }
Other builds
BuildTransactionResponse → { unsignedXdr, txHash }
Submit
SendTransactionResponse
Error handling: Errors. Payload types: Types.