toip.tools

settle/escrow/sign

https://toip.tools/spec/settle/escrow/sign/0.1

A party sends its signature over an escrow outcome (how much of the price goes to the payee), with the evidence the outcome rests on. The processor collects these and submits the on-chain resolve once enough distinct allowed keys sign the same outcome. When the payee sends one to the payer, it asks for a release or a refund, which the payer checks against its policy.

Sent
payer's or payee's party processor, and the payer's party when the payee asks for a release or refund
Kind
One-way. No response is expected; any answer is a separate message.
Envelope
Signed by the issuer, addressed to one recipient, timestamped, and encrypted in a TSP Direct message. The signature and recipient binding prevent its use as a bearer token.
Defined in
projects/settle/src/protocol/specs.ts:12 as ESCROW_SIGN
Handled in
projects/settle/src/agents/roles.ts, projects/settle/src/agents/party.ts
Design
7. The Trust Tasks in projects/settle/docs/design.md

Payload

TypeScriptprojects/settle/src/agents/base.ts:80
/** The signed outcome a party sends the processor (design §7, escrow/sign). */
export interface OutcomeSignature {
  termsHash: string;
  escrow: Address;
  payeeUnits: string;
  evidence: Evidence;
  signer: Address;
  signature: string;
}

Notes

The arbiter's outcome signature travels inside settle/arbiter/ruling instead. The design's escrow/release/request type is not separate in the code: the payee's escrow/sign to the payer takes its place.

Document envelope

Every Trust Task uses this envelope. Replace payload with the structure shown above.

JSONShape of a document of this type
{
  "id": "urn:uuid:…",
  "type": "https://toip.tools/spec/settle/escrow/sign/0.1",
  "issuer": "did:key:… (the sender)",
  "recipient": "did:key:… (the receiver)",
  "issuedAt": "2026-11-06T18:00:00.000Z",
  "payload": { … },
  "proof": {
    "type": "DataIntegrityProof",
    "cryptosuite": "eddsa-jcs-2022",
    "verificationMethod": "did:key:…#…",
    "proofPurpose": "assertionMethod",
    "proofValue": "z…"
  }
}