Skip to content

TODO : Add Tapscript differentiation and validation #147

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

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

Conversation

JAGADISHSUNILPEDNEKAR
Copy link
Contributor

This PR adds script type differentiation to improve Tapscript support:

  • Added script type constants: SCRIPT_TYPE_LEGACY, SCRIPT_TYPE_SEGWIT_V0, SCRIPT_TYPE_TAPSCRIPT
  • Implemented validation to ensure OP_CHECKSIGADD is only used in Tapscript contexts
  • Added TapscriptFactory helper to create valid Tapscripts

Test Updates:

  • Updated test_checksigadd.py to properly test OP_CHECKSIGADD in Tapscript

All the tests pass
Screenshot 2025-03-30 at 3 16 08 PM

@JAGADISHSUNILPEDNEKAR JAGADISHSUNILPEDNEKAR changed the title Add Tapscript differentiation and validation TODO : Add Tapscript differentiation and validation Mar 31, 2025
@defconradio
Copy link
Contributor

can you provide an example on how spend a OP_CHECKSIGADD script like the one you use as reference script by script path

@JAGADISHSUNILPEDNEKAR
Copy link
Contributor Author

Hi @defconradio
Surely I can do that, for this I would need to construct a tapscript input
But currently, I am working on something else, and it is best if I implement this example after this PR is approved

Let me know if you have something in mind related to this, I would be happy to hear from you and collaborate

@defconradio
Copy link
Contributor

just trying to figure out how perform the signatures for 2-2 tr scripts using this library, couldn't find any example as all tr scripts used in this library use only 1 signature. a simple example Script : <key_1> OP_CHECKSIGVERIFY <key_2> OP_CHECKSIG , or using OP_CHECKSIGADD using TxWitnessInput or raw tx digest would be amazing.

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