Bitcoin Forum
July 16, 2024, 09:41:38 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Recommended tools for spending from witness scripts and tapscripts?  (Read 91 times)
BlackHatCoiner (OP)
Legendary
*
Offline Offline

Activity: 1582
Merit: 7746

Masses won't buy bitcoin. Masses will earn bitcoin


View Profile
July 02, 2024, 02:41:30 PM
Merited by pooya87 (2), ABCbits (2)
 #1

I just found out Liquid, and I've been experimenting with it since. It's much more flexible when it comes to testing stuff, like disabled or not yet implemented OP codes in Bitcoin.

I've been using scriptwiz.app to write witness and tapscripts. While I can fund these scripts (by paying with P2WSH or P2TR), I cannot spend from them. Elements Core does not allow me to spend from a custom witness script or tapscript, as I see. Is there any good recommendation?

Thanks.
pooya87
Legendary
*
Offline Offline

Activity: 3514
Merit: 10712



View Profile
July 03, 2024, 03:38:33 AM
Merited by ABCbits (1)
 #2

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).

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
ABCbits
Legendary
*
Offline Offline

Activity: 2940
Merit: 7665


Crypto Swap Exchange


View Profile
July 03, 2024, 09:06:10 AM
 #3

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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BlackHatCoiner (OP)
Legendary
*
Offline Offline

Activity: 1582
Merit: 7746

Masses won't buy bitcoin. Masses will earn bitcoin


View Profile
July 03, 2024, 12:34:04 PM
 #4

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).
OK, thanks. I funded the hash of the following script:
Code:
<0x3044022002748547ba97e986d26b48dc2093c21f04334aea4694470328d605c15971a8f302207501b30f114d1c27e5d8fa903635d9485dca60c705dbdf2a12daf795239d5e5e>
<'hello'>
<'🌎'>
OP_CAT
<0x02211862a1f993b4578d595c3e00b0935cd9ccc29a869cab7a680e36efc2e7b548>
OP_CHECKSIGFROMSTACK

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?  Lips sealed

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.

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.
Thanks. I'll look on Miniscript. Does that allow any script to be executed, or does it have to be standard?
ABCbits
Legendary
*
Offline Offline

Activity: 2940
Merit: 7665


Crypto Swap Exchange


View Profile
July 04, 2024, 09:05:00 AM
Merited by pooya87 (2)
 #5

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.
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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!