diff --git a/README.md b/README.md index 29dfc8f6..040195f7 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ Wallets and mints `MUST` implement all mandatory specs and `CAN` implement optio | [26][26] | Payment Request Bech32m Encoding | [cdk] | - | | [27][27] | Nostr Mint Backup | [Cashu.me][cashume], [cdk] | - | | [28][28] | Pay to Blinded Key (P2BK) | - | - | +| [XX][XX] | Get Locked Mint Quotes By Pubkey | - | - | #### Wallets: @@ -104,3 +105,4 @@ Wallets and mints `MUST` implement all mandatory specs and `CAN` implement optio [26]: 26.md [27]: 27.md [28]: 28.md +[XX]: xx.md diff --git a/xx.md b/xx.md new file mode 100644 index 00000000..2c223c48 --- /dev/null +++ b/xx.md @@ -0,0 +1,60 @@ +# NUT-29: Mint Quote Lookup by Public Key + +`optional` + +`depends on: NUT-04, NUT-20` + +--- + +This NUT adds an endpoint for wallets to get all NUT-20 locked mint quotes associated with a set of public keys. Queries require a valid signature from the owner of the corresponding private keys. + +## Request + +To query quotes assigned to a public key, the wallet makes a `POST /v1/mint/quote/{method}/pubkey` request. + +```http +POST https://mint.host:3338/v1/mint/quote/bolt11/pubkey +``` + +The wallet includes the following `PostMintQuotesByPubkeyRequest` data: + +```json +{ + "pubkeys": , + "pubkey_signatures": +} +``` + +- `pubkeys` is an array of hex-encoded compressed secp256k1 NUT-20 public keys (33 bytes each) +- `pubkey_signatures` is an array of hex-encoded Schnorr signatures on `pubkeys` in the same order (64 bytes each) + +The wallet **MUST** provide a valid signature in `pubkey_signatures` for each public key in `pubkeys` with the corresponding private key in the same order as the `pubkeys` array. The message to sign is the byte representation of the public key. + +## Response + +The mint responds with a `PostMintQuotesByPubkeyResponse`: + +```json +{ + "quotes": +} +``` + +Where `MintQuoteResponse` is the quote response type defined in [NUT-04][04]. + +## Settings + +The settings for this NUT are part of the mint info response ([NUT-06][06]): + +```json +{ + "29": { + "supported": + } +} +``` + +[04]: 04.md +[06]: 06.md +[20]: 20.md +[errors]: error_codes.md