ReferenceCashu Protocol Cheat Sheet

Compressed reference for the Cashu core protocol (mandatory NUTs 00–06). Source of truth: cashubtc/nuts.

The three operations

OperationMeaningEndpoints
Mint (NUT-04)Pay the mint (Lightning) → receive ecashPOST /v1/mint/quote/bolt11
GET /v1/mint/quote/bolt11/{quote_id}
POST /v1/mint/bolt11
Swap (NUT-03)Old proofs in → new proofs out (receive / split / rotate)POST /v1/swap
Melt (NUT-05)Ecash in → mint pays a Lightning invoice for youPOST /v1/melt/quote/bolt11
GET /v1/melt/quote/bolt11/{quote_id}
POST /v1/melt/bolt11

Data models (NUT-00)

ModelDirectionJSON
BlindedMessage ("output")wallet → mint{"amount": 8, "id": "<keyset_id>", "B_": "<hex>"}
BlindSignature ("promise")mint → wallet{"amount": 8, "id": "<keyset_id>", "C_": "<hex>"}
Proof ("input") — this is the ecashstored in wallet; wallet → mint to spend{"amount": 8, "id": "<keyset_id>", "secret": "<string>", "C": "<hex>"}

BDHKE — blind signature scheme (NUT-00)

SymbolMeaningHeld by
k, K = kGMint's private key for one amount; published pubkeymint / public
xRandom secret string (the secret field)wallet
Y = hash_to_curve(x)Secret mapped to a curve pointderivable
rRandom blinding factorwallet only
B_ = Y + rGBlinded message sent to mintwallet → mint
C_ = kB_Blind signature returned by mintmint → wallet
C = C_ − rK = kYUnblinded signature (the C field)wallet

Mint verifies a spend by checking C == k·hash_to_curve(secret) and that secret is not in its spent list. The mint never saw x or C at issuance — only B_ and C_ — so it cannot link issuance to spend.

Keysets & fees (NUT-01/02)

Serialized tokens (NUT-00)

Quote lifecycle (debugging map)

FlowProgressNotes
Mint quoteunpaid → paid → issuedNUT-04 tracks amount_paid vs amount_issued; mintable = paid − issued. The quote id is a bearer secret — leak it and tokens can be stolen.
Melt quoteUNPAIDPENDINGPAIDPENDING = Lightning payment in flight; proofs are locked. Poll GET /v1/melt/quote/…. fee_reserve must be covered by inputs.