cashubtc / nuts

Cashu protocol specifications https://cashubtc.github.io/nuts/
MIT License
143 stars 49 forks source link

NUT-04: add new `state` enum, deprecate `paid` #141

Closed callebtc closed 1 month ago

callebtc commented 3 months ago

What

This change to NUT-04 deprecates the paid field to PostMintQuoteBolt11Response and replaces it with a new state field that is a string enum with four possible values: UNPAID, PAID, and ISSUED.

Implementation

Mints

Wallets

As long as paid is kept around, wallets can still function the same way as before, also when the POST /v1/mint/bolt11 is changed (since JSON is "backwards compatible" to new fields).

Tracking progress:

elnosh commented 3 months ago

when would a quote be in a PENDING state?

callebtc commented 3 months ago

when would a quote be in a PENDING state?

When it's currently being issued (i.e. in a mint transaction). The pending state can be used by the mint to prevent race conditions.

lescuer97 commented 3 months ago

Implemented in Nutmix

callebtc commented 3 months ago

Pending state removed in 9e86b9e

@elnosh @lescuer97 @thesimplekid

callebtc commented 1 month ago

LFG