diff --git a/60.md b/60.md index 1517f7c..c1475f5 100644 --- a/60.md +++ b/60.md @@ -184,5 +184,22 @@ Her client: } ``` +## Redeeming a quote (optional) +When creating a quote at a mint, an event can be used to keep the state of the quote ID, which will be used to check when the quote has been paid. These events should be created with an expiration tag [[NIP-40]] matching the expiration of the bolt11 received from the mint; this signals to relays when they can safely discard these events. + +Application developers are encouraged to use local state when possible and only publish this event when it makes sense in the context of their application. + +```jsonc +{ + "kind": 7374, + "content": nip44_encrypt("quote-id"), + "tags": [ + [ "expiration", "" ], + [ "mint", "" ], + [ "a", "37375::my-wallet" ] + ] +} +``` + ## Appendix 1: Validating proofs Clients can optionally validate proofs to make sure they are not working from an old state; this logic is left up to particular implementations to decide when and why to do it, but if some proofs are checked and deemed to have been spent, the client should delete the token and roll over any unspent proof.