Best tools for spending from witness and tapscripts

4 replies 223 views
sigma2018Member
Posts: 15 · Reputation: 172
#1Nov 27, 2025, 09:04 PM
I recently discovered Liquid and I’ve been playing around with it a bit. It’s way more adaptable for testing things like disabled or not yet available OP codes in Bitcoin. I’ve been using scriptwiz.app to create my witness and tapscripts. I can fund these scripts using P2WSH or P2TR, but I’m stuck with spending from them. It looks like Elements Core doesn’t let me spend from a custom witness script or tapscript. Any good suggestions out there? Thanks!
2 Reply Quote Share
Posts: 29 · Reputation: 234
#2Nov 27, 2025, 10:05 PM
I don't think such a tool can exist, so you have to write the code for it yourself. We have had the same problem with uncommon (custom) scripts forever, for example despite P2SH being very old you still can not find any tool that allows spending from any script that it doesn't already recognized or hard-coded into the tool (eg. m-of-n multisig is defined, conditional with OP_IF is not).
3 Reply Quote Share
madrocketFull Member
Posts: 53 · Reputation: 394
#3Nov 28, 2025, 02:19 AM
I don't know any other way beside using createrawtransaction on Bitcoin Core. Although according to https://bitcoin.stackexchange.com/a/120862, you can import your address to Bitcoin Core with help of descriptor (assuming the script can be represented using Miniscript) which should make it a bit easier.
7 Reply Quote Share
sigma2018Member
Posts: 15 · Reputation: 172
#4Nov 28, 2025, 05:55 AM
OK, thanks. I funded the hash of the following script: Which is a signed "Hello World" message. It only takes you to publish this script to get the testnet bitcoin from here: tb1qmklyqnchpyfqvz3lkmxf6y8k47fcthwkmffvhu4u8ha0xqrmelrspj7f9a. But, I'm afraid spending it would be non-standard, wouldn't it?   Same address has been funded in Liquid testnet, but no one has claimed it, and I'm thinking it may be due to non-standardness there as well: tex1qy85zk844lwd4zazrxhqls07k4sx736h8pcqrjpr2lj58v5l3mhaq32qtrl. Thanks. I'll look on Miniscript. Does that allow any script to be executed, or does it have to be standard?
3 Reply Quote Share
madrocketFull Member
Posts: 53 · Reputation: 394
#5Nov 28, 2025, 11:34 AM
AFAIK if your script can be represented with Miniscript, Bitcoin Core can execute or spend it. But i never tried it personally and IMO this kind of question should receive better answer either on https://bitcoin.stackexchange.com/ or https://groups.google.com/g/bitcoindev.
2 Reply Quote Share

Related topics