Skip to content

NUT-XX: add quote offers - #409

Closed
zeugmaster wants to merge 1 commit into
cashubtc:mainfrom
zeugmaster:quote-offers
Closed

NUT-XX: add quote offers#409
zeugmaster wants to merge 1 commit into
cashubtc:mainfrom
zeugmaster:quote-offers

Conversation

@zeugmaster

@zeugmaster zeugmaster commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

NUT-XX: Quote Offers

This adds a standardised format for quote offers: a shareable string
(cquoteA..., CBOR + base64_urlsafe like NUT-18) with which an operator hands
a wallet a prepared mint or melt operation — e.g. a cash deposit or withdrawal
at a counter, prepared by an operator connected to the mint through a payment
processor. This complements custom payment methods (#382), where an operation is
often initiated by a counterparty rather than by the wallet.

Motivation

Displaying an existing quote (e.g. as a QR code) would be unsafe: NUT-04
requires quote ids to remain secret between user and mint, and anyone who scans
the code could front-run the mint operation.

How it works

A quote offer contains no quote at all. It encodes the mint URL, operation,
method, unit, amount, and a single-use ticket. The wallet claims the offer
by creating the quote itself via the regular NUT-04/NUT-05 endpoints,
referencing the ticket; first claim wins. No new endpoints are required.

  • Mint offers must be claimed with a NUT-20 lock, so every quote is born
    locked to its owner's key. An attacker who scans the offer first can only
    create a quote locked to their own key; the payer's claim then fails visibly
    and the operator voids the ticket — theft degrades to denial of service.
  • Melt offers are always asynchronous. The quote id is generated by the
    wallet's own request and never displayed, so it doubles as proof of who
    initiated the payment before a payout is handed over.

Also adds error codes 20010 and 20011 for unknown/expired and
already-claimed tickets.

Implementations

  • CDK
  • cashu-ts
  • CashuSwift / macadamia

@github-project-automation github-project-automation Bot moved this to Backlog in nuts Jul 21, 2026
@zeugmaster
zeugmaster marked this pull request as ready for review July 28, 2026 12:53
@zeugmaster zeugmaster closed this Jul 29, 2026
@github-project-automation github-project-automation Bot moved this from Backlog to Done in nuts Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant