diff --git a/19.md b/19.md new file mode 100644 index 00000000..01c6db01 --- /dev/null +++ b/19.md @@ -0,0 +1,182 @@ +# NUT-19: Signature on Mint Quote + +`optional` + +This NUT defines a protocol extension that enables signature-based authentication for mint quote redemption. When requesting a mint quote, clients can provide a public key. The mint will then require a valid signature from the corresponding secret key before processing the mint. +Caution: If the mint does not support this NUT, anyone with the mint quote id will be able to mint even without providing a signature. + +# Mint quote + +To request a mint quote, the wallet of `Alice` makes a `POST /v1/mint/quote/{method}` request where `method` is the payment method requested (here `bolt11`). + +```http +POST https://mint.host:3338/v1/mint/quote/bolt11 +``` + +The wallet of `Alice` includes the following `PostMintQuoteBolt11Request` data in its request: + +```json +{ + "amount": , + "unit": , + "description": , + "pubkey": <-- New +} +``` + +with the requested `amount` and the `unit`. An optional `description` can be passed if the mint signals support for it in `MintMethodSetting`. `pubkey` is the public key that will be required for signature verification during the minting process. The mint will only mint ecash after receiving a valid signature from the corresponding private key in the `PostMintRequest`. + +> **Privacy:** To prevent linking multiple mint quotes together, wallets **SHOULD** generate a unique public key for each mint quote request + +The mint `Bob` then responds with a `PostMintQuoteBolt11Response`: + +```json +{ + "quote": , + "request": , + "state": , + "expiry": , + "pubkey": <-- New +} +``` + +Where `quote` is the quote ID and `request` is the payment request to fulfill. `expiry` is the Unix timestamp until which the mint quote is valid. +`state` is an enum string field with possible values `"UNPAID"`, `"PAID"`, `"ISSUED"`: + +- `"UNPAID"` means that the quote's request has not been paid yet. +- `"PAID"` means that the request has been paid. +- `"ISSUED"` means that the quote has already been issued. + +## Example + +Request of `Alice` with curl: + +```bash +curl -X POST http://localhost:3338/v1/mint/quote/bolt11 -d '{"amount": 10, "unit": "sat", "pubkey": "03d56ce4e446a85bbdaa547b4ec2b073d40ff802831352b8272b7dd7a4de5a7cac"}' -H "Content-Type: application/json" +``` + +Response of `Bob`: + +```json +{ + "quote": "9d745270-1405-46de-b5c5-e2762b4f5e00", + "request": "lnbc100n1pj4apw9...", + "state": "UNPAID", + "expiry": 1701704757, + "pubkey": "03d56ce4e446a85bbdaa547b4ec2b073d40ff802831352b8272b7dd7a4de5a7cac" +} +``` + +#### Message aggregation + +To provide a signature for a mint request, the owner of one of the signing public keys must concatenate the `PostMintQuoteBolt11Response.quote` and the `B_` fields of all `BlindedMessages` (outputs, see [NUT-00][00]) to a single message string in the order they appear in the `PostMintRequest`. This string concatenated is then hashed and signed (see [Signature scheme](#signature-scheme)). + +If a request has `n` outputs the message to sign becomes: + +``` +msg = quote_id || B_0 || ... || B_n +``` + +Where || denotes concatenation, `quote_id` is a UTF-8 string, and each `B_` is a hex string, with all components encoded to UTF-8 bytes + +#### Signature scheme + +To mint a quote where a public key was provided, the minter needs to include signatures in the `PostMintBolt11Request`. We use a [BIP340](https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki) signature on the SHA-256 hash of the message to sign as defined above. + +# Minting tokens + +After requesting a mint quote and paying the request, the wallet proceeds with minting new tokens by calling the `POST /v1/mint/{method}` endpoint where `method` is the payment method requested (here `bolt11`). + +```http +POST https://mint.host:3338/v1/mint/bolt11 +``` + +The wallet `Alice` includes the following `PostMintBolt11Request` data in its request + +```json +{ + "quote": , + "outputs": , + "witness": <-- New +} +``` + +with the `quote` being the quote ID from the previous step and `outputs` being `BlindedMessages` (see [NUT-00][00]) that the wallet requests signatures on whose sum is `amount` as requested in the quote. `witness` is the signature on the mint quote id as defined above. +The mint `Bob` then responds with a `PostMintBolt11Response`: + +```json +{ + "signatures": +} +``` + +where `signatures` is an array of blind signatures on the outputs. + +## Example + +Request of `Alice` with curl: + +```bash +curl -X POST https://mint.host:3338/v1/mint/bolt11 -H "Content-Type: application/json" -d \ +'{ + "quote": "9d745270-1405-46de-b5c5-e2762b4f5e00", + "outputs": [ + { + "amount": 8, + "id": "009a1f293253e41e", + "B_": "035015e6d7ade60ba8426cefaf1832bbd27257636e44a76b922d78e79b47cb689d" + }, + { + "amount": 2, + "id": "009a1f293253e41e", + "B_": "0288d7649652d0a83fc9c966c969fb217f15904431e61a44b14999fabc1b5d9ac6" + } + ], + "witness": "d9be080b33179387e504bb6991ea41ae0dd715e28b01ce9f63d57198a095bccc776874914288e6989e97ac9d255ac667c205fa8d90a211184b417b4ffdd24092" + +}' +``` + +Response of `Bob`: + +```json +{ + "signatures": [ + { + "id": "009a1f293253e41e", + "amount": 2, + "C_": "0224f1c4c564230ad3d96c5033efdc425582397a5a7691d600202732edc6d4b1ec" + }, + { + "id": "009a1f293253e41e", + "amount": 8, + "C_": "0277d1de806ed177007e5b94a8139343b6382e472c752a74e99949d511f7194f6c" + } + ] +} +``` + +If the invoice was not paid yet, `Bob` responds with an error. In that case, `Alice` **MAY** repeat the same request until the Lightning invoice is settled, as in NUT04. If `Alice` does not include a witness on the `PostMintBolt11Request` but did include a `pubkey` in the `PostMintBolt11QuoteRequest` then `Bob` **MUST** respond with an error, `Alice` **SHOULD** repeat the request with a witness in order to mint the ecash. + +## Settings + +The settings for this NUT indicate the support for requiring a signature before minting. They are part of the info response of the mint ([NUT-06][06]) which in this case reads + +```json +{ + "19": { + "supported": , + "required": + } +} +``` + +In addition to signaling optional support, the mint can require a public key for mint quotes and a corresponding witness during minting. If `required` is set to `true` in the NUT-19 settings: + +1. The wallet **MUST** provide a public key when requesting a mint quote +2. The wallet **MUST** provide a valid witness signature when submitting the mint request + +> **Note:** Enabling this setting makes the mint incompatible with wallets that do not support NUT-19 + +[00]: 00.md +[06]: 06.md diff --git a/22.md b/22.md new file mode 100644 index 00000000..1b5e29d8 --- /dev/null +++ b/22.md @@ -0,0 +1,231 @@ +NUT-22: Mint tokens Bitcoin On-Chain +========================== + +`optional` + +`depends on: [NUT-19][19]` +--- + +This NUT describes the process of minting tokens on Bitcoin On-Chain analog to [NUT-04][04] for Bitcoin Lightning. + +# Mint quote + +To request a mint quote, the wallet of `Alice` makes a `POST /v1/mint/quote/{method}` request where `method` is the payment method requested (here `btconchain`). + +```http +POST https://mint.host:3338/v1/mint/quote/btconchain +``` + +The wallet of `Alice` includes the following `PostMintQuoteBtcOnchainRequest` data in its request: + +```json +{ + "amount": , + "unit": , + "pubkey": +} +``` + with the requested `amount` and the `unit`. + + The mint `Bob` then responds with a `PostMintQuoteBtcOnchainResponse`: + +```json +{ + "quote": , + "address": , + "expiry": , + "unconfirmed_amount", , + "amount_paid": , + "amount_issued": , + "pubkey": +} +``` + + +Where `quote` is the quote ID and `request` is the bitcoin onchain address. `expiry` is the Unix timestamp until which the mint quote is valid. `unconfirmed_amount` is the value of UTXOs in sats that has not met the minimum confirmations set in the info endpoint. `amount_paid` is the amount that has been paid to the mint via the onchain address. `amount_issued` is the amount of ecash that has been issued for the given mint quote. `amount_paid` - `amount_issued` represents the amount of ecash a wallet can still mint. + +**Note**: Any UTXOs with a value less than the `min_amount` in the info response will not be added to the `amount_paid` value and will be considered dust. Ecash cannot be minted for these UTXOs. + +## Example + +Request of `Alice` with curl: + +```bash +curl -X POST https://mint.host:3338/v1/mint/quote/btconchain -d '{"amount": 10, "unit": "sat", "pubkey": "03d56ce4e446a85bbdaa547b4ec2b073d40ff802831352b8272b7dd7a4de5a7cac"}' -H "Content-Type: application/json" +``` + +Response of `Bob`: + +```json +{ + "quote": "DSGLX9kevM...", + "request": "bc1q...", + "expiry": 1701704757, + "amount_paid": 0, + "amount_issued": 0, + "pubkey": "03d56ce4e446a85bbdaa547b4ec2b073d40ff802831352b8272b7dd7a4de5a7cac" +} +``` + +The wallet **MUST** store the `quote` id in the response in its database so it can later request the tokens after paying the request. After payment, the wallet continues with the next section. + +## Check mint quote state + +To check whether a mint quote has been paid, `Alice` makes a `GET /v1/mint/quote/btconchain/{quote_id}`. + +```http +GET https://mint.host:3338/v1/mint/quote/btconchain/{quote_id} +``` + +Like before, the mint `Bob` responds with a `PostMintQuoteBtcOnchainResponse`. + +Example request of `Alice` with curl: + +```bash +curl -X GET https://mint.host:3338/v1/mint/quote/btconchain/DSGLX9kevM... +``` + +Response of `Bob`: + +```json +{ + "quote": "DSGLX9kevM...", + "request": "bc1q...", + "expiry": 1701704757, + "amount_paid": 0, + "amount_issued": 0, + "pubkey": "03d56ce4e446a85bbdaa547b4ec2b073d40ff802831352b8272b7dd7a4de5a7cac" +} +``` + +### Witness + +In order to mint ecash the wallet **MUST** include a signature as defined in [NUT-19][19]. + +# Minting tokens + +After requesting a mint quote and paying the request, the wallet proceeds with minting new tokens by calling the `POST /v1/mint/{method}` endpoint where `method` is the payment method requested (here `btconchain`). + +```http +POST https://mint.host:3338/v1/mint/btconchain +``` + +The wallet `Alice` includes the following `PostMintBtcOnchainRequest` data in its request + +```json +{ + "quote": , + "outputs": , + "witness": +} +``` + +The `quote` is the quote ID from the previous step and `outputs` are `BlindedMessages` (see [NUT-00][00]) that the wallet requests signatures on. The sum of the outputs must equal the amount that can be minted (`amount_paid` - `amount_issued`). `witness` is the signature on the mint quote id as defined above. + + The mint `Bob` then responds with a `PostMintBtcOnchainResponse`: + +```json +{ + "signatures": +} +``` + +where `signatures` is an array of blind signatures on the outputs. + +## Example + +Request of `Alice` with curl: + +```bash +curl -X POST https://mint.host:3338/v1/mint/btconchain -H "Content-Type: application/json" -d \ +'{ + "quote": "DSGLX9kevM...", + "outputs": [ + { + "amount": 8, + "id": "009a1f293253e41e", + "B_": "035015e6d7ade60ba8426cefaf1832bbd27257636e44a76b922d78e79b47cb689d" + }, + { + "amount": 2, + "id": "009a1f293253e41e", + "B_": "0288d7649652d0a83fc9c966c969fb217f15904431e61a44b14999fabc1b5d9ac6" + } + ], + "witness": "d4b386f21f7aa7172f0994ee6e4dd966539484247ea71c99b81b8e09b1bb2acbc0026a43c221fd773471dc30d6a32b04692e6837ddaccf0830a63128308e4ee0" +}' +``` + +Response of `Bob`: + +```json +{ + "signatures": [ + { + "id": "009a1f293253e41e", + "amount": 2, + "C_": "0224f1c4c564230ad3d96c5033efdc425582397a5a7691d600202732edc6d4b1ec" + }, + { + "id": "009a1f293253e41e", + "amount": 8, + "C_": "0277d1de806ed177007e5b94a8139343b6382e472c752a74e99949d511f7194f6c" + } + ] +} +``` + +## Unblinding signatures + +Upon receiving the `BlindSignatures` from the mint `Bob`, the wallet of `Alice` unblinds them to generate `Proofs` (using the blinding factor `r` and the mint's public key `K`, see BDHKE [NUT-00][00]). The wallet then stores these `Proofs` in its database: + +```json +[ + { + "id": "009a1f293253e41e", + "amount": 2, + "secret": "407915bc212be61a77e3e6d2aeb4c727980bda51cd06a6afc29e2861768a7837", + "C": "02bc9097997d81afb2cc7346b5e4345a9346bd2a506eb7958598a72f0cf85163ea" + }, + { + "id": "009a1f293253e41e", + "amount": 8, + "secret": "fe15109314e61d7756b0f8ee0f23a624acaa3f4e042f61433c728c7057b931be", + "C": "029e8e5050b890a7d6c0968db16bc1d5d5fa040ea1de284f6ec69d61299f671059" + } +] +``` + +## Settings +The settings for this nut indicate the supported method-unit pairs for minting and whether minting is supported or not. They are part of the info response of the mint ([NUT-06][06]) which in this case reads +```json +{ + "22": { + "methods": [ + { + "method": "btconchain", + "unit": "sat", + "min_amount": 10000, + "max_amount": 1000000, + "min_confirmations": 3 + } + ], + "disabled": false, + } +} +``` + +[00]: 00.md +[01]: 01.md +[02]: 02.md +[03]: 03.md +[04]: 04.md +[05]: 05.md +[06]: 06.md +[07]: 07.md +[08]: 08.md +[09]: 09.md +[10]: 10.md +[11]: 11.md +[12]: 12.md +[19]: 19.md diff --git a/23.md b/23.md new file mode 100644 index 00000000..17bd1b14 --- /dev/null +++ b/23.md @@ -0,0 +1,212 @@ +NUT-23: Melt tokens Bitcoin On-Chain +========================== + +`optional` + +--- + +This NUT describes the process of melting tokens on Bitcoin On-Chain analog to NUT-05 for Bitcoin Lightning. + +# Melt quote + +To request a melt quote, the wallet of `Alice` makes a `POST /v1/melt/quote/{method}` request where `method` is the payment method requested (here `btconchain`). + +```http +POST https://mint.host:3338/v1/melt/quote/btconchain +``` + +The wallet `Alice` includes the following `PostMeltQuoteBtcOnchainRequest` data in its request: + +```json +{ + "amount": , + "address": , + "unit": +} +``` + +Here, `address` is the Bitcoin on chain address to be paid and `unit` is the unit the wallet would like to pay with. + +The mint `Bob` then responds with an array of `PostMeltQuoteBtcOnchainResponse`: + + +```json +[ + { + "quote": , + "amount": , + "fee": , + "estimated_blocks": , + "state": , + "expiry": + } +] +``` +The mint can return multiple `PostMeltQuoteBtcOnchainResponse` with different `fees` and `expiry` dates. The wallet can choose which one to pay and the other ones will expire. Where `quote` is the quote ID, `amount` the amount that needs to be provided, and `fee` the additional fee that is required in the unit of the `PostMeltQuoteBtcOnchainRequest`. `estimated_blocks` is the number of blocks estimated untill confimation. The mint expects `Alice` to include `Proofs` of *at least* `total_amount = amount + fee`. `expiry` is the Unix timestamp until which the melt quote is valid. + + +`state` is an enum string field with possible values `"UNPAID"`, `"PENDING"`, `"PAID"`: + +- `"UNPAID"` means that the request has not been paid yet. +- `"PENDING"` means that the request is currently being paid. +- `"PAID"` means that the request has been paid successfully. + + + +## Example + +Request of `Alice` with curl: + +```bash +curl -X POST https://mint.host:3338/v1/melt/quote/btconchain -d \ +{ + "address": "bc1qkyfgd7mus7ykfd7qkwakq75qsf7rtm...", + "unit": "sat" + "amount": 100000 +} +``` + +Response of `Bob`: + +```json +[ + { + "quote": "TRmjduhIsPxd...", + "description": "1 sat per vbyte", + "amount": 10, + "fee": 3000, + "estimated_blocks": 1, + "state": "UNPAID", + "expiry": 1701704757 + }, + { + "quote": "OewtRaqe...", + "description": "5 sat per vbyte", + "amount": 10, + "fee": 300, + "estimated_blocks": 50, + "state": "UNPAID", + "expiry": 1701704757 + } +] +``` + +## Check melt quote state + +To check whether a melt quote has been paid, `Alice` makes a `GET /v1/melt/quote/btconchain/{quote_id}`. + +```http +GET https://mint.host:3338/v1/melt/quote/btconchain/{quote_id} +``` + +Like before, the mint `Bob` responds with a `PostMeltQuoteBtcOnchainResponse`. + +Example request of `Alice` with curl: + +```bash +curl -X GET https://mint.host:3338/v1/melt/quote/btconchain/TRmjduhIsPxd... +``` + +# Melting tokens + +Now that `Alice` knows what the total amount is (`amount + fee`) in her requested `unit`, she can proceed for melting tokens for which a payment will be executed by the mint. She calls the `POST /v1/melt/{method}` endpoint where `method` is the payment method requested (here `btconchain`). + +```http +POST https://mint.host:3338/v1/melt/btconchain +``` + +The wallet of `Alice` includes the following `PostMeltBtcOnchainRequest` data in its request + +```json +{ + "quote": , + "inputs": +} +``` + +Here, `quote` is the melt quote ID to be paid and `inputs` are the proofs with a total amount of at least `amount + fee` (see previous melt quote response). + +The mint `Bob` then responds with a `PostMeltBtcOnchainResponse`: + +```json +{ + "state": , + "txid": +} +``` + +`txid` is the Bitcoin on chain transaction id of the transmitted transaction. + +`state` is an enum string field with possible values `"UNPAID"`, `"PENDING"`, `"PAID"`: +- `"UNPAID"` means that the request has not been paid yet. +- `"PENDING"` means that the request is currently being paid. +- `"PAID"` means that the request has been paid successfully. + +If `state==PAID`, `Alice`'s wallet can delete the `inputs` from her database (or move them to a history). If `paid==PENDING`, `Alice` can repeat the same request again until the payment is successful. + +## Example + +Request of `Alice` with curl: + +```bash +curl -X POST https://mint.host:3338/v1/melt/btconchain -d \ +'{ + "quote": "od4CN5smMMS3K3QVHkbGGNCTxfcAIyIXeq8IrfhP", + "inputs": [ + { + "amount": 4, + "id": "009a1f293253e41e", + "secret": "429700b812a58436be2629af8731a31a37fce54dbf8cbbe90b3f8553179d23f5", + "C": "03b01869f528337e161a6768b480fcf9f75fd248b649c382f5e352489fd84fd011", + }, + { + "amount": 8, + "id": "009a1f293253e41e", + "secret": "4f3155acef6481108fcf354f6d06e504ce8b441e617d30c88924991298cdbcad", + "C": "0278ab1c1af35487a5ea903b693e96447b2034d0fd6bac529e753097743bf73ca9", + } + ] +}' +``` + +Response of `Bob`: + +```json +{ + "state": "PENDING", + "txid": "61470d1816e107165e08eb12a8526e7f6da9f6432fbb9da9f50fd0feb290a584" +} +``` + + +# Settings +The settings for this nut indicate the supported method-unit pairs for melting. They are part of the info response of the mint ([NUT-06][06]) which in this case reads +```json +{ + "23": { + "methods": [ + { + "method": "btconchain", + "unit": "sat", + "min_amount": 1000, + "max_amount": 1000000 + } + ] + "disabled": false, + } +} +``` + +[00]: 00.md +[01]: 01.md +[02]: 02.md +[03]: 03.md +[04]: 04.md +[05]: 05.md +[06]: 06.md +[07]: 07.md +[08]: 08.md +[09]: 09.md +[10]: 10.md +[11]: 11.md +[12]: 12.md diff --git a/README.md b/README.md index b63ab38d..254e8d55 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,9 @@ Wallets and mints `MUST` implement all mandatory specs and `CAN` implement optio | [16][16] | Animated QR codes | [Cashu.me][cashume] | - | | [17][17] | WebSocket subscriptions | [Nutshell][py] | [Nutshell][py] | | [18][18] | Payment requests | [Cashu.me][cashume], [Boardwalk][bwc], [cdk-cli] | - | - +| [22][22] | Minting onchain | | | +| [23][23] | Melting onchain | | | + #### Wallets: - [Nutshell][py] diff --git a/error_codes.md b/error_codes.md index f3403309..d746e015 100644 --- a/error_codes.md +++ b/error_codes.md @@ -16,6 +16,8 @@ | 20005 | Quote is pending | [NUT-04][04], [NUT-05][05] | | 20006 | Invoice already paid | [NUT-05][05] | | 20007 | Quote is expired | [NUT-04][04], [NUT-05][05] | +| 20008 | Witness on mint request not provided or invalid | [NUT-19][19] | +| 20009 | Pubkey required on mint quote | [NUT-19][19] | [00]: 00.md [01]: 01.md @@ -30,3 +32,4 @@ [10]: 10.md [11]: 11.md [12]: 12.md +[19]: 19.md diff --git a/tests/19-tests.md b/tests/19-tests.md new file mode 100644 index 00000000..7acffc13 --- /dev/null +++ b/tests/19-tests.md @@ -0,0 +1,79 @@ +# NUT-19 Test Vectors + +The following is a `PostMintBolt11Request` with a valid signature. Where the `pubkey` in the `PostMintQuoteBolt11Request` is `03d56ce4e446a85bbdaa547b4ec2b073d40ff802831352b8272b7dd7a4de5a7cac`. + +```json +{ + "quote": "9d745270-1405-46de-b5c5-e2762b4f5e00", + "outputs": [ + { + "amount": 1, + "id": "00456a94ab4e1c46", + "B_": "0342e5bcc77f5b2a3c2afb40bb591a1e27da83cddc968abdc0ec4904201a201834" + }, + { + "amount": 1, + "id": "00456a94ab4e1c46", + "B_": "032fd3c4dc49a2844a89998d5e9d5b0f0b00dde9310063acb8a92e2fdafa4126d4" + }, + { + "amount": 1, + "id": "00456a94ab4e1c46", + "B_": "033b6fde50b6a0dfe61ad148fff167ad9cf8308ded5f6f6b2fe000a036c464c311" + }, + { + "amount": 1, + "id": "00456a94ab4e1c46", + "B_": "02be5a55f03e5c0aaea77595d574bce92c6d57a2a0fb2b5955c0b87e4520e06b53" + }, + { + "amount": 1, + "id": "00456a94ab4e1c46", + "B_": "02209fc2873f28521cbdde7f7b3bb1521002463f5979686fd156f23fe6a8aa2b79" + } + ], + "witness": "d4b386f21f7aa7172f0994ee6e4dd966539484247ea71c99b81b8e09b1bb2acbc0026a43c221fd773471dc30d6a32b04692e6837ddaccf0830a63128308e4ee0" +} +``` + +The following is the expected message to sign on the above `PostMintBolt11Request`. + +``` +[57, 100, 55, 52, 53, 50, 55, 48, 45, 49, 52, 48, 53, 45, 52, 54, 100, 101, 45, 98, 53, 99, 53, 45, 101, 50, 55, 54, 50, 98, 52, 102, 53, 101, 48, 48, 48, 51, 52, 50, 101, 53, 98, 99, 99, 55, 55, 102, 53, 98, 50, 97, 51, 99, 50, 97, 102, 98, 52, 48, 98, 98, 53, 57, 49, 97, 49, 101, 50, 55, 100, 97, 56, 51, 99, 100, 100, 99, 57, 54, 56, 97, 98, 100, 99, 48, 101, 99, 52, 57, 48, 52, 50, 48, 49, 97, 50, 48, 49, 56, 51, 52, 48, 51, 50, 102, 100, 51, 99, 52, 100, 99, 52, 57, 97, 50, 56, 52, 52, 97, 56, 57, 57, 57, 56, 100, 53, 101, 57, 100, 53, 98, 48, 102, 48, 98, 48, 48, 100, 100, 101, 57, 51, 49, 48, 48, 54, 51, 97, 99, 98, 56, 97, 57, 50, 101, 50, 102, 100, 97, 102, 97, 52, 49, 50, 54, 100, 52, 48, 51, 51, 98, 54, 102, 100, 101, 53, 48, 98, 54, 97, 48, 100, 102, 101, 54, 49, 97, 100, 49, 52, 56, 102, 102, 102, 49, 54, 55, 97, 100, 57, 99, 102, 56, 51, 48, 56, 100, 101, 100, 53, 102, 54, 102, 54, 98, 50, 102, 101, 48, 48, 48, 97, 48, 51, 54, 99, 52, 54, 52, 99, 51, 49, 49, 48, 50, 98, 101, 53, 97, 53, 53, 102, 48, 51, 101, 53, 99, 48, 97, 97, 101, 97, 55, 55, 53, 57, 53, 100, 53, 55, 52, 98, 99, 101, 57, 50, 99, 54, 100, 53, 55, 97, 50, 97, 48, 102, 98, 50, 98, 53, 57, 53, 53, 99, 48, 98, 56, 55, 101, 52, 53, 50, 48, 101, 48, 54, 98, 53, 51, 48, 50, 50, 48, 57, 102, 99, 50, 56, 55, 51, 102, 50, 56, 53, 50, 49, 99, 98, 100, 100, 101, 55, 102, 55, 98, 51, 98, 98, 49, 53, 50, 49, 48, 48, 50, 52, 54, 51, 102, 53, 57, 55, 57, 54, 56, 54, 102, 100, 49, 53, 54, 102, 50, 51, 102, 101, 54, 97, 56, 97, 97, 50, 98, 55, 57] +``` + +The following is a `PostMintBolt11Request` with an invalid signature. Where the `pubkey` in the `PostMintQuoteBolt11Request` is `03d56ce4e446a85bbdaa547b4ec2b073d40ff802831352b8272b7dd7a4de5a7cac`. + +```json +{ + "quote": "9d745270-1405-46de-b5c5-e2762b4f5e00", + "outputs": [ + { + "amount": 1, + "id": "00456a94ab4e1c46", + "B_": "0342e5bcc77f5b2a3c2afb40bb591a1e27da83cddc968abdc0ec4904201a201834" + }, + { + "amount": 1, + "id": "00456a94ab4e1c46", + "B_": "032fd3c4dc49a2844a89998d5e9d5b0f0b00dde9310063acb8a92e2fdafa4126d4" + }, + { + "amount": 1, + "id": "00456a94ab4e1c46", + "B_": "033b6fde50b6a0dfe61ad148fff167ad9cf8308ded5f6f6b2fe000a036c464c311" + }, + { + "amount": 1, + "id": "00456a94ab4e1c46", + "B_": "02be5a55f03e5c0aaea77595d574bce92c6d57a2a0fb2b5955c0b87e4520e06b53" + }, + { + "amount": 1, + "id": "00456a94ab4e1c46", + "B_": "02209fc2873f28521cbdde7f7b3bb1521002463f5979686fd156f23fe6a8aa2b79" + } + ], + "witness": "cb2b8e7ea69362dfe2a07093f2bbc319226db33db2ef686c940b5ec976bcbfc78df0cd35b3e998adf437b09ee2c950bd66dfe9eb64abd706e43ebc7c669c36c3" +} +```