]> Untitled Git - bdk/commit
feat(core,chain): introduce `CanonicalizationTask` and `ChainQuery`
authorLeonardo Lima <oleonardolima@users.noreply.github.com>
Tue, 19 May 2026 18:53:10 +0000 (15:53 -0300)
committerLeonardo Lima <oleonardolima@users.noreply.github.com>
Tue, 2 Jun 2026 20:39:58 +0000 (17:39 -0300)
commit987da73fce7b7f4e015aa05cc8fa4e36deebf4df
tree71f4efeed2928e3f95e10bd0135c93020b4646b7
parent47556ab7094c6af5c500eda9c9fa43f6d1804563
feat(core,chain): introduce `CanonicalizationTask` and `ChainQuery`

It introduces the new `CanonicalizationTask` that's implements the
canonicalization algorithm through a request/response pattern.

Also, it introduces the new `ChainQuery` trait in `bdk_core`, which
provides an interface for blockchain source/oracle query-based operations.
Allowing sans-IO patterns for algorithm that needs a blockchain oracle,
without the need for directly implement/handle I/O.

Adds new API methods into `LocalChain`: `canonicalize` and `canonical_view`,
adding same features as the existing `CanonicalIter` and it's APIs.

Co-Authored-By: Claude <noreply@anthropic.com>
crates/chain/src/canonical_iter.rs
crates/chain/src/canonical_task.rs [new file with mode: 0644]
crates/chain/src/canonical_view.rs
crates/chain/src/indexed_tx_graph.rs
crates/chain/src/lib.rs
crates/chain/src/local_chain.rs
crates/chain/src/tx_graph.rs
crates/core/src/chain_query.rs [new file with mode: 0644]
crates/core/src/lib.rs