-
Notifications
You must be signed in to change notification settings - Fork 54
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
Bolt12 #170
base: main
Are you sure you want to change the base?
Bolt12 #170
Conversation
thesimplekid
commented
Oct 4, 2024
•
edited
Loading
edited
- CDK
- Nutshell
- cashu-ts
- gonuts
- nutmix
Following up on your hackaton presentation at BTC++ we could make it so that a bolt12 quote has a different status enum:
The states can go from And then we might introduce a new endpoint through which one can retire the quote. |
63bf4eb
to
55355b0
Compare
19.md
Outdated
|
||
Where `quote` is the quote ID and `request` is the bolt12 offer. `expiry` is the Unix timestamp until which the mint quote is valid. `amount_paid` is the amount that has been paid to the mint via the bolt12 offer. `amount_issued` is the amount of ecash that has been issued for the given mint quote. `amount_paid` - `amount_issued` represents the amount of ecash a wallet can still mint. | ||
|
||
Note: `quote` is a **unique and random** id generated by the mint to internally look up the payment state. `quote` **MUST** remain a secret between user and mint and **MUST NOT** be derivable from the payment request. A third party who knows the `quote` ID can front-run and steal the ecash that this operation mints. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to specify the length and type of the quote
? For example, 64 char hex string?
IMO that makes it clear for implementors and avoids quick-and-dirty (and-insecure) solutions like incrementing from 1, or current unix timestamp, etc.
This also avoids complications if some mints decide to try out exotic characters, which some wallets may not expect.
Co-authored-by: lollerfirst <[email protected]>