I used "decodescript" on a transaction inputscript


I got this script from this website.

and got

"p2sh" : "3BfdeDc4HpcLJCs6PZ5jzdfaVDzFDBXrVu"

which makes no sense to me.

1 Answer 1


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, 2014 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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