Creating custom scriptSig and scriptPubkey is a breeze. You can calculate a P2SH address and spend from it with some manual steps. Like, here's an example:
scriptSig: 080123456789abcdef
scriptPubkey: a82055c53f5d490297900cefa825d0c8e8e9532ee8a118abe7d8570762cd38be981887.
Combine them and you get a redeem script, just pad it with a length byte "2c".
What about trying Coinb.in? They have a raw transaction tool that may accept redeem scripts. I haven't tried it with custom ones like yours though, but it’s definitely worth a shot.
I doubt any wallet will support that. No one really needs these non-standard scripts anyway, and the risks they come with can ruin the user experience. That’s why it’s all manual work. Only those who get how it works take that risk.
You can import your redeem script into Bitcoin Core using a specific command. That "true" at the end signifies it’s a P2SH script. It’ll generate the same address back: 33CGouuJW2G66mDaQ13pMBDuztW9eLKiKw. But don’t expect to spend from it through the interface.
Ugh, this is so annoying! The Bitcoin Core manual claims you can import a scriptSig with a redeem script, yet all I can do is add it as a watch-only address. I need to crack this!
I confirm this. Using importaddress will just give you a watch-only address. But importmulti is supposed to let you use redeem scripts, right? Still confused about how to make it work...
Nope. Bitcoin Core has specific accepted script formats. Your redeem script isn’t one of them, so it just warns you. It adds the script and address, but can’t create valid inputs for anything outside standard formats.
Can you give an example of a standard P2SH address along with its redeem script? I can't seem to find any working examples despite the manual saying it’s possible.
Seriously! If importmulti with scriptPubKey and redeem script can only make watch-only addresses, what’s the point of it? You can already get that with a public address.
Importmulti can import private keys too, but it’s meant for scenarios where you have existing private keys. Plus, it is handy for using partial transactions.
Got it! It’s wild that you can build a transaction here then broadcast it in Bitcoin Core without a hitch, but you can’t do the whole thing directly in the client.
The node's IsStandard check isn’t as strict as what the wallet enforces. The node doesn’t rely on standard templates like the wallet does, so it’s a bit more flexible.
I get it, but it’s still tricky. Sure, Bitcoin scripts can be complex, but in the end, you just need it to result in "TRUE". That’s not rocket science.
The problem is automating scriptSig creation for random scripts isn’t feasible. Bitcoin Core needs to know how to construct those scripts to process transactions.
Interesting, but I doubt that was a real "puzzle" transaction. They were just messing around with P2SH scripts. It would have been cool to see a detailed step-by-step instead of just the result.
These addresses were actually tested way back in 2014. The OP_2 to OP_9 scripts work too since they resolve as true in the stack. Crazy to see old tricks resurfacing.
I found another cool example. I call it a "nothing P2SH address" because the script is EMPTY. Interestingly, it’s been highly active and used for large transactions recently.