- snip -
The raw transaction is
010000000105287a343ffb315b10c03574975535badbe801cf6ffdf73c79ac22da215d095b01000 0006a4730440220670ef406032cc1c20c284da8ccc2a40d5b135776dac672ce04e8cbb9036fec15 022011e6f589e5ca946f974b3ff69523497d06262a7e75be38ae99a85e493940ea8401210278072 1cc016aaf0434878f95bce130147ccdc4bd88478222bcba2018294e99d4ffffffff02c09e0a0000 0000001976a9142e2a8d353ea825de6bc2b081324f412764e53e5788ac85351931100000001976a 914c73c92961d27fb399e1d408c94f1dade2860394588ac00000000
Lets break down the entire transaction. It may help you some, and it may help others that stumble across this thread while investigating their own issues understanding how bitcoin transactions are built. Note that the values in the raw transaction are generally in little-endian byte order.
4 byte version number: 01000000
1 byte quantity of transaction inputs: 01
32 byte hash of the transaction that supplied the value being used in the input: 05287a343ffb315b10c03574975535badbe801cf6ffdf73c79ac22da215d095b
4 byte index indicating which output from that transaction is being used as input in this transaction: 01000000
1 byte value indicating the length of the scriptSig: 6a
6a in decimal is 106. In this case, the ScriptSig consists of a 73 byte signature followed by a 33 byte compressed public key both associated with the output in the earlier transaction that supplied the value for this transaction.
1 byte value indicating a number of bytes to push on to the stack when processing the ScriptSig: 47
47 in decimal is 71, therefore 71 bytes are pushed on to the stack. Those 71 bytes consist of a 70 byte DER encoded signature and a 1 byte OP_SIGHASHALL:
The 70 bytes DER encoded signature is:
1 byte sequence: 30
1 byte length of signature X & Y coordinates: 44
1 byte indication that the next value is intended to be an integer: 02
1 byte indication of the length of the X coordinate of the signature: 20
32 byte X coordinate: 670ef406032cc1c20c284da8ccc2a40d5b135776dac672ce04e8cbb9036fec15
1 byte indication that the next value is intended to be an integer: 02
1 byte indication of the length of the X coordinate of the signature: 20
32 byte Y coordinate: 11e6f589e5ca946f974b3ff69523497d06262a7e75be38ae99a85e493940ea84
Then we have the 1 byte OP_SIGHASHALL: 01
1 byte value indicating the length of the public key: 21
21 in decimal is 33, therefore the public key is 33 bytes long:
33 byte compressed public key: 02 780721cc016aaf0434878f95bce130147ccdc4bd88478222bcba2018294e99d4
4 byte sequence number: ffffffff
1 byte quantity of transaction inputs: 02
8 byte number of satoshis in the output representing 0.000696 BTC: c09e0a0000000000
1 byte value indicating the length of the scriptPubKey: 19
19 in decimal is 25. In this case the scriptPubKey consists of:
1 byte OP_DUP: 76
1 byte OP_HASH160: a9
1 byte value indicating the length of the pubKeyHash: 14
14 in decimal is 20. Therefore the next 20 bytes are the 160 bit pubKeyHash that can be acquired from the address.
pubKeyHash: 2e2a8d353ea825de6bc2b081324f412764e53e57
1 byte OP_EQUALVERIFY: 88
1 byte OP_CHECKSIG: ac
8 byte number of satoshis in the output representing 695.43212421 BTC: 8535193110000000
1 byte value indicating the length of the scriptPubKey: 19
19 in decimal is 25. In this case the scriptPubKey consists of:
1 byte OP_DUP: 76
1 byte OP_HASH160: a9
1 byte value indicating the length of the pubKeyHash: 14
14 in decimal is 20. Therefore the next 20 bytes are the 160 bit pubKeyHash that can be acquired from the address.
pubKeyHash: c73c92961d27fb399e1d408c94f1dade28603945
1 byte OP_EQUALVERIFY: 88
1 byte OP_CHECKSIG: ac
4 byte locktime: 00000000
If you take the pubKeyHash (2e2a8d353ea825de6bc2b081324f412764e53e57) then add the appropriate checksum and version number to it, and finally convert from base16 to base58, the result should be the bitcoin address (mjj4MR1aeTjWSRqHuixfoCGRDRwabbK3zv).
Reversing that, if you start with the bitcoin address (mjj4MR1aeTjWSRqHuixfoCGRDRwabbK3zv), then convert from base58 to base 16, and finally strip off the version number and checksum, the result should be the pubKeyHash (2e2a8d353ea825de6bc2b081324f412764e53e57)
EDIT: I've gone back and broken the ScriptSig down into it's component parts.