How to spend an UTXO P2SH pay-to-script-hash

0

Anyone knows specific instructions on how to claim an unspent P2SH TX (pay-to-script-hash) based on a redeem script? No multisig.

I am looking for node.js JS instructions in bitcore-lib or similar.

Any suggestions or help appreciated.

Thanks :)

edited:

RobertH

Posted 2018-06-08T19:47:13.470

Reputation: 151

I hope you download from bitcoin.org, and verify the checksum/integrity of files. Then there is a very good example in Andreas‘ book, or even here: https://bitcoin.org/en/developer-examples#p2sh-multisig. As you said, you are not doing multisig, not a problem... can you show the raw tax, that you used? There is no link behind „coinb.in“... and here in the answer I have done a P2SH example: https://bitcoin.stackexchange.com/questions/74753/htlc-hash-time-lock-contract-using-bitcoin-qt/74953#74953

pebwindkraft 2018-06-08T22:14:49.290

Answers

1

How to spend the output depends on the redeemscript. You have to provide a scriptSig that makes the script evaluate to True. More info on the wiki

If there are no signatures involved you can try to repeat the scriptSig that was revealed, although I doubt that would work as there are bots that do that automatically.

Mike D

Posted 2018-06-08T19:47:13.470

Reputation: 1 571