Specify NUT-22 authA serialization #353
No reviewers
Labels
No labels
breaking change
bug
documentation
enhancement
needs discussion
needs implementation
new nut
ready
wallet-only
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo-admin/nuts!353
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "nut-22-autha"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
NUT-22 does not specify the base64 encoding variant to use.
CDK uses general_purpose::URL_SAFE, which requires base64 URL with padding .
This PR requires mints to support both padded and unpadded forms (as per https://github.com/cashubtc/nuts/pull/147).
Implementation
NOTE: This was not an issue prior to keysets v2, as keyset v1 IDs (16 chars) produced serialized BAT JSON of exactly 174 bytes, and 174 % 3 = 0 — so base64 encoding never produced any padding before.
@robwoodgate looks like what I told you was wrong. We did not restrict the spec for the normal tokens. So I think we should do the same here and cdk should be changed to be less restrictive.
https://github.com/cashubtc/nuts/pull/147
@thesimplekid - that is even better. I've tweaked the spec to say mints MUST support both forms.
I'll leave Cashu-TS on padded, as that is backwards compatible with CDK <= 0.15.2
Please can you raise a ticket to sort CDK and pop it on this PR when ready.