|
Spending BTCSpending your Bitcoins is a secured process that requires several steps.It involves moving files between your online PC and your offline wallet machine. USB flash disk is probably the most convenient medium to use for this purpose. Never move any files others than the ones that you actually need to move, which are:
Assuming that you would not sign a wrong transaction, nothing in the files you move between the two points is security sensitive, so you do not need to worry about protecting the medium (USB disk). 1. Export your balanceIn order to spend your coins you will need to provide a current balance data to the computer that runs your wallet.
2. Sign your transactionAs mentioned before, to spend your money you need to move the most recentbalance/ folder, from online PC to wallet machine.For security reasons, you should execute wallet command only on offline machine - one that never was nor will be connected to Internet.Manual modeTo spend your coins, order the wallet to make and sign a new transaction, using a command like: wallet -send 1JbdKe4eBwtexisGTbCKY5v5CfphtdZXJs=0.01Please note no spaces between the address, the equal sign and the value. The value represents the amount in BTC, which you request to send to the given address. There are also other switches which you may find useful at this stage: -fee <value> - the transaction fee, in BTC (see also the fee config value) -prompt - decode the signed transaction and ask for a confirmation, before writing it to disk -txfn <file> - write the signed transaction to this file, instead of a name made from the TxID -change <address> - send the change to this address (by default it goes back to the first input) -f - substract the fee from the first value, instead of adding it on top -seq <value> - the sequence number to be used in the inputs.
The default of -3 marks the transaction as replaceable (RBF), so you can bump its fee later.
Use -1 or -2 to make it final. -locktime <value> - the transaction's lock time
(a unix timestamp if 500000000 or more, otherwise a block height) -txver <value> - the transaction version number (2 by default)Note: -prompt is worth setting permanently, with prompt=true in your
wallet.cfg file. It shows you the decoded transaction while nothing has been written to disk yet,
so you can abort before there is any file to move to the online machine.
See the wallet config file page.To see all the wallet's options, just run wallet -h
Smart modeIf you used Spend tab to make the transaction, all you have to do now is to extract payment.zip file at the wallet computer and execute there the exact command from the pay_cmd file. For further convenience, you can rename it to pay_cmd.sh or pay_cmd.bat by editing the config file.3. Verify signed transactionIf everything goes well with the wallet's'-send ... command,
it will create a text file with a signed transaction.
The file is named like 01234567.txt - this is the file you need to move
to your online node in order to notify the network about your payment.
Before you broadcast your signed transaction to the network,
verify carefully that it does exactly what you intended.
Note: always verify transaction before broadcasting it! Double check whether the decoded content of a transaction matches exactly what you intended to spend. If what you see is not what you wanted, do not broadcast the transaction but destroy the transaction file instead. If you follow this simple rule, your coins should be safe, even if your wallet application at the offline machine got compromised or experienced some critical bug. 4. Broadcast the transactionAfter making sure that the transaction does indeed what you intended, you must broadcast it to the network, in order to actually move your coins.
| ||||||||||||||||||||||