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!
Best tools for spending from witness and tapscripts
4 replies 223 views
ju5t_rocketMember
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).
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.
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?
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.
Related topics
- Difference between witness and signscript explained 5
- Best practices for securely storing newly generated wallets programmatically 14
- bitcoin-qt sync issues and slow speeds 6
- Recovering a Bitcoin wallet and address 8
- Creating a list of non-zero wallets and their balances using Python 4
- CipherSeed: A Comprehensive Guide to Super-Secure Crypto Wallet Backups 5