# Examples

Explore the toolkit through payments, private collaboration, anonymous speech, and agent delegation. Each project has a written design; working examples include commands to run them locally.

**Working** projects run and have tests. **Being built** projects have a design and an implementation in progress. **Design only** projects are proposals ready to build.

Set up the repository once:

```bash
git clone https://github.com/yourbuddyconner/toip-tools.git
cd toip-tools
npm install
```

## Settle Working

Conditional payments with shared control of escrow. A customer pays through a link, and stablecoins wait in a Solana escrow until two of the payer, payee, and arbiter sign to move them. Signed Trust Tasks coordinate each step. Before signing, each party's device checks the payment's Rego policy.

### What it shows

- A Trust Task vocabulary for a real protocol: invoices, terms, attestations, disputes, rulings, receipts.
- Identity off-chain, fresh keys on-chain, bound together by credentials only the parties see.
- Passkey-sealed keys in the browser, and operators who sign in with their own key instead of a password.

Built on [`@toip-tools/trust-core`](https://toip.tools/toolkit/trust-core/), [`@toip-tools/relay`](https://toip.tools/toolkit/relay/) and [`@toip-tools/web-vault`](https://toip.tools/toolkit/web-vault/). Message reference: [`settle/…` Trust Tasks](https://toip.tools/spec/#settle).

### Run it

The whole network and the web app, on a local Solana cluster:

```bash
npm run settle
```

Run the terminal demo:

```bash
npm run demo --workspace projects/settle
```

The app in a real browser, with screenshots:

```bash
npm run e2e --workspace projects/settle
```

![Settle's hosted checkout: Joe's Plumbing, verified, asks 120.00 USDC to fix a kitchen sink, and explains that the money goes into an escrow nobody can empty alone.](https://toip.tools/img/settle-checkout.jpg)

*Hosted checkout for a payment link.*

![A released payment: payer and payee seals are checked, the arbiter's is empty, and an activity list shows each signed step from invoice to receipt.](https://toip.tools/img/settle-released.jpg)

*Two signatures release the funds. The activity log records each Trust Task.*

![The operator view of a dispute: the payer reported no hot water, and the arbiter is ruling 180 of 300 USDC to the plumber, with reasons.](https://toip.tools/img/settle-arbiter.jpg)

*An arbiter signs a split ruling, preserving the decision as evidence.*

Read Settle's [README](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/settle/README.md) and [design](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/settle/docs/design.md), or browse [its source](https://github.com/yourbuddyconner/toip-tools/tree/main/projects/settle).

## Shared To-Do Working

Private to-do lists for a household. Each person and list has its own key and DID, created on the device. The list signs membership credentials, and members exchange signed changes in encrypted TSP messages. Every device verifies a change before applying it; the relay handles delivery without reading the list.

### What it shows

- Identity, credentials, and encrypted messaging in a small collaborative app.
- Invitations, roles, removal, and private items sealed to chosen readers.
- Offline outboxes and catching up from other members, through a relay that can't read anything.

Built on [`@toip-tools/trust-core`](https://toip.tools/toolkit/trust-core/) and [`@toip-tools/relay`](https://toip.tools/toolkit/relay/). Message reference: [`todo/…` Trust Tasks](https://toip.tools/spec/#todo).

### Run it

The relay on ws://localhost:8787 and the app on http://localhost:5181:

```bash
npm run dev
```

Read Shared To-Do's [README](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/shared-todo/README.md) and [design](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/shared-todo/docs/design.md), or browse [its source](https://github.com/yourbuddyconner/toip-tools/tree/main/projects/shared-todo).

## Tipline Working

A drop box that lets sources prove membership without revealing their identity. A source shows a journalist that they belong to an organization, shares documents, and continues the conversation using a fresh DID for the tip. A code written on paper lets them return without keeping the conversation on their device.

### What it shows

- Zero-knowledge group membership in the browser.
- Counting distinct sources by nullifier without knowing any of them.

Built on [`@toip-tools/anon-membership`](https://toip.tools/toolkit/anon-membership/), [`@toip-tools/trust-core`](https://toip.tools/toolkit/trust-core/), [`@toip-tools/relay`](https://toip.tools/toolkit/relay/) and [`@toip-tools/web-vault`](https://toip.tools/toolkit/web-vault/).

### Run it

The organization, the source app, the journalist's inbox and the relay, each on its own localhost origin:

```bash
npm run tipline
```

Run the terminal demo:

```bash
npm run demo --workspace projects/tipline
```

The demo in a real browser, checking the source leaves nothing behind:

```bash
npm run e2e --workspace projects/tipline
```

Read Tipline's [README](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/tipline/README.md) and [design](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/tipline/docs/design.md), or browse [its source](https://github.com/yourbuddyconner/toip-tools/tree/main/projects/tipline).

## Agora Working

Anonymous forums with verified membership. A forum can require a nursing license to post, or district residency to vote, without asking members to reveal their identity. Each membership has one pseudonym per forum; the membership proofs keep those pseudonyms from being linked across forums.

### What it shows

- Credential-gated anonymity with attribute predicates.
- One vote per person with secret ballots.
- A signed, append-only feed the host can't quietly rewrite.

Built on [`@toip-tools/anon-membership`](https://toip.tools/toolkit/anon-membership/), [`@toip-tools/eventlog`](https://toip.tools/toolkit/eventlog/), [`@toip-tools/trust-core`](https://toip.tools/toolkit/trust-core/), [`@toip-tools/relay`](https://toip.tools/toolkit/relay/) and [`@toip-tools/web-vault`](https://toip.tools/toolkit/web-vault/).

### Run it

Issuers, the forum host and the web app on http://localhost:4320:

```bash
npm run agora
```

Run the twelve-step terminal demo:

```bash
npm run demo --workspace projects/agora
```

Members, a non-member and a reader, in a real browser:

```bash
npm run e2e --workspace projects/agora
```

Read Agora's [README](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/agora/README.md) and [design](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/agora/docs/design.md), or browse [its source](https://github.com/yourbuddyconner/toip-tools/tree/main/projects/agora).

## Agents Working

AI agents with identities, spending limits, and accountable actions. A person or company gives an agent a revocable mandate. As it hires people and other agents through Settle, a guard checks every payment and message against that mandate chain. A signed audit trail lets the principal review what happened.

### What it shows

- Delegation that only narrows, checked by both the agent's guard and its counterparties.
- Escalation to a human for one exact action.
- Audit trails an agent can't quietly rewrite.

Built on [`@toip-tools/mandates`](https://toip.tools/toolkit/mandates/), [`@toip-tools/eventlog`](https://toip.tools/toolkit/eventlog/), [`@toip-tools/trust-core`](https://toip.tools/toolkit/trust-core/) and [`@toip-tools/relay`](https://toip.tools/toolkit/relay/).

### Run it

The principal's console and the courier's view on http://localhost:4330:

```bash
npm run agents
```

Run the terminal demo with scripted models:

```bash
npm run demo --workspace projects/agents
```

Run with Claude; requires ANTHROPIC\_API\_KEY:

```bash
npm run demo --workspace projects/agents -- --live
```

Read Agents's [README](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/agents/README.md) and [design](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/agents/docs/design.md), or browse [its source](https://github.com/yourbuddyconner/toip-tools/tree/main/projects/agents).

## Trail Working

Verifiable audit trails for agents, devices, and services. A local network of witnesses and watchers makes log tampering visible in a web explorer. The demo walks through forged edits, conflicting histories, dishonest witnesses, and recovery from a stolen key.

### What it shows

- KERI key event logs with pre-rotation and witnesses, verified by KERIpy.
- Duplicity detection by watchers.

Built on [`@toip-tools/eventlog`](https://toip.tools/toolkit/eventlog/) and [`@toip-tools/trust-core`](https://toip.tools/toolkit/trust-core/).

### Run it

Four witnesses, two watchers and the explorer on http://localhost:4340:

```bash
npm run trail
```

Run the terminal demo, including tampering and recovery:

```bash
npm run demo --workspace projects/trail
```

The explorer through all ten steps in a real browser:

```bash
npm run e2e --workspace projects/trail
```

Read Trail's [README](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/trail/README.md) and [design](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/trail/docs/design.md), or browse [its source](https://github.com/yourbuddyconner/toip-tools/tree/main/projects/trail).

## Capture Working

Verifiable origins for photos and sensor readings. Devices sign captures with their own keys, and edits extend a signed history. A browser verifier checks the device, the capture's time interval, and which image tiles remain unchanged after redaction.

### What it shows

- Non-exportable WebCrypto device keys, protected by passkeys or passphrases.
- Owner-to-device mandates.
- Key histories that keep old captures verifiable after a rotation.

Built on [`@toip-tools/cose`](https://toip.tools/toolkit/cose/), [`@toip-tools/eventlog`](https://toip.tools/toolkit/eventlog/), [`@toip-tools/mandates`](https://toip.tools/toolkit/mandates/), [`@toip-tools/web-vault`](https://toip.tools/toolkit/web-vault/) and [`@toip-tools/mesh-transport`](https://toip.tools/toolkit/mesh-transport/).

### Run it

The camera, editor, verifier and sensor dashboard on http://localhost:4350, with witnesses and simulated sensors:

```bash
npm run capture
```

One more sensor, sending signed readings over the simulated LoRa radio:

```bash
npm run sensor --workspace projects/capture
```

Capture, a blur edit and verification in a real browser with a fake camera:

```bash
npm run e2e --workspace projects/capture
```

Read Capture's [README](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/capture/README.md) and [design](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/capture/docs/design.md), or browse [its source](https://github.com/yourbuddyconner/toip-tools/tree/main/projects/capture).

## Mesh Working

Trust Tasks beyond an internet connection. Three simulator demos verify a door pass offline, forward a Settle attestation through a radio gateway, and deliver a sealed bundle by hand. A visualizer shows the frames, retries, and airtime. Real-radio bring-up and Bluetooth LE remain future work.

### What it shows

- Compact Trust Tasks with every proof intact.
- Random-looking address tags instead of DIDs on the air.
- Gateways that hand exact TSP bytes to the relay.

Built on [`@toip-tools/mesh-transport`](https://toip.tools/toolkit/mesh-transport/), [`@toip-tools/cose`](https://toip.tools/toolkit/cose/) and [`@toip-tools/trust-core`](https://toip.tools/toolkit/trust-core/).

### Run it

The radio visualizer on http://localhost:4360: a field map, frames in flight, airtime meters:

```bash
npm run mesh
```

Run all three demos on the simulated radio:

```bash
npm run demo --workspace projects/mesh
```

Checks a LoRa gateway or RAK3172 is talking to you (see HARDWARE.md):

```bash
npm run mesh --workspace projects/mesh -- doctor
```

Read Mesh's [README](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/mesh/README.md) and [design](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/mesh/docs/design.md), or browse [its source](https://github.com/yourbuddyconner/toip-tools/tree/main/projects/mesh).

## Commons Design only

Everyday tools for an apartment building and its households. The design brings guest passes, shared expenses, maintenance requests, votes, and noticeboards under one identity per person. The building and its households form nested communities with their own roles.

### What it shows

- Nested communities and roles.
- Many small apps sharing one identity and one trust core.

Built on [`@toip-tools/trust-core`](https://toip.tools/toolkit/trust-core/) and [`@toip-tools/relay`](https://toip.tools/toolkit/relay/).

### Build status

The design is ready for an implementation. Read it below, or [help build it](https://toip.tools/get-involved/#propose).

Read Commons's [README](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/commons/README.md) and [design](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/commons/docs/design.md), or browse [its source](https://github.com/yourbuddyconner/toip-tools/tree/main/projects/commons).

## Community Rides Design only

A proposal for ride sharing within a local community. The community vouches for its members, and riders and drivers verify those claims directly. Built around the OpenVTC libraries and applicable registry specifications, the design traces what each party learns at every step.

### What it shows

- Registry Trust Tasks alongside your own.
- What each party learns, step by step.

Designed using the [OpenVTC](https://github.com/OpenVTC) TypeScript libraries directly.

### Build status

The design is ready for an implementation. Read it below, or [help build it](https://toip.tools/get-involved/#propose).

Read Community Rides's [README](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/community-rides/README.md) and [design](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/community-rides/docs/design.md), or browse [its source](https://github.com/yourbuddyconner/toip-tools/tree/main/projects/community-rides).

---

This is the Markdown version of https://toip.tools/examples/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
