Skip to content
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

feat: support taproot addresses #607

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

gregdhill
Copy link
Member

@gregdhill gregdhill commented May 18, 2022

Signed-off-by: Gregory Hill [email protected]

Some initial draft code for supporting taproot spending. As noted in #606, it is not possible to determine the "address" from a key path spending transaction alone since Schnorr signatures do not support public key recovery. Therefore to verify that a P2TR spend is valid we must provide the spent TransactionOutput when reporting a theft here. Since #603 is merged, we do not explicitly require that inputs to issue, redeem, refund and replace transactions are valid since they only need to verify the output. The benefit of this approach is also to disambiguate witness parsing, we currently assume all non-standard inputs are P2WSH - see this comment.

EDIT: since theft reporting was removed the problem described above is no longer a concern - P2TR addresses can be plainly parsed from the scriptPubKey outputs. Updated the PR to add Address::P2TRv1(tweaked_pub_key) so taproot addresses can be used throughout the runtime.

Closes #606

References

@gregdhill gregdhill marked this pull request as ready for review August 2, 2023 14:43
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.

Taproot support
1 participant