Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions 04.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ The mint `Bob` responds with a quote that includes some common fields for all me
"quote": <str>, // UUID v7
"request": <str>,
"unit": <str_enum[UNIT]>,
"method": <str>,
"amount_paid": <int>,
"amount_issued": <int>,
"updated_at": <int>,
Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion 05.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ The mint `Bob` responds with a quote that includes some common fields for all me
"quote": <str>, // UUID v7
"amount": <int>,
"unit": <str_enum[UNIT]>,
"method": <str>,
"state": <str_enum[STATE]>,
"expiry": <int>
// 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"`:

Expand Down Expand Up @@ -177,6 +178,7 @@ Content-Type: application/json
"quote": "019e6d5a-2347-7000-89e2-35fe79f92c0e",
"amount": 10,
"unit": "sat",
"method": "bolt11",
"state": "PENDING",
"expiry": 1701704757
}
Expand Down
6 changes: 6 additions & 0 deletions 23.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ The mint responds with a `PostMintQuoteBolt11Response`:
"request": <str>, // The bolt11 invoice to pay
"amount": <int>,
"unit": <str_enum[UNIT]>,
"method": "bolt11",
"amount_paid": <int>,
"amount_issued": <int>,
"updated_at": <int>,
Expand Down Expand Up @@ -64,6 +65,7 @@ Response:
"request": "lnbc100n1pj4apw9...",
"amount": 10,
"unit": "sat",
"method": "bolt11",
"amount_paid": 0,
"amount_issued": 0,
"updated_at": 1701704657,
Expand Down Expand Up @@ -162,6 +164,7 @@ The mint responds with a `PostMeltQuoteBolt11Response`:
"request": <str>,
"amount": <int>,
"unit": <str_enum[UNIT]>,
"method": "bolt11",
"fee_reserve": <int>,
"state": <str_enum[STATE]>,
"expiry": <int>,
Expand Down Expand Up @@ -191,6 +194,7 @@ If the `outputs` field is included and there is excess from the `fee_reserve`, t
"request": <str>,
"amount": <int>,
"unit": <str_enum[UNIT]>,
"method": "bolt11",
"fee_reserve": <int>,
"state": <str_enum[STATE]>,
"expiry": <int>,
Expand All @@ -216,6 +220,7 @@ Melt quote response:
"request": "lnbc100n1p3kdrv5sp5lpdxzghe5j67q...",
"amount": 10,
"unit": "sat",
"method": "bolt11",
"fee_reserve": 2,
"state": "UNPAID",
"expiry": 1701704757
Expand Down Expand Up @@ -243,6 +248,7 @@ Successful melt response:
"request": "lnbc100n1p3kdrv5sp5lpdxzghe5j67q...",
"amount": 10,
"unit": "sat",
"method": "bolt11",
"fee_reserve": 2,
"state": "PAID",
"expiry": 1701704757,
Expand Down
6 changes: 6 additions & 0 deletions 25.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ The mint responds with a `PostMintQuoteBolt12Response`:
"request": <str>,
"amount": <int|null>,
"unit": <str_enum[UNIT]>,
"method": "bolt12",
"expiry": <int|null>,
"pubkey": <str>,
"amount_paid": <int>,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -170,6 +172,7 @@ The mint responds with a `PostMeltQuoteBolt12Response`:
"request": <str>,
"amount": <int>,
"unit": <str_enum[UNIT]>,
"method": "bolt12",
"fee_reserve": <int>,
"state": <str_enum[STATE]>,
"expiry": <int>,
Expand Down Expand Up @@ -205,6 +208,7 @@ If the `outputs` field is included and there is excess from the `fee_reserve`, t
"request": <str>,
"amount": <int>,
"unit": <str_enum[UNIT]>,
"method": "bolt12",
"fee_reserve": <int>,
"state": <str_enum[STATE]>,
"expiry": <int>,
Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions 30.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ The mint responds with a `PostMintQuoteOnchainResponse`:
"quote": <str>,
"request": <str>,
"unit": <str_enum[UNIT]>,
"method": "onchain",
"expiry": <int|null>,
"pubkey": <str>,
"amount_paid": <int>,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -191,6 +193,7 @@ The mint responds with a `PostMeltQuoteOnchainResponse`:
"quote": <str>,
"amount": <int>,
"unit": <str_enum[UNIT]>,
"method": "onchain",
"state": <str_enum[STATE]>,
"expiry": <int>,
"request": <str>,
Expand Down Expand Up @@ -242,6 +245,7 @@ If the `outputs` field is included and the mint does not claim the full `selecte
"quote": <str>,
"amount": <int>,
"unit": <str_enum[UNIT]>,
"method": "onchain",
"state": <str_enum[STATE]>,
"expiry": <int>,
"request": <str>,
Expand Down
Loading