Hi bitcoin pros,
I'm trying to put together my first "by-hand" transaction. I'm following along with ken sherrif's bitcoins the hard way blog and looking at the docs etc to try to get this going. I decided that I wanted to do something on testnet first before trying anything on mainnet. So my step 1 was to generate a testnet address and get some coins sent to it from a testnet fountain. I did this.
https://www.blocktrail.com/tBTC/tx/3ca5868acb7ea66fc8c2a3ed841337d24774183ec8edb626d0e05d799a271e57I own the address:
mtmAtMCFotG5NbFgkbVHTPhARKpqToWsky
So, in theory, if I do things right, I should be able to put together a transaction to send those coins along.
Here's what I got so far:
0100000001571e279a795de0d026b6edc83e187447d2371384eda3c2c86fa67ecb8a86a53c010000001976a9140f532b6d8285d6d1bba1286cd74350270edbc7ee88acffffffff01703a8c00000000001976a9140f532b6d8285d6d1bba1286cd74350270edbc7ee88ac00000000
This isn't signed yet, but I wanted to get someone looking over my shoulder to see if I'm on the right track.
The first part "01000000" is the "version number"
Next "01" is the input count. I only have a single input for this transaction.
Next,
571e279a795de0d026b6edc83e187447d2371384eda3c2c86fa67ecb8a86a53c
is the bytes reversed of the transaction hash where the input is found (3ca5868acb7ea66fc8c2a3ed841337d24774183ec8edb626d0e05d799a271e57)
Next, the index of the previous output (it was the second output in that transaction, the first was change) 010000
Then, the script from the output (length, script, ffffffff) -> 001976a9140f532b6d8285d6d1bba1286cd74350270edbc7ee88acffffffff
Then the output count 01
Then the value of first output 9190000 satoshis encoded as hex (leaving 10KSat for fee), reversed "703a8c"
Then the script to pay to the address OP_DUP OP_HASH160 DATA OP_EQVERIFY OP_CHECKSIG
Then the block lock time (00000000)
How is this looking to you guys?