Skip to content
Open
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
14 changes: 11 additions & 3 deletions 23.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,17 @@ For the `bolt11` method, the wallet includes the following specific `PostMintQuo
{
"amount": <int>,
"unit": <str_enum[UNIT]>,
"description": <str> // Optional
"description": <str>, // Optional
"description_hash": <bool> // Optional, default false
}
```

If `description_hash` is `true`, `description` **MUST** be present. The mint **MUST** return a BOLT11 invoice containing an `h` tag equal to the SHA-256 hash of the UTF-8 encoded `description` and **MUST NOT** include a `d` tag. This allows the invoice to commit to exact data that is provided to the payer out of band.

If `description_hash` is `false` or omitted, the existing `description` behavior is unchanged: a mint that supports descriptions includes the value in the invoice's `d` tag.

Wallets **SHOULD** request a description hash only when the mint advertises support. A mint that cannot produce the requested description hash **MUST** reject the quote request.

The mint responds with a `PostMintQuoteBolt11Response`:

```json
Expand Down Expand Up @@ -122,7 +129,7 @@ Response:

## Mint Settings

A `description` option **MUST** be set to indicate whether the `bolt11` payment method backend supports providing an invoice description.
A `description` option **MUST** be set to indicate whether the `bolt11` payment method backend supports providing a plaintext invoice description. A `description_hash` option **MUST** be set to indicate whether it supports committing to the supplied description with an invoice description hash.

### Example `MintMethodSetting`

Expand All @@ -133,7 +140,8 @@ A `description` option **MUST** be set to indicate whether the `bolt11` payment
"min_amount": 0,
"max_amount": 10000,
"options": {
"description": true
"description": true,
"description_hash": true
}
}
```
Expand Down