How to Clear a Stuck Bitcoin Transaction - Bitzuma

Blockchain offline

Blockchain Algorithm / May 30, 2016

Simple version

Your offline Bitcoin client needs more information to identify which coins it is spending, so there needs to be some communication from the online computer to the offline computer. Typically, this is done by preparing most of the transaction on the online computer, then transferring it flash drive to the offline computer to be signed.

Technical version

You need the outpoint, scriptPubKey, and amount of each input you want to spend. The outpoint is composed of the 256 bit hash of the transaction that sent you the Bitcoins, and a small integer showing which output of that transaction you're spending. You also need the scriptPubKey to tell you which key you need to use to sign the transaction. You need to know the amount so that you can specify the correct amount of change to send back to yourself. (Otherwise, the unspent money will just go to the miner.) This requires about 61 bytes of space per input. If a single input doesn't have enough to cover the transaction, you'll need to combine multiple inputs.