Crate bdk_chain

Source
Expand description

This crate is a collection of core structures for Bitcoin Dev Kit.

The goal of this crate is to give wallets the mechanisms needed to:

  1. Figure out what data they need to fetch.
  2. Process the data in a way that never leads to inconsistent states.
  3. Fully index that data and expose it to be consumed without friction.

Our design goals for these mechanisms are:

  1. Data source agnostic – nothing in bdk_chain cares about where you get data from or whether you do it synchronously or asynchronously. If you know a fact about the blockchain, you can just tell bdk_chain’s APIs about it, and that information will be integrated, if it can be done consistently.
  2. Data persistence agnostic – bdk_chain does not care where you cache on-chain data, what you cache or how you retrieve it from persistent storage.

Re-exports§

Modules§

Structs§

  • Balance, differentiated into various categories.
  • A reference to a block in the canonical chain.
  • Iterates over canonical txs.
  • A checkpoint is a node of a reference-counted linked list of BlockIds.
  • Iterates over checkpoints backwards.
  • Represents the confirmation block and time of a transaction.
  • Represents the unique ID of a descriptor.
  • A TxOut with as much data as we can retrieve about it
  • A wrapper that we use to impl remote traits for types in our crate or dependency crates.
  • An iterator for derived script pubkeys.
  • Set of parameters sufficient to construct an Anchor.
  • Data object used to communicate updates about relevant transactions from some chain data source to the core model (usually a bdk_chain::TxGraph).

Enums§

  • The reason why a transaction is canonical.
  • Represents the observed position of some chain data.
  • Represents when and where a transaction was last observed in.

Constants§

Traits§

  • Trait that “anchors” blockchain data to a specific block of height and hash.
  • Represents a service that tracks the blockchain.
  • A trait to extend the functionality of a miniscript descriptor.
  • Trait that makes an object mergeable.

Type Aliases§

  • A tuple of keychain index and T representing the indexed value.
  • A tuple of keychain K, derivation index (u32) and a T associated with them.