bitcoin-cli howto

Electrum has a powerful command line.This page will show you a few basic principles.Using the inline help To see the list of Electrum commands, type: To see the documentation for a command, type: Magic words The arguments passed to commands may be one of the following magic words: !The exclamation mark !is a shortcut that means ‘the maximum amount available’.Example: Note that the transaction fee will be computed and deducted from the amount.A question mark ?means that you want the parameter to be prompted.Example: Use a colon : if you want the prompted parameter to be hidden (not echoed in your terminal).Note that you will be prompted twice in this example, first for the private key, then for your wallet password.A parameter replaced by a dash - will be read from standard input (in a pipe) | Aliases You can use DNS aliases in place of bitcoin addresses, in most commands.Formatting outputs using jq Command outputs are either simple strings or json structured data.
A very useful utility is the ‘jq’ program.Install it with: The following examples use it.Examples Sign and verify message We may use a variable to store the signature, and verify it: =|) And: | Show the values of your unspents The ‘listunspent’ command returns a list of dict objects, with various fields.Suppose we want to extract the ‘value’ field of each record.This can be achieved with the jq command: | Select only incoming transactions from history Incoming transactions have a positive ‘value’ field | Filter transactions by date The following command selects transactions that were timestamped after a given date: =) | Similarly, we may export transactions for a given time period: =) =) | Encrypt and decrypt messages First we need the public key of a wallet address: =|) Encrypt: | Decrypt: Note: this command will prompt for the encrypted message, then for the wallet password Export private keys and sweep coins The following command will export the private keys of all wallet addresses that hold some bitcoins: | This will return a list of lists of private keys.
In most cases, you want to get a simple list.This can be done by adding a jq filer, as follows: || Finally, let us use this list of private keys as input to the sweep command: || |How to Set up Full Bitcoin Node on Raspberry Pi 3 with Ease by Mario Dian Oct 11, 2016 · 3 min read Running a full node is crucial for securing the Bitcoin network.Without a substantial number of nodes decentralization of Bitcoin would be in danger.If you're a service provider or a volunteer, Raspberry Pi 3 provides a cheap way to access and maintain the full blockchain and contribute to overall security and performance of the network.Before we start, make sure you have:fully working Raspberry Pi 3a large external storage such as USB flash drivegood Internet connection Get 256GB USB drive Now Update OS and Install DependenciesMake sure we have latest Raspbian packages.Some additional dependencies are needed to build the bitcoin client.Pre-installed Raspbian's Berkley DB doesn't play well with the bitcoin client, we need to compile our own.
/berkeley-db/db-4.8.30.NC.tar.gztar -xzvf db-4.8.30.NC.tar.gzcd db-4.8.30.NC/build_unix/../dist/configure --enable-cxxmake sudo make install Install the Bitcoin Client I'm a supporter of a reference implementation from core devs, but you can use any available bitcoin client.bitcoin bbbThe steps may differ, though.Let's download the current code first (v.0.13.1 as of November 7, 2016):Configure the source code, compile it and install: This process took ~2 hours to finish for me.bitcoin calgaryPlease be patient.If you use swap, you can speed it up by running make -j2 instead.Synchronize with the NetworkRun your newly installed node as a process ("&" will suppress any output):Wait for a few seconds and check that the node responds to your commands:It should tell you it's downloading the blockchain.ethereum price etc
If it gives you any error let me know in the comments below.In the case of no errors wait for the node to finish downloading the whole blockchain (currently ~100GB).This process is very time-consuming on RPi3 and may easily take 2-3 weeks to finish.You may occasionally check the process by comparing the following command's output with info from any publicly accessible block explorer such as this one.After all bitcoin transactions are downloaded and verified stop your node and proceed to the next step: Start the Node Automatically Bitcoin full node is a very resource intensive program.bitcoin billionaire two linesThe chances are it will crash itself or the whole operating system occasionally.We need to make sure it can start automatically should any issues occur by installing it as a Linux service.litecoin reeditBy default, Raspbian uses Systemd to take care of services.python bitcoin install
I've written a basic script that works well for me.bitcoin acheter ou pasYou can download it from my gist page: The script runs well on a default Raspbian setup without any modifications.bitcoin time capsuleFeel free to edit it to your needs.Enable the service:If it doesn't output any error run the service and exit the super-user environment:Your bitcoin node should now start automatically after every crash and system restart.Make it Accessible from the Outside WorldWhen you first install a bitcoin node it isn't accessible to the rest of the network thus isn't fully supporting it.bitcoin konto testWe need to open ports to make it "visible".Bitcoin full node listens on port 8333 by default.We'll create following iptables records then: Give it some time (1-60 minutes) and check the node info:In case the number is 8 or less, don't worry and wait a "little" more.