Skip to content

Commit e7112cd

Browse files
committed
Nut-04/05: add amount, unit, request to quotes
1 parent fb2ad98 commit e7112cd

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

04.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ The mint `Bob` then responds with a `PostMintQuoteBolt11Response`:
3838
{
3939
"quote": <str>,
4040
"request": <str>,
41+
"amount": <int>,
42+
"unit": <str_enum["sat"]>,
4143
"state": <str_enum[STATE]>,
4244
"expiry": <int>
4345
}
4446
```
4547

46-
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.
48+
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. `amount` and `unit` correspond to the same values provided in the request.
4749

4850
`state` is an enum string field with possible values `"UNPAID"`, `"PAID"`, `"ISSUED"`:
4951

@@ -69,6 +71,8 @@ Response of `Bob`:
6971
{
7072
"quote": "DSGLX9kevM...",
7173
"request": "lnbc100n1pj4apw9...",
74+
"amount": 10,
75+
"unit": "sat",
7276
"state": "UNPAID",
7377
"expiry": 1701704757
7478
}

05.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,17 @@ The mint `Bob` then responds with a `PostMeltQuoteBolt11Response`:
3838
```json
3939
{
4040
"quote": <str>,
41+
"request": <str>,
4142
"amount": <int>,
43+
"unit": <str_enum["sat"]>,
4244
"fee_reserve": <int>,
4345
"state": <str_enum[STATE]>,
4446
"expiry": <int>,
4547
"payment_preimage": <str|null>
4648
}
4749
```
4850

49-
Where `quote` is the quote ID, `amount` the amount that needs to be provided, and `fee_reserve` the additional fee reserve that is required. The mint expects `Alice` to include `Proofs` of _at least_ `total_amount = amount + fee_reserve`. `expiry` is the Unix timestamp until which the melt quote is valid. `payment_preimage` is the bolt11 payment preimage in case of a successful payment.
51+
Where `quote` is the quote ID, `amount` and `unit` the amount and unit that need to be provided, `request` the payment request from the quote request, and `fee_reserve` the additional fee reserve that is required. The mint expects `Alice` to include `Proofs` of _at least_ `total_amount = amount + fee_reserve`. `expiry` is the Unix timestamp until which the melt quote is valid. `payment_preimage` is the bolt11 payment preimage in case of a successful payment.
5052

5153
`state` is an enum string field with possible values `"UNPAID"`, `"PENDING"`, `"PAID"`:
5254

@@ -71,7 +73,9 @@ Response of `Bob`:
7173
```json
7274
{
7375
"quote": "TRmjduhIsPxd...",
76+
"request": "lnbc100n1p3kdrv5sp5lpdxzghe5j67q...",
7477
"amount": 10,
78+
"unit": "sat",
7579
"fee_reserve": 2,
7680
"state": "UNPAID",
7781
"expiry": 1701704757
@@ -149,7 +153,9 @@ Response `PostMeltQuoteBolt11Response` of `Bob`:
149153
```json
150154
{
151155
"quote": "TRmjduhIsPxd...",
156+
"request": "lnbc100n1p3kdrv5sp5lpdxzghe5j67q...",
152157
"amount": 10,
158+
"unit": "sat",
153159
"fee_reserve": 2,
154160
"state": "PAID",
155161
"expiry": 1701704757,

0 commit comments

Comments
 (0)