# 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`](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/settle/src/protocol/specs.ts#L12) as `ESCROW_SIGN`
- **Handled in**: [`projects/settle/src/agents/roles.ts`](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/settle/src/agents/roles.ts), [`projects/settle/src/agents/party.ts`](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/settle/src/agents/party.ts)
- **Design**: [7. The Trust Tasks](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/settle/docs/design.md#7-the-trust-tasks) in `projects/settle/docs/design.md`

## Payload

projects/settle/src/agents/base.ts:80:

```ts
/** 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.

Shape of a document of this type:

```json
{
  "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…"
  }
}
```

---

This is the Markdown version of https://toip.tools/spec/settle/escrow/sign/0.1/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
