Skip to content

Conversation

@nerolation
Copy link
Contributor

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:

  • The script must start with 0x01
  • The second part of the script must result in a valid taproot address when encoded

Notably, the check for Taproot is the last check before a script would be classifies as unknown.

Everything was squashed into one commit.

@pep8speaks
Copy link

pep8speaks commented Mar 5, 2022

Hello @nerolation! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 70:13: E101 indentation contains mixed spaces and tabs
Line 70:13: W191 indentation contains tabs

Line 113:80: E501 line too long (92 > 79 characters)

Line 140:80: E501 line too long (92 > 79 characters)

Comment last updated at 2022-03-05 09:05:08 UTC

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants