Expand description
Wallet
This module defines the Wallet structure.
Modules
Structs
AddressEnums
AddressEnums
Wallet::get_address. If youâre unsure which one to use use WalletIndex::New.Wallet::newTraits
Functions
Type Definitions
Wallet used in Wallet::apply_update. This is usually returned from blockchain data sources.
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/sidebar-items.js b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/sidebar-items.js
index 41b994075c..e3291d243a 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/sidebar-items.js
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/sidebar-items.js
@@ -1 +1 @@
-window.SIDEBAR_ITEMS = {"enum":[["AddressIndex","The address index selection strategy to use to derived an address from the walletâs external descriptor. See [`Wallet::get_address`]. If youâre unsure which one to use use `WalletIndex::New`."],["NewError","Error returned from [`Wallet::new`]"]],"fn":[["wallet_name_from_descriptor","Deterministically generate a unique name given the descriptors defining the wallet"]],"mod":[["coin_selection","Coin selection"],["export","Wallet export"],["signer","Generalized signers"],["tx_builder","Transaction builder"]],"struct":[["AddressInfo","A derived address and the index it was found at. For convenience this automatically derefs to `Address`"],["Balance","Balance differentiated in various categories."],["Wallet","A Bitcoin wallet"]],"trait":[["IsDust","Trait to check if a value is below the dust limit. We are performing dust value calculation for a given script public key using rust-bitcoin to keep it compatible with network dust rate"]],"type":[["Update","The update to a [`Wallet`] used in [`Wallet::apply_update`]. This is usually returned from blockchain data sources. The type parameter `T` indicates the kind of transaction contained in the update. Itâs usually a [`bitcoin::Transaction`]."],["UpdateError","Error indicating that something was wrong with an [`Updatepub struct Balance {
+Balance in bdk::wallet - Rust pub struct Balance {
pub immature: u64,
pub trusted_pending: u64,
pub untrusted_pending: u64,
pub confirmed: u64,
-}
Expand description
Balance differentiated in various categories.
+}Expand description
Balance, differentiated into various categories.
Fields§
§immature: u64All coinbase outputs not yet matured
§trusted_pending: u64Unconfirmed UTXOs generated by a wallet tx
§untrusted_pending: u64Unconfirmed UTXOs received from an external wallet
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/enum.InsertTxError.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/enum.InsertTxError.html
index a395d28b60..1f7e3a1763 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/enum.InsertTxError.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/enum.InsertTxError.html
@@ -1,11 +1,11 @@
-InsertTxError in bdk_chain::chain_graph - Rust Enum bdk_chain::chain_graph::InsertTxError
source · pub enum InsertTxError<P> {
+InsertTxError in bdk_chain::chain_graph - Rust Enum bdk_chain::chain_graph::InsertTxError
source · pub enum InsertTxError<P> {
Chain(InsertTxError<P>),
UnresolvableConflict(UnresolvableConflict<P>),
}
Expand description
Error that may occur when inserting a transaction.
Refer to ChainGraph::insert_tx_preview and ChainGraph::insert_tx.
-Variants§
§Chain(InsertTxError<P>)
§UnresolvableConflict(UnresolvableConflict<P>)
Trait Implementations§
source§impl<P: Clone> Clone for InsertTxError<P>
source§fn clone(&self) -> InsertTxError<P>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl<P: Debug> Debug for InsertTxError<P>
source§impl<P: Debug> Display for InsertTxError<P>
source§impl<P: Debug> Error for InsertTxError<P>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
ðDeprecated since 1.42.0: use the Display impl or to_string()source§impl<P> From<InsertTxError<P>> for InsertTxError<P>
source§fn from(inner: InsertTxError<P>) -> Self
Converts to this type from the input type.source§impl<P> From<UnresolvableConflict<P>> for InsertTxError<P>
source§fn from(inner: UnresolvableConflict<P>) -> Self
Converts to this type from the input type.source§impl<P: PartialEq> PartialEq<InsertTxError<P>> for InsertTxError<P>
source§fn eq(&self, other: &InsertTxError<P>) -> bool
This method tests for self and other values to be equal, and is used
+Variants§
§Chain(InsertTxError<P>)
§UnresolvableConflict(UnresolvableConflict<P>)
Trait Implementations§
source§impl<P: Clone> Clone for InsertTxError<P>
source§fn clone(&self) -> InsertTxError<P>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl<P: Debug> Debug for InsertTxError<P>
source§impl<P: Debug> Display for InsertTxError<P>
source§impl<P: Debug> Error for InsertTxError<P>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
ðDeprecated since 1.42.0: use the Display impl or to_string()source§impl<P> From<InsertTxError<P>> for InsertTxError<P>
source§fn from(inner: InsertTxError<P>) -> Self
Converts to this type from the input type.source§impl<P> From<UnresolvableConflict<P>> for InsertTxError<P>
source§fn from(inner: UnresolvableConflict<P>) -> Self
Converts to this type from the input type.source§impl<P: PartialEq> PartialEq<InsertTxError<P>> for InsertTxError<P>
source§fn eq(&self, other: &InsertTxError<P>) -> bool
source§impl<P> StructuralPartialEq for InsertTxError<P>
Auto Trait Implementations§
§impl<P> RefUnwindSafe for InsertTxError<P>where
P: RefUnwindSafe,
§impl<P> Send for InsertTxError<P>where
P: Send,
§impl<P> Sync for InsertTxError<P>where
P: Sync,
§impl<P> Unpin for InsertTxError<P>where
P: Unpin,
§impl<P> UnwindSafe for InsertTxError<P>where
P: UnwindSafe,
Blanket Implementations§
source§impl<P> StructuralPartialEq for InsertTxError<P>
Auto Trait Implementations§
§impl<P> RefUnwindSafe for InsertTxError<P>where
P: RefUnwindSafe,
§impl<P> Send for InsertTxError<P>where
P: Send,
§impl<P> Sync for InsertTxError<P>where
P: Sync,
§impl<P> Unpin for InsertTxError<P>where
P: Unpin,
§impl<P> UnwindSafe for InsertTxError<P>where
P: UnwindSafe,
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/enum.NewError.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/enum.NewError.html
index 03d2c42344..e8401e3565 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/enum.NewError.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/enum.NewError.html
@@ -1,4 +1,4 @@
-NewError in bdk_chain::chain_graph - Rust Enum bdk_chain::chain_graph::NewError
source · pub enum NewError<P> {
+NewError in bdk_chain::chain_graph - Rust Enum bdk_chain::chain_graph::NewError
source · pub enum NewError<P> {
Conflict {
a: (P, Txid),
b: (P, Txid),
@@ -7,9 +7,9 @@
}
Expand description
Error that may occur when calling ChainGraph::new.
Variants§
§Conflict
Two transactions within the sparse chain conflicted with each other
§Missing(HashSet<Txid>)
One or more transactions in the chain were not in the graph
-Trait Implementations§
source§impl<P: Debug> Error for NewError<P>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
ðDeprecated since 1.42.0: use the Display impl or to_string()source§impl<P: PartialEq> PartialEq<NewError<P>> for NewError<P>
Trait Implementations§
source§impl<P: Debug> Error for NewError<P>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
ðDeprecated since 1.42.0: use the Display impl or to_string()source§impl<P: PartialEq> PartialEq<NewError<P>> for NewError<P>
source§impl<P> StructuralPartialEq for NewError<P>
Auto Trait Implementations§
§impl<P> RefUnwindSafe for NewError<P>where
P: RefUnwindSafe,
§impl<P> Send for NewError<P>where
P: Send,
§impl<P> Sync for NewError<P>where
P: Sync,
§impl<P> Unpin for NewError<P>where
P: Unpin,
§impl<P> UnwindSafe for NewError<P>where
P: UnwindSafe,
Blanket Implementations§
source§impl<P> StructuralPartialEq for NewError<P>
Auto Trait Implementations§
§impl<P> RefUnwindSafe for NewError<P>where
P: RefUnwindSafe,
§impl<P> Send for NewError<P>where
P: Send,
§impl<P> Sync for NewError<P>where
P: Sync,
§impl<P> Unpin for NewError<P>where
P: Unpin,
§impl<P> UnwindSafe for NewError<P>where
P: UnwindSafe,
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/enum.UpdateError.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/enum.UpdateError.html
index 8fecb11a88..abd7c30a18 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/enum.UpdateError.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/enum.UpdateError.html
@@ -1,12 +1,12 @@
-UpdateError in bdk_chain::chain_graph - Rust Enum bdk_chain::chain_graph::UpdateError
source · pub enum UpdateError<P> {
+UpdateError in bdk_chain::chain_graph - Rust Enum bdk_chain::chain_graph::UpdateError
source · pub enum UpdateError<P> {
Chain(UpdateError<P>),
UnresolvableConflict(UnresolvableConflict<P>),
}
Expand description
Represents an update failure.
Variants§
§Chain(UpdateError<P>)
The update chain was inconsistent with the existing chain
§UnresolvableConflict(UnresolvableConflict<P>)
A transaction in the update spent the same input as an already confirmed transaction
-Trait Implementations§
source§impl<P: Clone> Clone for UpdateError<P>
source§fn clone(&self) -> UpdateError<P>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl<P: Debug> Debug for UpdateError<P>
source§impl<P: Debug> Display for UpdateError<P>
source§impl<P: Debug> Error for UpdateError<P>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
ðDeprecated since 1.42.0: use the Display impl or to_string()source§impl<P> From<UnresolvableConflict<P>> for UpdateError<P>
source§fn from(inner: UnresolvableConflict<P>) -> Self
Converts to this type from the input type.source§impl<P> From<UpdateError<P>> for UpdateError<P>
source§fn from(inner: UpdateError<P>) -> Self
Converts to this type from the input type.source§impl<P: PartialEq> PartialEq<UpdateError<P>> for UpdateError<P>
source§fn eq(&self, other: &UpdateError<P>) -> bool
This method tests for self and other values to be equal, and is used
+Trait Implementations§
source§impl<P: Clone> Clone for UpdateError<P>
source§fn clone(&self) -> UpdateError<P>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl<P: Debug> Debug for UpdateError<P>
source§impl<P: Debug> Display for UpdateError<P>
source§impl<P: Debug> Error for UpdateError<P>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
ðDeprecated since 1.42.0: use the Display impl or to_string()source§impl<P> From<UnresolvableConflict<P>> for UpdateError<P>
source§fn from(inner: UnresolvableConflict<P>) -> Self
Converts to this type from the input type.source§impl<P> From<UpdateError<P>> for UpdateError<P>
source§fn from(inner: UpdateError<P>) -> Self
Converts to this type from the input type.source§impl<P: PartialEq> PartialEq<UpdateError<P>> for UpdateError<P>
source§fn eq(&self, other: &UpdateError<P>) -> bool
source§impl<P> StructuralPartialEq for UpdateError<P>
Auto Trait Implementations§
§impl<P> RefUnwindSafe for UpdateError<P>where
P: RefUnwindSafe,
§impl<P> Send for UpdateError<P>where
P: Send,
§impl<P> Sync for UpdateError<P>where
P: Sync,
§impl<P> Unpin for UpdateError<P>where
P: Unpin,
§impl<P> UnwindSafe for UpdateError<P>where
P: UnwindSafe,
Blanket Implementations§
source§impl<P> StructuralPartialEq for UpdateError<P>
Auto Trait Implementations§
§impl<P> RefUnwindSafe for UpdateError<P>where
P: RefUnwindSafe,
§impl<P> Send for UpdateError<P>where
P: Send,
§impl<P> Sync for UpdateError<P>where
P: Sync,
§impl<P> Unpin for UpdateError<P>where
P: Unpin,
§impl<P> UnwindSafe for UpdateError<P>where
P: UnwindSafe,
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/index.html
index 2bb2b267f6..a8344573c3 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/index.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/index.html
@@ -1,3 +1,3 @@
-bdk_chain::chain_graph - Rust Module bdk_chain::chain_graph
source · Expand description
Module for structures that combine the features of sparse_chain and tx_graph.
+bdk_chain::chain_graph - Rust Module bdk_chain::chain_graph
source · Expand description
Module for structures that combine the features of sparse_chain and tx_graph.
Structs
A consistent combination of a SparseChain<P> and a TxGraph<T>.Represents changes to ChainGraph.Represents an unresolvable conflict between an updateâs transaction and an
already-confirmed transaction.Enums
Error that may occur when inserting a transaction.Error that may occur when calling ChainGraph::new.Represents an update failure.Type Definitions
A nice alias of sparse_chain::InsertCheckpointError.
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/struct.ChainGraph.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/struct.ChainGraph.html
index b9bcfb82d0..0c9895a5de 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/struct.ChainGraph.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/struct.ChainGraph.html
@@ -1,12 +1,12 @@
ChainGraph in bdk_chain::chain_graph - Rust Struct bdk_chain::chain_graph::ChainGraph
source · pub struct ChainGraph<P = TxHeight> { /* private fields */ }
Expand description
A consistent combination of a SparseChain<P> and a TxGraph<T>.
-SparseChain only keeps track of transaction ids and their position in the chain but you often
-want to store the full transactions as well. Additionally you want to make sure that everything
+
SparseChain only keeps track of transaction ids and their position in the chain, but you often
+want to store the full transactions as well. Additionally, you want to make sure that everything
in the chain is consistent with the full transaction data. ChainGraph enforces these two
invariants:
- Every transaction that is in the chain is also in the graph (you always have the full
transaction).
-- No transactions in the chain conflict with each other i.e. they donât double spend each
+
- No transactions in the chain conflict with each other, i.e., they donât double spend each
other or have ancestors that double spend each other.
Note that the ChainGraph guarantees a 1:1 mapping between transactions in the chain and
@@ -14,12 +14,12 @@ other or have ancestors that double spend each other.
mempool eviction) but will remain in the graph.
Implementations§
source§impl<P> ChainGraph<P>
sourcepub fn chain(&self) -> &SparseChain<P>
Returns a reference to the internal SparseChain.
source§impl<P> ChainGraph<P>where
P: ChainPosition,
source§impl<P> ChainGraph<P>where
P: ChainPosition,
sourcepub fn new(chain: SparseChain<P>, graph: TxGraph) -> Result<Self, NewError<P>>
Create a new chain graph from a chain and a graph.
There are two reasons this can return an Err:
- There is a transaction in the
chain that does not have its corresponding full
transaction in graph.
-- The
chain has two transactions that allegedly in it but they conflict in the graph
+ - The
chain has two transactions that are allegedly in it, but they conflict in the graph
(so could not possibly be in the same chain).
sourcepub fn inflate_update(
&self,
update: SparseChain<P>,
new_txs: impl IntoIterator<Item = Transaction>
) -> Result<ChainGraph<P>, NewError<P>>
Take an update in the form of a SparseChain<P> and attempt to turn it
@@ -27,12 +27,12 @@ into a chain graph by filling in full transactions from self and fr
returns a ChainGraph<P, Cow<T>> where the Cow<'a, T> will borrow the transaction if it
got it from self.
This is useful when interacting with services like an electrum server which returns a list
-of txids and heights when calling script_get_history which can easily be inserted into a
-SparseChain<TxHeight>. From there you need to figure out which full
+of txids and heights when calling script_get_history, which can easily be inserted into a
+SparseChain<TxHeight>. From there, you need to figure out which full
transactions you are missing in your chain graph and form new_txs. You then use
inflate_update to turn this into an update ChainGraph<P, Cow<Transaction>> and finally
use determine_changeset to generate the changeset from it.
-sourcepub fn checkpoint_limit(&self) -> Option<usize>
Sets the checkpoint limit.
+sourcepub fn checkpoint_limit(&self) -> Option<usize>
Gets the checkpoint limit.
Refer to SparseChain::checkpoint_limit for more.
sourcepub fn set_checkpoint_limit(&mut self, limit: Option<usize>)
Sets the checkpoint limit.
Refer to SparseChain::set_checkpoint_limit for more.
@@ -42,45 +42,45 @@ above. Displaced transactions will have their positions moved to TxHeight::Unconfirmed.
This is equivalent to calling Self::invalidate_checkpoints_preview and
Self::apply_changeset in sequence.
-sourcepub fn get_tx_in_chain(&self, txid: Txid) -> Option<(&P, &Transaction)>
Get a transaction that is currently in the underlying SparseChain.
-This does not necessarily mean that it is confirmed in the blockchain, it might just be in
+
sourcepub fn get_tx_in_chain(&self, txid: Txid) -> Option<(&P, &Transaction)>
Get a transaction currently in the underlying SparseChain.
+This does not necessarily mean that it is confirmed in the blockchain; it might just be in
the unconfirmed transaction list within the SparseChain.
sourcepub fn insert_tx_preview(
&self,
tx: Transaction,
pos: P
) -> Result<ChangeSet<P>, InsertTxError<P>>
Determines the changes required to insert a transaction into the inner ChainGraph and
SparseChain at the given position.
If inserting it into the chain position will result in conflicts, the returned
ChangeSet should evict conflicting transactions.
-sourcepub fn insert_tx(
&mut self,
tx: Transaction,
pos: P
) -> Result<ChangeSet<P>, InsertTxError<P>>
Inserts [Transaction] at given chain position.
+sourcepub fn insert_tx(
&mut self,
tx: Transaction,
pos: P
) -> Result<ChangeSet<P>, InsertTxError<P>>
Inserts [Transaction] at the given chain position.
This is equivalent to calling Self::insert_tx_preview and Self::apply_changeset in
sequence.
sourcepub fn insert_txout_preview(
&self,
outpoint: OutPoint,
txout: TxOut
) -> ChangeSet<P>
Determines the changes required to insert a [TxOut] into the internal TxGraph.
sourcepub fn insert_txout(&mut self, outpoint: OutPoint, txout: TxOut) -> ChangeSet<P>
Inserts a [TxOut] into the internal TxGraph.
This is equivalent to calling Self::insert_txout_preview and Self::apply_changeset
in sequence.
-sourcepub fn insert_checkpoint_preview(
&self,
block_id: BlockId
) -> Result<ChangeSet<P>, InsertCheckpointError>
Determines the changes required to insert a block_id (a height and block hash) into the
+
sourcepub fn insert_checkpoint_preview(
&self,
block_id: BlockId
) -> Result<ChangeSet<P>, InsertCheckpointError>
Determines the changes required to insert a block_id (a height and block hash) into the
chain.
-If a checkpoint already exists at that height with a different hash this will return
-an error.
-sourcepub fn insert_checkpoint(
&mut self,
block_id: BlockId
) -> Result<ChangeSet<P>, InsertCheckpointError>
Inserts checkpoint into Self.
+If a checkpoint with a different hash already exists at that height, this will return an error.
+sourcepub fn insert_checkpoint(
&mut self,
block_id: BlockId
) -> Result<ChangeSet<P>, InsertCheckpointError>
Inserts checkpoint into Self.
This is equivalent to calling Self::insert_checkpoint_preview and
Self::apply_changeset in sequence.
-sourcepub fn determine_changeset(
&self,
update: &ChainGraph<P>
) -> Result<ChangeSet<P>, UpdateError<P>>
Calculates the difference between self and update in the form of a ChangeSet.
-sourcepub fn tx_conflicts_in_chain<'a>(
&'a self,
tx: &'a Transaction
) -> impl Iterator<Item = (&'a P, Txid)> + 'a
Given a transaction, return an iterator of txids that conflict with it (spends at least
-one of the same inputs). This includes all descendants of conflicting transactions.
+sourcepub fn determine_changeset(
&self,
update: &ChainGraph<P>
) -> Result<ChangeSet<P>, UpdateError<P>>
Calculates the difference between self and update in the form of a ChangeSet.
+sourcepub fn tx_conflicts_in_chain<'a>(
&'a self,
tx: &'a Transaction
) -> impl Iterator<Item = (&'a P, Txid)> + 'a
Given a transaction, return an iterator of txids that conflict with it (spends at least
+one of the same inputs). This iterator includes all descendants of conflicting transactions.
This method only returns conflicts that exist in the SparseChain as transactions that
are not included in SparseChain are already considered as evicted.
-sourcepub fn apply_changeset(&mut self, changeset: ChangeSet<P>)
Applies changeset to self.
-Warning this method assumes the changeset is assumed to be correctly formed. If it isnât
-then the chain graph may not behave correctly in the future and may panic unexpectedly.
-sourcepub fn apply_update(
&mut self,
update: ChainGraph<P>
) -> Result<ChangeSet<P>, UpdateError<P>>
Applies the update chain graph. Note this is shorthand for calling
+
sourcepub fn apply_changeset(&mut self, changeset: ChangeSet<P>)
Applies changeset to self.
+Warning this method assumes that the changeset is correctly formed. If it is not, the
+chain graph may behave incorrectly in the future and panic unexpectedly.
+sourcepub fn apply_update(
&mut self,
update: ChainGraph<P>
) -> Result<ChangeSet<P>, UpdateError<P>>
Applies the update chain graph. Note this is shorthand for calling
Self::determine_changeset() and Self::apply_changeset() in sequence.
-sourcepub fn full_txout(&self, outpoint: OutPoint) -> Option<FullTxOut<P>>
Get the full transaction output at an outpoint if it exists in the chain and the graph.
-sourcepub fn transactions_in_chain(
&self
) -> impl DoubleEndedIterator<Item = (&P, &Transaction)>
Iterate over the full transactions and their position in the chain ordered by their position
+
sourcepub fn full_txout(&self, outpoint: OutPoint) -> Option<FullTxOut<P>>
Get the full transaction output at an outpoint if it exists in the chain and the graph.
+sourcepub fn transactions_in_chain(
&self
) -> impl DoubleEndedIterator<Item = (&P, &Transaction)>
Iterate over the full transactions and their position in the chain ordered by their position
in ascending order.
-Trait Implementations§
source§impl<P> AsRef<ChainGraph<P>> for ChainGraph<P>
source§fn as_ref(&self) -> &ChainGraph<P>
Converts this type into a shared reference of the (usually inferred) input type.source§impl<K, P> AsRef<ChainGraph<P>> for KeychainTracker<K, P>
source§fn as_ref(&self) -> &ChainGraph<P>
Converts this type into a shared reference of the (usually inferred) input type.source§impl<P> AsRef<SparseChain<P>> for ChainGraph<P>
source§fn as_ref(&self) -> &SparseChain<P>
Converts this type into a shared reference of the (usually inferred) input type.source§impl<P> AsRef<TxGraph> for ChainGraph<P>
source§impl<P: Clone> Clone for ChainGraph<P>
source§fn clone(&self) -> ChainGraph<P>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl<P: Debug> Debug for ChainGraph<P>
source§impl<P> Default for ChainGraph<P>
source§impl<P> ForEachTxOut for ChainGraph<P>
source§fn for_each_txout(&self, f: impl FnMut((OutPoint, &TxOut)))
The provided closure f will called with each outpoint/txout pair.source§impl<K, P> From<ChainGraph<P>> for KeychainScan<K, P>
source§fn from(update: ChainGraph<P>) -> Self
Converts to this type from the input type.source§impl<P: PartialEq> PartialEq<ChainGraph<P>> for ChainGraph<P>
source§fn eq(&self, other: &ChainGraph<P>) -> bool
This method tests for self and other values to be equal, and is used
+sourcepub fn spent_by(&self, outpoint: OutPoint) -> Option<(&P, Txid)>
Find the transaction in the chain that spends outpoint.
+This uses the input/output relationships in the internal graph. Note that the transaction
+which includes outpoint does not need to be in the graph or the chain for this to
+return Some(_).
+Trait Implementations§
source§impl<P> AsRef<ChainGraph<P>> for ChainGraph<P>
source§fn as_ref(&self) -> &ChainGraph<P>
Converts this type into a shared reference of the (usually inferred) input type.source§impl<K, P> AsRef<ChainGraph<P>> for KeychainTracker<K, P>
source§fn as_ref(&self) -> &ChainGraph<P>
Converts this type into a shared reference of the (usually inferred) input type.source§impl<P> AsRef<SparseChain<P>> for ChainGraph<P>
source§fn as_ref(&self) -> &SparseChain<P>
Converts this type into a shared reference of the (usually inferred) input type.source§impl<P> AsRef<TxGraph> for ChainGraph<P>
source§impl<P: Clone> Clone for ChainGraph<P>
source§fn clone(&self) -> ChainGraph<P>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl<P: Debug> Debug for ChainGraph<P>
source§impl<P> Default for ChainGraph<P>
source§impl<P> ForEachTxOut for ChainGraph<P>
source§fn for_each_txout(&self, f: impl FnMut((OutPoint, &TxOut)))
The provided closure f will be called with each outpoint/txout pair.source§impl<K, P> From<ChainGraph<P>> for KeychainScan<K, P>
source§fn from(update: ChainGraph<P>) -> Self
Converts to this type from the input type.source§impl<P: PartialEq> PartialEq<ChainGraph<P>> for ChainGraph<P>
source§fn eq(&self, other: &ChainGraph<P>) -> bool
source§impl<P> StructuralPartialEq for ChainGraph<P>
Auto Trait Implementations§
§impl<P> RefUnwindSafe for ChainGraph<P>where
P: RefUnwindSafe,
§impl<P> Send for ChainGraph<P>where
P: Send,
§impl<P> Sync for ChainGraph<P>where
P: Sync,
§impl<P> Unpin for ChainGraph<P>where
P: Unpin,
§impl<P> UnwindSafe for ChainGraph<P>where
P: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
Calls U::from(self).
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/struct.ChangeSet.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/struct.ChangeSet.html
index 1d19127e02..c666090470 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/struct.ChangeSet.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/struct.ChangeSet.html
@@ -1,15 +1,15 @@
-ChangeSet in bdk_chain::chain_graph - Rust Struct bdk_chain::chain_graph::ChangeSet
source · pub struct ChangeSet<P> {
+ChangeSet in bdk_chain::chain_graph - Rust Struct bdk_chain::chain_graph::ChangeSet
source · Expand description
Represents changes to ChainGraph.
This is essentially a combination of sparse_chain::ChangeSet and tx_graph::Additions.
-Fields§
§chain: ChangeSet<P>§graph: AdditionsImplementations§
source§impl<P> ChangeSet<P>
sourcepub fn contains_eviction(&self) -> bool
Returns true if this ChangeSet contains transaction evictions.
-sourcepub fn append(&mut self, other: ChangeSet<P>)where
P: ChainPosition,
Appends the changes in other into self such that applying self afterwards has the same
+
Fields§
§chain: ChangeSet<P>§graph: AdditionsImplementations§
source§impl<P> ChangeSet<P>
sourcepub fn contains_eviction(&self) -> bool
Returns true if this ChangeSet contains transaction evictions.
+sourcepub fn append(&mut self, other: ChangeSet<P>)where
P: ChainPosition,
Appends the changes in other into self such that applying self afterward has the same
effect as sequentially applying the original self and other.
-Trait Implementations§
source§impl<'de, P> Deserialize<'de> for ChangeSet<P>where
P: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl<P> ForEachTxOut for ChangeSet<P>
source§fn for_each_txout(&self, f: impl FnMut((OutPoint, &TxOut)))
The provided closure f will called with each outpoint/txout pair.source§impl<K, P> From<ChangeSet<P>> for KeychainChangeSet<K, P>
Trait Implementations§
source§impl<'de, P> Deserialize<'de> for ChangeSet<P>where
P: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl<P> ForEachTxOut for ChangeSet<P>
source§fn for_each_txout(&self, f: impl FnMut((OutPoint, &TxOut)))
The provided closure f will be called with each outpoint/txout pair.source§impl<K, P> From<ChangeSet<P>> for KeychainChangeSet<K, P>
source§impl<P: PartialEq> PartialEq<ChangeSet<P>> for ChangeSet<P>
source§impl<P> StructuralPartialEq for ChangeSet<P>
Auto Trait Implementations§
§impl<P> RefUnwindSafe for ChangeSet<P>where
P: RefUnwindSafe,
§impl<P> Send for ChangeSet<P>where
P: Send,
§impl<P> Sync for ChangeSet<P>where
P: Sync,
§impl<P> Unpin for ChangeSet<P>
§impl<P> UnwindSafe for ChangeSet<P>where
P: RefUnwindSafe,
Blanket Implementations§
source§impl<P> StructuralPartialEq for ChangeSet<P>
Auto Trait Implementations§
§impl<P> RefUnwindSafe for ChangeSet<P>where
P: RefUnwindSafe,
§impl<P> Send for ChangeSet<P>where
P: Send,
§impl<P> Sync for ChangeSet<P>where
P: Sync,
§impl<P> Unpin for ChangeSet<P>
§impl<P> UnwindSafe for ChangeSet<P>where
P: RefUnwindSafe,
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/struct.UnresolvableConflict.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/struct.UnresolvableConflict.html
index ff5a2c8a1f..4be9cc6c02 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/struct.UnresolvableConflict.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/struct.UnresolvableConflict.html
@@ -1,11 +1,11 @@
-UnresolvableConflict in bdk_chain::chain_graph - Rust Struct bdk_chain::chain_graph::UnresolvableConflict
source · pub struct UnresolvableConflict<P> {
+UnresolvableConflict in bdk_chain::chain_graph - Rust Struct bdk_chain::chain_graph::UnresolvableConflict
source · pub struct UnresolvableConflict<P> {
pub already_confirmed_tx: (P, Txid),
pub update_tx: (P, Txid),
}
Expand description
Represents an unresolvable conflict between an updateâs transaction and an
already-confirmed transaction.
-Fields§
§already_confirmed_tx: (P, Txid)§update_tx: (P, Txid)Trait Implementations§
source§impl<P: Clone> Clone for UnresolvableConflict<P>
source§fn clone(&self) -> UnresolvableConflict<P>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl<P: Debug> Debug for UnresolvableConflict<P>
source§impl<P: Debug> Display for UnresolvableConflict<P>
source§impl<P: Debug> Error for UnresolvableConflict<P>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
ðDeprecated since 1.42.0: use the Display impl or to_string()source§impl<P> From<UnresolvableConflict<P>> for InsertTxError<P>
source§fn from(inner: UnresolvableConflict<P>) -> Self
Converts to this type from the input type.source§impl<P> From<UnresolvableConflict<P>> for UpdateError<P>
source§fn from(inner: UnresolvableConflict<P>) -> Self
Converts to this type from the input type.source§impl<P: PartialEq> PartialEq<UnresolvableConflict<P>> for UnresolvableConflict<P>
source§fn eq(&self, other: &UnresolvableConflict<P>) -> bool
This method tests for self and other values to be equal, and is used
+Fields§
§already_confirmed_tx: (P, Txid)§update_tx: (P, Txid)Trait Implementations§
source§impl<P: Clone> Clone for UnresolvableConflict<P>
source§fn clone(&self) -> UnresolvableConflict<P>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl<P: Debug> Debug for UnresolvableConflict<P>
source§impl<P: Debug> Display for UnresolvableConflict<P>
source§impl<P: Debug> Error for UnresolvableConflict<P>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
ðDeprecated since 1.42.0: use the Display impl or to_string()source§impl<P> From<UnresolvableConflict<P>> for InsertTxError<P>
source§fn from(inner: UnresolvableConflict<P>) -> Self
Converts to this type from the input type.source§impl<P> From<UnresolvableConflict<P>> for UpdateError<P>
source§fn from(inner: UnresolvableConflict<P>) -> Self
Converts to this type from the input type.source§impl<P: PartialEq> PartialEq<UnresolvableConflict<P>> for UnresolvableConflict<P>
source§fn eq(&self, other: &UnresolvableConflict<P>) -> bool
source§impl<P> StructuralPartialEq for UnresolvableConflict<P>
Auto Trait Implementations§
§impl<P> RefUnwindSafe for UnresolvableConflict<P>where
P: RefUnwindSafe,
§impl<P> Send for UnresolvableConflict<P>where
P: Send,
§impl<P> Sync for UnresolvableConflict<P>where
P: Sync,
§impl<P> Unpin for UnresolvableConflict<P>where
P: Unpin,
§impl<P> UnwindSafe for UnresolvableConflict<P>where
P: UnwindSafe,
Blanket Implementations§
source§impl<P> StructuralPartialEq for UnresolvableConflict<P>
Auto Trait Implementations§
§impl<P> RefUnwindSafe for UnresolvableConflict<P>where
P: RefUnwindSafe,
§impl<P> Send for UnresolvableConflict<P>where
P: Send,
§impl<P> Sync for UnresolvableConflict<P>where
P: Sync,
§impl<P> Unpin for UnresolvableConflict<P>where
P: Unpin,
§impl<P> UnwindSafe for UnresolvableConflict<P>where
P: UnwindSafe,
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/type.InsertCheckpointError.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/type.InsertCheckpointError.html
index 92f78822bb..69be1d4d6a 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/type.InsertCheckpointError.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/chain_graph/type.InsertCheckpointError.html
@@ -1,2 +1,2 @@
-InsertCheckpointError in bdk_chain::chain_graph - Rust Type Definition bdk_chain::chain_graph::InsertCheckpointError
source · pub type InsertCheckpointError = InsertCheckpointError;
Expand description
A nice alias of sparse_chain::InsertCheckpointError.
+InsertCheckpointError in bdk_chain::chain_graph - Rust Type Definition bdk_chain::chain_graph::InsertCheckpointError
source · pub type InsertCheckpointError = InsertCheckpointError;
Expand description
A nice alias of sparse_chain::InsertCheckpointError.
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/constant.COINBASE_MATURITY.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/constant.COINBASE_MATURITY.html
index be97a5e42e..90b7284b60 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/constant.COINBASE_MATURITY.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/constant.COINBASE_MATURITY.html
@@ -1,2 +1,2 @@
-COINBASE_MATURITY in bdk_chain - Rust Constant bdk_chain::COINBASE_MATURITY
source · pub const COINBASE_MATURITY: u32 = 100;
Expand description
How many confirmations are needed for a coinbase output to be spent
+COINBASE_MATURITY in bdk_chain - Rust Constant bdk_chain::COINBASE_MATURITY
source · pub const COINBASE_MATURITY: u32 = 100;
Expand description
How many confirmations are needed f or a coinbase output to be spent.
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/enum.ConfirmationTime.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/enum.ConfirmationTime.html
index 70be0a0b08..3b8dd8a1ae 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/enum.ConfirmationTime.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/enum.ConfirmationTime.html
@@ -1,11 +1,11 @@
-ConfirmationTime in bdk_chain - Rust Enum bdk_chain::ConfirmationTime
source · pub enum ConfirmationTime {
+ConfirmationTime in bdk_chain - Rust Enum bdk_chain::ConfirmationTime
source · Expand description
Block height and timestamp in which a transaction is confirmed in.
-Variants§
Implementations§
source§impl ConfirmationTime
sourcepub fn is_confirmed(&self) -> bool
Trait Implementations§
source§impl ChainPosition for ConfirmationTime
source§fn max_ord_of_height(height: TxHeight) -> Self
Get the positonâs upper bound of a given height.source§fn min_ord_of_height(height: TxHeight) -> Self
Get the positionâs lower bound of a given height.source§fn unconfirmed() -> Self
Get the unconfirmed position.source§impl Clone for ConfirmationTime
source§fn clone(&self) -> ConfirmationTime
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for ConfirmationTime
source§impl<'de> Deserialize<'de> for ConfirmationTime
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Hash for ConfirmationTime
source§impl Ord for ConfirmationTime
source§fn cmp(&self, other: &ConfirmationTime) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§impl PartialEq<ConfirmationTime> for ConfirmationTime
source§fn eq(&self, other: &ConfirmationTime) -> bool
This method tests for self and other values to be equal, and is used
+}Expand description
Block height and timestamp at which a transaction is confirmed.
+Variants§
Implementations§
source§impl ConfirmationTime
sourcepub fn is_confirmed(&self) -> bool
Trait Implementations§
source§impl ChainPosition for ConfirmationTime
source§fn max_ord_of_height(height: TxHeight) -> Self
Get the positionâs upper bound of a given height.source§fn min_ord_of_height(height: TxHeight) -> Self
Get the positionâs lower bound of a given height.source§fn unconfirmed() -> Self
Get the unconfirmed position.source§impl Clone for ConfirmationTime
source§fn clone(&self) -> ConfirmationTime
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for ConfirmationTime
source§impl<'de> Deserialize<'de> for ConfirmationTime
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Hash for ConfirmationTime
source§impl Ord for ConfirmationTime
source§fn cmp(&self, other: &ConfirmationTime) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§impl PartialEq<ConfirmationTime> for ConfirmationTime
source§fn eq(&self, other: &ConfirmationTime) -> bool
source§impl PartialOrd<ConfirmationTime> for ConfirmationTime
source§fn partial_cmp(&self, other: &ConfirmationTime) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more1.0.0 · source§fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self and other) and is used by the >=
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/enum.TxHeight.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/enum.TxHeight.html
index 15e397910d..ea254f242d 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/enum.TxHeight.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/enum.TxHeight.html
@@ -1,8 +1,8 @@
-TxHeight in bdk_chain - Rust pub enum TxHeight {
+TxHeight in bdk_chain - Rust pub enum TxHeight {
Confirmed(u32),
Unconfirmed,
-}
Expand description
Represents the height in which a transaction is confirmed at.
-Variants§
Implementations§
Trait Implementations§
source§impl ChainPosition for TxHeight
source§fn max_ord_of_height(height: TxHeight) -> Self
Get the positonâs upper bound of a given height.source§fn min_ord_of_height(height: TxHeight) -> Self
Get the positionâs lower bound of a given height.source§fn unconfirmed() -> Self
Get the unconfirmed position.source§impl<'de> Deserialize<'de> for TxHeight
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for TxHeight
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§impl PartialEq<TxHeight> for TxHeight
source§fn eq(&self, other: &TxHeight) -> bool
This method tests for self and other values to be equal, and is used
+}Expand description
Represents the height at which a transaction is confirmed.
+Variants§
Implementations§
Trait Implementations§
source§impl ChainPosition for TxHeight
source§fn max_ord_of_height(height: TxHeight) -> Self
Get the positionâs upper bound of a given height.source§fn min_ord_of_height(height: TxHeight) -> Self
Get the positionâs lower bound of a given height.source§fn unconfirmed() -> Self
Get the unconfirmed position.source§impl<'de> Deserialize<'de> for TxHeight
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for TxHeight
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§impl PartialOrd<TxHeight> for TxHeight
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more1.0.0 · source§fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self and other) and is used by the >=
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/index.html
index 29f9799aef..be4b66df8f 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/index.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/index.html
@@ -1,18 +1,18 @@
bdk_chain - Rust Expand description
This crate is a collection of core structures for Bitcoin Dev Kit (alpha release).
-The goal of this crate is give wallets the mechanisms needed to:
+The goal of this crate is to give wallets the mechanisms needed to:
- Figure out what data they need to fetch.
-- Process that data in a way that never leads to inconsistent states.
-- Fully index that data and expose it so that it can be consumed without friction.
+- Process the data in a way that never leads to inconsistent states.
+- Fully index that data and expose it to be consumed without friction.
Our design goals for these mechanisms are:
- 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
+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.
-- Error free APIs.
+- Error-free APIs.
- Data persistence agnostic â
bdk_chain does not care where you cache on-chain data, what you
cache or how you fetch it.
-Re-exports
Modules
Module for structures that combine the features of sparse_chain and tx_graph.Module for keychain based structures.Module for structures that maintain sparse (purposely incomplete) snapshots of blockchain data.Module for structures that store and traverse transactions.Structs
A reference to a block in the cannonical chain.A TxOut with as much data as we can retreive about itAn index storing TxOuts that have a script pubkey that matches those in a list.Enums
Block height and timestamp in which a transaction is confirmed in.Represents the height in which a transaction is confirmed at.Constants
How many confirmations are needed for a coinbase output to be spentTraits
A trait to extend the functionality of a miniscript descriptor.Trait to do something with every txout contained in a structure.
\ No newline at end of file
+Re-exports
Modules
Module for structures that combine the features of sparse_chain and tx_graph.Module for keychain related structures.Module for structures that maintain sparse (purposely incomplete) snapshots of blockchain data.Module for structures that store and traverse transactions.Structs
A reference to a block in the canonical chain.A TxOut with as much data as we can retrieve about itAn index storing TxOuts that have a script pubkey that matches those in a list.Enums
Block height and timestamp at which a transaction is confirmed.Represents the height at which a transaction is confirmed.Constants
How many confirmations are needed f or a coinbase output to be spent.Traits
A trait to extend the functionality of a miniscript descriptor.Trait to do something with every txout contained in a structure.
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/index.html
index 94acf44ec3..68b7a79968 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/index.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/index.html
@@ -1,13 +1,13 @@
-bdk_chain::keychain - Rust Expand description
Module for keychain based structures.
-A keychain here is a set of application defined indexes for a minscript descriptor where we can
+
bdk_chain::keychain - Rust Expand description
Module for keychain related structures.
+A keychain here is a set of application-defined indexes for a miniscript descriptor where we can
derive script pubkeys at a particular derivation index. The applicationâs index is simply
anything that implements Ord.
KeychainTxOutIndex indexes script pubkeys of keychains and scans in relevant outpoints (that
has a txout containing an indexed script pubkey). Internally, this uses SpkTxOutIndex, but
-also maintains ârevealedâ and âlookaheadâ index count per keychain.
+also maintains ârevealedâ and âlookaheadâ index counts per keychain.
KeychainTracker combines ChainGraph and KeychainTxOutIndex and enforces atomic
changes between both these structures. KeychainScan is a structure used to update to
KeychainTracker and changes made on a KeychainTracker are reported by
KeychainChangeSets.
-Re-exports
pub use persist::*;Modules
Persistence for changes made to a KeychainTracker.Structs
Balance differentiated in various categories.Represents updates to the derivation index of a KeychainTxOutIndex.Represents changes to a KeychainTracker.An update that includes the last active indexes of each keychain.A convenient combination of a KeychainTxOutIndex and a ChainGraph.A convenient wrapper around SpkTxOutIndex that relates script pubkeys to miniscript public
+Re-exports
pub use persist::*;Modules
Persistence for changes made to a KeychainTracker.Structs
Balance, differentiated into various categories.Represents updates to the derivation index of a KeychainTxOutIndex.Represents changes to a KeychainTracker.An update that includes the last active indexes of each keychain.A convenient combination of a KeychainTxOutIndex and a ChainGraph.A convenient wrapper around SpkTxOutIndex that relates script pubkeys to miniscript public
Descriptors.Constants
Maximum BIP32 derivation index.
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/persist/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/persist/index.html
index edd084cacf..e9a10baf56 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/persist/index.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/persist/index.html
@@ -1,10 +1,10 @@
bdk_chain::keychain::persist - Rust Expand description
Persistence for changes made to a KeychainTracker.
BDKâs KeychainTracker needs somewhere to persist changes it makes during operation.
Operations like giving out a new address are crucial to persist so that next time the
-application is loaded it can find transactions related to that address.
+application is loaded, it can find transactions related to that address.
Note that the KeychainTracker does not read this persisted data during operation since it
always has a copy in memory.
Structs
Persist wraps a PersistBackend to create a convenient staging area for changes before they
are persisted. Not all changes made to the KeychainTracker need to be written to disk right
away so you can use Persist::stage to stage it first and then Persist::commit to
-finally write it to disk.Traits
A persistence backend for Persist.
\ No newline at end of file
+finally, write it to disk.Traits
A persistence backend for Persist.
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/persist/sidebar-items.js b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/persist/sidebar-items.js
index 9c4f9f3c4a..59a9f5d7d5 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/persist/sidebar-items.js
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/persist/sidebar-items.js
@@ -1 +1 @@
-window.SIDEBAR_ITEMS = {"struct":[["Persist","`Persist` wraps a [`PersistBackend`] to create a convenient staging area for changes before they are persisted. Not all changes made to the `KeychainTracker` need to be written to disk right away so you can use [`Persist::stage`] to stage it first and then [`Persist::commit`] to finally write it to disk."]],"trait":[["PersistBackend","A persistence backend for [`Persist`]."]]};
\ No newline at end of file
+window.SIDEBAR_ITEMS = {"struct":[["Persist","`Persist` wraps a [`PersistBackend`] to create a convenient staging area for changes before they are persisted. Not all changes made to the `KeychainTracker` need to be written to disk right away so you can use [`Persist::stage`] to stage it first and then [`Persist::commit`] to finally, write it to disk."]],"trait":[["PersistBackend","A persistence backend for [`Persist`]."]]};
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/persist/struct.Persist.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/persist/struct.Persist.html
index 449fe2d614..421992ce58 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/persist/struct.Persist.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/persist/struct.Persist.html
@@ -1,12 +1,12 @@
-Persist in bdk_chain::keychain::persist - Rust pub struct Persist<K, P, B> { /* private fields */ }
Expand description
Persist wraps a PersistBackend to create a convenient staging area for changes before they
+
Persist in bdk_chain::keychain::persist - Rust pub struct Persist<K, P, B> { /* private fields */ }
Expand description
Persist wraps a PersistBackend to create a convenient staging area for changes before they
are persisted. Not all changes made to the KeychainTracker need to be written to disk right
away so you can use Persist::stage to stage it first and then Persist::commit to
-finally write it to disk.
+finally, write it to disk.
Implementations§
source§impl<K, P, B> Persist<K, P, B>
sourcepub fn new(backend: B) -> Self
Create a new Persist from a PersistBackend.
sourcepub fn stage(&mut self, changeset: KeychainChangeSet<K, P>)where
K: Ord,
P: ChainPosition,
Stage a changeset to later persistence with commit.
-sourcepub fn staged(&self) -> &KeychainChangeSet<K, P>
Get the changes that havenât been commited yet
+sourcepub fn staged(&self) -> &KeychainChangeSet<K, P>
Get the changes that havenât been committed yet
sourcepub fn commit(&mut self) -> Result<(), B::WriteError>where
B: PersistBackend<K, P>,
Commit the staged changes to the underlying persistence backend.
-Retuns a backend defined error if this fails
+Returns a backend-defined error if this fails.
Trait Implementations§
Auto Trait Implementations§
§impl<K, P, B> RefUnwindSafe for Persist<K, P, B>where
B: RefUnwindSafe,
K: RefUnwindSafe,
P: RefUnwindSafe,
§impl<K, P, B> Send for Persist<K, P, B>where
B: Send,
K: Send,
P: Send,
§impl<K, P, B> Sync for Persist<K, P, B>where
B: Sync,
K: Sync,
P: Sync,
§impl<K, P, B> Unpin for Persist<K, P, B>where
B: Unpin,
§impl<K, P, B> UnwindSafe for Persist<K, P, B>where
B: UnwindSafe,
K: RefUnwindSafe,
P: RefUnwindSafe,
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/persist/trait.PersistBackend.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/persist/trait.PersistBackend.html
index ea8d7d5d7a..350f5945c7 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/persist/trait.PersistBackend.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/persist/trait.PersistBackend.html
@@ -7,9 +7,9 @@
}
Expand description
A persistence backend for Persist.
Required Associated Types§
sourcetype WriteError: Debug
The error the backend returns when it fails to write.
Required Methods§
sourcefn append_changeset(
&mut self,
changeset: &KeychainChangeSet<K, P>
) -> Result<(), Self::WriteError>
Appends a new changeset to the persistance backend.
+Required Methods§
sourcefn append_changeset(
&mut self,
changeset: &KeychainChangeSet<K, P>
) -> Result<(), Self::WriteError>
Appends a new changeset to the persistent backend.
It is up to the backend what it does with this. It could store every changeset in a list or
-it insert the actual changes to a more structured database. All it needs to guarantee is
+it inserts the actual changes into a more structured database. All it needs to guarantee is
that load_into_keychain_tracker restores a keychain tracker to what it should be if all
changesets had been applied sequentially.
sourcefn load_into_keychain_tracker(
&mut self,
tracker: &mut KeychainTracker<K, P>
) -> Result<(), Self::LoadError>
Applies all the changesets the backend has received to tracker.
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/sidebar-items.js b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/sidebar-items.js
index 1ce48c32e3..f57d9cc969 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/sidebar-items.js
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/sidebar-items.js
@@ -1 +1 @@
-window.SIDEBAR_ITEMS = {"constant":[["BIP32_MAX_INDEX","Maximum BIP32 derivation index."]],"mod":[["persist","Persistence for changes made to a `KeychainTracker`."]],"struct":[["Balance","Balance differentiated in various categories."],["DerivationAdditions","Represents updates to the derivation index of a `KeychainTxOutIndex`."],["KeychainChangeSet","Represents changes to a [`KeychainTracker`]."],["KeychainScan","An update that includes the last active indexes of each keychain."],["KeychainTracker","A convenient combination of a [`KeychainTxOutIndex`] and a [`ChainGraph`]."],["KeychainTxOutIndex","A convenient wrapper around `SpkTxOutIndex` that relates script pubkeys to miniscript public `Descriptor`s."]]};
\ No newline at end of file
+window.SIDEBAR_ITEMS = {"constant":[["BIP32_MAX_INDEX","Maximum BIP32 derivation index."]],"mod":[["persist","Persistence for changes made to a `KeychainTracker`."]],"struct":[["Balance","Balance, differentiated into various categories."],["DerivationAdditions","Represents updates to the derivation index of a `KeychainTxOutIndex`."],["KeychainChangeSet","Represents changes to a [`KeychainTracker`]."],["KeychainScan","An update that includes the last active indexes of each keychain."],["KeychainTracker","A convenient combination of a [`KeychainTxOutIndex`] and a [`ChainGraph`]."],["KeychainTxOutIndex","A convenient wrapper around `SpkTxOutIndex` that relates script pubkeys to miniscript public `Descriptor`s."]]};
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/struct.Balance.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/struct.Balance.html
index 2354d57817..7ed14e384a 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/struct.Balance.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/struct.Balance.html
@@ -1,9 +1,9 @@
-Balance in bdk_chain::keychain - Rust pub struct Balance {
+Balance in bdk_chain::keychain - Rust pub struct Balance {
pub immature: u64,
pub trusted_pending: u64,
pub untrusted_pending: u64,
pub confirmed: u64,
-}
Expand description
Balance differentiated in various categories.
+}Expand description
Balance, differentiated into various categories.
Fields§
§immature: u64All coinbase outputs not yet matured
§trusted_pending: u64Unconfirmed UTXOs generated by a wallet tx
§untrusted_pending: u64Unconfirmed UTXOs received from an external wallet
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/struct.DerivationAdditions.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/struct.DerivationAdditions.html
index bf82aaf7fd..7413b15a62 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/struct.DerivationAdditions.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/struct.DerivationAdditions.html
@@ -2,10 +2,10 @@
It can be applied to KeychainTxOutIndex with apply_additions. `DerivationAdditions are
monotone in that they will never decrease the revealed derivation index.
Tuple Fields§
§0: BTreeMap<K, u32>Implementations§
source§impl<K> DerivationAdditions<K>
source§impl<K: Ord> DerivationAdditions<K>
sourcepub fn append(&mut self, other: Self)
Append another DerivationAdditions into self.
-If keychain already exists, increases the index when otherâs index > selfâs index.
-If keychain did not exist, append the new keychain.
+If the keychain already exists, increase the index when the otherâs index > selfâs index.
+If the keychain did not exist, append the new keychain.
Trait Implementations§
source§impl<K: Clone> Clone for DerivationAdditions<K>
source§fn clone(&self) -> DerivationAdditions<K>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl<K: Debug> Debug for DerivationAdditions<K>
source§impl<K> Default for DerivationAdditions<K>
source§impl<'de, K> Deserialize<'de> for DerivationAdditions<K>where
K: Ord + Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl<K, P> From<DerivationAdditions<K>> for KeychainChangeSet<K, P>
source§fn from(additions: DerivationAdditions<K>) -> Self
Converts to this type from the input type.source§impl<K: PartialEq> PartialEq<DerivationAdditions<K>> for DerivationAdditions<K>
source§fn eq(&self, other: &DerivationAdditions<K>) -> bool
source§impl<K> StructuralPartialEq for DerivationAdditions<K>
Auto Trait Implementations§
§impl<K> RefUnwindSafe for DerivationAdditions<K>where
K: RefUnwindSafe,
§impl<K> Send for DerivationAdditions<K>where
K: Send,
§impl<K> Sync for DerivationAdditions<K>where
K: Sync,
§impl<K> Unpin for DerivationAdditions<K>
§impl<K> UnwindSafe for DerivationAdditions<K>where
K: RefUnwindSafe,
Blanket Implementations§
source§impl<T> From<T> for T
const: unstable · source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/struct.KeychainChangeSet.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/struct.KeychainChangeSet.html
index 8d2359eb80..bf80bae1e5 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/struct.KeychainChangeSet.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/struct.KeychainChangeSet.html
@@ -6,11 +6,11 @@
Fields§
§derivation_indices: DerivationAdditions<K>The changes in local keychain derivation indices
§chain_graph: ChangeSet<P>The changes that have occurred in the blockchain
Implementations§
source§impl<K, P> KeychainChangeSet<K, P>
sourcepub fn is_empty(&self) -> bool
Returns whether the KeychainChangeSet is empty (no changes recorded).
-sourcepub fn append(&mut self, other: KeychainChangeSet<K, P>)where
K: Ord,
P: ChainPosition,
Appends the changes in other into self such that applying self afterwards has the same
+
sourcepub fn append(&mut self, other: KeychainChangeSet<K, P>)where
K: Ord,
P: ChainPosition,
Appends the changes in other into self such that applying self afterward has the same
effect as sequentially applying the original self and other.
-Note the derivation indices cannot be decreased so other will only change the derivation
-index for a keychain if itâs entry is higher than the one in self.
-Trait Implementations§
source§impl<K: Clone, P: Clone> Clone for KeychainChangeSet<K, P>
source§fn clone(&self) -> KeychainChangeSet<K, P>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl<K, P> Default for KeychainChangeSet<K, P>
source§impl<'de, K, P> Deserialize<'de> for KeychainChangeSet<K, P>where
K: Ord + Deserialize<'de>,
P: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl<K, P> ForEachTxOut for KeychainChangeSet<K, P>
source§fn for_each_txout(&self, f: impl FnMut((OutPoint, &TxOut)))
The provided closure f will called with each outpoint/txout pair.source§impl<K, P> From<ChangeSet<P>> for KeychainChangeSet<K, P>
source§impl<K, P> From<DerivationAdditions<K>> for KeychainChangeSet<K, P>
source§fn from(additions: DerivationAdditions<K>) -> Self
Converts to this type from the input type.Auto Trait Implementations§
§impl<K, P> RefUnwindSafe for KeychainChangeSet<K, P>where
K: RefUnwindSafe,
P: RefUnwindSafe,
§impl<K, P> Send for KeychainChangeSet<K, P>where
K: Send,
P: Send,
§impl<K, P> Sync for KeychainChangeSet<K, P>where
K: Sync,
P: Sync,
§impl<K, P> Unpin for KeychainChangeSet<K, P>
§impl<K, P> UnwindSafe for KeychainChangeSet<K, P>where
K: RefUnwindSafe,
P: RefUnwindSafe,
Blanket Implementations§
Trait Implementations§
source§impl<K: Clone, P: Clone> Clone for KeychainChangeSet<K, P>
source§fn clone(&self) -> KeychainChangeSet<K, P>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl<K, P> Default for KeychainChangeSet<K, P>
source§impl<'de, K, P> Deserialize<'de> for KeychainChangeSet<K, P>where
K: Ord + Deserialize<'de>,
P: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl<K, P> ForEachTxOut for KeychainChangeSet<K, P>
source§fn for_each_txout(&self, f: impl FnMut((OutPoint, &TxOut)))
The provided closure f will be called with each outpoint/txout pair.source§impl<K, P> From<ChangeSet<P>> for KeychainChangeSet<K, P>
source§impl<K, P> From<DerivationAdditions<K>> for KeychainChangeSet<K, P>
source§fn from(additions: DerivationAdditions<K>) -> Self
Converts to this type from the input type.Auto Trait Implementations§
§impl<K, P> RefUnwindSafe for KeychainChangeSet<K, P>where
K: RefUnwindSafe,
P: RefUnwindSafe,
§impl<K, P> Send for KeychainChangeSet<K, P>where
K: Send,
P: Send,
§impl<K, P> Sync for KeychainChangeSet<K, P>where
K: Sync,
P: Sync,
§impl<K, P> Unpin for KeychainChangeSet<K, P>
§impl<K, P> UnwindSafe for KeychainChangeSet<K, P>where
K: RefUnwindSafe,
P: RefUnwindSafe,
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/struct.KeychainTracker.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/struct.KeychainTracker.html
index d1d07df6b8..b126f93d08 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/struct.KeychainTracker.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/struct.KeychainTracker.html
@@ -5,7 +5,7 @@
The KeychainTracker atomically updates its KeychainTxOutIndex whenever new chain data is
incorporated into its internal ChainGraph.
Fields§
§txout_index: KeychainTxOutIndex<K>Index between script pubkeys to transaction outputs
-Implementations§
source§impl<K, P> KeychainTracker<K, P>where
P: ChainPosition,
K: Ord + Clone + Debug,
sourcepub fn add_keychain(
&mut self,
keychain: K,
descriptor: Descriptor<DescriptorPublicKey>
)
Add a keychain to the trackerâs txout_index with a descriptor to derive addresses for it.
+
Implementations§
source§impl<K, P> KeychainTracker<K, P>where
P: ChainPosition,
K: Ord + Clone + Debug,
sourcepub fn add_keychain(
&mut self,
keychain: K,
descriptor: Descriptor<DescriptorPublicKey>
)
Add a keychain to the trackerâs txout_index with a descriptor to derive addresses.
This is just shorthand for calling KeychainTxOutIndex::add_keychain on the internal
txout_index.
Adding a keychain means you will be able to derive new script pubkeys under that keychain
@@ -20,7 +20,7 @@ and the tracker will discover transaction outputs with those script pubkeys.
Internally, we call ChainGraph::determine_changeset and also determine the additions of
KeychainTxOutIndex.
sourcepub fn apply_update(
&mut self,
scan: KeychainScan<K, P>
) -> Result<KeychainChangeSet<K, P>, UpdateError<P>>
Directly applies a KeychainScan on KeychainTracker.
-This is equivilant to calling determine_changeset and apply_changeset in sequence.
+This is equivalent to calling determine_changeset and apply_changeset in sequence.
sourcepub fn apply_changeset(&mut self, changeset: KeychainChangeSet<K, P>)
Applies the changes in changeset to KeychainTracker.
Internally, this calls KeychainTxOutIndex::apply_additions and
ChainGraph::apply_changeset in sequence.
@@ -33,10 +33,10 @@ view of the blockchain/mempool.
sourcepub fn chain_graph(&self) -> &ChainGraph<P>
Returns a reference to the internal ChainGraph.
sourcepub fn graph(&self) -> &TxGraph
Returns a reference to the internal TxGraph (which is part of the ChainGraph).
sourcepub fn chain(&self) -> &SparseChain<P>
Returns a reference to the internal SparseChain (which is part of the ChainGraph).
-sourcepub fn insert_checkpoint_preview(
&self,
block_id: BlockId
) -> Result<KeychainChangeSet<K, P>, InsertCheckpointError>
Determines the changes as result of inserting block_id (a height and block hash) into the
+
sourcepub fn insert_checkpoint_preview(
&self,
block_id: BlockId
) -> Result<KeychainChangeSet<K, P>, InsertCheckpointError>
Determines the changes as a result of inserting block_id (a height and block hash) into the
tracker.
The caller is responsible for guaranteeing that a block exists at that height. If a
-checkpoint already exists at that height with a different hash this will return an error.
+checkpoint already exists at that height with a different hash; this will return an error.
Otherwise it will return Ok(true) if the checkpoint didnât already exist or Ok(false)
if it did.
Warning: This function modifies the internal state of the tracker. You are responsible
@@ -44,21 +44,21 @@ for persisting these changes to disk if you need to restore them.
sourcepub fn insert_checkpoint(
&mut self,
block_id: BlockId
) -> Result<KeychainChangeSet<K, P>, InsertCheckpointError>
Directly insert a block_id into the tracker.
This is equivalent of calling insert_checkpoint_preview and apply_changeset in
sequence.
-sourcepub fn insert_tx_preview(
&self,
tx: Transaction,
pos: P
) -> Result<KeychainChangeSet<K, P>, InsertTxError<P>>
Determines the changes as result of inserting a transaction into the inner ChainGraph
+
sourcepub fn insert_tx_preview(
&self,
tx: Transaction,
pos: P
) -> Result<KeychainChangeSet<K, P>, InsertTxError<P>>
Determines the changes as a result of inserting a transaction into the inner ChainGraph
and optionally into the inner chain at position.
Warning: This function modifies the internal state of the chain graph. You are
responsible for persisting these changes to disk if you need to restore them.
sourcepub fn insert_tx(
&mut self,
tx: Transaction,
pos: P
) -> Result<KeychainChangeSet<K, P>, InsertTxError<P>>
Directly insert a transaction into the inner ChainGraph and optionally into the inner
chain at position.
-This is equivilant of calling insert_tx_preview and apply_changeset in sequence.
-sourcepub fn balance(&self, should_trust: impl FnMut(&K) -> bool) -> Balance
Returns the balance of the keychain i.e. the value of unspent transaction outputs tracked.
+This is equivalent of calling insert_tx_preview and apply_changeset in sequence.
+sourcepub fn balance(&self, should_trust: impl FnMut(&K) -> bool) -> Balance
Returns the balance of the keychain, i.e., the value of unspent transaction outputs tracked.
The caller provides a should_trust predicate which must decide whether the value of
unconfirmed outputs on this keychain are guaranteed to be realized or not. For example:
-- For an internal (change) keychain
should_trust should in general be true since even if
-you lose an internal output due to eviction you will always gain back the value from whatever output the
-unconfirmed transaction was spending (since that output is presumeably from your wallet).
-- For an external keychain you might want
should_trust to return false since someone may cancel (by double spending)
+ - For an internal (change) keychain,
should_trust should generally be true since even if
+you lose an internal output due to eviction, you will always gain back the value from whatever output the
+unconfirmed transaction was spending (since that output is presumably from your wallet).
+- For an external keychain, you might want
should_trust to return false since someone may cancel (by double spending)
a payment made to addresses on that keychain.
When in doubt set should_trust to return false. This doesnât do anything other than change
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/struct.KeychainTxOutIndex.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/struct.KeychainTxOutIndex.html
index 791d9847b1..811a8da70b 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/struct.KeychainTxOutIndex.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/keychain/struct.KeychainTxOutIndex.html
@@ -1,9 +1,9 @@
KeychainTxOutIndex in bdk_chain::keychain - Rust Struct bdk_chain::keychain::KeychainTxOutIndex
source · pub struct KeychainTxOutIndex<K> { /* private fields */ }
Expand description
A convenient wrapper around SpkTxOutIndex that relates script pubkeys to miniscript public
Descriptors.
Descriptors are referenced by the provided keychain generic (K).
-Script pubkeys for a descriptor are revealed chronologically from index 0. I.e. If the last
-revealed index of a descriptor is 5, scripts of indices 0 to 4 are guaranteed to already be
-revealed. In addition to revealed scripts, we have a lookahead parameter for each keychain
+
Script pubkeys for a descriptor are revealed chronologically from index 0. I.e., If the last
+revealed index of a descriptor is 5; scripts of indices 0 to 4 are guaranteed to be already
+revealed. In addition to revealed scripts, we have a lookahead parameter for each keychain,
which defines the number of script pubkeys to store ahead of the last revealed index.
Methods that could update the last revealed index will return DerivationAdditions to report
these changes. This can be persisted for future recovery.
@@ -31,43 +31,43 @@ txout_index.add_keychain(MyKeychain::MyAppUser { user_id: 4
If the matched script pubkey is part of the lookahead, the last stored index is updated for
the script pubkeyâs keychain and the DerivationAdditions returned will reflect the
change.
-Typically this method is used in two situations:
+Typically, this method is used in two situations:
-- After loading transaction data from disk you may scan over all the txouts to restore all
+
- After loading transaction data from the disk, you may scan over all the txouts to restore all
your txouts.
-- When getting new data from the chain you usually scan it before incorporating it into
-your chain state (i.e.
SparseChain, ChainGraph).
+- When getting new data from the chain, you usually scan it before incorporating it into
+your chain state (i.e.,
SparseChain, ChainGraph).
See ForEachTxout for the types that support this.
sourcepub fn scan_txout(
&mut self,
op: OutPoint,
txout: &TxOut
) -> DerivationAdditions<K>
Scan a single outpoint for a matching script pubkey.
-If it matches the index will store and index it.
+If it matches, this will store and index it.
sourcepub fn inner(&self) -> &SpkTxOutIndex<(K, u32)>
Return a reference to the internal SpkTxOutIndex.
-sourcepub fn keychains(&self) -> &BTreeMap<K, Descriptor<DescriptorPublicKey>>
Return a reference to the internal map of keychain to descriptors.
-sourcepub fn add_keychain(
&mut self,
keychain: K,
descriptor: Descriptor<DescriptorPublicKey>
)
Add a keychain to the trackerâs txout_index with a descriptor to derive addresses for it.
+sourcepub fn keychains(&self) -> &BTreeMap<K, Descriptor<DescriptorPublicKey>>
Return a reference to the internal map of the keychain to descriptors.
+sourcepub fn add_keychain(
&mut self,
keychain: K,
descriptor: Descriptor<DescriptorPublicKey>
)
Add a keychain to the trackerâs txout_index with a descriptor to derive addresses.
Adding a keychain means you will be able to derive new script pubkeys under that keychain
and the txout index will discover transaction outputs with those script pubkeys.
Panics
This will panic if a different descriptor is introduced to the same keychain.
sourcepub fn lookaheads(&self) -> &BTreeMap<K, u32>
Return the lookahead setting for each keychain.
-Refer to set_lookahead for a deeper explanation on lookahead.
+Refer to set_lookahead for a deeper explanation of the lookahead.
sourcepub fn set_lookahead_for_all(&mut self, lookahead: u32)
Convenience method to call set_lookahead for all keychains.
sourcepub fn set_lookahead(&mut self, keychain: &K, lookahead: u32)
Set the lookahead count for keychain.
The lookahead is the number of scripts to cache ahead of the last stored script index. This
is useful during a scan via scan or scan_txout.
Panics
-This will panic if keychain does not exist.
+This will panic if the keychain does not exist.
sourcepub fn lookahead_to_target_multi(&mut self, target_indexes: BTreeMap<K, u32>)
Convenience method to call lookahead_to_target for multiple keychains.
sourcepub fn lookahead_to_target(&mut self, keychain: &K, target_index: u32)
Store lookahead scripts until target_index.
This does not change the lookahead setting.
sourcepub fn spks_of_all_keychains(
&self
) -> BTreeMap<K, impl Iterator<Item = (u32, Script)> + Clone>
Generates script pubkey iterators for every keychain. The iterators iterate over all
derivable script pubkeys.
-sourcepub fn spks_of_keychain(
&self,
keychain: &K
) -> impl Iterator<Item = (u32, Script)> + Clone
Generates a script pubkey iterator for the given keychainâs descriptor (if exists). The
+
sourcepub fn spks_of_keychain(
&self,
keychain: &K
) -> impl Iterator<Item = (u32, Script)> + Clone
Generates a script pubkey iterator for the given keychainâs descriptor (if it exists). The
iterator iterates over all derivable scripts of the keychainâs descriptor.
Panics
-This will panic if keychain does not exist.
+This will panic if the keychain does not exist.
sourcepub fn revealed_spks_of_all_keychains(
&self
) -> BTreeMap<K, impl Iterator<Item = (u32, &Script)> + Clone>
Convenience method to get revealed_spks_of_keychain of all keychains.
sourcepub fn revealed_spks_of_keychain(
&self,
keychain: &K
) -> impl DoubleEndedIterator<Item = (u32, &Script)> + Clone
Iterates over the script pubkeys revealed by this index under keychain.
-sourcepub fn next_index(&self, keychain: &K) -> (u32, bool)
Get the next derivation index for keychain. This is the index after the last revealed
+
sourcepub fn next_index(&self, keychain: &K) -> (u32, bool)
Get the next derivation index for keychain. The next index is the index after the last revealed
derivation index.
The second field in the returned tuple represents whether the next derivation index is new.
There are two scenarios where the next derivation index is reused (not new):
@@ -84,12 +84,12 @@ There are two scenarios where the next derivation index is reused (not new):
sourcepub fn reveal_to_target_multi(
&mut self,
keychains: &BTreeMap<K, u32>
) -> (BTreeMap<K, impl Iterator<Item = (u32, Script)>>, DerivationAdditions<K>)
Convenience method to call Self::reveal_to_target on multiple keychains.
sourcepub fn reveal_to_target(
&mut self,
keychain: &K,
target_index: u32
) -> (impl Iterator<Item = (u32, Script)>, DerivationAdditions<K>)
Reveals script pubkeys of the keychainâs descriptor up to and including the
target_index.
-If the target_index cannot be reached (due to the descriptor having no wildcard, and/or
-the target_index is in the hardened index range), this method will do a best-effort and
+
If the target_index cannot be reached (due to the descriptor having no wildcard and/or
+the target_index is in the hardened index range), this method will make a best-effort and
reveal up to the last possible index.
-This returns an iterator of newly revealed indices (along side their scripts), and a
-DerivationAdditions which reports updates to the latest revealed index. If no new script
-pubkeys are revealed, both of these will be empty.
+This returns an iterator of newly revealed indices (alongside their scripts) and a
+DerivationAdditions, which reports updates to the latest revealed index. If no new script
+pubkeys are revealed, then both of these will be empty.
Panics
Panics if keychain does not exist.
sourcepub fn reveal_next_spk(
&mut self,
keychain: &K
) -> ((u32, &Script), DerivationAdditions<K>)
Attempts to reveal the next script pubkey for keychain.
@@ -103,25 +103,25 @@ pubkeys are revealed, both of these will be empty.
Panics
Panics if the keychain does not exist.
-sourcepub fn next_unused_spk(
&mut self,
keychain: &K
) -> ((u32, &Script), DerivationAdditions<K>)
Gets the next unused script pubkey in the keychain. I.e. the script pubkey with the lowest
+
sourcepub fn next_unused_spk(
&mut self,
keychain: &K
) -> ((u32, &Script), DerivationAdditions<K>)
Gets the next unused script pubkey in the keychain. I.e., the script pubkey with the lowest
index that has not been used yet.
This will derive and reveal a new script pubkey if no more unused script pubkeys exist.
-If the descriptor has no wildcard and already has a used script pubkey, or if a descriptor
-has used all scripts up to the derivation bounds, the last derived script pubkey will be
+
If the descriptor has no wildcard and already has a used script pubkey or if a descriptor
+has used all scripts up to the derivation bounds, then the last derived script pubkey will be
returned.
Panics
Panics if keychain has never been added to the index
-sourcepub fn mark_used(&mut self, keychain: &K, index: u32) -> bool
Marks the script pubkey at index as used even though it hasnât seen an output with it.
+
sourcepub fn mark_used(&mut self, keychain: &K, index: u32) -> bool
Marks the script pubkey at index as used even though the tracker hasnât seen an output with it.
This only has an effect when the index had been added to self already and was unused.
-Returns whether the index was originally present as unused.
+Returns whether the index was initially present as unused.
This is useful when you want to reserve a script pubkey for something but donât want to add
the transaction output using it to the index yet. Other callers will consider index on
keychain used until you call unmark_used.
sourcepub fn unmark_used(&mut self, keychain: &K, index: u32) -> bool
Undoes the effect of mark_used. Returns whether the index is inserted back into
unused.
-Note that if self has scanned an output with this script pubkey then this will have no
+
Note that if self has scanned an output with this script pubkey, then this will have no
effect.
-sourcepub fn unused_spks_of_keychain(
&self,
keychain: &K
) -> impl DoubleEndedIterator<Item = (u32, &Script)>
Iterates over all unused script pubkeys for a keychain that have been stored in the index.
+sourcepub fn unused_spks_of_keychain(
&self,
keychain: &K
) -> impl DoubleEndedIterator<Item = (u32, &Script)>
Iterates over all unused script pubkeys for a keychain stored in the index.
sourcepub fn txouts_of_keychain(
&self,
keychain: &K
) -> impl DoubleEndedIterator<Item = (u32, OutPoint)> + '_
Iterates over all the [OutPoint] that have a TxOut with a script pubkey derived from
keychain.
sourcepub fn last_used_index(&self, keychain: &K) -> Option<u32>
Returns the highest derivation index of the keychain where KeychainTxOutIndex has
@@ -132,14 +132,14 @@ a [TxOut] with itâs script pubkey.
derived scripts per keychain, as specified in the additions.
Methods from Deref<Target = SpkTxOutIndex<(K, u32)>>§
sourcepub fn txouts(
&self
) -> impl DoubleEndedIterator<Item = (&I, OutPoint, &TxOut)> + ExactSizeIterator
Iterate over all known txouts that spend to tracked script pubkeys.
sourcepub fn txouts_in_tx(
&self,
txid: Txid
) -> impl DoubleEndedIterator<Item = (&I, OutPoint, &TxOut)>
Finds all txouts on a transaction that has previously been scanned and indexed.
-sourcepub fn outputs_in_range(
&self,
range: impl RangeBounds<I>
) -> impl DoubleEndedIterator<Item = (&I, OutPoint)>
Iterates over all outputs with script pubkeys in an index range.
+sourcepub fn outputs_in_range(
&self,
range: impl RangeBounds<I>
) -> impl DoubleEndedIterator<Item = (&I, OutPoint)>
Iterates over all the outputs with script pubkeys in an index range.
sourcepub fn txout(&self, outpoint: OutPoint) -> Option<(&I, &TxOut)>
Returns the txout and script pubkey index of the TxOut at OutPoint.
Returns None if the TxOut hasnât been scanned or if nothing matching was found there.
sourcepub fn spk_at_index(&self, index: &I) -> Option<&Script>
Returns the script that has been inserted at the index.
-If that index hasnât been inserted yet it will return None.
-sourcepub fn all_spks(&self) -> &BTreeMap<I, Script>
The script pubkeys being tracked by the index.
-sourcepub fn unused_spks<R>(
&self,
range: R
) -> impl DoubleEndedIterator<Item = (&I, &Script)>where
R: RangeBounds<I>,
Iterates over a unused script pubkeys in a index range.
-Here âunusedâ means that after the script pubkey was stored in the index, the index has
+
If that index hasnât been inserted yet, it will return None.
+sourcepub fn all_spks(&self) -> &BTreeMap<I, Script>
The script pubkeys that are being tracked by the index.
+sourcepub fn unused_spks<R>(
&self,
range: R
) -> impl DoubleEndedIterator<Item = (&I, &Script)>where
R: RangeBounds<I>,
Iterates over all unused script pubkeys in an index range.
+Here, âunusedâ means that after the script pubkey was stored in the index, the index has
never scanned a transaction output with it.
Example
@@ -150,13 +150,13 @@ never scanned a transaction output with it.
let unused_change_spks =
txout_index.unused_spks((change_index, u32::MIN)..(change_index, u32::MAX));
sourcepub fn is_used(&self, index: &I) -> bool
Returns whether the script pubkey at index has been used or not.
-Here âunusedâ means that after the script pubkey was stored in the index, the index has
+
Here, âunusedâ means that after the script pubkey was stored in the index, the index has
never scanned a transaction output with it.
sourcepub fn index_of_spk(&self, script: &Script) -> Option<&I>
Returns the index associated with the script pubkey.
-sourcepub fn sent_and_received(&self, tx: &Transaction) -> (u64, u64)
Computes total input value going from script pubkeys in the index (sent) and total output
+
sourcepub fn sent_and_received(&self, tx: &Transaction) -> (u64, u64)
Computes total input value going from script pubkeys in the index (sent) and the total output
value going to script pubkeys in the index (received) in tx. For the sent to be computed
-correctly the output being spent must have already been scanned by the index. Calculating
-received just uses the transaction outputs directly so will be correct even if it has not
+correctly, the output being spent must have already been scanned by the index. Calculating
+received just uses the transaction outputs directly, so it will be correct even if it has not
been scanned.
sourcepub fn net_value(&self, tx: &Transaction) -> i64
Computes the net value that this transaction gives to the script pubkeys in the index and
takes from the transaction outputs in the index. Shorthand for calling
@@ -164,8 +164,8 @@ been scanned.
sourcepub fn is_relevant(&self, tx: &Transaction) -> bool
Whether any of the inputs of this transaction spend a txout tracked or whether any output
matches one of our script pubkeys.
It is easily possible to misuse this method and get false negatives by calling it before you
-have scanned the TxOuts the transaction is spending. For example if you want to filter out
-all the transactions in a block that are irrelevant you must first scan all the
+have scanned the TxOuts the transaction is spending. For example, if you want to filter out
+all the transactions in a block that are irrelevant, you must first scan all the
transactions in the block and only then use this method.
Trait Implementations§
source§impl<K: Clone> Clone for KeychainTxOutIndex<K>
source§fn clone(&self) -> KeychainTxOutIndex<K>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl<K: Debug> Debug for KeychainTxOutIndex<K>
source§impl<K> Default for KeychainTxOutIndex<K>
Auto Trait Implementations§
§impl<K> RefUnwindSafe for KeychainTxOutIndex<K>where
K: RefUnwindSafe,
§impl<K> Send for KeychainTxOutIndex<K>where
K: Send,
§impl<K> Sync for KeychainTxOutIndex<K>where
K: Sync,
§impl<K> Unpin for KeychainTxOutIndex<K>where
K: Unpin,
§impl<K> UnwindSafe for KeychainTxOutIndex<K>where
K: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
Calls U::from(self).
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sidebar-items.js b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sidebar-items.js
index b05c084a29..cae94de312 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sidebar-items.js
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sidebar-items.js
@@ -1 +1 @@
-window.SIDEBAR_ITEMS = {"constant":[["COINBASE_MATURITY","How many confirmations are needed for a coinbase output to be spent"]],"enum":[["ConfirmationTime","Block height and timestamp in which a transaction is confirmed in."],["TxHeight","Represents the height in which a transaction is confirmed at."]],"externcrate":[["serde",""]],"mod":[["chain_graph","Module for structures that combine the features of [`sparse_chain`] and [`tx_graph`]."],["keychain","Module for keychain based structures."],["sparse_chain","Module for structures that maintain sparse (purposely incomplete) snapshots of blockchain data."],["tx_graph","Module for structures that store and traverse transactions."]],"struct":[["BlockId","A reference to a block in the cannonical chain."],["FullTxOut","A `TxOut` with as much data as we can retreive about it"],["SpkTxOutIndex","An index storing `TxOut`s that have a script pubkey that matches those in a list."]],"trait":[["DescriptorExt","A trait to extend the functionality of a miniscript descriptor."],["ForEachTxOut","Trait to do something with every txout contained in a structure."]]};
\ No newline at end of file
+window.SIDEBAR_ITEMS = {"constant":[["COINBASE_MATURITY","How many confirmations are needed f or a coinbase output to be spent."]],"enum":[["ConfirmationTime","Block height and timestamp at which a transaction is confirmed."],["TxHeight","Represents the height at which a transaction is confirmed."]],"externcrate":[["serde",""]],"mod":[["chain_graph","Module for structures that combine the features of [`sparse_chain`] and [`tx_graph`]."],["keychain","Module for keychain related structures."],["sparse_chain","Module for structures that maintain sparse (purposely incomplete) snapshots of blockchain data."],["tx_graph","Module for structures that store and traverse transactions."]],"struct":[["BlockId","A reference to a block in the canonical chain."],["FullTxOut","A `TxOut` with as much data as we can retrieve about it"],["SpkTxOutIndex","An index storing `TxOut`s that have a script pubkey that matches those in a list."]],"trait":[["DescriptorExt","A trait to extend the functionality of a miniscript descriptor."],["ForEachTxOut","Trait to do something with every txout contained in a structure."]]};
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/enum.InsertCheckpointError.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/enum.InsertCheckpointError.html
index 0dd477e41b..66e87b52ea 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/enum.InsertCheckpointError.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/enum.InsertCheckpointError.html
@@ -5,7 +5,7 @@
update_hash: BlockHash,
},
}Expand description
Represents a failure when trying to insert a checkpoint into SparseChain.
-Variants§
§HashNotMatching
Occurs when checkpoint of the same height already exists with a different [BlockHash].
+Variants§
§HashNotMatching
Occurs when a checkpoint of the same height already exists with a different [BlockHash].
Trait Implementations§
source§impl Clone for InsertCheckpointError
source§fn clone(&self) -> InsertCheckpointError
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for InsertCheckpointError
source§impl Display for InsertCheckpointError
source§impl Error for InsertCheckpointError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
ðDeprecated since 1.42.0: use the Display impl or to_string()source§impl PartialEq<InsertCheckpointError> for InsertCheckpointError
source§fn eq(&self, other: &InsertCheckpointError) -> bool
source§impl StructuralPartialEq for InsertCheckpointError
Auto Trait Implementations§
§impl RefUnwindSafe for InsertCheckpointError
§impl Send for InsertCheckpointError
§impl Sync for InsertCheckpointError
§impl Unpin for InsertCheckpointError
§impl UnwindSafe for InsertCheckpointError
Blanket Implementations§
source§impl<T> From<T> for T
const: unstable · source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/enum.InsertTxError.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/enum.InsertTxError.html
index c4e829be0d..9ee5454298 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/enum.InsertTxError.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/enum.InsertTxError.html
@@ -10,10 +10,10 @@
update_pos: P,
},
}Expand description
Represents a failure when trying to insert a [Txid] into SparseChain.
-Variants§
§TxTooHigh
Occurs when the [Txid] is to be inserted at a hight higher than the SparseChainâs tip.
-§TxMovedUnexpectedly
Occurs when the [Txid] is already in the SparseChain and the insertion would result in
+
Variants§
§TxTooHigh
Occurs when the [Txid] is to be inserted at a height higher than the SparseChainâs tip.
+§TxMovedUnexpectedly
Occurs when the [Txid] is already in the SparseChain, and the insertion would result in
an unexpected move in ChainPosition.
-Trait Implementations§
source§impl<P: Clone> Clone for InsertTxError<P>
source§fn clone(&self) -> InsertTxError<P>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl<P: Debug> Debug for InsertTxError<P>
source§impl<P: Debug> Display for InsertTxError<P>
source§impl<P: Debug> Error for InsertTxError<P>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
ðDeprecated since 1.42.0: use the Display impl or to_string()source§impl<P> From<InsertTxError<P>> for InsertTxError<P>
source§fn from(inner: InsertTxError<P>) -> Self
Converts to this type from the input type.source§impl<P: PartialEq> PartialEq<InsertTxError<P>> for InsertTxError<P>
source§fn eq(&self, other: &InsertTxError<P>) -> bool
This method tests for self and other values to be equal, and is used
+Trait Implementations§
source§impl<P: Clone> Clone for InsertTxError<P>
source§fn clone(&self) -> InsertTxError<P>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl<P: Debug> Debug for InsertTxError<P>
source§impl<P: Debug> Display for InsertTxError<P>
source§impl<P: Debug> Error for InsertTxError<P>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
ðDeprecated since 1.42.0: use the Display impl or to_string()source§impl<P> From<InsertTxError<P>> for InsertTxError<P>
source§fn from(inner: InsertTxError<P>) -> Self
Converts to this type from the input type.source§impl<P: PartialEq> PartialEq<InsertTxError<P>> for InsertTxError<P>
source§fn eq(&self, other: &InsertTxError<P>) -> bool
source§impl<P> StructuralPartialEq for InsertTxError<P>
Auto Trait Implementations§
§impl<P> RefUnwindSafe for InsertTxError<P>where
P: RefUnwindSafe,
§impl<P> Send for InsertTxError<P>where
P: Send,
§impl<P> Sync for InsertTxError<P>where
P: Sync,
§impl<P> Unpin for InsertTxError<P>where
P: Unpin,
§impl<P> UnwindSafe for InsertTxError<P>where
P: UnwindSafe,
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
Calls U::from(self).
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/enum.UpdateError.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/enum.UpdateError.html
index 85281b5c08..e6c913632f 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/enum.UpdateError.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/enum.UpdateError.html
@@ -9,9 +9,9 @@
Variants§
§NotConnected(u32)
The update cannot be applied to the chain because the chain suffix it represents did not
connect to the existing chain. This error case contains the checkpoint height to include so
that the chains can connect.
-§TxInconsistent
The update contains inconsistent tx states (e.g. it changed the transactionâs height). This
+
§TxInconsistent
The update contains inconsistent tx states (e.g., it changed the transactionâs height). This
error is usually the inconsistency found.
-Trait Implementations§
source§impl<P: Clone> Clone for UpdateError<P>
source§fn clone(&self) -> UpdateError<P>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl<P: Debug> Debug for UpdateError<P>
source§impl<P: Debug> Display for UpdateError<P>
source§impl<P: Debug> Error for UpdateError<P>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
ðDeprecated since 1.42.0: use the Display impl or to_string()source§impl<P> From<UpdateError<P>> for UpdateError<P>
source§fn from(inner: UpdateError<P>) -> Self
Converts to this type from the input type.source§impl<P: PartialEq> PartialEq<UpdateError<P>> for UpdateError<P>
source§fn eq(&self, other: &UpdateError<P>) -> bool
This method tests for self and other values to be equal, and is used
+Trait Implementations§
source§impl<P: Clone> Clone for UpdateError<P>
source§fn clone(&self) -> UpdateError<P>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl<P: Debug> Debug for UpdateError<P>
source§impl<P: Debug> Display for UpdateError<P>
source§impl<P: Debug> Error for UpdateError<P>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
ðDeprecated since 1.42.0: use the Display impl or to_string()source§impl<P> From<UpdateError<P>> for UpdateError<P>
source§fn from(inner: UpdateError<P>) -> Self
Converts to this type from the input type.source§impl<P: PartialEq> PartialEq<UpdateError<P>> for UpdateError<P>
source§fn eq(&self, other: &UpdateError<P>) -> bool
source§impl<P> StructuralPartialEq for UpdateError<P>
Auto Trait Implementations§
§impl<P> RefUnwindSafe for UpdateError<P>where
P: RefUnwindSafe,
§impl<P> Send for UpdateError<P>where
P: Send,
§impl<P> Sync for UpdateError<P>where
P: Sync,
§impl<P> Unpin for UpdateError<P>where
P: Unpin,
§impl<P> UnwindSafe for UpdateError<P>where
P: UnwindSafe,
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
Calls U::from(self).
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/index.html
index bc751eb0b1..85121b1ac1 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/index.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/index.html
@@ -1,8 +1,8 @@
bdk_chain::sparse_chain - Rust Module bdk_chain::sparse_chain
source · Expand description
Module for structures that maintain sparse (purposely incomplete) snapshots of blockchain data.
SparseChain stores [Txid]s ordered by an index that implements ChainPosition (this
-represents the transactionâs position in the blockchain, by default TxHeight is used).
+represents the transactionâs position in the blockchain; by default, TxHeight is used).
SparseChain also contains âcheckpointsâ which relate block height to block hash. Changes to
-a SparseChain are reported by returning ChangeSets.
+a SparseChain is reported by returning ChangeSets.
Updating SparseChain
A sparsechain can be thought of as a consistent snapshot of history. A SparseChain can be
updated by applying an update SparseChain on top, but only if they âconnectâ via their
@@ -46,7 +46,7 @@ checkpoints and donât result in unexpected movements of transactions.
As shown above, sparsechains can be âconnectedâ by comparing their checkpoints. However, there
are situations where two sparsechains cannot connect in a way that guarantees consistency.
-// our sparsechain has 2 checkpoints
+// our sparsechain has two checkpoints
let chain = SparseChain::<TxHeight>::from_checkpoints(vec![
BlockId {
height: 1,
@@ -79,7 +79,7 @@ are situations where two sparsechains cannot connect in a way that guarantees co
/* Example of an update that completely misses the point */
let disconnected_update = SparseChain::from_checkpoints(vec![
- // the last checkpoint in chain is 2, so 3 and 4 do not connect
+ // the last checkpoint in the chain is 2, so 3 and 4 do not connect
BlockId {
height: 3,
hash: hash_c,
@@ -96,7 +96,7 @@ are situations where two sparsechains cannot connect in a way that guarantees co
Updates can be formed to evict data from the original sparsechain. This is useful for handling
blockchain reorgs.
-// our chain has a single checkpoint at height 11
+// our chain has a single checkpoint at height 11.
let mut chain = SparseChain::<TxHeight>::from_checkpoints(vec![BlockId {
height: 11,
hash: hash_a,
@@ -117,10 +117,10 @@ blockchain reorgs.
.apply_update(update)
.expect("we can evict/replace checkpoint 11 since it is the only checkpoint");
-// now our `chain` has 2 checkpoints (11:hash_b & 12:hash_c)
-// we detect another reorg, this time at height 12...
+// now our `chain` has two checkpoints (11:hash_b & 12:hash_c)
+// we detect another reorg, this time at height 12.
let update = SparseChain::from_checkpoints(vec![
- // we connect at checkpoint 11 as this is our "point of agreement"
+ // we connect at checkpoint 11 as this is our "point of agreement".
BlockId {
height: 11,
hash: hash_b,
@@ -152,9 +152,9 @@ reorg.
Custom ChainPosition
SparseChain maintains a list of txids ordered by ChainPosition. By default, TxHeight
-is used, however additional data can be incorporated into the implementation.
+is used; however, additional data can be incorporated into the implementation.
For example, we can have âperfect orderingâ of transactions if our positional index is a
-combination of block height and transaction position in block.
+combination of block height and transaction position in a block.
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum TxPosition {
@@ -263,4 +263,4 @@ combination of block height and transaction position in block.
],
);
Structs
The return value of determine_changeset.This is a non-monotone structure that tracks relevant [Txid]s that are ordered by chain
-position P.Enums
Represents a failure when trying to insert a checkpoint into SparseChain.Represents a failure when trying to insert a [Txid] into SparseChain.Represents an update failure of SparseChain.Traits
Represents an position in which transactions are ordered in SparseChain.
\ No newline at end of file
+position P.
Enums
Represents a failure when trying to insert a checkpoint into SparseChain.Represents a failure when trying to insert a [Txid] into SparseChain.Represents an update failure of SparseChain.Traits
Represents a position in which transactions are ordered in SparseChain.
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/sidebar-items.js b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/sidebar-items.js
index 0872de8708..5b8fd9d27f 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/sidebar-items.js
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/sidebar-items.js
@@ -1 +1 @@
-window.SIDEBAR_ITEMS = {"enum":[["InsertCheckpointError","Represents a failure when trying to insert a checkpoint into [`SparseChain`]."],["InsertTxError","Represents a failure when trying to insert a [`Txid`] into [`SparseChain`]."],["UpdateError","Represents an update failure of [`SparseChain`]."]],"struct":[["ChangeSet","The return value of `determine_changeset`."],["SparseChain","This is a non-monotone structure that tracks relevant [`Txid`]s that are ordered by chain position `P`."]],"trait":[["ChainPosition","Represents an position in which transactions are ordered in [`SparseChain`]."]]};
\ No newline at end of file
+window.SIDEBAR_ITEMS = {"enum":[["InsertCheckpointError","Represents a failure when trying to insert a checkpoint into [`SparseChain`]."],["InsertTxError","Represents a failure when trying to insert a [`Txid`] into [`SparseChain`]."],["UpdateError","Represents an update failure of [`SparseChain`]."]],"struct":[["ChangeSet","The return value of `determine_changeset`."],["SparseChain","This is a non-monotone structure that tracks relevant [`Txid`]s that are ordered by chain position `P`."]],"trait":[["ChainPosition","Represents a position in which transactions are ordered in [`SparseChain`]."]]};
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/struct.ChangeSet.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/struct.ChangeSet.html
index 9f81a5c315..ae49b96bf7 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/struct.ChangeSet.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/struct.ChangeSet.html
@@ -2,7 +2,7 @@
pub checkpoints: BTreeMap<u32, Option<BlockHash>>,
pub txids: BTreeMap<Txid, Option<P>>,
}Expand description
The return value of determine_changeset.
-Fields§
§checkpoints: BTreeMap<u32, Option<BlockHash>>§txids: BTreeMap<Txid, Option<P>>Implementations§
source§impl<P> ChangeSet<P>
sourcepub fn append(&mut self, other: Self)where
P: ChainPosition,
Appends the changes in other into self such that applying self afterwards has the same
+
Fields§
§checkpoints: BTreeMap<u32, Option<BlockHash>>§txids: BTreeMap<Txid, Option<P>>Implementations§
Trait Implementations§
source§impl<'de, P> Deserialize<'de> for ChangeSet<P>where
P: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl<P: PartialEq> PartialEq<ChangeSet<P>> for ChangeSet<P>
source§fn eq(&self, other: &ChangeSet<P>) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/struct.SparseChain.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/struct.SparseChain.html
index 9ff0e1f174..9ca9d71b55 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/struct.SparseChain.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/struct.SparseChain.html
@@ -10,7 +10,7 @@ are in the same chain.
sourcepub fn latest_checkpoint(&self) -> Option<BlockId>
Get the checkpoint for the last known tip.
sourcepub fn checkpoint_at(&self, height: u32) -> Option<BlockId>
Get the checkpoint at the given height if it exists.
sourcepub fn tx_position(&self, txid: Txid) -> Option<&P>
Return the ChainPosition of a txid.
-This returns None if the transation does not exist.
+This returns None if the transaction does not exist.
sourcepub fn checkpoints(&self) -> &BTreeMap<u32, BlockHash>
Return a BTreeMap of all checkpoints (block hashes by height).
sourcepub fn range_checkpoints(
&self,
range: impl RangeBounds<u32>
) -> impl DoubleEndedIterator<Item = BlockId> + '_
Return an iterator over checkpoints in a height range, in ascending height order.
sourcepub fn determine_changeset(
&self,
update: &Self
) -> Result<ChangeSet<P>, UpdateError<P>>
Preview changes of updating Self with another chain that connects to it.
@@ -19,8 +19,8 @@ that is exactly the same height as one of selfâs checkpoints.
To invalidate from a given checkpoint, update must contain a checkpoint of the same height
but different hash. Invalidated checkpoints result in invalidated transactions becoming
âunconfirmedâ.
-An error will be returned if an update will result in inconsistencies or if the update does
-not properly connect with self.
+An error will be returned if an update results in inconsistencies or if the update does
+not correctly connect with self.
Refer to module-level documentation for more.
sourcepub fn apply_update(
&mut self,
update: Self
) -> Result<ChangeSet<P>, UpdateError<P>>
Updates SparseChain with another chain that connects to it.
This is equivilant to calling determine_changeset and apply_changeset in sequence.
@@ -38,7 +38,7 @@ removed completely.
This is equivalent to calling clear_mempool_preview and apply_changeset in sequence.
sourcepub fn insert_tx_preview(
&self,
txid: Txid,
pos: P
) -> Result<ChangeSet<P>, InsertTxError<P>>
Determines the resultant ChangeSet if [Txid] was inserted at position pos.
-Changes to the [Txid]âs position is allowed (under the rules noted in
+
Changes to the [Txid]âs position are allowed (under the rules noted in
module-level documentation) and will be reflected in the ChangeSet.
sourcepub fn insert_tx(
&mut self,
txid: Txid,
pos: P
) -> Result<ChangeSet<P>, InsertTxError<P>>
Inserts a given [Txid] at pos.
This is equivilant to calling insert_tx_preview and apply_changeset in sequence.
@@ -46,13 +46,13 @@ removed completely.
If the change would result in a change in block hash of a certain height, insertion would
fail.
sourcepub fn insert_checkpoint(
&mut self,
block_id: BlockId
) -> Result<ChangeSet<P>, InsertCheckpointError>
Insert a checkpoint (BlockId).
-This is equivilant to calling insert_checkpoint_preview and apply_changeset in
+
This is equivalent to calling insert_checkpoint_preview and apply_changeset in
sequence.
sourcepub fn txids(
&self
) -> impl DoubleEndedIterator<Item = &(P, Txid)> + ExactSizeIterator + '_
Iterate over all [Txid]s ordered by their ChainPosition.
sourcepub fn range_txids<R>(
&self,
range: R
) -> impl DoubleEndedIterator<Item = &(P, Txid)> + '_where
R: RangeBounds<(P, Txid)>,
Iterate over a sub-range of positioned [Txid]s.
sourcepub fn range_txids_by_position<R>(
&self,
range: R
) -> impl DoubleEndedIterator<Item = &(P, Txid)> + '_where
R: RangeBounds<P>,
Iterate over a sub-range of positioned [Txid]s, where the range is defined by
ChainPosition only.
-sourcepub fn range_txids_by_height<R>(
&self,
range: R
) -> impl DoubleEndedIterator<Item = &(P, Txid)> + '_where
R: RangeBounds<TxHeight>,
Iterate over a sub-range of positioned [Txid]s, where the range is define by TxHeight
+
sourcepub fn range_txids_by_height<R>(
&self,
range: R
) -> impl DoubleEndedIterator<Item = &(P, Txid)> + '_where
R: RangeBounds<TxHeight>,
Iterate over a sub-range of positioned [Txid]s, where the range is defined by TxHeight
only.
sourcepub fn full_txout(
&self,
graph: &TxGraph,
outpoint: OutPoint
) -> Option<FullTxOut<P>>
Attempt to retrieve a FullTxOut of the given outpoint.
This will return Some only if the outputâs transaction is in both self and graph.
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/trait.ChainPosition.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/trait.ChainPosition.html
index b1437e14cf..f3040ab5dc 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/trait.ChainPosition.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/sparse_chain/trait.ChainPosition.html
@@ -1,13 +1,13 @@
-ChainPosition in bdk_chain::sparse_chain - Rust Trait bdk_chain::sparse_chain::ChainPosition
source · pub trait ChainPosition: Debug + Clone + Eq + PartialOrd + Ord + Hash + Send + Sync + 'static {
+ChainPosition in bdk_chain::sparse_chain - Rust Trait bdk_chain::sparse_chain::ChainPosition
source · pub trait ChainPosition: Debug + Clone + Eq + PartialOrd + Ord + Hash + Send + Sync + 'static {
fn height(&self) -> TxHeight;
fn max_ord_of_height(height: TxHeight) -> Self;
fn min_ord_of_height(height: TxHeight) -> Self;
fn unconfirmed() -> Self { ... }
-}
Expand description
Represents an position in which transactions are ordered in SparseChain.
+}Expand description
Represents a position in which transactions are ordered in SparseChain.
ChainPosition implementations must be Ord by TxHeight first.
-Required Methods§
sourcefn max_ord_of_height(height: TxHeight) -> Self
Get the positonâs upper bound of a given height.
+Required Methods§
sourcefn max_ord_of_height(height: TxHeight) -> Self
Get the positionâs upper bound of a given height.
sourcefn min_ord_of_height(height: TxHeight) -> Self
Get the positionâs lower bound of a given height.
Provided Methods§
sourcefn unconfirmed() -> Self
Get the unconfirmed position.
Implementors§
source§impl ChainPosition for ConfirmationTime
source§impl ChainPosition for TxHeight
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/struct.BlockId.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/struct.BlockId.html
index b50bae278b..f503a66ccc 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/struct.BlockId.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/struct.BlockId.html
@@ -1,9 +1,9 @@
-BlockId in bdk_chain - Rust pub struct BlockId {
+BlockId in bdk_chain - Rust pub struct BlockId {
pub height: u32,
pub hash: BlockHash,
-}
Expand description
A reference to a block in the cannonical chain.
-Fields§
§height: u32The height the block was confirmed at
-§hash: BlockHashThe hash of the block
+}Expand description
A reference to a block in the canonical chain.
+Fields§
§height: u32The height of the block.
+§hash: BlockHashThe hash of the block.
Trait Implementations§