Posts

Showing posts with the label How do I spend a non-standard P2SH transaction

How do I spend a non-standard P2SH transaction

How do I spend a non-standard P2SH transaction I was sent a P2SH puzzle address. I have solved the puzzle, which is to say I have created a script that matches the hash, and I know what to put on the stack before the script. Sadly, what I am having trouble figuring out is how to actually create a valid transaction with this non-standard script and no signature. All the examples and documentation I've found only talk about creating standard signature-based transactions and not ones with arbitrary scripts. For example, let's say the encoded script is 955787 and someone actually sent bitcoin to the P2SH address for that script, which is 3PijzLhTnkA9S2HDFLrdwX9SCg69W8ggD4 Now I want to spend that by providing the full redeem script: 1 7 955787 or I guess more accurately OP_1 OP_7 3 0x955787 How do I actually create that transaction using bitcoind or bcoin? I don't see how to get it to create a transaction with that supplied script or transmit it to the network without a...