Bitcoin script example

Is there some good example on how to process a basic tx’s scriptsig and get the recipient’s address from the raw transaction?


In the output there is a field “scriptPubKey” that for a standard transaction looks like this:

OP_DUP OP_HASH160 62e907b15cbf27d5425399ebf6f0fb50ebb88f18 OP_EQUALVERIFY OP_CHECKSIG

The hex number is what you get the address from; this is the result of step #3 in To get the address continue the process in that example. (Though, arguably the hardest part is calculating Base58Check, for which an example is not given.)

Also relevant is

Leave a Reply

Your email address will not be published. Required fields are marked *