0

I used "decodescript" on a transaction inputscript

304402206c4eba989dd5f87b7814f25ec8b9e08f955d30b299d963df8955639aa0a0f9bc02203c4d41b047d4dc616da101911c512e89255e2c3261733f030f9d1329ca2822dd01

I got this script from this website.

and got

"p2sh" : "3BfdeDc4HpcLJCs6PZ5jzdfaVDzFDBXrVu"

which makes no sense to me.

2

You didn't copy the full script from blockchain.info, you copied half of the already decoded script. The part you copied is the signature, but the public key (the other part) is also part of the script. Even if you had both, though, it's still not the right data to pass to decode script, because the script has already been decoded. The hex that should be passed to the getrawtransaction call can be gotten by looking at the result of:

getrawtransaction 2c7b5cede0ab477800c407526ea98de9c89e80e53435dc786479be15970cc0d7 1

But you will just get the same thing as what blockchain.info already has up on their site.

And the "p2sh" value is the address that would be made by using the script passed to the RPC call as the redeemScript. I don't think this is what you're looking for at all, so you can pretty safely ignore it.

  • @Willipm, you're welcome. If this answered your question, mark it so others know. If you still have more questions related to this, let me know! – morsecoder Dec 3 '14 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.