-
Notifications
You must be signed in to change notification settings - Fork 194
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
Add taproot support #101
Add taproot support #101
Conversation
Hello @nerolation! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2022-08-29 12:40:17 UTC |
Hi @alecalve , |
Thanks for your contribution, I think some tests would be warranted yes |
Fine, I will attach some! |
Hi @alecalve ! |
This is the test output:
|
Early scripts represent non-byte types in operations[0]
Ready to rumble @alecalve |
Add Bech32m encoding/decoding for taproot addresses. The decoding was written by Pieter Wuille here: https://github.com/Bytom/python-bytomlib/blob/master/pybtmsdk/segwit_addr.py
The check if a PkScript represents an Bech32m script is done in the following:
Notably, the check for Taproot is the last check before a script would be classifies as unknown, thus avoiding useless computation for checking if a tweaked public key might be encoded into a valid address.
Everything was squashed into one commit.