Trait exonum_btc_anchoring::BitcoinRelay
[−]
[src]
pub trait BitcoinRelay: 'static + Debug + Send + Sync { fn get_transaction(&self, txid: TxId) -> Result<Option<BitcoinTx>>; fn get_transaction_info(&self, txid: TxId) -> Result<Option<TxInfo>>; fn watch_address(&self, addr: &Address, rescan: bool) -> Result<()>; fn send_transaction(&self, tx: BitcoinTx) -> Result<()>; fn send_to_address(
&self,
addr: &Address,
satoshis: u64
) -> Result<FundingTx>; fn unspent_transactions(&self, addr: &Address) -> Result<Vec<TxInfo>>; fn config(&self) -> AnchoringRpcConfig; fn get_transaction_confirmations(&self, txid: TxId) -> Result<Option<u64>> { ... } }
Required Methods
fn get_transaction(&self, txid: TxId) -> Result<Option<BitcoinTx>>
Retrieves transaction from the bitcoin blockchain.
fn get_transaction_info(&self, txid: TxId) -> Result<Option<TxInfo>>
Retrieves information about transaction with the given id.
fn watch_address(&self, addr: &Address, rescan: bool) -> Result<()>
Observes the changes on given address.
fn send_transaction(&self, tx: BitcoinTx) -> Result<()>
Sends raw transaction to the bitcoin network.
fn send_to_address(&self, addr: &Address, satoshis: u64) -> Result<FundingTx>
Sends funds to the given address.
fn unspent_transactions(&self, addr: &Address) -> Result<Vec<TxInfo>>
Lists unspent transactions for the given address.
fn config(&self) -> AnchoringRpcConfig
Returns an actual relay configuration.
Provided Methods
fn get_transaction_confirmations(&self, txid: TxId) -> Result<Option<u64>>
Retrieves information about confirmations for transaction with the given id.
Implementors
impl BitcoinRelay for RpcClient