[−][src]Struct electrum_client::client::Client
Generalized Electrum client that supports multiple backends. Can re-instantiate client_type if connections drops
Implementations
impl Client
[src]
pub fn new(url: &str) -> Result<Self, Error>
[src]
Default constructor supporting multiple backends by providing a prefix
Supported prefixes are:
- tcp:// for a TCP plaintext client.
- ssl:// for an SSL-encrypted client. The server certificate will be verified.
If no prefix is specified, then tcp://
is assumed.
See Client::from_config for more configuration options
pub fn from_config(url: &str, config: Config) -> Result<Self, Error>
[src]
Generic constructor that supports multiple backends and allows configuration through the [Config]
Trait Implementations
impl ElectrumApi for Client
[src]
pub fn batch_call(&self, batch: &Batch) -> Result<Vec<Value>, Error>
[src]
pub fn block_headers_subscribe_raw(
&self
) -> Result<RawHeaderNotification, Error>
[src]
&self
) -> Result<RawHeaderNotification, Error>
pub fn block_headers_pop_raw(
&self
) -> Result<Option<RawHeaderNotification>, Error>
[src]
&self
) -> Result<Option<RawHeaderNotification>, Error>
pub fn block_header_raw(&self, height: usize) -> Result<Vec<u8>, Error>
[src]
pub fn block_headers(
&self,
start_height: usize,
count: usize
) -> Result<GetHeadersRes, Error>
[src]
&self,
start_height: usize,
count: usize
) -> Result<GetHeadersRes, Error>
pub fn estimate_fee(&self, number: usize) -> Result<f64, Error>
[src]
pub fn relay_fee(&self) -> Result<f64, Error>
[src]
pub fn script_subscribe(
&self,
script: &Script
) -> Result<Option<ScriptStatus>, Error>
[src]
&self,
script: &Script
) -> Result<Option<ScriptStatus>, Error>
pub fn script_unsubscribe(&self, script: &Script) -> Result<bool, Error>
[src]
pub fn script_pop(&self, script: &Script) -> Result<Option<ScriptStatus>, Error>
[src]
pub fn script_get_balance(
&self,
script: &Script
) -> Result<GetBalanceRes, Error>
[src]
&self,
script: &Script
) -> Result<GetBalanceRes, Error>
pub fn batch_script_get_balance<'s, I>(
&self,
scripts: I
) -> Result<Vec<GetBalanceRes>, Error> where
I: IntoIterator<Item = &'s Script> + Clone,
[src]
&self,
scripts: I
) -> Result<Vec<GetBalanceRes>, Error> where
I: IntoIterator<Item = &'s Script> + Clone,
pub fn script_get_history(
&self,
script: &Script
) -> Result<Vec<GetHistoryRes>, Error>
[src]
&self,
script: &Script
) -> Result<Vec<GetHistoryRes>, Error>
pub fn batch_script_get_history<'s, I>(
&self,
scripts: I
) -> Result<Vec<Vec<GetHistoryRes>>, Error> where
I: IntoIterator<Item = &'s Script> + Clone,
[src]
&self,
scripts: I
) -> Result<Vec<Vec<GetHistoryRes>>, Error> where
I: IntoIterator<Item = &'s Script> + Clone,
pub fn script_list_unspent(
&self,
script: &Script
) -> Result<Vec<ListUnspentRes>, Error>
[src]
&self,
script: &Script
) -> Result<Vec<ListUnspentRes>, Error>
pub fn batch_script_list_unspent<'s, I>(
&self,
scripts: I
) -> Result<Vec<Vec<ListUnspentRes>>, Error> where
I: IntoIterator<Item = &'s Script> + Clone,
[src]
&self,
scripts: I
) -> Result<Vec<Vec<ListUnspentRes>>, Error> where
I: IntoIterator<Item = &'s Script> + Clone,
pub fn transaction_get_raw(&self, txid: &Txid) -> Result<Vec<u8>, Error>
[src]
pub fn batch_transaction_get_raw<'t, I>(
&self,
txids: I
) -> Result<Vec<Vec<u8>>, Error> where
I: IntoIterator<Item = &'t Txid> + Clone,
[src]
&self,
txids: I
) -> Result<Vec<Vec<u8>>, Error> where
I: IntoIterator<Item = &'t Txid> + Clone,
pub fn batch_block_header_raw<'s, I>(
&self,
heights: I
) -> Result<Vec<Vec<u8>>, Error> where
I: IntoIterator<Item = u32> + Clone,
[src]
&self,
heights: I
) -> Result<Vec<Vec<u8>>, Error> where
I: IntoIterator<Item = u32> + Clone,
pub fn batch_estimate_fee<'s, I>(&self, numbers: I) -> Result<Vec<f64>, Error> where
I: IntoIterator<Item = usize> + Clone,
[src]
I: IntoIterator<Item = usize> + Clone,
pub fn transaction_broadcast_raw(&self, raw_tx: &[u8]) -> Result<Txid, Error>
[src]
pub fn transaction_get_merkle(
&self,
txid: &Txid,
height: usize
) -> Result<GetMerkleRes, Error>
[src]
&self,
txid: &Txid,
height: usize
) -> Result<GetMerkleRes, Error>
pub fn server_features(&self) -> Result<ServerFeaturesRes, Error>
[src]
pub fn ping(&self) -> Result<(), Error>
[src]
pub fn block_header(&self, height: usize) -> Result<BlockHeader, Error>
[src]
pub fn block_headers_subscribe(&self) -> Result<HeaderNotification, Error>
[src]
pub fn block_headers_pop(&self) -> Result<Option<HeaderNotification>, Error>
[src]
pub fn transaction_get(&self, txid: &Txid) -> Result<Transaction, Error>
[src]
pub fn batch_transaction_get<'t, I>(
&self,
txids: I
) -> Result<Vec<Transaction>, Error> where
I: IntoIterator<Item = &'t Txid> + Clone,
[src]
&self,
txids: I
) -> Result<Vec<Transaction>, Error> where
I: IntoIterator<Item = &'t Txid> + Clone,
pub fn batch_block_header<I>(
&self,
heights: I
) -> Result<Vec<BlockHeader>, Error> where
I: IntoIterator<Item = u32> + Clone,
[src]
&self,
heights: I
) -> Result<Vec<BlockHeader>, Error> where
I: IntoIterator<Item = u32> + Clone,
pub fn transaction_broadcast(&self, tx: &Transaction) -> Result<Txid, Error>
[src]
Auto Trait Implementations
impl RefUnwindSafe for Client
[src]
impl Send for Client
[src]
impl Sync for Client
[src]
impl Unpin for Client
[src]
impl UnwindSafe for Client
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,