-
Notifications
You must be signed in to change notification settings - Fork 52
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-XX: signature on mint request #188
base: main
Are you sure you want to change the base?
Conversation
@thesimplekid Should we make it clear that wallets should use an ephemeral (one time) key? |
Added note on this |
f866a25
to
a4349b5
Compare
19.md
Outdated
```json | ||
{ | ||
"19": { | ||
"supported": <bool>, | ||
"required": <bool> | ||
} | ||
} | ||
``` | ||
|
||
In addition to signaling optional support, the mint can require a public key for mint quotes and a corresponding signature during minting. If `required` is set to `true` in the NUT-19 settings: | ||
|
||
1. The wallet **MUST** provide a public key when requesting a mint quote | ||
2. The wallet **MUST** provide a valid witness signature when submitting the mint request | ||
|
||
> **Note:** Enabling this setting makes the mint incompatible with wallets that do not support NUT-19 | ||
|
||
[00]: 00.md | ||
[06]: 06.md |
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.
I wonder if the required
flag should be set by specific NUT. For BOLT12 and Onchain NUTs it will be a MUST
as it is already specified in the PRs for those but I don't think this should break wallets that don't implement it for NUT-04.
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.
I think we can remove the required flag here. Leaving it up to wallets to choose to use it or not for NUT04 and future nuts that want to require it (eg bolt12) can specify that there.
556d688
to
3748985
Compare
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.
LGTM
ACK cccbb1d |
f126bfc
to
7ba6a76
Compare
@@ -16,6 +16,8 @@ | |||
| 20005 | Quote is pending | [NUT-04][04], [NUT-05][05] | | |||
| 20006 | Invoice already paid | [NUT-05][05] | | |||
| 20007 | Quote is expired | [NUT-04][04], [NUT-05][05] | | |||
| 20008 | Signature for mint request invalid | [NUT-20][20] | | |||
| 20009 | Pubkey required for mint quote | [NUT-20][20] | |
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.
Is this error still necessary?
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.
Will be used for BOLT12 and onchain
"description": <str|null> | ||
"description": <str> // Optional |
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.
For future reference: https://json-schema.org/understanding-json-schema/reference/object#required
This NUT defines a protocol extension that enables signature-based authentication for mint quote redemption. When requesting a mint quote, clients can provide a public key. The mint will then require a valid signature from the corresponding secret key before processing the mint.
This is defined as an optional extension to NUT-04 and the intention is to reuse it and make it mandatory for bolt12 and onchain.