1

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:

Robert
  • 351
  • 3
  • 15
  • 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 Jun 08 '18 at 22:14
  • I have answered this in detail here https://bitcoin.stackexchange.com/questions/105796/how-to-spend-from-a-custom-p2sh-script-using-bitcore-lib/105797#105797 – MCCCS Apr 27 '21 at 15:37

1 Answers1

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
  • 3,569
  • 1
  • 9
  • 19