Skip to content

Commit

Permalink
feat: add max expiry signaling
Browse files Browse the repository at this point in the history
  • Loading branch information
thesimplekid committed Nov 1, 2024
1 parent 55355b0 commit 0424113
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions 19.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The wallet of `Alice` includes the following `PostMintQuoteBolt12Request` data i
}
```

The `amount` field is optional and specifies the amount to mint. The `unit` field is mandatory. An optional `description` can be passed if the mint signals support for it in `MintMethodSetting`. If `single_use` is false, the offer can be paid multiple times. The optional `expiry` field specifies the unix timestamp when the offer expires.
The `amount` field is optional and specifies the amount to mint. The `unit` field is mandatory. An optional `description` can be passed if the mint signals support for it in `MintMethodSetting`. If `single_use` is false, the offer can be paid multiple times. The optional `expiry` field specifies the unix timestamp when the offer expires it **MUST** be before the `max_expiry` in the `MintMethodSettings` if one is given.

The mint `Bob` then responds with a `PostMintQuoteBolt12Response`:

Expand Down Expand Up @@ -141,11 +141,13 @@ The settings for this nut indicate the supported method-unit pairs for minting a
"unit": <str>,
"min_amount": <int|null>,
"max_amount": <int|null>,
"description": <bool|null>
"description": <bool|null>,
"max_expiry": <int|null>
}
```

`min_amount` and `max_amount` indicate the minimum and maximum amount for an operation of this method-unit pair.
`min_amount` and `max_amount` define the allowed range for transactions using this method-unit pair. `max_expiry` specifies the latest timestamp (in Unix time) until which payments for this offer will be accepted.


Example `MintMethodSetting`:

Expand All @@ -155,7 +157,8 @@ Example `MintMethodSetting`:
"unit": "sat",
"min_amount": 0,
"max_amount": 10000,
"description": true
"description": true,
"max_expiry": 1825076378
}
```

Expand Down

0 comments on commit 0424113

Please sign in to comment.