diff --git a/05.md b/05.md index 651d2422..e21b6e53 100644 --- a/05.md +++ b/05.md @@ -28,10 +28,15 @@ The wallet `Alice` includes the following `PostMeltQuoteBolt11Request` data in i { "request": , "unit": + "options": { // Optional + "amountless": { + "amount_msat": + } + } } ``` -Here, `request` is the bolt11 Lightning invoice to be paid and `unit` is the unit the wallet would like to pay with. +Here, `request` is the bolt11 Lightning invoice to be paid and `unit` is the unit the wallet would like to pay with. `amount` **MAY** be passed to pay amountless bolt11 invoices. The `amount` **MUST** be in msat and if the bolt11 invoice has an amount, the `amount` field **MUST** be equal to the amount of the bolt11 invoice. The request **MAY** be an amountless invoice only if support for amountless invoices is signaled in the `MeltMethodSettings`. The mint `Bob` then responds with a `PostMeltQuoteBolt11Response`: @@ -188,11 +193,12 @@ The mint's settings for this nut indicate the supported method-unit pairs for me "method": , "unit": , "min_amount": , - "max_amount": + "max_amount": , + "amountless": } ``` -`min_amount` and `max_amount` indicate the minimum and maximum amount for an operation of this method-unit pair. +`min_amount` and `max_amount` indicate the minimum and maximum amount for an operation of this method-unit pair. `amountless` signals if the backed supports paying an amountless invoice. Example `MeltMethodSetting`: @@ -201,7 +207,8 @@ Example `MeltMethodSetting`: "method": "bolt11", "unit": "sat", "min_amount": 100, - "max_amount": 10000 + "max_amount": 10000, + "amountless": true } ``` diff --git a/error_codes.md b/error_codes.md index bd758a9f..8ef94754 100644 --- a/error_codes.md +++ b/error_codes.md @@ -12,6 +12,8 @@ | 11008 | Duplicate outputs provided | [NUT-03][03], [NUT-04][04], [NUT-05][05] | | 11009 | Inputs/Outputs of multiple units | [NUT-03][03], [NUT-04][04], [NUT-05][05] | | 11010 | Inputs and outputs not of same unit | [NUT-03][03], [NUT-04][04], [NUT-05][05] | +| 11011 | Amountless invoice is not supported | [NUT-05][05] | +| 11012 | Amount in request does not equal invoice | [NUT-05][05] | | 12001 | Keyset is not known | [NUT-02][02], [NUT-04][04] | | 12002 | Keyset is inactive, cannot sign messages | [NUT-02][02], [NUT-03][03], [NUT-04][04] | | 20001 | Quote request is not paid | [NUT-04][04] |