github.com/piotrnar/gocoin@v0.0.0-20240512203912-faa0448c5e96/website/gocoin_manual_spending.html (about)

     1  <html>
     2  <head>
     3  <link rel="stylesheet" href="style.css" type="text/css">
     4  </head>
     5  <body>
     6  <h1>Spending BTC</h1>
     7  Spending your Bitcoins is a secured process that requires several steps.<br>
     8  It involves moving files between your <u>online PC</u> and your offline <u>wallet machine</u>.<br>
     9  USB flash disk is probably the most convenient medium to use for this purpose.
    10  <br>
    11  <br>
    12  Never move any files others than the ones that you actually need to move, which are:<br>
    13  <ul><li><code>balance/</code> folder created by <b>balio</b>
    14  or <code>balance.zip</code> / <code>payment.zip</code> file
    15  generated by <b>WebUI</b> - you move it from <u>online PC</u> to <u>wallet machine</u>.</li>
    16  <li>Text files with signed transactions - these you move from <u>wallet machine</u> to <u>online PC</u>.</li></ul>
    17  <br>
    18  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).
    19  <br>
    20  
    21  
    22  <h2><b>1. Export your balance</b></h2>
    23  In order to spend your coins you will need to provide a current balance data to the computer that runs your <u>wallet</u>.
    24  
    25  <br><br>
    26  
    27  <table border="1" cellpadding="5" cellspacing="0">
    28  <tr>
    29  <td align="center"><b class="bigger">If you have no client: use balio tool</b>
    30  
    31  <td align="center"><b class="bigger">If you have a running client: use WebUI</b>
    32  
    33  <tr>
    34  <td valign="top">
    35  There is a tool <b>balio</b> that can fetch a balance of your wallet from a public block explorers.<br>
    36  <br>
    37  Run the tool from a command line with the file name of your wallet as the command line parameter (e.g. <code>balio wallet.txt</code>).<br>
    38  Eventually enter the list of space separated BTC addresses that you want to fetch the balance for
    39  (<code>balio 1Hz96kJKF2HLPGY15JWLB5m9qGNxvt8tHJ 3NEDeMiXubepj68RGCTXJyJc83cYXMpusw</code>).
    40  <br>
    41  <br>
    42  This should create the <code>balance/</code> folder in the current directory, ready to be moved your <u>wallet machine</u>.<br>
    43  <br>
    44  <i><b>Note:</b> fetching the balance this way exposes your privacy.</i><br>
    45  <i>To </i><i>use <b>balio</b> through <b>Tor</b>, set TOR environment variable in your system, pointing it to your tor's socks proxy (e.g. <code>TOR=localhost:9050</code>).</i><br>
    46  <i>Additionally, despite of using Tor, to further protect your privacy try to fetch balance of single addresses instead of entire wallets.</i>
    47  
    48  
    49  <td valign="top">
    50  From the moment a content of <code>wallet.txt</code> file is properly stored in your browser, you can check and export your balance.
    51  Do it on the <b>Wallet</b> tab.<br>
    52  <br>
    53  To spend your coins, you can choose one of the two ways here.
    54  It is recommended to use <b>MakeTx</b> page that allows you to assemble a transaction using a convenient,
    55  interactive way.<br>
    56  <br>
    57  
    58  
    59  
    60  <table border="1" cellpadding="3" cellspacing="0">
    61  <tr>
    62  <td align="center" width="50%"><b>MakeTx tab: Use Coin Control</b>
    63  
    64  <td align="center" width="50%"><b>Wallet tab: download balance.zip</b>
    65  
    66  <tr>
    67  <td valign="top">
    68  <br>
    69  After you fill in all the transaction details, it will give you <code>payment.zip</code> with the exact command that you shall execute at the wallet machine.<br>
    70  <br>
    71  
    72  <td valign="top">
    73  Use <b>Wallet</b> page of WebUI to download <code>balance.zip</code> file.<br>
    74  <br>
    75  Extract the zip file to get the <code>balance</code> folder.<br>
    76  <br>
    77  
    78  
    79  </table>
    80  </table>
    81  
    82  
    83  
    84  <h2><b>2. Sign your transaction</b></h2>
    85  
    86  
    87  As mentioned before, to spend your money you need to move the most recent <code>balance/</code> folder, from <u>online PC</u> to <u>wallet machine</u>.<br>
    88  For security reasons, you should execute <code>wallet</code> command only on offline machine - one that never was nor will be connected to Internet.<br>
    89  
    90  <h3>Manual mode</h3>
    91  To spend your coins, order the wallet to make and sign a new transaction, using a command like:<br>
    92  <code>&nbsp;&nbsp;&nbsp;&nbsp;wallet -send 1JbdKe4eBwtexisGTbCKY5v5CfphtdZXJs=0.01</code><br>
    93  Please note no spaces between the address, the equal sign and the value.<br>
    94  The value represents the amount in BTC, which you request to send to the given address.<br>
    95  <br>
    96  
    97  There are also other switches which you may find useful at this stage.<br>
    98  One of them (<code>-fee</code>) allows you to control the transaction's' fee.<br>
    99  To see all the wallet's options, just run <code>wallet -h</code>
   100  
   101  <h3>Smart mode</h3>
   102  If you used <b>MakeTx</b> tab to make the transaction, all you have to do now is to extract <b>payment.zip</b>
   103  file at the <u>wallet</u> computer and execute there the exact command from the <b>pay_cmd</b> file.
   104  For further convenience, you can rename it to <i>pay_cmd.sh</i> or <i>pay_cmd.bat</i> by editing the <a href="gocoin_manual_config.html">config file</a>.
   105  
   106  
   107  <h2><b>3. Verify signed transaction</b></h2>
   108  
   109  If everything goes well with the wallet's' <code>-send ...</code> command,
   110  it will create a text file with a signed transaction.
   111  The file is named like <code>01234567.txt</code> - this is the file you need to move
   112  to your online node in order to notify the network about your payment.
   113  Before you broadcast your signed transaction to the network,
   114  verify carefully that it does exactly what you intended.
   115  <br>
   116  <br>
   117  
   118  <table border="1" cellpadding="3" cellspacing="0">
   119  <tr>
   120  <td align="center" width="30%"><b>Wallet</b>
   121  <td align="center" width="40%"><b>WebUI</b> (requires client)
   122  
   123  
   124  <tr>
   125  <td valign="top">
   126  To see a decoded content of a transaction, execute:<br>
   127  <code>  wallet -d rawtxdata.txt</code>
   128  
   129  
   130  <td valign="top">
   131  Use <b>PushTx</b> button or <i>Upload Transaction File</i> form.<br>
   132  After you upload the transaction, you should see it decoded.<br>
   133  Then have a look if it makes sense. And if it does, send it away...<br>
   134  </table>
   135  
   136  <br>
   137  <i><b>Note: always verify transaction before broadcasting it!</b><br>
   138  Verify that the decoded content of a transaction matches exactly what you intended to spend.</i>
   139  <i>If what you see would not be what you wanted, do not broadcast the transaction, but destroy the transaction file instead.<br>
   140  </i>
   141  <i>If you follow this simple rule, your money will be safe, even in case if there was a critical bug in the wallet application that would otherwise destroy your coins (which we hope there isn't).</i>
   142  <br>
   143  <br>
   144  <h2><b>4. Broadcast the transaction</b></h2>
   145  After making sure that the transaction does indeed what you intended, you must broadcast it to the network, in order to actually move your coins.<br>
   146  <br>
   147  
   148  
   149  <table border="1" cellpadding="5" cellspacing="0">
   150  <tr>
   151  <td align="center" width="35%"><b>WebUI</b> (requires client)
   152  <td align="center" width="35%"><b>TextUI</b> (requires client)
   153  <td align="center" width="30%"><b>Web services</b>
   154  
   155  
   156  <tr>
   157  <td valign="top">
   158  Load the transaction using the client's WebUI.
   159  Click on the envelope icon with a green arrow to broadcast a loaded transaction to the network.
   160  Coming back to <i>Transactions</i> tab later, press the button in the "Own TXs" row,
   161  to see all the transactions you've loaded (those with a red background are yours).
   162  You can also unload a previously loaded transaction by clicking on the red X icon.
   163  
   164  
   165  <td valign="top">
   166  Use <code>stx</code> command with the transaction ID as its parameter (you had the ID printed, when loading it).
   167  
   168  <td valign="top" rowspan="3">
   169  Use any web page that allows you to push a raw transaction to the bitcoin network.<br>
   170  <br>
   171  For instance:<br>
   172  &bull;&nbsp;<a href="https://blockchain.info/pushtx">https://blockchain.info/pushtx</a><br>
   173  &bull;&nbsp;<a href="https://coinb.in/send-raw-transaction.html">https://coinb.in/send-raw-transaction.html</a><br>
   174  &bull;&nbsp;More at <a href="https://en.bitcoin.it/wiki/Transaction_broadcasting">https://en.bitcoin.it/wiki/Transaction_broadcasting</a><br>
   175  <br>
   176  
   177  Just copy the text from the transaction file, paste it into the form and push the button.<br>
   178  <br>
   179  
   180  <i><b>Note:</b> being concerned about exposing your IP, you may want to access the web page via Tor.</i><br>
   181  <i><br>
   182  </i>
   183  
   184  <tr><td valign="top" colspan="2" align="center">
   185  <b>Re-broadcasting transactions</b>
   186  
   187  <tr><td valign="top" colspan="2">
   188  The client never broadcasts transactions unrequested, so if your transaction does not appear in the chain soon enough, you may want to re-broadcast it, using the same method as for the initial broadcasting. There may of course be other reasons why your transaction does not get confirmed (usually because the fee was too low), in which case re-broadcasting it will not help you much.<br>
   189  <br>
   190  
   191  There is also a TextUI command <code>stxa</code> that re-broadcasts all the transaction that have been loaded, but not yet confirmed by the network. Note that when a transaction gets mined into a block it gets removed from the list automatically.
   192  
   193  
   194  
   195  </table>
   196  
   197  
   198  </body>
   199  </html>