Expand description
This library provides an extendable Bitcoin-Electrum client that supports batch calls, notifications and multiple transport methods.
By default this library is compiled with support for SSL servers using rustls
and support for
plaintext connections over a socks proxy, useful for Onion servers. Using different features,
the SSL implementation can be removed or replaced with openssl
.
A minimal
configuration is also provided, which only includes the plaintext TCP client.
§Example
use electrum_client::{Client, ElectrumApi};
let mut client = Client::new("tcp://electrum.blockstream.info:50001")?;
let response = client.server_features()?;
Re-exports§
Modules§
- client
- Electrum Client
- raw_
client - Raw client
- socks
- SOCKS proxy clients
- utils
- Utilities helping to handle Electrum-related data.
Structs§
- Batch
- Helper structure that caches all the requests before they are actually sent to the server.
- Config
- Configuration for an electrum client
- Config
Builder - Config Builder
- GetBalance
Res - Response to a
script_get_balance
request. - GetHeaders
Res - Response to a
server_features
request. - GetHistory
Res - Response to a
script_get_history
request. - GetMerkle
Res - Response to a
transaction_get_merkle
request. - Header
Notification - Notification of a new block header
- List
Unspent Res - Response to a
script_list_unspent
request. - RawHeader
Notification - Notification of a new block header with the header encoded as raw bytes
- Request
- A request that can be sent to the server
- Script
Notification - Notification of the new status of a script
- Server
Features Res - Response to a
server_features
request. - Socks5
Config - Configuration for Socks5
- Txid
From PosRes - Response to a
txid_from_pos_with_merkle
request.
Enums§
Traits§
- Electrum
Api - API calls exposed by an Electrum client
- ToElectrum
Script Hash - Trait used to convert a struct into the Electrum representation of an address
Type Aliases§
- Script
Hash - Format used by the Electrum server to identify an address. The reverse sha256 hash of the scriptPubKey. Documented here.
- Script
Status - Binary blob that condenses all the activity of an address. Used to detect changes without having to compare potentially long lists of transactions.