-
Notifications
You must be signed in to change notification settings - Fork 58
Add bech32m PR encoding for unified QR codes #436
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
Conversation
This package is a transient dependency of @scure/bip32, so this does not affect the dep graph
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! Hats off to you, this is a seriously impressive bit of code, and I love that you've included all the test vectors from the NUT.
My only question (which @thesimplekid may want to input on) is what about the P2BK flag to signal that the PR should use blinded keys. Currently we have that implemented as a nut26 boolean, at same level as the nut10 tag, but it is not represented here.
|
Looks good and clean. |
|
@robwoodgate should we merge this and simply add P2BK once the NUT has been adjusted? I think P2BK signaling is not part of the spec right now and shouldn't block this. |
Yes, let's not let P2BK hold it up. I have removed all NUT-18 from P2BK pending another review, so this is correct to current spec. |
Description
This adds the new bech32m and TLV based Payment Request encoding (creqB). We use
@scure/basefor bech32m and bech32 encoding. This dependency was transiently installed through@scure/bip32already, so this should not affect our dep graph.Changes
tlv.tswith TLV encoding utils for Payment Requests and nostr nprofiles (required for noramlization)bech32m.tsthat wraps@scure/baseutils for convenience and isolationPaymentRequesttoEncodedRequestfor compatibilityPR Tasks
npm run test--> no failing unit testsnpm run lint--> no warnings or errorsnpm run formatnpm run api:check--> runnpm run api:updatefor changes to the API