-
Notifications
You must be signed in to change notification settings - Fork 176
WIP: Add Silent Payments + BIP 375 Support #587
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
base: new_edge
Are you sure you want to change the base?
WIP: Add Silent Payments + BIP 375 Support #587
Conversation
stabilize simulator debug
ec_pubkey_tweak_mul ec_pubkey_combine generator curve_order
include shim for testing ngu modules
e065256 to
4923edd
Compare
shared/bech32.py
Outdated
| @@ -0,0 +1,135 @@ | |||
| # from <https://github.com/sipa/bech32/blob/master/ref/python/segwit_addr.py> | |||
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.
you shouldn't need this - just import bech32 we bundle it together with ngu from this C port https://github.com/sipa/bech32/tree/10d38fbba12da9f93c54c7fd44376152e1c06d85
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.
Good catch! Thank you for the feedback.
Unfortunately, I could not use any existing encoding functions in ngu so I followed the scheme of adding nip19 encoding to add bip352_encode. If you have a better idea please let me know.
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.
yeah, I completely forgot we only expose segwit_{encode/decode} thru ngu.codecs - sorry for unreliable info.
Your approach, adding it to the libngu, is correct.
Update libngu Submodule to support bip352_encode
4923edd to
c5b5977
Compare
Tested with Sparrow Air Gapped Wallet commit a6081970 and simulator on mainnet
After putting together some python BIP 375 examples I took a look at the coldcard firmware and discovered it would be a easy lift to create a Proof of Concept to evaluate silent payments since PSBTv2 was already supported. This PR focuses on core behavior and minimal UI/UX changes.
The commits were organized to make review as easy as possible. There are some # TODO: in code where I don't have enough knowledge to make a decision at this time. Appreciate your feedback and advice on this PR.
TODOs:
screenshots


