Difference between revisions of "Electrum"

From Bitcoin Wiki
Jump to: navigation, search
(license was changed from GPL to MIT in Feb 2016)
 
(21 intermediate revisions by 7 users not shown)
Line 5: Line 5:
  
 
'''Main features:'''
 
'''Main features:'''
* Encrypted wallet: the file that contains your bitcoins is protected with a password. You are protected from thieves.
+
* Encrypted wallet: the file that contains bitcoin [[private keys]] is protected with a password, and never leaves the user's computer.
* Deterministic key generation: If you lose your wallet, you can recover it from its seed. You are protected from your own mistakes.
+
* Deterministic key generation: If you lose your wallet file, you can recover it from its [[seed phrase|seed]]. You are protected from your own mistakes.
* Instant on: the client does not download the blockchain, it requests that information from a server. No delays, always up-to-date.
+
* Instant on: by default the client does not download the blockchain, it requests that information from a server. No delays, always up-to-date.
 
* Transactions are signed locally: Your private keys are not shared with the server. You do not have to trust the server with your money.
 
* Transactions are signed locally: Your private keys are not shared with the server. You do not have to trust the server with your money.
* Freedom and Privacy: The server does not store user accounts. You are not tied to a particular server, and the server does not need to know you.
+
* [[Cold storage]]: Keeping private keys offline is supported. Has a watch-only mode for online use.
* No scripts: Electrum does not download any script. A compromised server cannot send you arbitrary code and steal your bitcoins.
+
* [[Multisignature]]: Dividing the power to spend coins between multiple wallets is supported.
* No single point of failure: The server code is open source, anyone can run a server.
+
* [[Hardware wallet]] integration: Many leading hardware wallets can interface with Electrum.
 +
* Redundancy: You are not tied to a particular server, and the server does not need to know you. One server going down doesn't cause user downtimes.
 +
* No single point of failure: The server code is open source, anyone can run a server. Private keys can be exported and imported into other wallets.
 
* Firewall friendly: The client does not need to open a port, it simply polls the server for updates.
 
* Firewall friendly: The client does not need to open a port, it simply polls the server for updates.
* Free software: Gnu GPL v3. Anyone can audit the code.
+
* Free software: MIT License. Anyone can audit the code.
 
* Written in Python. The code is short, and easy to review.
 
* Written in Python. The code is short, and easy to review.
 +
* Add-ons: third-party plugins are supported.
 
* Support for Bitcoin URIs, signed URIs and Bitcoin aliases
 
* Support for Bitcoin URIs, signed URIs and Bitcoin aliases
 
<pre>
 
Some contents can be outdated or deprecated. To see up to date documentation visit the repository [https://github.com/spesmilo/electrum/blob/master/docs Electrum Docs]
 
</pre>
 
  
 
__TOC__
 
__TOC__
  
===Graphical User Interfaces===
+
==Documentation==
Electrum has two GUIs: one that is based on Gtk, and a newer one based on Qt. The Qt GUI is enabled by default. To use the gtk interface, type:
 
<pre>
 
$ ./electrum -g gtk
 
</pre>
 
In addition, Electrum has a rich set of commands for the command line interface.
 
  
===Brain Wallet===
+
Documentation is hosted on http://docs.electrum.org/
  
Electrum uses a type 2 deterministic key generation algorithm.
+
It includes tutorials for the multisignature, cold storage and hardware wallet features.
This means that all the keys are derived from a seed.
 
  
Typical seeds have 128 bits of entropy. Electrum provides mnemonic code in order to represent the seed.
+
==History==
  
Example:
+
Electrum was announced November 5, 2011<ref>[http://bitcointalk.org/index.php?topic=50936.0 Electrum - a new thin client]</ref>.
*hexadecimal: 431a62f1c86555d3c45e5c4d9e10c8c7
 
*mnemonic: "constant forest adore false green weave stop guy fur freeze giggle clock"
 
  
You can display the seed with the command line interface. Example:
+
== Server software ==
<pre>
 
$ ./electrum getseed
 
Password:
 
431a62f1c86555d3c45e5c4d9e10c8c7 "constant forest adore false green weave stop guy fur freeze giggle clock"
 
</pre>
 
  
===Wallet File===
+
The server code is open source, anyone can run a server. There are several implementations.
Electrum uses an electrum.dat file as your wallet which is created when you first run the application.
 
  
Your wallet file is located in:
+
Public Electrum servers run by strangers can easily spy on Electrum users. For this reason many people run their own server. For maximum [[Full node#Why should you use a full node wallet|trustlessness, privacy and security]]; users should point Electrum to their own servers.
  
On Windows
+
=== ElectrumX ===
  
*Show hidden files
+
ElectrumX is the latest iteration of general purpose Electrum servers. Written in python, it tries to be as efficient as possible to keep synchronization times low. ElectrumX is able to serve thousands of clients at once, it is suited to be an always-on server that contributes to bitcoin.
*Go to \Users\YourUserName\AppData\Local\Electrum
 
  
On Mac
+
Github: https://github.com/kyuupichan/electrumx/
*Open Finder
 
*Go > Go to folder (shift+cmd+G) and type ~/.electrum
 
  
On Linux
+
Interview with author: https://btcmanager.com/nobody-has-setup-an-electrum-server-for-over-a-year/ archive: https://archive.is/lUnfa
*Home Folder
 
*Go > Location and type ~/.electrum
 
  
===Multiple wallets===
+
=== Electrum Personal Server ===
Electrum uses one single file per wallet. Your default wallet is located in your user account as listed above.
 
If you want to use another wallet, use the -w option followed by the wallet path and name:
 
<pre>
 
$ ./electrum -w /path/to/my/wallet/wallet_name
 
</pre>
 
  
===Export and import addresses===
+
Electrum Personal Server has a different approach to a normal server. It is intended to be used by a single person only. Instead of creating a database of every transaction and address ever used on the bitcoin blockchain, Electrum Personal Server only tracks the user's own wallets. This allows it to be much more efficient with resources, it does not need any extra data files and is compatible with [[Bitcoin Core]]'s pruning feature.
  
You can export your private keys using the 'addresses' command:
+
Electrum Personal Server is probably the best way to combine Electrum's feature-richness (hardware wallet integration, multisignature, [[seed phrase]], etc) with a [[full node]]'s strong security and privacy.
<pre>
 
$ ./electrum addresses -ak
 
Password:
 
1LGoehbyeX4QBEPK1a6dhyaoMQZfqg5LKX:5JBSttEGhjEcPidSovW66Rin2EZ6LEHZ2qx8Pu2RqqNaDTBVWaF 
 
1KcsBJa2cCxVkGJfSsg5bUeXN7Y5uLa8mP:5KiP4uiNT6KG8jnXbainCM8rDWRrgxt3PAyut4FFpDoCo1Rh6VM 
 
1PXsn7LVXTccGhJPTUL8r2EGB4fF9kvex3:5Kj8mvBJReyk8xEBMx5cTnciQCxto5JmudiTPkqwMcd61Kf1Jqc 
 
1KteSFTAphyByLTtUfFiVQ9s7fMVmx7c2h:5JeZ3FTbWcksLt3PKydd5U9p952UQRHwv3LoxzCA9LZ7V2bku5p 
 
1GE5ZChAobeTEPLHDCDDKTSg3XvLkcQFjS:5JwtGEygTwF2nouhRVzW3w5DWZd1sCgxLtnd1v51wjkbUrp5sqH 
 
12YNehfAoYTiwjTXULwaZqTCauu2D61fq6:5Jvcq19ePCXKcVun4n7US99CsrEByUK2kgxXBA3rBVBqYZjhfwD  [change]  
 
</pre>
 
There are two options in this example:
 
* option -a means: 'list all addresses'. if you don't use it, change addresses are not listed.
 
* option -k means: display the private keys
 
  
You can also import addresses into an electrum wallet, with the 'importprivkey' command:
+
Github: https://github.com/chris-belcher/electrum-personal-server
<pre>
 
$ ./electrum importprivkey 5JBSttEGhjEcPidSovW66Rin2EZ6LEHZ2qx8Pu2RqqNaDTBVWaF
 
Keypair imported:  1LGoehbyeX4QBEPK1a6dhyaoMQZfqg5LKX
 
</pre>
 
Note that imported keys do not belong to the deterministic sequence of your wallet; if you import keys in a wallet, you must back it up!
 
 
 
===Offline wallet===
 
 
 
It is possible to create a transaction on an offline computer,
 
and to broadcast them from another computer, with a wallet that does not have the seed or private keys.
 
 
 
====How to prepare an offline wallet ====
 
*step 1: create a wallet on your offline computer
 
<pre>
 
[offline]$ electrum -o -w wallet create
 
</pre>
 
*step 2: extract the seed from your wallet file:
 
<pre>
 
[offline]$ electrum -o -w wallet deseed
 
</pre>
 
This will remove the seed from 'wallet', and save it to a file named 'wallet.seed'
 
*step 3: transfer the deseeded wallet to the online computer (for example with a usb stick)
 
*step 4: run electrum on the online computer; this will synchronize your wallet with the bitcoin network, and you will be able to monitor incoming transactions:
 
<pre>
 
[online]$ electrum -w wallet
 
</pre>
 
 
 
====How to send a transaction with an offline wallet====
 
*step 1: copy the synchronized wallet file to your offline computer, in the directory where the seed is.
 
*step 2: restore the seed in the wallet file:
 
<pre>
 
[offline]$ electrum -w wallet reseed
 
</pre>
 
*step 3: create the transaction
 
<pre>
 
[offline]$ electrum -w wallet mktx <recipient> <amount>  >  tx_file
 
</pre>
 
*step 4: with the usb stick, copy the transaction to the online computer:
 
*step 5: broadcast the transaction on the online computer:
 
<pre>
 
[online]$ electrum -w wallet sendtx  `cat tx_file`
 
</pre>
 
 
 
=== List of commands ===
 
 
 
{| class="wikitable sortable"
 
|-
 
! command !! description !! syntax !! requires password !! needs to be online
 
|-
 
| addresses || show your list of addresses, optionally with private keys. || addresses [-a] [-b] [-k] || iff -k || no
 
|-
 
| balance || shows the balance of your wallet or of an address || balance [address] || no || yes
 
|-
 
| contacts || print your list of contacts || contacts || no || no
 
|-
 
| create || create a new wallet || create || no || no
 
|-
 
| deseed || Remove seed from wallet and store it to .seed file  || deseed || no || no
 
|-
 
| eval || call python eval || eval <expression> || no || no
 
|-
 
| getseed || print your seed || seed || yes || no
 
|-
 
| help || display the help for a command || help [command] || no || no
 
|-
 
| history || print the transaction history || history || no || yes
 
|-
 
| import || import a keypair || import <address:private_key> || yes || no
 
|-
 
| label || change the label of a transaction or address || label <label> || no || no
 
|-
 
| mktx || create a transaction and dump it || mktx [-s sourceaddr] [-c changeaddr] [-f fee] <address> <amount>  || yes || no
 
|-
 
| password || update your password || password || yes || no
 
|-
 
| payto || create and broadcast a transaction || payto [-s sourceaddr] [-c changeaddr] [-f fee] <address> <amount> || yes || yes
 
|-
 
| reseed || take seed from .seed file and add it to wallet (it checks that keys are consistent). || reseed || no || no
 
|-
 
| restore || restore a wallet from seed || restore || no || yes
 
|-
 
| sendtx || broadcast a transaction || sendtx <tx> || no || yes
 
|-
 
| signmessage || sign a message (as in bitcoind) || signmessage <address> <message> || yes || no
 
|-
 
| validateaddress || check is the argument is a valid bitcoin address || validateaddress <address> || no || no
 
|-
 
| verifymessage || verify a message (as in bitcoind) || verifymessage <address> <signature> <message> || no || no
 
|}
 
 
 
==History==
 
 
 
Electrum was announced November 5, 2011<ref>[http://bitcointalk.org/index.php?topic=50936.0 Electrum - a new thin client]</ref>.
 
  
 
==See Also==
 
==See Also==
  
* [[Electrum/Documentation]] : General documentation of the Electrum client
 
* [[Electrum/Translation]]
 
* [[Electrum/TODO]]
 
 
* [[Thin Client Security]]
 
* [[Thin Client Security]]
 +
* [[Hardware wallet]]
 +
* [[Seed phrase]]
 +
* [[Multisignature]]
 +
* [[Cold storage]]
  
 
==External Links==
 
==External Links==
Line 196: Line 66:
 
* [http://electrum.org/ Electrum] project website
 
* [http://electrum.org/ Electrum] project website
 
* [https://github.com/spesmilo/electrum/ Electrum] project source
 
* [https://github.com/spesmilo/electrum/ Electrum] project source
* [https://github.com/spesmilo/electrum/blob/master/docs Electrum Docs] updated documentation
 
  
 
==References==
 
==References==

Latest revision as of 01:13, 21 December 2018

Electrum logo.png
screenshot of Electrum with its Qt gui

Electrum is a lightweight Bitcoin client, based on a client-server protocol. It was released on november 5, 2011.

Main features:

  • Encrypted wallet: the file that contains bitcoin private keys is protected with a password, and never leaves the user's computer.
  • Deterministic key generation: If you lose your wallet file, you can recover it from its seed. You are protected from your own mistakes.
  • Instant on: by default the client does not download the blockchain, it requests that information from a server. No delays, always up-to-date.
  • Transactions are signed locally: Your private keys are not shared with the server. You do not have to trust the server with your money.
  • Cold storage: Keeping private keys offline is supported. Has a watch-only mode for online use.
  • Multisignature: Dividing the power to spend coins between multiple wallets is supported.
  • Hardware wallet integration: Many leading hardware wallets can interface with Electrum.
  • Redundancy: You are not tied to a particular server, and the server does not need to know you. One server going down doesn't cause user downtimes.
  • No single point of failure: The server code is open source, anyone can run a server. Private keys can be exported and imported into other wallets.
  • Firewall friendly: The client does not need to open a port, it simply polls the server for updates.
  • Free software: MIT License. Anyone can audit the code.
  • Written in Python. The code is short, and easy to review.
  • Add-ons: third-party plugins are supported.
  • Support for Bitcoin URIs, signed URIs and Bitcoin aliases

Documentation

Documentation is hosted on http://docs.electrum.org/

It includes tutorials for the multisignature, cold storage and hardware wallet features.

History

Electrum was announced November 5, 2011[1].

Server software

The server code is open source, anyone can run a server. There are several implementations.

Public Electrum servers run by strangers can easily spy on Electrum users. For this reason many people run their own server. For maximum trustlessness, privacy and security; users should point Electrum to their own servers.

ElectrumX

ElectrumX is the latest iteration of general purpose Electrum servers. Written in python, it tries to be as efficient as possible to keep synchronization times low. ElectrumX is able to serve thousands of clients at once, it is suited to be an always-on server that contributes to bitcoin.

Github: https://github.com/kyuupichan/electrumx/

Interview with author: https://btcmanager.com/nobody-has-setup-an-electrum-server-for-over-a-year/ archive: https://archive.is/lUnfa

Electrum Personal Server

Electrum Personal Server has a different approach to a normal server. It is intended to be used by a single person only. Instead of creating a database of every transaction and address ever used on the bitcoin blockchain, Electrum Personal Server only tracks the user's own wallets. This allows it to be much more efficient with resources, it does not need any extra data files and is compatible with Bitcoin Core's pruning feature.

Electrum Personal Server is probably the best way to combine Electrum's feature-richness (hardware wallet integration, multisignature, seed phrase, etc) with a full node's strong security and privacy.

Github: https://github.com/chris-belcher/electrum-personal-server

See Also

External Links

References