[][src]Trait exonum_btc_anchoring::rpc::BtcRelay

pub trait BtcRelay: Send + Sync + Debug {
    fn send_to_address(
        &self,
        addr: &Address,
        satoshis: u64
    ) -> Result<Transaction, Error>;
fn transaction_info(
        &self,
        id: &Hash
    ) -> Result<Option<TransactionInfo>, Error>;
fn send_transaction(&self, transaction: &Transaction) -> Result<Hash, Error>;
fn watch_address(&self, addr: &Address, rescan: bool) -> Result<(), Error>;
fn config(&self) -> BitcoinRpcConfig; }

Information provider about the Bitcoin network.

Required methods

fn send_to_address(
    &self,
    addr: &Address,
    satoshis: u64
) -> Result<Transaction, Error>

Sends funds to the given address.

fn transaction_info(&self, id: &Hash) -> Result<Option<TransactionInfo>, Error>

Retrieves information about transaction with the given id.

fn send_transaction(&self, transaction: &Transaction) -> Result<Hash, Error>

Sends raw transaction to the bitcoin network.

fn watch_address(&self, addr: &Address, rescan: bool) -> Result<(), Error>

Observes the changes on given address.

fn config(&self) -> BitcoinRpcConfig

Returns an actual relay configuration.

Loading content...

Implementors

impl BtcRelay for BitcoinRpcClient[src]

impl BtcRelay for FakeBtcRelay[src]

Loading content...