How do I get to the value in the 'scriptPubKey' part of the transaction ? How do I get to the value in the 'scriptPubKey' part of the transaction ? 


The sender knows only the address (1A3XjcuZmcszX2tGoVn1TrMNchuHwdAxZV) so how did he get into 63339ebf4914d964fbc729b0dc4c1a44c4fb8f80 ?
I've tried ripemd160(sha256(address)) didn't work .
I've tried sha256(sha256(address)) didn't work.
Addresses are kept in Base58Check format. Here's how you decode it.


Decode the base58 encoding (similar to Base64). You should have 25 bytes.
Check that the 1st byte is 0x00 (the version byte of Bitcoin)
Check that the last 4 bytes are a correct checksum of the rest. This is done (in Python) by:

sha256(sha256(data[0:21]))[:4] == data[-4:]


(Or, "take the first 4 bytes of a double-SHA256 of the first 21 bytes of the decoded data, then compare to the last 4 bytes of the decoded data.")
Take the middle 20 bytes (data[1:21]) and insert it into the following scriptPubKey.

OP_DUP OP_HASH160 &lt;x&gt; OP_EQUALVERIFY OP_CHECKSIG



Here are some libraries that will do steps 1-3:


libbasse58 (C)
base58perl (Perl)
python-bitcoinlib (Python)
bitcoinj (Java)

byte[] hash160 = new Address(NetworkParameters.prodNet(),
    &lt;addr&gt;).getHash160();

coinstring.js (node.js)

require('coinstring').decode(&lt;addr&gt;)

Various examples on rosetta code