01000000 // version
01 // number of inputs
9f9b54077ebaf05f41c38a22fd2269a481089c922c5cf6b4a241cbf28e29e683 // hash of the tx you gave me, reversed
00000000 // your input was first, so index is 0
00 // this is just here for when you sign. placeholder.
ffffffff // this is sequence for nLockTime
01 // this is output count
18310c0000000000 // This says the output is worth 0.00799 BTC (leaving 0.00001 BTC in fees, because the input is worth 0.008 BTC)
23 // The length of the output is 35 bytes
a8 // OP_SHA256
20 // push 32 bytes on the stack
931d236179670b00348f87bea4199fe18297f0ef26da02c7542bd54d5b7836d8 // this is the 32 bytes that are pushed (your hash) REPLACE WITH A HASH OF SOMETHING ONLY YOU KNOW!
87 // OP_EQUAL
00000000 // nLockTime... leave at 0
clumped all together.
01000000019f9b54077ebaf05f41c38a22fd2269a481089c922c5cf6b4a241cbf28e29e6830000000000ffffffff0118310c000000000023a820931d236179670b00348f87bea4199fe18297f0ef26da02c7542bd54d5b7836d88700000000
This is what you use for signrawtransaction.
I will replace the sha256 hash with XXX so you can see where to put it.
01000000019f9b54077ebaf05f41c38a22fd2269a481089c922c5cf6b4a241cbf28e29e6830000000000ffffffff0118310c000000000023a820XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX8700000000