Crate bdk_electrum

source ·
Expand description

This crate is used for updating structures of the bdk_chain crate with data from electrum.

The star of the show is the ElectrumExt::scan method, which scans for relevant blockchain data (via electrum) and outputs updates for bdk_chain structures as a tuple of form:

(bdk_chain::local_chain::Update, RelevantTxids, keychain_update)

An RelevantTxids only includes txids and no full transactions. The caller is responsible for obtaining full transactions before applying. This can be done with these steps:

  1. Determine which full transactions are missing. The method missing_full_txs of RelevantTxids can be used.

  2. Obtaining the full transactions. To do this via electrum, the method batch_transaction_get can be used.

Refer to bdk_electrum_example for a complete example.

Re-exports

Structs

  • Combination of chain and transactions updates from electrum
  • Represents updates fetched from an Electrum server, but excludes full transactions.

Traits