For the complete documentation index, see llms.txt. This page is also available as Markdown.

Escrow Information

REST read methods for GET /escrows* — list, detail, events, milestones, financial.

Typed helpers for Core GET /escrows*.

Import from @trustless-work/escrow-js or @trustless-work/escrow-js/rest.

Methods

Method
Endpoint

listEscrows

GET /escrows

getEscrow

GET /escrows/:contractId

getEscrowDetails

GET /escrows/details?contractIds=

listEscrowEvents

GET /escrows/:contractId/events

getEscrowMilestones

GET /escrows/:contractId/milestones

getEscrowsMilestones

GET /escrows/milestones?contractIds=

getEscrowsFinancial

GET /escrows/financial?contractIds=

Quick example

import { TrustlessWorkClient, development } from "@trustless-work/escrow-js";

const client = new TrustlessWorkClient({
  baseURL: development,
  apiKey: process.env.API_KEY,
});

const page = await client.rest.listEscrows({ scope: "mine", limit: 20 });
const detail = await client.rest.getEscrow(contractId);

Filters & pagination

ListEscrowsParams: scope, status, type, engagementId, contractIds, participant, role, platformId, subjectId, createdAfter, createdBefore, limit, cursor, sort, order.

type is "single-release" or "multi-release" and matches the row's type field. Every row also exposes amount (decimal string, or null until the first on-chain state is projected).

  • Use scope: "mine" | "all" for segmentation (not per-escrow access grants).

  • List/events return a keyset page: { data, hasMore, nextCursor }.

Read-model shapes

Type
Notes

EscrowSummary

List/detail row: contractId, type, amount, status, balance, asset, camelCased snapshot

EscrowDetail

{ escrow, events, deposits }

EscrowFinancial

Batch financial: deposited / released / pending / balance

EscrowEvent

Indexed event — no UUID event id

EscrowDeposit

Deposit row — no UUID deposit id

Amounts on reads are human decimal strings. Prefer GraphQL when you need nested financial + deposits + events in one call — see GraphQL.