TODO : Add Tapscript differentiation and validation
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
can you provide an example on how spend a OP_CHECKSIGADD script like the one you use as reference script by script path
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
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.