Top Related Projects
Bitcoin wallet for iOS & Android. Built with React Native
Bitcoin Wallet app for your Android device. Standalone Bitcoin node, no centralized backend required.
Quick Overview
Electrum is a popular, lightweight Bitcoin wallet that allows users to securely store, send, and receive Bitcoin. It offers advanced features like multi-signature support, hardware wallet integration, and the ability to use your own full node, making it suitable for both beginners and advanced users.
Pros
- User-friendly interface with a balance of simplicity and advanced features
- Supports hardware wallets for enhanced security
- Allows connection to custom Bitcoin nodes for increased privacy
- Multi-signature support for shared wallets and increased security
Cons
- Requires some technical knowledge for advanced features
- Has been a target for phishing attacks due to its popularity
- Limited support for other cryptocurrencies (primarily focused on Bitcoin)
- Occasional synchronization issues with servers
Code Examples
As Electrum is primarily a wallet application and not a code library, there are no direct code examples to provide. However, Electrum does offer a JSON-RPC interface for developers who want to interact with the wallet programmatically.
Getting Started
To get started with Electrum:
- Download the official Electrum wallet from https://electrum.org/
- Verify the download's authenticity using the provided GPG signatures
- Install the wallet on your system
- Launch Electrum and follow the setup wizard to create a new wallet or restore an existing one
- Secure your wallet by setting up a strong password and backing up your seed phrase
- Start using Electrum to send, receive, and manage your Bitcoin
For developers interested in using the JSON-RPC interface:
- Launch Electrum with the
--daemon
flag - Use the
electrum daemon load_wallet
command to load your wallet - Interact with the wallet using JSON-RPC calls, such as:
electrum getbalance electrum listaddresses electrum payto <address> <amount>
Note: Always use Electrum responsibly and ensure you're using the official, verified version to protect your funds.
Competitor Comparisons
Bitcoin wallet for iOS & Android. Built with React Native
Pros of BlueWallet
- User-friendly mobile interface for Bitcoin and Lightning transactions
- Supports multiple wallets and watch-only addresses
- Integrates with hardware wallets for enhanced security
Cons of BlueWallet
- Less extensive feature set compared to Electrum
- Limited desktop support, primarily focused on mobile platforms
- Newer project with a smaller community and less battle-tested codebase
Code Comparison
BlueWallet (React Native)
export class WalletsList extends Component {
componentDidMount() {
this.refreshFunction();
}
refreshFunction = () => {
this.setState({ isLoading: true }, async () => {
await BlueApp.fetchWalletBalances();
this.setState({ isLoading: false });
});
};
}
Electrum (Python)
class WalletStorage:
def __init__(self, path, manual_upgrades=False):
self.lock = threading.RLock()
self.data = {}
self._file_exists = False
self._modified = False
self.path = path
self.manual_upgrades = manual_upgrades
self.load_data(path)
Both projects use different programming languages and frameworks, reflecting their focus on mobile (BlueWallet) and desktop (Electrum) platforms. BlueWallet's code snippet shows a React Native component for managing wallets, while Electrum's code demonstrates a more low-level approach to wallet storage management in Python.
Bitcoin Wallet app for your Android device. Standalone Bitcoin node, no centralized backend required.
Pros of Bitcoin Wallet
- Simpler and more user-friendly interface, ideal for beginners
- Faster initial setup and synchronization process
- Supports Bluetooth payments for local transactions
Cons of Bitcoin Wallet
- Limited advanced features compared to Electrum
- Fewer customization options for transaction fees and security settings
- Less support for hardware wallets and multi-signature setups
Code Comparison
Electrum (Python):
def get_tx_height(self, tx_hash):
tx_info = self.db.get_tx_height(tx_hash)
return tx_info.height
Bitcoin Wallet (Java):
public int getConfirmations(Transaction tx) {
if (tx.getConfidence().getConfidenceType() != ConfidenceType.BUILDING)
return 0;
return getChainHeight() - tx.getConfidence().getAppearedAtChainHeight() + 1;
}
Both repositories implement Bitcoin wallets, but they differ in their approach and target audience. Electrum offers more advanced features and customization options, making it suitable for experienced users. Bitcoin Wallet, on the other hand, focuses on simplicity and ease of use, making it more accessible to newcomers in the cryptocurrency space.
Electrum is written in Python, which allows for rapid development and easier contribution from the open-source community. Bitcoin Wallet is implemented in Java, which provides better performance on mobile devices and easier integration with Android systems.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Electrum - Lightweight Bitcoin client
Licence: MIT Licence
Author: Thomas Voegtlin
Language: Python (>= 3.8)
Homepage: https://electrum.org/
Getting started
(If you've come here looking to simply run Electrum, you may download it here.)
Electrum itself is pure Python, and so are most of the required dependencies, but not everything. The following sections describe how to run from source, but here is a TL;DR:
$ sudo apt-get install libsecp256k1-dev
$ python3 -m pip install --user ".[gui,crypto]"
Not pure-python dependencies
If you want to use the Qt interface, install the Qt dependencies:
$ sudo apt-get install python3-pyqt5
For elliptic curve operations, libsecp256k1 is a required dependency:
$ sudo apt-get install libsecp256k1-dev
Alternatively, when running from a cloned repository, a script is provided to build libsecp256k1 yourself:
$ sudo apt-get install automake libtool
$ ./contrib/make_libsecp256k1.sh
Due to the need for fast symmetric ciphers, cryptography is required. Install from your package manager (or from pip):
$ sudo apt-get install python3-cryptography
If you would like hardware wallet support, see this.
Running from tar.gz
If you downloaded the official package (tar.gz), you can run Electrum from its root directory without installing it on your system; all the pure python dependencies are included in the 'packages' directory. To run Electrum from its root directory, just do:
$ ./run_electrum
You can also install Electrum on your system, by running this command:
$ sudo apt-get install python3-setuptools python3-pip
$ python3 -m pip install --user .
This will download and install the Python dependencies used by
Electrum instead of using the 'packages' directory.
It will also place an executable named electrum
in ~/.local/bin
,
so make sure that is on your PATH
variable.
Development version (git clone)
(For OS-specific instructions, see here for Windows, and for macOS)
Check out the code from GitHub:
$ git clone https://github.com/spesmilo/electrum.git
$ cd electrum
$ git submodule update --init
Run install (this should install dependencies):
$ python3 -m pip install --user -e .
Create translations (optional):
$ sudo apt-get install python3-requests gettext qttools5-dev-tools
$ ./contrib/pull_locale
Finally, to start Electrum:
$ ./run_electrum
Run tests
Run unit tests with pytest
:
$ pytest tests -v
To run a single file, specify it directly like this:
$ pytest tests/test_bitcoin.py -v
Creating Binaries
Contributing
Any help testing the software, reporting or fixing bugs, reviewing pull requests and recent changes, writing tests, or helping with outstanding issues is very welcome. Implementing new features, or improving/refactoring the codebase, is of course also welcome, but to avoid wasted effort, especially for larger changes, we encourage discussing these on the issue tracker or IRC first.
Besides GitHub,
most communication about Electrum development happens on IRC, in the
#electrum
channel on Libera Chat. The easiest way to participate on IRC is
with the web client, web.libera.chat.
Top Related Projects
Bitcoin wallet for iOS & Android. Built with React Native
Bitcoin Wallet app for your Android device. Standalone Bitcoin node, no centralized backend required.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot