Struct chainseeker::Client[][src]

pub struct Client { /* fields omitted */ }

Implementations

impl Client[src]

pub fn new(endpoint: &str) -> Self[src]

pub async fn get<T: for<'de> Deserialize<'de>>(
    &self,
    path: &str
) -> Result<T, Error>
[src]

GET the REST endpoint and parse it as a JSON.

pub async fn put<T: for<'de> Deserialize<'de>>(
    &self,
    path: &str,
    s: String
) -> Result<T, Error>
[src]

PUT the REST endpoint and parse it as a JSON.

pub async fn status(&self) -> Result<Status, Error>[src]

pub async fn tx(&self, txid: &str) -> Result<Transaction, Error>[src]

pub async fn put_tx(&self, hex: String) -> Result<Txid, Error>[src]

pub async fn block_summary(
    &self,
    offset: u32,
    limit: u32
) -> Result<Vec<BlockSummary>, Error>
[src]

pub async fn block_with_txids<T: ToString>(
    &self,
    hash_or_height: T
) -> Result<BlockWithTxids, Error>
[src]

pub async fn block_with_txs<T: ToString>(
    &self,
    hash_or_height: T
) -> Result<BlockWithTxs, Error>
[src]

pub async fn block_header<T: ToString>(
    &self,
    hash_or_height: T
) -> Result<BlockHeader, Error>
[src]

pub async fn txids(&self, script_or_address: &str) -> Result<Vec<String>, Error>[src]

pub async fn txs(
    &self,
    script_or_address: &str
) -> Result<Vec<Transaction>, Error>
[src]

pub async fn utxos(&self, script_or_address: &str) -> Result<Vec<Utxo>, Error>[src]

pub async fn rich_list_count(&self) -> Result<RichListCount, Error>[src]

pub async fn rich_list_addr_rank(
    &self,
    script_or_address: &str
) -> Result<RichListRank, Error>
[src]

pub async fn rich_list(
    &self,
    offset: u32,
    limit: u32
) -> Result<Vec<Option<RichListEntry>>, Error>
[src]

pub async fn generate_tx(
    &self,
    wallet: &Wallet,
    txouts: &[TxOut],
    change: &Script,
    fee_rate: u64,
    network: Network
) -> Result<Transaction, Error>
[src]

Generate a new valid transaction from private keys and outputs.

Arguments

  • wallet - The collection of private keys.
  • txouts - The destinations.
  • change - The change address in bitcoin::Script format.
  • fee_rate - The fee rate in satoshi / weight.
  • network - The network.

Trait Implementations

impl Clone for Client[src]

impl Debug for Client[src]

Auto Trait Implementations

impl !RefUnwindSafe for Client

impl Send for Client

impl Sync for Client

impl Unpin for Client

impl !UnwindSafe for Client

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.