# todo/op

https://toip.tools/spec/todo/op/0.1

A member who adds, edits, checks, unchecks or deletes an item sends the signed operation, with their membership credential, to every other current member. Each device checks it against the roster, the credential and the policy before applying it.

- **Sent**: author's device → every other current member's device
- **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/shared-todo/src/todo/specs.ts:8`](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/shared-todo/src/todo/specs.ts#L8) as `OP`
- **Handled in**: [`projects/shared-todo/src/todo/device.ts`](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/shared-todo/src/todo/device.ts)
- **Design**: [4.3 Messages](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/shared-todo/docs/design.md#43-messages) in `projects/shared-todo/docs/design.md`

## Payload

projects/shared-todo/src/todo/device.ts:64:

```ts
export interface OpMessage {
  op: Op;
  membership?: Credential;
}
```

### Types it uses

projects/shared-todo/src/todo/ops.ts:11:

```ts
/**
 * One change to the list, signed by its author. It is separate from the message that carries it,
 * so anyone can forward it and it still proves who wrote it (design 4.4).
 */
export interface Op {
  id: string;
  type: "todo/op";
  list: string;
  issuer: string;
  kind: OpKind;
  itemId: string;
  at: string;
  text?: string;
  sealed?: SealedText;
  readers?: string[];
  membershipId: string;
  proof?: Proof;
}
```

## 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/todo/op/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/todo/op/0.1/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
