Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Aug 9, 2024
Merged

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

merged 2 commits into from
Aug 9, 2024

Conversation

callebtc
Copy link
Contributor

@callebtc callebtc commented Jun 25, 2024

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.

  • "UNPAID" means that the quote's request has not been paid yet.
  • "PAID" means that the request has been paid.
  • "ISSUED" means that the quote has already been issued.

Implementation

Mints

  • add new state field to PostMintQuoteBolt11Response
  • keep the paid field around until all wallets update

Wallets

  • replace the paid field with state

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:

  • nutshell
  • CDK
  • cashu-ts
  • nutmix
  • gonuts
  • ...

@elnosh
Copy link
Contributor

elnosh commented Jun 26, 2024

when would a quote be in a PENDING state?

@callebtc
Copy link
Contributor Author

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
Copy link

Implemented in Nutmix

@callebtc
Copy link
Contributor Author

callebtc commented Jul 7, 2024

Pending state removed in 9e86b9e

@elnosh @lescuer97 @thesimplekid

Copy link
Collaborator

@thesimplekid thesimplekid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 9e86b9e

@callebtc
Copy link
Contributor Author

callebtc commented Aug 9, 2024

LFG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants