Wallet request expiry for mint quotes - #415
Conversation
Allow wallets to request a relative expiry for BOLT11 and BOLT12 mint quotes. Advertise the maximum per method and return error 11018 when the requested lifetime cannot be honored. Clarify each method's absolute response expiry.
Allow wallets to opt into an expiry that limits when onchain payments are credited to a mint quote. Keep quotes open when no expiry is requested and continue monitoring payments detected before expiry.
|
Not sure I understand the rationale for this. Quote expiry binds the mint to a monitoring period - why would a wallet voluntarily reduce that and risk a payment being missed? I kind of understand it in cases where the mint doesn't have an expiry and the wallet wants to enforce one. But mints committing to monitor quotes perpetually are just storing up pain for themselves in the future. |
| Wallets **SHOULD** use `amount_paid` and `amount_issued` instead of `state` whenever these fields are present. | ||
|
|
||
| `expiry` is the Unix timestamp until which the `request` can be paid (i.e. the bolt11 invoice expiry). | ||
| `expiry` is the invoice timestamp plus its BOLT11 expiry duration, expressed as a Unix timestamp. If `expiry_seconds` was set, it **MUST** be used as the invoice expiry duration. |
There was a problem hiding this comment.
Should the default include a buffer for the HTLC timeouts too? If a payment is made close to LN invoice expiry, it may arrive after the expiry time and not be credited.
There was a problem hiding this comment.
Mints should honor payments even expiry is reached. Wallets should do their best to check quotes that are technically expired but might have received a payment.
A wallet would want to reduce the number of quotes it must monitor. I think the best example for this is bolt12 right now. Currently, bolt12 never expires and this is useful for long running repeated payments however in the event bolt12 replaces bolt11 as the default invoice a wallet like numo would want to create short lived ones. Only the wallet knows if it wants a short one or the long one, so it must request and then the mint can decide if it supports this or not. |
No description provided.