01
Trust the mint, not the user.
A peer message is coordination, not proof. Verified mint state and the spend witness decide whether a leg actually settled.
Wallet profile: …
01 / Public order book
Send an order
Your balance is checked before the signed order is published.
A peer-to-peer Cashu exchange
Granola is a decentralized exchange layer on top of Cashu. Nostr carries public orders and private coordination; Cashu settles atomic swaps between wallets and across mints.
02 / Wallet
03 / Private settlement
Granola connects Cashu wallets across mints. Nostr carries the market and private coordination. The protocol ensures no token gets lost and no additional party gets added.
04 / Custody
Your proofs live only in this browser profile’s IndexedDB. A backup contains spendable bearer tokens.
05 / Trace
Secrets, encoded tokens, and mint quote IDs stay out of this log.
For agents, too
Open developer tools and use window.granola. Read redacted state, publish orders, and advance swaps without exposing bearer material.
Protocol flow
Nostr carries the order and the private coordination. The same hash links both Cashu legs: one party reveals the preimage on the first mint, and the other uses it to claim the second leg.
Sequence diagram showing Alice publishing an order through Nostr, Carol creating a matching atomic swap, and both parties settling linked HTLCs through a Cashu mint.
sequenceDiagram
actor Alice
participant Nostr
actor Carol
participant Mint
Alice-->>Nostr: Generate new \n ephemeral PubKey
Alice->>Nostr: Publish Order
Nostr->>Carol: Fetches 8338 events \n Sees order
Carol-->>Nostr: Generate new \n ephemeral PubKey
Carol->>Alice: Sends DM \n with pay request \n via Nostr
Alice->>Carol: Generates H\n sends HTLC_c to PubKey
Carol-->>Mint: Verify HTLC_c
Carol->>Alice: Sends HTLC_a with the same H
Carol-->>Mint: Subscribe \n to HTLC_a
Alice->>Mint: Swaps HTLC_a token revealing preimage
Mint-->>Carol: State change with preimage
Carol->>Mint: Swaps HTLC_c token
What matters
01
A peer message is coordination, not proof. Verified mint state and the spend witness decide whether a leg actually settled.
02
Every reservation gets fresh Nostr, Cashu settlement, and refund keys. Granola scopes and stores them for the swap; you never manage a key ceremony.
03
Relays carry orders and encrypted coordination. Proofs, preimages, balances, and private keys stay out of public events.
04
One hash links both legs and bounded locktimes provide recovery. Safety still depends on participating mints enforcing the required Cashu capabilities.
05
Your wallet and session state run in the browser. Granola has no account, matching, or custody server; Nostr relays and Cashu mints are the external protocol infrastructure.
06
Only you and the mint custody your funds.