13 breaking releases

new 0.14.0 May 23, 2024
0.12.0 May 2, 2024
0.10.0 Mar 27, 2024
0.4.0 Oct 12, 2023
0.2.0 Mar 20, 2023

#1585 in Magic Beans

Download history 693/week @ 2024-02-06 442/week @ 2024-02-13 482/week @ 2024-02-20 342/week @ 2024-02-27 581/week @ 2024-03-05 483/week @ 2024-03-12 1433/week @ 2024-03-19 1795/week @ 2024-03-26 2692/week @ 2024-04-02 2166/week @ 2024-04-09 2948/week @ 2024-04-16 3380/week @ 2024-04-23 1899/week @ 2024-04-30 1993/week @ 2024-05-07 1463/week @ 2024-05-14 1384/week @ 2024-05-21

7,459 downloads per month
Used in 2 crates (via mutiny-core)

MIT/Apache

275KB
4.5K SLoC

BDK Esplora

BDK Esplora extends esplora-client to update bdk_chain structures from an Esplora server.

Usage

There are two versions of the extension trait (blocking and async).

For blocking-only:

bdk_esplora = { version = "0.3", features = ["blocking"] }

For async-only:

bdk_esplora = { version = "0.3", features = ["async"] }

For async-only (with https):

bdk_esplora = { version = "0.3", features = ["async-https"] }

To use the extension traits:

// for blocking
use bdk_esplora::EsploraExt;
// for async
// use bdk_esplora::EsploraAsyncExt;

For full examples, refer to example-crates/wallet_esplora_blocking and example-crates/wallet_esplora_async.


lib.rs:

This crate is used for updating structures of bdk_chain with data from an Esplora server.

The two primary methods are EsploraExt::sync and EsploraExt::full_scan. In most cases EsploraExt::sync is used to sync the transaction histories of scripts that the application cares about, for example the scripts for all the receive addresses of a Wallet's keychain that it has shown a user. EsploraExt::full_scan is meant to be used when importing or restoring a keychain where the range of possibly used scripts is not known. In this case it is necessary to scan all keychain scripts until a number (the "stop gap") of unused scripts is discovered. For a sync or full scan the user receives relevant blockchain data and output updates for bdk_chain via a new TxGraph to be appended to any existing TxGraph data.

Refer to example_esplora for a complete example.

Dependencies

~7–24MB
~326K SLoC