diff --git a/04.md b/04.md index a38b1f47c..b0aa9a0d4 100644 --- a/04.md +++ b/04.md @@ -52,6 +52,7 @@ The mint `Bob` responds with a quote that includes some common fields for all me "quote": , // UUID v7 "request": , "unit": , + "method": , "amount_paid": , "amount_issued": , "updated_at": , @@ -64,6 +65,7 @@ Where: - `quote` is the quote ID in UUID v7 format - `request` is the payment request for the quote - `unit` corresponds to the value provided in the request +- `method` is the payment method of the quote - `amount_paid` is the total amount that has been paid to the mint for this quote, denominated in `unit` - `amount_issued` is the total amount of ecash that has been issued for this quote, denominated in `unit` - `updated_at` is a Unix timestamp integer indicating when the quote was last updated diff --git a/05.md b/05.md index 445ed1c75..1a404e35b 100644 --- a/05.md +++ b/05.md @@ -58,13 +58,14 @@ The mint `Bob` responds with a quote that includes some common fields for all me "quote": , // UUID v7 "amount": , "unit": , + "method": , "state": , "expiry": // Additional method-specific fields will be included } ``` -Where `quote` is the quote ID string in UUID v7 format with all 74 variable bits generated by a CSPRNG, `amount` and `unit` the amount and unit that need to be provided, and `expiry` is the Unix timestamp until which the melt quote is valid. +Where `quote` is the quote ID string in UUID v7 format with all 74 variable bits generated by a CSPRNG, `amount` and `unit` the amount and unit that need to be provided, `method` is the payment method of the quote, and `expiry` is the Unix timestamp until which the melt quote is valid. `state` is an enum string field with possible values `"UNPAID"`, `"PENDING"`, `"PAID"`: @@ -177,6 +178,7 @@ Content-Type: application/json "quote": "019e6d5a-2347-7000-89e2-35fe79f92c0e", "amount": 10, "unit": "sat", + "method": "bolt11", "state": "PENDING", "expiry": 1701704757 } diff --git a/23.md b/23.md index f7f28a5f5..64fea4634 100644 --- a/23.md +++ b/23.md @@ -28,6 +28,7 @@ The mint responds with a `PostMintQuoteBolt11Response`: "request": , // The bolt11 invoice to pay "amount": , "unit": , + "method": "bolt11", "amount_paid": , "amount_issued": , "updated_at": , @@ -64,6 +65,7 @@ Response: "request": "lnbc100n1pj4apw9...", "amount": 10, "unit": "sat", + "method": "bolt11", "amount_paid": 0, "amount_issued": 0, "updated_at": 1701704657, @@ -162,6 +164,7 @@ The mint responds with a `PostMeltQuoteBolt11Response`: "request": , "amount": , "unit": , + "method": "bolt11", "fee_reserve": , "state": , "expiry": , @@ -191,6 +194,7 @@ If the `outputs` field is included and there is excess from the `fee_reserve`, t "request": , "amount": , "unit": , + "method": "bolt11", "fee_reserve": , "state": , "expiry": , @@ -216,6 +220,7 @@ Melt quote response: "request": "lnbc100n1p3kdrv5sp5lpdxzghe5j67q...", "amount": 10, "unit": "sat", + "method": "bolt11", "fee_reserve": 2, "state": "UNPAID", "expiry": 1701704757 @@ -243,6 +248,7 @@ Successful melt response: "request": "lnbc100n1p3kdrv5sp5lpdxzghe5j67q...", "amount": 10, "unit": "sat", + "method": "bolt11", "fee_reserve": 2, "state": "PAID", "expiry": 1701704757, diff --git a/25.md b/25.md index 34a3f70e1..c447e3446 100644 --- a/25.md +++ b/25.md @@ -33,6 +33,7 @@ The mint responds with a `PostMintQuoteBolt12Response`: "request": , "amount": , "unit": , + "method": "bolt12", "expiry": , "pubkey": , "amount_paid": , @@ -68,6 +69,7 @@ curl -X POST http://localhost:3338/v1/mint/quote/bolt12 -d \ "request": "lno1qcp...", "amount": 10, "unit": "sat", + "method": "bolt12", "expiry": 1701704757, "pubkey": "03d56ce4e446a85bbdaa547b4ec2b073d40ff802831352b8272b7dd7a4de5a7cac", "amount_paid": 0, @@ -170,6 +172,7 @@ The mint responds with a `PostMeltQuoteBolt12Response`: "request": , "amount": , "unit": , + "method": "bolt12", "fee_reserve": , "state": , "expiry": , @@ -205,6 +208,7 @@ If the `outputs` field is included and there is excess from the `fee_reserve`, t "request": , "amount": , "unit": , + "method": "bolt12", "fee_reserve": , "state": , "expiry": , @@ -230,6 +234,7 @@ curl -X POST https://mint.host:3338/v1/melt/quote/bolt12 -d \ "request": "lno1qcp4256ypqpq86q69t5wv5629arxqurn8cxg9p5qmmqy2e5xq...", "amount": 10, "unit": "sat", + "method": "bolt12", "fee_reserve": 2, "state": "UNPAID", "expiry": 1701704757 @@ -257,6 +262,7 @@ curl -X POST https://mint.host:3338/v1/melt/bolt12 -d \ "request": "lno1qcp4256ypqpq86q69t5wv5629arxqurn8cxg9p5qmmqy2e5xq...", "amount": 10, "unit": "sat", + "method": "bolt12", "fee_reserve": 2, "state": "PAID", "expiry": 1701704757, diff --git a/30.md b/30.md index 0a29c131b..753f16a2d 100644 --- a/30.md +++ b/30.md @@ -28,6 +28,7 @@ The mint responds with a `PostMintQuoteOnchainResponse`: "quote": , "request": , "unit": , + "method": "onchain", "expiry": , "pubkey": , "amount_paid": , @@ -65,6 +66,7 @@ curl -X POST http://localhost:3338/v1/mint/quote/onchain -d \ "quote": "019e6d5a-2347-7000-8850-39c85ed1b5d3", "request": "bc1q...", "unit": "sat", + "method": "onchain", "expiry": 1701704757, "pubkey": "03d56ce4e446a85bbdaa547b4ec2b073d40ff802831352b8272b7dd7a4de5a7cac", "amount_paid": 0, @@ -191,6 +193,7 @@ The mint responds with a `PostMeltQuoteOnchainResponse`: "quote": , "amount": , "unit": , + "method": "onchain", "state": , "expiry": , "request": , @@ -242,6 +245,7 @@ If the `outputs` field is included and the mint does not claim the full `selecte "quote": , "amount": , "unit": , + "method": "onchain", "state": , "expiry": , "request": ,