bitcoins-provider
This crate provides a generic chain-data API for Bitcoin apps. It aims to give a simple consistent interface to chain data, so that wallets can easily support a wide range of backends out of the box.
Apps that are generic over a BtcProvider
can seamlessly accept different
sources. We have implemented a BtcProvider
calling the Blockstream Esplora
API, and more options are coming.
The PollingBtcProvider
trait can extend the BtcProvider
with useful
functionality like a polling chain-tip stream, a pending tx that streams
confirmations, and a UTXO watcher that streams spend notifications.
Usage example
use StreamExt;
use runtime;
use ;
let fut = async move ;
new.unwrap.block_on;