pub enum ApplyBlockError {
- CannotConnect(CannotConnectError),
+ CannotConnect(CannotConnectError),
UnexpectedConnectedToHash {
connected_to_hash: BlockHash,
expected_hash: BlockHash,
},
}Expand description
An error that may occur when applying a block to Wallet.
Variants§
CannotConnect(CannotConnectError)
Occurs when the update chain cannot connect with original chain.
+Variants§
CannotConnect(CannotConnectError)
Occurs when the update chain cannot connect with original chain.
UnexpectedConnectedToHash
Occurs when the connected_to hash does not match the hash derived from block.
Fields
connected_to_hash: BlockHashBlock hash of connected_to.
expected_hash: BlockHashExpected block hash of connected_to, as derived from block.
Genesis
Genesis hash does not match.
Fields
loaded: BlockHashThe genesis hash that is loaded.
expected: BlockHashThe expected genesis hash.
-Descriptor
Descriptorâs DescriptorId does not match.
Descriptor
Descriptorâs DescriptorId does not match.
Fields
keychain: KeychainKindKeychain identifying the descriptor.
loaded: Option<ExtendedDescriptor>The loaded descriptor.
expected: Option<ExtendedDescriptor>The expected descriptor.
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/index.html index 3efc3755c6..f7f993d395 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/index.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/index.html @@ -182,7 +182,7 @@ that theWallet can use to update its view of the chain.
submitted for inclusion in the work by you, as defined in the Apache-2.0
license, shall be dual licensed as above, without any additional terms or
conditions.
-Re-exports§
pub extern crate bitcoin;pub extern crate bdk_chain as chain;pub extern crate bdk_file_store as file_store; pub extern crate miniscript;pub extern crate serde;pub extern crate serde_json;pub use descriptor::template;pub use descriptor::HdKeyPaths;pub use signer;pub use bdk_chain::rusqlite;
Modules§
- coin_
selection - Coin selection
- descriptor
- Descriptors
- error
- Errors that can be thrown by the
Wallet - export
- Wallet export
- keys
- Key formats
- psbt
- Additional functions on the
rust-bitcoinPsbtstructure. - rusqlite_
impl - Support for persisting
bdk_chainstructures to SQLite using [rusqlite]. - signer
- Generalized signers
- tx_
builder - Transaction builder
Macros§
- descriptor
- Macro to write full descriptors with code
- fragment
- Macro to write descriptor fragments with code
Structs§
- Address
Info - A derived address and the index it was found at. +
Re-exports§
pub extern crate bitcoin;pub extern crate bdk_chain as chain;pub extern crate bdk_file_store as file_store; pub extern crate miniscript;pub extern crate serde;pub extern crate serde_json;pub use descriptor::template;pub use descriptor::HdKeyPaths;pub use signer;pub use bdk_chain::rusqlite;
Modules§
- coin_
selection - Coin selection
- descriptor
- Descriptors
- error
- Errors that can be thrown by the
Wallet - export
- Wallet export
- keys
- Key formats
- psbt
- Additional functions on the
rust-bitcoinPsbtstructure. - rusqlite_
impl - Support for persisting
bdk_chainstructures to SQLite using [rusqlite]. - signer
- Generalized signers
- tx_
builder - Transaction builder
Macros§
- descriptor
- Macro to write full descriptors with code
- fragment
- Macro to write descriptor fragments with code
Structs§
- Address
Info - A derived address and the index it was found at.
For convenience this automatically derefs to
Address - Balance
- Balance, differentiated into various categories.
- Change
Set - A changeset for
Wallet. - Create
Params - Parameters for
Wallet::createorPersistedWallet::create. - Load
Params - Parameters for
Wallet::loadorPersistedWallet::load. - Local
Output - An unspent output owned by a
Wallet. - Persisted
Wallet - Represents a persisted wallet which persists into type
P. - Sign
Options - Options for a software signer
- TxBuilder
- A transaction builder
- Update
- An update to
Wallet. - Wallet
- A Bitcoin wallet
- Weighted
Utxo - A
Utxowith itssatisfaction_weight.
Enums§
- AddForeign
Utxo Error - Error returned from
TxBuilder::add_foreign_utxo. - AddUtxo
Error - Error returned from
TxBuilder::add_utxoandTxBuilder::add_utxos - Apply
Block Error - An error that may occur when applying a block to
Wallet. - Change
Spend Policy - Policy regarding the use of change outputs when creating a transaction
- Create
With Persist Error - Error type for
PersistedWallet::create. - File
Store Error - Error for
bdk_file_storeâs implementation ofWalletPersister. - Keychain
Kind - Types of keychains
- Load
Error - The error type when loading a
Walletfrom aChangeSet. - Load
Mismatch - Represents a mismatch with what is loaded and what is expected from
LoadParams. - Load
With Persist Error - Error type for
PersistedWallet::load. - TxOrdering
- Ordering of the transactionâs inputs and outputs
- Utxo
- An unspent transaction output (UTXO).
Traits§
- Async
Wallet Persister - Async trait that persists
PersistedWallet. - 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
- Wallet
Persister - Trait that persists
PersistedWallet.
Functions§
- version
- Get the version of
bdk_walletat runtime. - wallet_
name_ from_ descriptor - Deterministically generate a unique name given the descriptors defining the wallet
Type Aliases§
- Wallet
Tx - A
CanonicalTxmanaged by aWallet.
pub const SCHEMAS_TABLE_NAME: &'static str;Expand description
Table name for schemas.
+Constant SCHEMAS_TABLE_NAME
pub const SCHEMAS_TABLE_NAME: &'static str;Expand description
Table name for schemas.
pub fn migrate_schema(
+migrate_schema in bdk_wallet::rusqlite_impl - Rust Function migrate_schema
pub fn migrate_schema(
db_tx: &Transaction<'_>,
schema_name: &str,
versioned_scripts: &[&str],
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/rusqlite_impl/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/rusqlite_impl/index.html
index ca743735f5..70569316d2 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/rusqlite_impl/index.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/rusqlite_impl/index.html
@@ -1,2 +1,2 @@
-bdk_wallet::rusqlite_impl - Rust Expand description
Support for persisting bdk_chain structures to SQLite using [rusqlite].
+bdk_wallet::rusqlite_impl - Rust Module rusqlite_impl
Expand description
Support for persisting bdk_chain structures to SQLite using [rusqlite].
Constants§
- SCHEMAS_
TABLE_NAME - Table name for schemas.
Functions§
- migrate_
schema - Runs logic that initializes/migrates the table schemas.
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.Balance.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.Balance.html
index 812fea6c9e..4a4e490cdc 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.Balance.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.Balance.html
@@ -1,4 +1,4 @@
-Balance in bdk_wallet - Rust pub struct Balance {
+Balance in bdk_wallet - Rust Struct Balance
pub struct Balance {
pub immature: Amount,
pub trusted_pending: Amount,
pub untrusted_pending: Amount,
@@ -8,19 +8,19 @@
§trusted_pending: AmountUnconfirmed UTXOs generated by a wallet tx
§untrusted_pending: AmountUnconfirmed UTXOs received from an external wallet
§confirmed: AmountConfirmed and immediately spendable balance
-Implementations§
Source§impl Balance
Sourcepub fn trusted_spendable(&self) -> Amount
Get sum of trusted_pending and confirmed coins.
+Implementations§
§impl Balance
pub fn trusted_spendable(&self) -> Amount
Get sum of trusted_pending and confirmed coins.
This is the balance you can spend right now that shouldnât get cancelled via another party
double spending it.
-Trait Implementations§
Trait Implementations§
§impl<'de> Deserialize<'de> for Balance
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Balance, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Serialize for Balance
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
- __S: Serializer,
Serialize this value into the given Serde serializer. Read moreSource§impl Eq for Balance
Source§impl StructuralPartialEq for Balance
Auto Trait Implementations§
§impl Freeze for Balance
§impl RefUnwindSafe for Balance
§impl Send for Balance
§impl Sync for Balance
§impl Unpin for Balance
§impl UnwindSafe for Balance
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Eq for Balance
§impl StructuralPartialEq for Balance
Auto Trait Implementations§
§impl Freeze for Balance
§impl RefUnwindSafe for Balance
§impl Send for Balance
§impl Sync for Balance
§impl Unpin for Balance
§impl UnwindSafe for Balance
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.ChangeSet.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.ChangeSet.html
index 3f111fcd08..5c9624b28d 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.ChangeSet.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.ChangeSet.html
@@ -2,16 +2,16 @@
pub descriptor: Option<Descriptor<DescriptorPublicKey>>,
pub change_descriptor: Option<Descriptor<DescriptorPublicKey>>,
pub network: Option<Network>,
- pub local_chain: ChangeSet,
- pub tx_graph: ChangeSet<ConfirmationBlockTime>,
- pub indexer: ChangeSet,
+ pub local_chain: ChangeSet,
+ pub tx_graph: ChangeSet<ConfirmationBlockTime>,
+ pub indexer: ChangeSet,
}Expand description
A changeset for Wallet.
Fields§
§descriptor: Option<Descriptor<DescriptorPublicKey>>Descriptor for recipient addresses.
§change_descriptor: Option<Descriptor<DescriptorPublicKey>>Descriptor for change addresses.
§network: Option<Network>Stores the network type of the transaction data.
-§local_chain: ChangeSetChanges to the LocalChain.
-§tx_graph: ChangeSet<ConfirmationBlockTime>Changes to TxGraph.
-§indexer: ChangeSetChanges to KeychainTxOutIndex.
+§local_chain: ChangeSetChanges to the LocalChain.
+§tx_graph: ChangeSet<ConfirmationBlockTime>Changes to TxGraph.
+§indexer: ChangeSetChanges to KeychainTxOutIndex.
Implementations§
Source§impl ChangeSet
Sourcepub const WALLET_SCHEMA_NAME: &'static str = "bdk_wallet"
Schema name for wallet.
Sourcepub const WALLET_TABLE_NAME: &'static str = "bdk_wallet"
Name of table to store wallet descriptors and network.
Sourcepub fn from_sqlite(db_tx: &Transaction<'_>) -> Result<Self>
Recover a ChangeSet from sqlite database.
Sourcepub fn persist_to_sqlite(&self, db_tx: &Transaction<'_>) -> Result<()>
Persist ChangeSet to sqlite database.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ChangeSet
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 From<ChangeSet<ConfirmationBlockTime>> for ChangeSet
Source§fn from(tx_graph: ChangeSet<ConfirmationBlockTime>) -> Self
Converts to this type from the input type.Source§impl From<ChangeSet<ConfirmationBlockTime>> for ChangeSet
Source§fn from(tx_graph: ChangeSet<ConfirmationBlockTime>) -> Self
Converts to this type from the input type.Source§impl From<ChangeSet<ConfirmationBlockTime, ChangeSet>> for ChangeSet
Source§fn from(indexed_tx_graph: ChangeSet<ConfirmationBlockTime, ChangeSet>) -> Self
Converts to this type from the input type.Source§impl StructuralPartialEq for ChangeSet
Auto Trait Implementations§
§impl !Freeze for ChangeSet
§impl RefUnwindSafe for ChangeSet
§impl Send for ChangeSet
§impl Sync for ChangeSet
§impl Unpin for ChangeSet
§impl UnwindSafe for ChangeSet
Blanket Implementations§
Source§impl<T> Any for Twhere
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.CreateParams.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.CreateParams.html
index 55a214de5b..b82fb80a27 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.CreateParams.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.CreateParams.html
@@ -7,7 +7,7 @@
change_descriptor = None
network = [Network::Bitcoin]
genesis_hash = None
-lookahead = DEFAULT_LOOKAHEAD
+lookahead = [DEFAULT_LOOKAHEAD]
Use this method only when building a wallet with a single descriptor. See
also Wallet::create_single.
@@ -19,7 +19,7 @@ also DEFAULT_LOOKAHEAD
+lookahead = [DEFAULT_LOOKAHEAD]
Sourcepub fn keymap(self, keychain: KeychainKind, keymap: KeyMap) -> Self
Extend the given keychainâs keymap.
Sourcepub fn network(self, network: Network) -> Self
Set network.
@@ -28,7 +28,7 @@ also DEFAULT_LOOKAHEAD is sufficient.
+the default value [DEFAULT_LOOKAHEAD] is sufficient.
Sourcepub fn create_wallet<P>(
self,
persister: &mut P,
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.LoadParams.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.LoadParams.html
index 7211ba3161..0ddb058ce2 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.LoadParams.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.LoadParams.html
@@ -1,6 +1,6 @@
LoadParams in bdk_wallet - Rust pub struct LoadParams { /* private fields */ }
Expand description
Parameters for Wallet::load or PersistedWallet::load.
Implementations§
Source§impl LoadParams
Sourcepub fn new() -> Self
Construct parameters with default values.
-Default values: lookahead = DEFAULT_LOOKAHEAD
+Default values: lookahead = [DEFAULT_LOOKAHEAD]
Sourcepub fn keymap(self, keychain: KeychainKind, keymap: KeyMap) -> Self
Extend the given keychainâs keymap.
Sourcepub fn descriptor<D>(
self,
@@ -17,7 +17,7 @@ for an expected descriptor containing secrets.
The lookahead defines a number of script pubkeys to derive over and above the last
revealed index. Without a lookahead the indexer will miss outputs you own when processing
transactions whose output script pubkeys lie beyond the last revealed index. In most cases
-the default value DEFAULT_LOOKAHEAD is sufficient.
+the default value [DEFAULT_LOOKAHEAD] is sufficient.
Sourcepub fn extract_keys(self) -> Self
Whether to try extracting private keys from the provided descriptors upon loading.
See also LoadParams::descriptor.
Sourcepub fn load_wallet<P>(
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.LocalOutput.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.LocalOutput.html
index 4c9df552d8..4a63c9e945 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.LocalOutput.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.LocalOutput.html
@@ -4,14 +4,14 @@
pub keychain: KeychainKind,
pub is_spent: bool,
pub derivation_index: u32,
- pub chain_position: ChainPosition<ConfirmationBlockTime>,
+ pub chain_position: ChainPosition<ConfirmationBlockTime>,
}Expand description
An unspent output owned by a Wallet.
Fields§
§outpoint: OutPointReference to a transaction output
§txout: TxOutTransaction output
§keychain: KeychainKindType of keychain
§is_spent: boolWhether this UTXO is spent or not
§derivation_index: u32The derivation index for the script pubkey in the wallet
-§chain_position: ChainPosition<ConfirmationBlockTime>The position of the output in the blockchain.
+§chain_position: ChainPosition<ConfirmationBlockTime>The position of the output in the blockchain.
Trait Implementations§
Source§impl Clone for LocalOutput
Source§fn clone(&self) -> LocalOutput
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 LocalOutput
Source§impl<'de> Deserialize<'de> for LocalOutput
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 LocalOutput
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.PersistedWallet.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.PersistedWallet.html
index 2b177238cd..fe0819f715 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.PersistedWallet.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.PersistedWallet.html
@@ -133,7 +133,7 @@ See Sourcepub fn calculate_fee(
&self,
tx: &Transaction,
-) -> Result<Amount, CalculateFeeError>
Calculates the fee of a given transaction. Returns [Amount::ZERO] if tx is a coinbase transaction.
+) -> Result<Amount, CalculateFeeError>Calculates the fee of a given transaction. Returns [Amount::ZERO] if tx is a coinbase transaction.
To calculate the fee for a [Transaction] with inputs not owned by this wallet you must
manually insert the TxOut(s) into the tx graph using the insert_txout function.
Note tx does not have to be in the graph for this to work.
@@ -146,7 +146,7 @@ manually insert the TxOut(s) into the tx graph using the Sourcepub fn calculate_fee_rate(
&self,
tx: &Transaction,
-) -> Result<FeeRate, CalculateFeeError>
Calculate the [FeeRate] for a given transaction.
+) -> Result<FeeRate, CalculateFeeError>Calculate the [FeeRate] for a given transaction.
To calculate the fee rate for a [Transaction] with inputs not owned by this wallet you must
manually insert the TxOut(s) into the tx graph using the insert_txout function.
Note tx does not have to be in the graph for this to work.
@@ -169,9 +169,9 @@ of this txâs outputs that send to script pubkeys tracked by this wallet.
Sourcepub fn get_tx(&self, txid: Txid) -> Option<WalletTx<'_>>
Get a single transaction from the wallet as a WalletTx (if the transaction exists).
WalletTx contains the full transaction alongside meta-data such as:
-- Blocks that the transaction is
Anchored in. These may or may not be blocks that exist
+ - Blocks that the transaction is
Anchored in. These may or may not be blocks that exist
in the best chain.
-- The
ChainPosition of the transaction in the best chain - whether the transaction is
+ - The [
ChainPosition] of the transaction in the best chain - whether the transaction is
confirmed or unconfirmed. If the transaction is confirmed, the anchor which proves the
confirmation is provided. If the transaction is unconfirmed, the unix timestamp of when
the transaction was last seen in the mempool is provided.
@@ -219,9 +219,9 @@ the transaction was last seen in the mempool is provided.
transaction is canonical when it is confirmed in the best chain, or does not conflict
with any transaction confirmed in the best chain.
To iterate over all transactions, including those that are irrelevant and not canonical, use
-TxGraph::full_txs.
+[TxGraph::full_txs].
To iterate over all canonical transactions, including those that are irrelevant, use
-TxGraph::list_canonical_txs.
+[TxGraph::list_canonical_txs].
Sourcepub fn transactions_sort_by<F>(&self, compare: F) -> Vec<WalletTx<'_>>
Array of relevant and canonical transactions in the wallet sorted with a comparator
function.
@@ -352,7 +352,7 @@ Otherwise, it will return the index of the highest address it has derived.
Sourcepub fn apply_update(
&mut self,
update: impl Into<Update>,
-) -> Result<(), CannotConnectError>
Available on crate feature std only.
Applies an update to the wallet and stages the changes (but does not persist them).
+) -> Result<(), CannotConnectError>Available on crate feature std only.Applies an update to the wallet and stages the changes (but does not persist them).
Usually you create an update by interacting with some blockchain data source and inserting
transactions related to your wallet into it.
After applying updates you should persist the staged wallet changes. For an example of how
@@ -361,7 +361,7 @@ to persist staged wallet changes see Into<Update>,
seen_at: u64,
-) -> Result<(), CannotConnectError>
Applies an update alongside a seen_at timestamp and stages the changes.
+) -> Result<(), CannotConnectError>Applies an update alongside a seen_at timestamp and stages the changes.
seen_at represents when the update is seen (in unix seconds). It is used to determine the
last_seens for all transactions in the update which have no corresponding anchor(s). The
last_seen value is used internally to determine precedence of conflicting unconfirmed
@@ -372,14 +372,14 @@ the current time.
Sourcepub fn staged(&self) -> Option<&ChangeSet>
Get a reference of the staged ChangeSet that is yet to be committed (if any).
Sourcepub fn staged_mut(&mut self) -> Option<&mut ChangeSet>
Get a mutable reference of the staged ChangeSet that is yet to be committed (if any).
Sourcepub fn take_staged(&mut self) -> Option<ChangeSet>
Take the staged ChangeSet to be persisted now (if any).
-Sourcepub fn tx_graph(&self) -> &TxGraph<ConfirmationBlockTime>
Get a reference to the inner TxGraph.
-Sourcepub fn spk_index(&self) -> &KeychainTxOutIndex<KeychainKind>
Get a reference to the inner KeychainTxOutIndex.
-Sourcepub fn local_chain(&self) -> &LocalChain
Get a reference to the inner LocalChain.
+Sourcepub fn tx_graph(&self) -> &TxGraph<ConfirmationBlockTime>
Get a reference to the inner [TxGraph].
+Sourcepub fn spk_index(&self) -> &KeychainTxOutIndex<KeychainKind>
Get a reference to the inner [KeychainTxOutIndex].
+Sourcepub fn local_chain(&self) -> &LocalChain
Get a reference to the inner [LocalChain].
Sourcepub fn apply_block(
&mut self,
block: &Block,
height: u32,
-) -> Result<(), CannotConnectError>
Introduces a block of height to the wallet, and tries to connect it to the
+) -> Result<(), CannotConnectError>
Introduces a block of height to the wallet, and tries to connect it to the
prev_blockhash of the blockâs header.
This is a convenience method that is equivalent to calling apply_block_connected_to
with prev_blockhash and height-1 as the connected_to parameter.
@@ -388,11 +388,11 @@ with prev_blockhash and height-1 as the connecte
block: &Block,
height: u32,
connected_to: BlockId,
-) -> Result<(), ApplyHeaderError>Applies relevant transactions from block of height to the wallet, and connects the
+) -> Result<(), ApplyHeaderError>
Applies relevant transactions from block of height to the wallet, and connects the
block to the internal chain.
The connected_to parameter informs the wallet how this block connects to the internal
-LocalChain. Relevant transactions are filtered from the block and inserted into the
-internal TxGraph.
+[LocalChain]. Relevant transactions are filtered from the block and inserted into the
+internal [TxGraph].
WARNING: You must persist the changes resulting from one or more calls to this method
if you need the inserted block data to be reloaded after closing the wallet.
See Wallet::reveal_next_address.
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.Update.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.Update.html
index 2548c5e490..741ef8199a 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.Update.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.Update.html
@@ -3,11 +3,11 @@
pub tx_update: TxUpdate<ConfirmationBlockTime>,
pub chain: Option<CheckPoint>,
}Expand description
An update to Wallet.
-It updates KeychainTxOutIndex, bdk_chain::TxGraph and LocalChain atomically.
+It updates [KeychainTxOutIndex], [bdk_chain::TxGraph] and [LocalChain] atomically.
Fields§
§last_active_indices: BTreeMap<KeychainKind, u32>Contains the last active derivation indices per keychain (K), which is used to update the
-KeychainTxOutIndex.
-§tx_update: TxUpdate<ConfirmationBlockTime>Update for the walletâs internal TxGraph.
-§chain: Option<CheckPoint>Update for the walletâs internal LocalChain.
+[KeychainTxOutIndex].
+§tx_update: TxUpdate<ConfirmationBlockTime>Update for the walletâs internal [TxGraph].
+§chain: Option<CheckPoint>Update for the walletâs internal [LocalChain].
Trait Implementations§
Source§impl From<FullScanResponse<KeychainKind>> for Update
Source§fn from(value: FullScanResponse<KeychainKind>) -> Self
Converts to this type from the input type.Source§impl From<SyncResponse> for Update
Source§fn from(value: SyncResponse) -> Self
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for Update
§impl RefUnwindSafe for Update
§impl Send for Update
§impl Sync for Update
§impl Unpin for Update
§impl UnwindSafe for Update
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.Wallet.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.Wallet.html
index 47ad247359..9636e6b058 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.Wallet.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/struct.Wallet.html
@@ -9,7 +9,7 @@ Its main components are:
ChangeSets (see take_staged). Also see individual functions and example for instructions
on when Wallet state needs to be persisted.
The Wallet descriptor (external) and change descriptor (internal) must not derive the same
-script pubkeys. See KeychainTxOutIndex::insert_descriptor() for more details.
+script pubkeys. See [KeychainTxOutIndex::insert_descriptor()] for more details.
Implementations§
Source§impl Wallet
Sourcepub fn create_single<D>(descriptor: D) -> CreateParams
Build a new single descriptor Wallet.
If you have previously created a wallet, use load instead.
@@ -176,7 +176,7 @@ See Sourcepub fn calculate_fee(
&self,
tx: &Transaction,
-) -> Result<Amount, CalculateFeeError>
Calculates the fee of a given transaction. Returns [Amount::ZERO] if tx is a coinbase transaction.
+) -> Result<Amount, CalculateFeeError>Calculates the fee of a given transaction. Returns [Amount::ZERO] if tx is a coinbase transaction.
To calculate the fee for a [Transaction] with inputs not owned by this wallet you must
manually insert the TxOut(s) into the tx graph using the insert_txout function.
Note tx does not have to be in the graph for this to work.
@@ -189,7 +189,7 @@ manually insert the TxOut(s) into the tx graph using the Sourcepub fn calculate_fee_rate(
&self,
tx: &Transaction,
-) -> Result<FeeRate, CalculateFeeError>
Calculate the [FeeRate] for a given transaction.
+) -> Result<FeeRate, CalculateFeeError>Calculate the [FeeRate] for a given transaction.
To calculate the fee rate for a [Transaction] with inputs not owned by this wallet you must
manually insert the TxOut(s) into the tx graph using the insert_txout function.
Note tx does not have to be in the graph for this to work.
@@ -212,9 +212,9 @@ of this txâs outputs that send to script pubkeys tracked by this wallet.
Sourcepub fn get_tx(&self, txid: Txid) -> Option<WalletTx<'_>>
Get a single transaction from the wallet as a WalletTx (if the transaction exists).
WalletTx contains the full transaction alongside meta-data such as:
-- Blocks that the transaction is
Anchored in. These may or may not be blocks that exist
+ - Blocks that the transaction is
Anchored in. These may or may not be blocks that exist
in the best chain.
-- The
ChainPosition of the transaction in the best chain - whether the transaction is
+ - The [
ChainPosition] of the transaction in the best chain - whether the transaction is
confirmed or unconfirmed. If the transaction is confirmed, the anchor which proves the
confirmation is provided. If the transaction is unconfirmed, the unix timestamp of when
the transaction was last seen in the mempool is provided.
@@ -262,9 +262,9 @@ the transaction was last seen in the mempool is provided.
transaction is canonical when it is confirmed in the best chain, or does not conflict
with any transaction confirmed in the best chain.
To iterate over all transactions, including those that are irrelevant and not canonical, use
-TxGraph::full_txs.
+[TxGraph::full_txs].
To iterate over all canonical transactions, including those that are irrelevant, use
-TxGraph::list_canonical_txs.
+[TxGraph::list_canonical_txs].
Sourcepub fn transactions_sort_by<F>(&self, compare: F) -> Vec<WalletTx<'_>>
Array of relevant and canonical transactions in the wallet sorted with a comparator
function.
@@ -395,7 +395,7 @@ Otherwise, it will return the index of the highest address it has derived.
Sourcepub fn apply_update(
&mut self,
update: impl Into<Update>,
-) -> Result<(), CannotConnectError>
Available on crate feature std only.
Applies an update to the wallet and stages the changes (but does not persist them).
+) -> Result<(), CannotConnectError>Available on crate feature std only.Applies an update to the wallet and stages the changes (but does not persist them).
Usually you create an update by interacting with some blockchain data source and inserting
transactions related to your wallet into it.
After applying updates you should persist the staged wallet changes. For an example of how
@@ -404,7 +404,7 @@ to persist staged wallet changes see Into<Update>,
seen_at: u64,
-) -> Result<(), CannotConnectError>
Applies an update alongside a seen_at timestamp and stages the changes.
+) -> Result<(), CannotConnectError>Applies an update alongside a seen_at timestamp and stages the changes.
seen_at represents when the update is seen (in unix seconds). It is used to determine the
last_seens for all transactions in the update which have no corresponding anchor(s). The
last_seen value is used internally to determine precedence of conflicting unconfirmed
@@ -415,14 +415,14 @@ the current time.
Sourcepub fn staged(&self) -> Option<&ChangeSet>
Get a reference of the staged ChangeSet that is yet to be committed (if any).
Sourcepub fn staged_mut(&mut self) -> Option<&mut ChangeSet>
Get a mutable reference of the staged ChangeSet that is yet to be committed (if any).
Sourcepub fn take_staged(&mut self) -> Option<ChangeSet>
Take the staged ChangeSet to be persisted now (if any).
-Sourcepub fn tx_graph(&self) -> &TxGraph<ConfirmationBlockTime>
Get a reference to the inner TxGraph.
-Sourcepub fn spk_index(&self) -> &KeychainTxOutIndex<KeychainKind>
Get a reference to the inner KeychainTxOutIndex.
-Sourcepub fn local_chain(&self) -> &LocalChain
Get a reference to the inner LocalChain.
+Sourcepub fn tx_graph(&self) -> &TxGraph<ConfirmationBlockTime>
Get a reference to the inner [TxGraph].
+Sourcepub fn spk_index(&self) -> &KeychainTxOutIndex<KeychainKind>
Get a reference to the inner [KeychainTxOutIndex].
+Sourcepub fn local_chain(&self) -> &LocalChain
Get a reference to the inner [LocalChain].
Sourcepub fn apply_block(
&mut self,
block: &Block,
height: u32,
-) -> Result<(), CannotConnectError>
Introduces a block of height to the wallet, and tries to connect it to the
+) -> Result<(), CannotConnectError>
Introduces a block of height to the wallet, and tries to connect it to the
prev_blockhash of the blockâs header.
This is a convenience method that is equivalent to calling apply_block_connected_to
with prev_blockhash and height-1 as the connected_to parameter.
@@ -431,11 +431,11 @@ with prev_blockhash and height-1 as the connecte
block: &Block,
height: u32,
connected_to: BlockId,
-) -> Result<(), ApplyHeaderError>Applies relevant transactions from block of height to the wallet, and connects the
+) -> Result<(), ApplyHeaderError>
Applies relevant transactions from block of height to the wallet, and connects the
block to the internal chain.
The connected_to parameter informs the wallet how this block connects to the internal
-LocalChain. Relevant transactions are filtered from the block and inserted into the
-internal TxGraph.
+[LocalChain]. Relevant transactions are filtered from the block and inserted into the
+internal [TxGraph].
WARNING: You must persist the changes resulting from one or more calls to this method
if you need the inserted block data to be reloaded after closing the wallet.
See Wallet::reveal_next_address.
@@ -464,7 +464,7 @@ start a blockchain sync with a spk based blockchain client.
start a blockchain full scan with a spk based blockchain client.
This operation is generally only used when importing or restoring a previously used wallet
in which the list of used scripts is not known.
-Trait Implementations§
Auto Trait Implementations§
§impl !Freeze for Wallet
§impl !RefUnwindSafe for Wallet
§impl Send for Wallet
§impl Sync for Wallet
§impl Unpin for Wallet
§impl !UnwindSafe for Wallet
Blanket Implementations§
Trait Implementations§
Auto Trait Implementations§
§impl !Freeze for Wallet
§impl !RefUnwindSafe for Wallet
§impl Send for Wallet
§impl Sync for Wallet
§impl Unpin for Wallet
§impl !UnwindSafe for Wallet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/type.WalletTx.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/type.WalletTx.html
index ff75218f6d..fb1820f8c9 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/type.WalletTx.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_wallet/type.WalletTx.html
@@ -1,7 +1,7 @@
-WalletTx in bdk_wallet - Rust pub type WalletTx<'a> = CanonicalTx<'a, Arc<Transaction>, ConfirmationBlockTime>;
Expand description
A CanonicalTx managed by a Wallet.
+WalletTx in bdk_wallet - Rust pub type WalletTx<'a> = CanonicalTx<'a, Arc<Transaction>, ConfirmationBlockTime>;
Expand description
A CanonicalTx managed by a Wallet.
Aliased Type§
struct WalletTx<'a> {
- pub chain_position: ChainPosition<ConfirmationBlockTime>,
- pub tx_node: TxNode<'a, Arc<Transaction>, ConfirmationBlockTime>,
-}
Fields§
§chain_position: ChainPosition<ConfirmationBlockTime>How the transaction is observed in the canonical chain (confirmed or unconfirmed).
-§tx_node: TxNode<'a, Arc<Transaction>, ConfirmationBlockTime>The transaction node (as part of the graph).
+ pub chain_position: ChainPosition<ConfirmationBlockTime>,
+ pub tx_node: TxNode<'a, Arc<Transaction>, ConfirmationBlockTime>,
+}Fields§
§chain_position: ChainPosition<ConfirmationBlockTime>How the transaction is observed in the canonical chain (confirmed or unconfirmed).
+§tx_node: TxNode<'a, Arc<Transaction>, ConfirmationBlockTime>The transaction node (as part of the graph).
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.create_tx.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.create_tx.html
index f44c206cb5..bab35373c1 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.create_tx.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.create_tx.html
@@ -1,4 +1,4 @@
-create_tx in example_cli - Rust pub fn create_tx<O: ChainOracle>(
+create_tx in example_cli - Rust
\ No newline at end of file
+ O::Error: Error + Send + Sync + 'static,
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.handle_commands.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.handle_commands.html
index c4ede978f8..9e518debec 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.handle_commands.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.handle_commands.html
@@ -1,6 +1,6 @@
handle_commands in example_cli - Rust pub fn handle_commands<CS: Subcommand, S: Args>(
graph: &Mutex<KeychainTxGraph>,
- chain: &Mutex<LocalChain>,
+ chain: &Mutex<LocalChain>,
db: &Mutex<Store<ChangeSet>>,
network: Network,
broadcast: impl FnOnce(S, &Transaction) -> Result<()>,
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.planned_utxos.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.planned_utxos.html
index 465aa1b113..29e2766b25 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.planned_utxos.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.planned_utxos.html
@@ -1,5 +1,5 @@
-planned_utxos in example_cli - Rust pub fn planned_utxos<O: ChainOracle>(
+planned_utxos in example_cli - Rust
\ No newline at end of file
+) -> Result<Vec<PlanUtxo>, O::Error>
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/struct.ChangeInfo.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/struct.ChangeInfo.html
index 2ab9bf3669..00422d13d9 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/struct.ChangeInfo.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/struct.ChangeInfo.html
@@ -1,8 +1,8 @@
ChangeInfo in example_cli - Rust pub struct ChangeInfo {
pub change_keychain: Keychain,
- pub indexer: ChangeSet,
+ pub indexer: ChangeSet,
pub index: u32,
-}
Fields§
§change_keychain: Keychain§indexer: ChangeSet§index: u32Trait Implementations§
Auto Trait Implementations§
§impl Freeze for ChangeInfo
§impl RefUnwindSafe for ChangeInfo
§impl Send for ChangeInfo
§impl Sync for ChangeInfo
§impl Unpin for ChangeInfo
§impl UnwindSafe for ChangeInfo
Blanket Implementations§
Source§impl<T> Any for Twhere
+}Fields§
§change_keychain: Keychain§indexer: ChangeSet§index: u32Trait Implementations§
Auto Trait Implementations§
§impl Freeze for ChangeInfo
§impl RefUnwindSafe for ChangeInfo
§impl Send for ChangeInfo
§impl Sync for ChangeInfo
§impl Unpin for ChangeInfo
§impl UnwindSafe for ChangeInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/struct.ChangeSet.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/struct.ChangeSet.html
index c1e2681510..e19f3e9bfc 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/struct.ChangeSet.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/struct.ChangeSet.html
@@ -2,16 +2,16 @@
pub descriptor: Option<Descriptor<DescriptorPublicKey>>,
pub change_descriptor: Option<Descriptor<DescriptorPublicKey>>,
pub network: Option<Network>,
- pub local_chain: ChangeSet,
- pub tx_graph: ChangeSet<ConfirmationBlockTime>,
- pub indexer: ChangeSet,
+ pub local_chain: ChangeSet,
+ pub tx_graph: ChangeSet<ConfirmationBlockTime>,
+ pub indexer: ChangeSet,
}Expand description
ChangeSet
Fields§
§descriptor: Option<Descriptor<DescriptorPublicKey>>Descriptor for recipient addresses.
§change_descriptor: Option<Descriptor<DescriptorPublicKey>>Descriptor for change addresses.
§network: Option<Network>Stores the network type of the transaction data.
-§local_chain: ChangeSetChanges to the LocalChain.
-§tx_graph: ChangeSet<ConfirmationBlockTime>Changes to TxGraph.
-§indexer: ChangeSetChanges to KeychainTxOutIndex.
+§local_chain: ChangeSetChanges to the [LocalChain].
+§tx_graph: ChangeSet<ConfirmationBlockTime>Changes to TxGraph.
+§indexer: ChangeSetChanges to [KeychainTxOutIndex].
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ChangeSet
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 Serialize for ChangeSet
Source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/struct.Init.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/struct.Init.html
index 4e1f4ff6aa..8acaaaa59c 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/struct.Init.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/struct.Init.html
@@ -1,13 +1,13 @@
Init in example_cli - Rust pub struct Init<CS: Subcommand, S: Args> {
pub args: Args<CS, S>,
pub graph: Mutex<KeychainTxGraph>,
- pub chain: Mutex<LocalChain>,
+ pub chain: Mutex<LocalChain>,
pub db: Mutex<Store<ChangeSet>>,
pub network: Network,
}
Expand description
The initial state returned by init_or_load.
Fields§
§args: Args<CS, S>CLI args
§graph: Mutex<KeychainTxGraph>Indexed graph
-§chain: Mutex<LocalChain>Local chain
+§chain: Mutex<LocalChain>Local chain
§db: Mutex<Store<ChangeSet>>Database
§network: NetworkNetwork
Auto Trait Implementations§
§impl<CS, S> !Freeze for Init<CS, S>
§impl<CS, S> RefUnwindSafe for Init<CS, S>where
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/type.KeychainTxGraph.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/type.KeychainTxGraph.html
index 7be31e7edb..9edabf8c86 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/type.KeychainTxGraph.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/type.KeychainTxGraph.html
@@ -1,6 +1,6 @@
-KeychainTxGraph in example_cli - Rust pub type KeychainTxGraph = IndexedTxGraph<ConfirmationBlockTime, KeychainTxOutIndex<Keychain>>;
Expand description
Alias for a IndexedTxGraph with specific Anchor and Indexer.
+KeychainTxGraph in example_cli - Rust pub type KeychainTxGraph = IndexedTxGraph<ConfirmationBlockTime, KeychainTxOutIndex<Keychain>>;
Expand description
Alias for a IndexedTxGraph with specific Anchor and Indexer.
Aliased Type§
struct KeychainTxGraph {
- pub index: KeychainTxOutIndex<Keychain>,
+ pub index: KeychainTxOutIndex<Keychain>,
/* private fields */
-}
Fields§
§index: KeychainTxOutIndex<Keychain>
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/type.PlanUtxo.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/type.PlanUtxo.html
index a8e28f585f..b35395040f 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/type.PlanUtxo.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/type.PlanUtxo.html
@@ -1 +1 @@
-PlanUtxo in example_cli - Rust pub type PlanUtxo = (Plan, FullTxOut<ConfirmationBlockTime>);
\ No newline at end of file
+PlanUtxo in example_cli - Rust pub type PlanUtxo = (Plan, FullTxOut<ConfirmationBlockTime>);
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/help.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/help.html
index e27aebed14..1c04e563a4 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/help.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/help.html
@@ -1 +1 @@
-Help Rustdoc help
Back
\ No newline at end of file
+Help Rustdoc help
Back
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/settings.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/settings.html
index f9cbd24cb1..51ed47c8e8 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/settings.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/settings.html
@@ -1 +1 @@
-Settings Rustdoc settings
Back
\ No newline at end of file
+Settings Rustdoc settings
Back
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/trait.impl/core/convert/trait.AsRef.js b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/trait.impl/core/convert/trait.AsRef.js
index 74f6817cd5..5c048cd7cb 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/trait.impl/core/convert/trait.AsRef.js
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/trait.impl/core/convert/trait.AsRef.js
@@ -1,9 +1,9 @@
(function() {
- var implementors = Object.fromEntries([["bdk_chain",[["impl AsRef<[u8; 32]> for DescriptorId"],["impl AsRef<[u8]> for DescriptorId"],["impl<A> AsRef<TxGraph<A>> for TxGraph<A>"],["impl<A, I> AsRef<TxGraph<A>> for IndexedTxGraph<A, I>"]]],["bdk_wallet",[["impl AsRef<TxGraph> for Wallet"],["impl AsRef<[u8]> for KeychainKind"]]]]);
+ var implementors = Object.fromEntries([["bdk_chain",[["impl AsRef<[u8; 32]> for DescriptorId"],["impl AsRef<[u8]> for DescriptorId"],["impl<A> AsRef<TxGraph<A>> for TxGraph<A>"],["impl<A, I> AsRef<TxGraph<A>> for IndexedTxGraph<A, I>"]]],["bdk_wallet",[["impl AsRef<TxGraph> for Wallet"],["impl AsRef<[u8]> for KeychainKind"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
-//{"start":57,"fragment_lengths":[1789,782]}
\ No newline at end of file
+//{"start":57,"fragment_lengths":[1789,664]}
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/trait.impl/core/convert/trait.From.js b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/trait.impl/core/convert/trait.From.js
index 34290217a1..19d62acdf5 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/trait.impl/core/convert/trait.From.js
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/trait.impl/core/convert/trait.From.js
@@ -1,9 +1,9 @@
(function() {
- var implementors = Object.fromEntries([["bdk_chain",[["impl From<Hash> for DescriptorId"],["impl From<DescriptorId> for Hash"],["impl From<TxPosInBlock<'_>> for BlockId"],["impl From<TxPosInBlock<'_>> for ConfirmationBlockTime"],["impl<A> From<ChangeSet> for ChangeSet<A, ChangeSet>"],["impl<A, IA: Default> From<ChangeSet<A>> for ChangeSet<A, IA>"],["impl<A: Anchor> From<TxUpdate<A>> for TxGraph<A>"],["impl<A: Ord> From<TxGraph<A>> for TxUpdate<A>"],["impl<B: IntoIterator<Item = (u32, Option<BlockHash>)>> From<B> for ChangeSet"],["impl<T> From<T> for Impl<T>"]]],["bdk_core",[["impl From<(&u32, &BlockHash)> for BlockId"],["impl From<(u32, BlockHash)> for BlockId"],["impl From<BlockId> for (u32, BlockHash)"],["impl<I> From<SyncRequestBuilder<I>> for SyncRequest<I>"],["impl<K> From<FullScanRequestBuilder<K>> for FullScanRequest<K>"]]],["bdk_file_store",[["impl From<Error> for FileError"],["impl From<Error> for IterError"]]],["bdk_wallet",[["impl From<Error> for CreateTxError"],["impl From<PolicyError> for Error"],["impl From<PolicyError> for CreateTxError"],["impl From<SatisfiableItem> for Policy"],["impl From<LoadMismatch> for LoadError"],["impl From<MiniscriptPsbtError> for CreateTxError"],["impl From<KeyError> for Error"],["impl From<bool> for Satisfaction"],["impl From<ChangeSet<ConfirmationBlockTime, ChangeSet>> for ChangeSet"],["impl From<ChangeSet> for ChangeSet"],["impl From<ChangeSet> for ChangeSet"],["impl From<ChangeSet<ConfirmationBlockTime>> for ChangeSet"],["impl From<FullScanResponse<KeychainKind>> for Update"],["impl From<SyncResponse> for Update"],["impl From<InsufficientFunds> for CreateTxError"],["impl From<Error> for Error"],["impl From<Error> for Error"],["impl From<Error> for Error"],["impl From<Error> for CreateTxError"],["impl From<Error> for KeyError"],["impl From<Error> for KeyError"],["impl From<Fingerprint> for SignerId"],["impl From<Hash> for SignerId"],["impl From<HexToBytesError> for Error"],["impl From<ParsePublicKeyError> for Error"],["impl<Ctx: ScriptContext> From<Xpriv> for ExtendedKey<Ctx>"],["impl<Ctx: ScriptContext> From<Xpub> for ExtendedKey<Ctx>"],["impl<E> From<LoadMismatch> for LoadWithPersistError<E>"]]],["example_bitcoind_rpc_polling",[["impl From<RpcArgs> for Auth"]]]]);
+ var implementors = Object.fromEntries([["bdk_chain",[["impl From<Hash> for DescriptorId"],["impl From<DescriptorId> for Hash"],["impl From<TxPosInBlock<'_>> for BlockId"],["impl From<TxPosInBlock<'_>> for ConfirmationBlockTime"],["impl<A> From<ChangeSet> for ChangeSet<A, ChangeSet>"],["impl<A, IA: Default> From<ChangeSet<A>> for ChangeSet<A, IA>"],["impl<A: Anchor> From<TxUpdate<A>> for TxGraph<A>"],["impl<A: Ord> From<TxGraph<A>> for TxUpdate<A>"],["impl<B: IntoIterator<Item = (u32, Option<BlockHash>)>> From<B> for ChangeSet"],["impl<T> From<T> for Impl<T>"]]],["bdk_core",[["impl From<(&u32, &BlockHash)> for BlockId"],["impl From<(u32, BlockHash)> for BlockId"],["impl From<BlockId> for (u32, BlockHash)"],["impl<I> From<SyncRequestBuilder<I>> for SyncRequest<I>"],["impl<K> From<FullScanRequestBuilder<K>> for FullScanRequest<K>"]]],["bdk_file_store",[["impl From<Error> for FileError"],["impl From<Error> for IterError"]]],["bdk_wallet",[["impl From<Error> for CreateTxError"],["impl From<PolicyError> for Error"],["impl From<PolicyError> for CreateTxError"],["impl From<SatisfiableItem> for Policy"],["impl From<LoadMismatch> for LoadError"],["impl From<MiniscriptPsbtError> for CreateTxError"],["impl From<KeyError> for Error"],["impl From<bool> for Satisfaction"],["impl From<FullScanResponse<KeychainKind>> for Update"],["impl From<SyncResponse> for Update"],["impl From<InsufficientFunds> for CreateTxError"],["impl From<ChangeSet> for ChangeSet"],["impl From<ChangeSet> for ChangeSet"],["impl From<ChangeSet<ConfirmationBlockTime>> for ChangeSet"],["impl From<ChangeSet<ConfirmationBlockTime, ChangeSet>> for ChangeSet"],["impl From<Error> for Error"],["impl From<Error> for Error"],["impl From<Error> for Error"],["impl From<Error> for CreateTxError"],["impl From<Error> for KeyError"],["impl From<Error> for KeyError"],["impl From<Fingerprint> for SignerId"],["impl From<Hash> for SignerId"],["impl From<HexToBytesError> for Error"],["impl From<ParsePublicKeyError> for Error"],["impl<Ctx: ScriptContext> From<Xpriv> for ExtendedKey<Ctx>"],["impl<Ctx: ScriptContext> From<Xpub> for ExtendedKey<Ctx>"],["impl<E> From<LoadMismatch> for LoadWithPersistError<E>"]]],["example_bitcoind_rpc_polling",[["impl From<RpcArgs> for Auth"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
-//{"start":57,"fragment_lengths":[5175,2130,853,11283,341]}
\ No newline at end of file
+//{"start":57,"fragment_lengths":[5175,2130,853,10593,341]}
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/type.impl/bdk_chain/indexed_tx_graph/struct.IndexedTxGraph.js b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/type.impl/bdk_chain/indexed_tx_graph/struct.IndexedTxGraph.js
index 496f0f7448..f8cb2a64c7 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/type.impl/bdk_chain/indexed_tx_graph/struct.IndexedTxGraph.js
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/type.impl/bdk_chain/indexed_tx_graph/struct.IndexedTxGraph.js
@@ -1,9 +1,9 @@
(function() {
- var type_impls = Object.fromEntries([["example_cli",[["Source§impl<A, I> AsRef<TxGraph<A>> for IndexedTxGraph<A, I>
","AsRef>","example_cli::KeychainTxGraph"],["Source§impl<A, I> Clone for IndexedTxGraph<A, I>
Source§fn clone(&self) -> IndexedTxGraph<A, I>
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more","Clone","example_cli::KeychainTxGraph"],["Source§impl<A, I> Debug for IndexedTxGraph<A, I>
","Debug","example_cli::KeychainTxGraph"],["Source§impl<A, I> Default for IndexedTxGraph<A, I>where\n I: Default,
Source§fn default() -> IndexedTxGraph<A, I>
Returns the âdefault valueâ for a type. Read more","Default","example_cli::KeychainTxGraph"],["Source§impl<A, I> IndexedTxGraph<A, I>
Methods are available if the anchor (A) can be created from TxPosInBlock.
\n
Sourcepub fn apply_block_relevant(\n &mut self,\n block: &Block,\n height: u32,\n) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Batch insert all transactions of the given block of height, filtering out those that are\nirrelevant.
\nEach inserted transactionâs anchor will be constructed using TxPosInBlock.
\nRelevancy is determined by the internal Indexer::is_tx_relevant implementation of I.\nIrrelevant transactions in txs will be ignored.
\nSourcepub fn apply_block(\n &mut self,\n block: Block,\n height: u32,\n) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Batch insert all transactions of the given block of height.
\nEach inserted transactionâs anchor will be constructed using TxPosInBlock.
\nTo only insert relevant transactions, use apply_block_relevant instead.
\n",0,"example_cli::KeychainTxGraph"],["Source§impl<A, I> IndexedTxGraph<A, I>
Sourcepub fn new(index: I) -> IndexedTxGraph<A, I>
Construct a new IndexedTxGraph with a given index.
\n",0,"example_cli::KeychainTxGraph"],["Source§impl<A, I> IndexedTxGraph<A, I>
Sourcepub fn apply_changeset(\n &mut self,\n changeset: ChangeSet<A, <I as Indexer>::ChangeSet>,\n)
Applies the ChangeSet to the IndexedTxGraph.
\nSourcepub fn initial_changeset(&self) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Determines the ChangeSet between self and an empty IndexedTxGraph.
\n",0,"example_cli::KeychainTxGraph"],["Source§impl<A, I> IndexedTxGraph<A, I>
Sourcepub fn apply_update(\n &mut self,\n update: TxUpdate<A>,\n) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Apply an update directly.
\nupdate is a tx_graph::TxUpdate<A> and the resultant changes is returned as ChangeSet.
\nSourcepub fn apply_update_at(\n &mut self,\n update: TxUpdate<A>,\n seen_at: Option<u64>,\n) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Apply the given update with an optional seen_at timestamp.
\nseen_at represents when the update is seen (in unix seconds). It is used to determine the\nlast_seens for all transactions in the update which have no corresponding anchor(s). The\nlast_seen value is used internally to determine precedence of conflicting unconfirmed\ntransactions (where the transaction with the lower last_seen value is omitted from the\ncanonical history).
\nNot setting a seen_at value means unconfirmed transactions introduced by this update will\nnot be part of the canonical history of transactions.
\nUse apply_update to have the seen_at value automatically\nset to the current time.
\nSourcepub fn insert_txout(\n &mut self,\n outpoint: OutPoint,\n txout: TxOut,\n) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Insert a floating txout of given outpoint.
\nSourcepub fn insert_tx<T>(&mut self, tx: T) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Insert and index a transaction into the graph.
\nSourcepub fn insert_anchor(\n &mut self,\n txid: Txid,\n anchor: A,\n) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Insert an anchor for a given transaction.
\nSourcepub fn insert_seen_at(\n &mut self,\n txid: Txid,\n seen_at: u64,\n) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Insert a unix timestamp of when a transaction is seen in the mempool.
\nThis is used for transaction conflict resolution in TxGraph where the transaction with\nthe later last-seen is prioritized.
\nSourcepub fn batch_insert_relevant<T>(\n &mut self,\n txs: impl IntoIterator<Item = (T, impl IntoIterator<Item = A>)>,\n) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Batch insert transactions, filtering out those that are irrelevant.
\nRelevancy is determined by the Indexer::is_tx_relevant implementation of I. Irrelevant\ntransactions in txs will be ignored. txs do not need to be in topological order.
\nSourcepub fn batch_insert_relevant_unconfirmed<T>(\n &mut self,\n unconfirmed_txs: impl IntoIterator<Item = (T, u64)>,\n) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Batch insert unconfirmed transactions, filtering out those that are irrelevant.
\nRelevancy is determined by the internal Indexer::is_tx_relevant implementation of I.\nIrrelevant transactions in txs will be ignored.
\nItems of txs are tuples containing the transaction and a last seen timestamp. The\nlast seen communicates when the transaction is last seen in the mempool which is used for\nconflict-resolution in TxGraph (refer to TxGraph::insert_seen_at for details).
\nSourcepub fn batch_insert_unconfirmed<T>(\n &mut self,\n txs: impl IntoIterator<Item = (T, u64)>,\n) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Batch insert unconfirmed transactions.
\nItems of txs are tuples containing the transaction and a last seen timestamp. The\nlast seen communicates when the transaction is last seen in the mempool which is used for\nconflict-resolution in TxGraph (refer to TxGraph::insert_seen_at for details).
\nTo filter out irrelevant transactions, use batch_insert_relevant_unconfirmed instead.
\n",0,"example_cli::KeychainTxGraph"]]]]);
+ var type_impls = Object.fromEntries([["example_cli",[["","AsRef>","example_cli::KeychainTxGraph"],["","Clone","example_cli::KeychainTxGraph"],["","Debug","example_cli::KeychainTxGraph"],["","Default","example_cli::KeychainTxGraph"],["§impl<A, I> IndexedTxGraph<A, I>
",0,"example_cli::KeychainTxGraph"],["§impl<A, I> IndexedTxGraph<A, I>
Methods are available if the anchor (A) can be created from [TxPosInBlock].
\n
pub fn apply_block_relevant(\n &mut self,\n block: &Block,\n height: u32,\n) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Batch insert all transactions of the given block of height, filtering out those that are\nirrelevant.
\nEach inserted transactionâs anchor will be constructed using [TxPosInBlock].
\nRelevancy is determined by the internal [Indexer::is_tx_relevant] implementation of I.\nIrrelevant transactions in txs will be ignored.
\npub fn apply_block(\n &mut self,\n block: Block,\n height: u32,\n) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Batch insert all transactions of the given block of height.
\nEach inserted transactionâs anchor will be constructed using [TxPosInBlock].
\nTo only insert relevant transactions, use apply_block_relevant instead.
\n",0,"example_cli::KeychainTxGraph"],["§impl<A, I> IndexedTxGraph<A, I>where\n A: Anchor,\n I: Indexer,
pub fn apply_changeset(\n &mut self,\n changeset: ChangeSet<A, <I as Indexer>::ChangeSet>,\n)
Applies the [ChangeSet] to the [IndexedTxGraph].
\npub fn initial_changeset(&self) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Determines the [ChangeSet] between self and an empty [IndexedTxGraph].
\n",0,"example_cli::KeychainTxGraph"],["§impl<A, I> IndexedTxGraph<A, I>
pub fn apply_update(\n &mut self,\n update: TxUpdate<A>,\n) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Apply an update directly.
\nupdate is a tx_graph::TxUpdate<A> and the resultant changes is returned as [ChangeSet].
\npub fn apply_update_at(\n &mut self,\n update: TxUpdate<A>,\n seen_at: Option<u64>,\n) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Apply the given update with an optional seen_at timestamp.
\nseen_at represents when the update is seen (in unix seconds). It is used to determine the\nlast_seens for all transactions in the update which have no corresponding anchor(s). The\nlast_seen value is used internally to determine precedence of conflicting unconfirmed\ntransactions (where the transaction with the lower last_seen value is omitted from the\ncanonical history).
\nNot setting a seen_at value means unconfirmed transactions introduced by this update will\nnot be part of the canonical history of transactions.
\nUse apply_update to have the seen_at value automatically\nset to the current time.
\npub fn insert_txout(\n &mut self,\n outpoint: OutPoint,\n txout: TxOut,\n) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Insert a floating txout of given outpoint.
\npub fn insert_tx<T>(&mut self, tx: T) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Insert and index a transaction into the graph.
\npub fn insert_anchor(\n &mut self,\n txid: Txid,\n anchor: A,\n) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Insert an anchor for a given transaction.
\npub fn insert_seen_at(\n &mut self,\n txid: Txid,\n seen_at: u64,\n) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Insert a unix timestamp of when a transaction is seen in the mempool.
\nThis is used for transaction conflict resolution in [TxGraph] where the transaction with\nthe later last-seen is prioritized.
\npub fn batch_insert_relevant<T>(\n &mut self,\n txs: impl IntoIterator<Item = (T, impl IntoIterator<Item = A>)>,\n) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Batch insert transactions, filtering out those that are irrelevant.
\nRelevancy is determined by the [Indexer::is_tx_relevant] implementation of I. Irrelevant\ntransactions in txs will be ignored. txs do not need to be in topological order.
\npub fn batch_insert_relevant_unconfirmed<T>(\n &mut self,\n unconfirmed_txs: impl IntoIterator<Item = (T, u64)>,\n) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Batch insert unconfirmed transactions, filtering out those that are irrelevant.
\nRelevancy is determined by the internal [Indexer::is_tx_relevant] implementation of I.\nIrrelevant transactions in txs will be ignored.
\nItems of txs are tuples containing the transaction and a last seen timestamp. The\nlast seen communicates when the transaction is last seen in the mempool which is used for\nconflict-resolution in [TxGraph] (refer to [TxGraph::insert_seen_at] for details).
\npub fn batch_insert_unconfirmed<T>(\n &mut self,\n txs: impl IntoIterator<Item = (T, u64)>,\n) -> ChangeSet<A, <I as Indexer>::ChangeSet>
Batch insert unconfirmed transactions.
\nItems of txs are tuples containing the transaction and a last seen timestamp. The\nlast seen communicates when the transaction is last seen in the mempool which is used for\nconflict-resolution in [TxGraph] (refer to [TxGraph::insert_seen_at] for details).
\nTo filter out irrelevant transactions, use batch_insert_relevant_unconfirmed instead.
\n",0,"example_cli::KeychainTxGraph"]]]]);
if (window.register_type_impls) {
window.register_type_impls(type_impls);
} else {
window.pending_type_impls = type_impls;
}
})()
-//{"start":55,"fragment_lengths":[36299]}
\ No newline at end of file
+//{"start":55,"fragment_lengths":[21409]}
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/type.impl/bdk_chain/tx_graph/struct.CanonicalTx.js b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/type.impl/bdk_chain/tx_graph/struct.CanonicalTx.js
index e26a1c97b6..11ddca0a8a 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/type.impl/bdk_chain/tx_graph/struct.CanonicalTx.js
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/type.impl/bdk_chain/tx_graph/struct.CanonicalTx.js
@@ -1,9 +1,9 @@
(function() {
- var type_impls = Object.fromEntries([["bdk_wallet",[["Source§impl<'a, T, A> Clone for CanonicalTx<'a, T, A>
Source§fn clone(&self) -> CanonicalTx<'a, T, A>
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more","Clone","bdk_wallet::wallet::WalletTx"],["Source§impl<'a, T, A> Debug for CanonicalTx<'a, T, A>
","Debug","bdk_wallet::wallet::WalletTx"],["Source§impl<'a, T, A> Ord for CanonicalTx<'a, T, A>
Source§fn cmp(&self, other: &CanonicalTx<'a, T, A>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere\n Self: Sized,
Compares and returns the maximum of two values. Read more","Ord","bdk_wallet::wallet::WalletTx"],["Source§impl<'a, T, A> PartialEq for CanonicalTx<'a, T, A>
","PartialEq","bdk_wallet::wallet::WalletTx"],["Source§impl<'a, T, A> PartialOrd for CanonicalTx<'a, T, A>where\n T: PartialOrd,\n A: PartialOrd,
","PartialOrd","bdk_wallet::wallet::WalletTx"],["Source§impl<'a, T, A> Eq for CanonicalTx<'a, T, A>
","Eq","bdk_wallet::wallet::WalletTx"],["Source§impl<'a, T, A> StructuralPartialEq for CanonicalTx<'a, T, A>
","StructuralPartialEq","bdk_wallet::wallet::WalletTx"]]]]);
+ var type_impls = Object.fromEntries([["bdk_wallet",[["","Clone","bdk_wallet::wallet::WalletTx"],["","Debug","bdk_wallet::wallet::WalletTx"],["§impl<'a, T, A> Ord for CanonicalTx<'a, T, A>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere\n Self: Sized,
Compares and returns the maximum of two values. Read more","Ord","bdk_wallet::wallet::WalletTx"],["","PartialEq","bdk_wallet::wallet::WalletTx"],["§impl<'a, T, A> PartialOrd for CanonicalTx<'a, T, A>where\n T: PartialOrd,\n A: PartialOrd,
","PartialOrd","bdk_wallet::wallet::WalletTx"],["§impl<'a, T, A> Eq for CanonicalTx<'a, T, A>
","Eq","bdk_wallet::wallet::WalletTx"],["§impl<'a, T, A> StructuralPartialEq for CanonicalTx<'a, T, A>
","StructuralPartialEq","bdk_wallet::wallet::WalletTx"]]]]);
if (window.register_type_impls) {
window.register_type_impls(type_impls);
} else {
window.pending_type_impls = type_impls;
}
})()
-//{"start":55,"fragment_lengths":[20397]}
\ No newline at end of file
+//{"start":55,"fragment_lengths":[18039]}
\ No newline at end of file
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/type.impl/bdk_wallet/descriptor/enum.Descriptor.js b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/type.impl/bdk_wallet/descriptor/enum.Descriptor.js
index e5210c3115..a66bf7548f 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/type.impl/bdk_wallet/descriptor/enum.Descriptor.js
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/type.impl/bdk_wallet/descriptor/enum.Descriptor.js
@@ -1,9 +1,9 @@
(function() {
- var type_impls = Object.fromEntries([["bdk_wallet",[["§impl<Pk> Clone for Descriptor<Pk>where\n Pk: Clone + MiniscriptKey,
§fn clone(&self) -> Descriptor<Pk>
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more","Clone","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> Debug for Descriptor<Pk>where\n Pk: MiniscriptKey,
","Debug","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl Descriptor<DefiniteDescriptorKey>
pub fn derived_descriptor<C>(\n &self,\n secp: &Secp256k1<C>,\n) -> Result<Descriptor<PublicKey>, ConversionError>where\n C: Verification,
Convert all the public keys in the descriptor to [bitcoin::PublicKey] by deriving them or\notherwise converting them. All [bitcoin::secp256k1::XOnlyPublicKey]s are converted to by adding a\ndefault(0x02) y-coordinate.
\n§Examples
\nuse miniscript::descriptor::{Descriptor, DescriptorPublicKey};\nuse miniscript::bitcoin::secp256k1;\nuse std::str::FromStr;\n\n// test from bip 86\nlet secp = secp256k1::Secp256k1::verification_only();\nlet descriptor = Descriptor::<DescriptorPublicKey>::from_str(\"tr(xpub6BgBgsespWvERF3LHQu6CnqdvfEvtMcQjYrcRzx53QJjSxarj2afYWcLteoGVky7D3UKDP9QyrLprQ3VCECoY49yfdDEHGCtMMj92pReUsQ/0/*)\")\n .expect(\"Valid ranged descriptor\");\nlet result = descriptor.at_derivation_index(0).unwrap().derived_descriptor(&secp).expect(\"Non-hardened derivation\");\nassert_eq!(result.to_string(), \"tr(03cc8a4bc64d897bddc5fbc2f670f7a8ba0b386779106cf1223c6fc5d7cd6fc115)#6qm9h8ym\");
\n§Errors
\nThis function will return an error if hardened derivation is attempted.
\n",0,"bdk_wallet::descriptor::DerivedDescriptor"],["§impl Descriptor<DefiniteDescriptorKey>
pub fn plan<P>(\n self,\n provider: &P,\n) -> Result<Plan, Descriptor<DefiniteDescriptorKey>>where\n P: AssetProvider<DefiniteDescriptorKey>,
Returns a plan if the provided assets are sufficient to produce a non-malleable satisfaction
\nIf the assets arenât sufficient for generating a Plan, the descriptor is returned
\npub fn plan_mall<P>(\n self,\n provider: &P,\n) -> Result<Plan, Descriptor<DefiniteDescriptorKey>>where\n P: AssetProvider<DefiniteDescriptorKey>,
Returns a plan if the provided assets are sufficient to produce a malleable satisfaction
\nIf the assets arenât sufficient for generating a Plan, the descriptor is returned
\n",0,"bdk_wallet::descriptor::DerivedDescriptor"],["§impl Descriptor<DescriptorPublicKey>
pub fn is_deriveable(&self) -> bool
ðDeprecated: use has_wildcards instead
Whether or not the descriptor has any wildcards
\npub fn has_wildcard(&self) -> bool
Whether or not the descriptor has any wildcards i.e. /*.
\npub fn at_derivation_index(\n &self,\n index: u32,\n) -> Result<Descriptor<DefiniteDescriptorKey>, ConversionError>
Replaces all wildcards (i.e. /*) in the descriptor with a particular derivation index,\nturning it into a definite descriptor.
\n§Errors
\n\n- If index ⥠2^31
\n
\npub fn derive(\n &self,\n index: u32,\n) -> Result<Descriptor<DefiniteDescriptorKey>, ConversionError>
ðDeprecated: use at_derivation_index instead
Deprecated name for Self::at_derivation_index.
\npub fn derived_descriptor<C>(\n &self,\n secp: &Secp256k1<C>,\n index: u32,\n) -> Result<Descriptor<PublicKey>, ConversionError>where\n C: Verification,
Convert all the public keys in the descriptor to [bitcoin::PublicKey] by deriving them or\notherwise converting them. All [bitcoin::secp256k1::XOnlyPublicKey]s are converted to by adding a\ndefault(0x02) y-coordinate.
\nThis is a shorthand for:
\n\n .expect(\"Valid ranged descriptor\");\nlet derived_descriptor = descriptor.at_derivation_index(index).unwrap().derived_descriptor(&secp).unwrap();
\nand is only here really here for backwards compatibility.\nSee at_derivation_index and [derived_descriptor] for more documentation.
\n§Errors
\nThis function will return an error if hardened derivation is attempted.
\npub fn parse_descriptor<C>(\n secp: &Secp256k1<C>,\n s: &str,\n) -> Result<(Descriptor<DescriptorPublicKey>, BTreeMap<DescriptorPublicKey, DescriptorSecretKey>), Error>where\n C: Signing,
Parse a descriptor that may contain secret keys
\nInternally turns every secret key found into the corresponding public key and then returns a\na descriptor that only contains public keys and a map to lookup the secret key given a public key.
\npub fn to_string_with_secret(\n &self,\n key_map: &BTreeMap<DescriptorPublicKey, DescriptorSecretKey>,\n) -> String
Serialize a descriptor to string with its secret keys
\npub fn find_derivation_index_for_spk<C>(\n &self,\n secp: &Secp256k1<C>,\n script_pubkey: &Script,\n range: Range<u32>,\n) -> Result<Option<(u32, Descriptor<PublicKey>)>, ConversionError>where\n C: Verification,
Utility method for deriving the descriptor at each index in a range to find one matching\nscript_pubkey.
\nIf it finds a match then it returns the index it was derived at and the concrete\ndescriptor at that index. If the descriptor is non-derivable then it will simply check the\nscript pubkey against the descriptor and return it if it matches (in this case the index\nreturned will be meaningless).
\npub fn is_multipath(&self) -> bool
Whether this descriptor contains a key that has multiple derivation paths.
\npub fn into_single_descriptors(\n self,\n) -> Result<Vec<Descriptor<DescriptorPublicKey>>, Error>
Get as many descriptors as different paths in this descriptor.
\nFor multipath descriptors it will return as many descriptors as there is\nâparallelâ paths. For regular descriptors it will just return itself.
\n",0,"bdk_wallet::descriptor::ExtendedDescriptor"],["§impl<Pk> Descriptor<Pk>where\n Pk: MiniscriptKey + ToPublicKey,
pub fn address(&self, network: Network) -> Result<Address, Error>
Computes the Bitcoin address of the descriptor, if one exists
\nSome descriptors like pk() donât have an address.
\n§Errors
\nFor raw/bare descriptors that donât have an address.
\npub fn script_pubkey(&self) -> ScriptBuf
Computes the scriptpubkey of the descriptor.
\npub fn unsigned_script_sig(&self) -> ScriptBuf
Computes the scriptSig that will be in place for an unsigned input\nspending an output with this descriptor. For pre-segwit descriptors,\nwhich use the scriptSig for signatures, this returns the empty script.
\nThis is used in Segwit transactions to produce an unsigned transaction\nwhose txid will not change during signing (since only the witness data\nwill change).
\npub fn explicit_script(&self) -> Result<ScriptBuf, Error>
Computes the the underlying script before any hashing is done. For\nBare, Pkh and Wpkh this is the scriptPubkey; for ShWpkh and Sh\nthis is the redeemScript; for the others it is the witness script.
\n§Errors
\nIf the descriptor is a taproot descriptor.
\npub fn script_code(&self) -> Result<ScriptBuf, Error>
Computes the scriptCode of a transaction output.
\nThe scriptCode is the Script of the previous transaction output being\nserialized in the sighash when evaluating a CHECKSIG & co. OP code.
\n§Errors
\nIf the descriptor is a taproot descriptor.
\npub fn get_satisfaction<S>(\n &self,\n satisfier: S,\n) -> Result<(Vec<Vec<u8>>, ScriptBuf), Error>where\n S: Satisfier<Pk>,
Returns satisfying non-malleable witness and scriptSig to spend an\noutput controlled by the given descriptor if it possible to\nconstruct one using the satisfier S.
\npub fn get_satisfaction_mall<S>(\n &self,\n satisfier: S,\n) -> Result<(Vec<Vec<u8>>, ScriptBuf), Error>where\n S: Satisfier<Pk>,
Returns a possilbly mallable satisfying non-malleable witness and scriptSig to spend an\noutput controlled by the given descriptor if it possible to\nconstruct one using the satisfier S.
\n",0,"bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> Descriptor<Pk>where\n Pk: MiniscriptKey,
pub fn new_pk(pk: Pk) -> Descriptor<Pk>
Create a new pk descriptor
\npub fn new_pkh(pk: Pk) -> Result<Descriptor<Pk>, Error>
Create a new PkH descriptor
\npub fn new_wpkh(pk: Pk) -> Result<Descriptor<Pk>, Error>
Create a new Wpkh descriptor\nWill return Err if uncompressed key is used
\npub fn new_sh_wpkh(pk: Pk) -> Result<Descriptor<Pk>, Error>
Create a new sh wrapped wpkh from Pk.\nErrors when uncompressed keys are supplied
\npub fn new_sh(ms: Miniscript<Pk, Legacy>) -> Result<Descriptor<Pk>, Error>
Create a new sh for a given redeem script\nErrors when miniscript exceeds resource limits under p2sh context\nor does not type check at the top level
\npub fn new_wsh(ms: Miniscript<Pk, Segwitv0>) -> Result<Descriptor<Pk>, Error>
Create a new wsh descriptor from witness script\nErrors when miniscript exceeds resource limits under p2sh context\nor does not type check at the top level
\npub fn new_sh_wsh(ms: Miniscript<Pk, Segwitv0>) -> Result<Descriptor<Pk>, Error>
Create a new sh wrapped wsh descriptor with witness script\nErrors when miniscript exceeds resource limits under wsh context\nor does not type check at the top level
\npub fn new_bare(ms: Miniscript<Pk, BareCtx>) -> Result<Descriptor<Pk>, Error>
Create a new bare descriptor from witness script\nErrors when miniscript exceeds resource limits under bare context\nor does not type check at the top level
\npub fn new_sh_with_wpkh(wpkh: Wpkh<Pk>) -> Descriptor<Pk>
Create a new sh wrapper for the given wpkh descriptor
\npub fn new_sh_with_wsh(wsh: Wsh<Pk>) -> Descriptor<Pk>
Create a new sh wrapper for the given wsh descriptor
\npub fn new_sh_sortedmulti(\n k: usize,\n pks: Vec<Pk>,\n) -> Result<Descriptor<Pk>, Error>
Create a new sh sortedmulti descriptor with threshold k\nand Vec of pks.\nErrors when miniscript exceeds resource limits under p2sh context
\npub fn new_sh_wsh_sortedmulti(\n k: usize,\n pks: Vec<Pk>,\n) -> Result<Descriptor<Pk>, Error>
Create a new sh wrapped wsh sortedmulti descriptor from threshold\nk and Vec of pks\nErrors when miniscript exceeds resource limits under segwit context
\npub fn new_wsh_sortedmulti(\n k: usize,\n pks: Vec<Pk>,\n) -> Result<Descriptor<Pk>, Error>
Create a new wsh sorted multi descriptor\nErrors when miniscript exceeds resource limits under p2sh context
\npub fn new_tr(\n key: Pk,\n script: Option<TapTree<Pk>>,\n) -> Result<Descriptor<Pk>, Error>
Create new tr descriptor\nErrors when miniscript exceeds resource limits under Tap context
\npub fn desc_type(&self) -> DescriptorType
Get the [DescriptorType] of Descriptor
\npub fn sanity_check(&self) -> Result<(), Error>
Checks whether the descriptor is safe.
\nChecks whether all the spend paths in the descriptor are possible on the\nbitcoin network under the current standardness and consensus rules. Also\nchecks whether the descriptor requires signatures on all spend paths and\nwhether the script is malleable.
\nIn general, all the guarantees of miniscript hold only for safe scripts.\nThe signer may not be able to find satisfactions even if one exists.
\npub fn max_weight_to_satisfy(&self) -> Result<Weight, Error>
Computes an upper bound on the difference between a non-satisfied\nTxInâs segwit_weight and a satisfied TxInâs segwit_weight
\nSince this method uses segwit_weight instead of legacy_weight,\nif you want to include only legacy inputs in your transaction,\nyou should remove 1WU from each inputâs max_weight_to_satisfy\nfor a more accurate estimate.
\nIn other words, for segwit inputs or legacy inputs included in\nsegwit transactions, the following will hold for each input if\nthat input was satisfied with the largest possible witness:
\n\nâfor i in 0..transaction.input.len() {\n assert_eq!(\n descriptor_for_input[i].max_weight_to_satisfy(),\n transaction.input[i].segwit_weight() - TxIn::default().segwit_weight()\n );\n}
\nInstead, for legacy transactions, the following will hold for each input\nif that input was satisfied with the largest possible witness:
\n\nâfor i in 0..transaction.input.len() {\n assert_eq!(\n descriptor_for_input[i].max_weight_to_satisfy(),\n transaction.input[i].legacy_weight() - TxIn::default().legacy_weight()\n );\n}
\nAssumes all ECDSA signatures are 73 bytes, including push opcode and\nsighash suffix.\nAssumes all Schnorr signatures are 66 bytes, including push opcode and\nsighash suffix.
\n§Errors
\nWhen the descriptor is impossible to safisfy (ex: sh(OP_FALSE)).
\npub fn max_satisfaction_weight(&self) -> Result<usize, Error>
ðDeprecated since 10.0.0: Use max_weight_to_satisfy instead. The method to count bytes was redesigned and the results will differ from max_weight_to_satisfy. For more details check rust-bitcoin/rust-miniscript#476.
Computes an upper bound on the weight of a satisfying witness to the\ntransaction.
\nAssumes all ec-signatures are 73 bytes, including push opcode and\nsighash suffix. Includes the weight of the VarInts encoding the\nscriptSig and witness stack length.
\n§Errors
\nWhen the descriptor is impossible to safisfy (ex: sh(OP_FALSE)).
\n",0,"bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["Source§impl DescriptorExt for Descriptor<DescriptorPublicKey>
Source§fn dust_value(&self) -> Amount
Returns the minimum [Amount] at which an output is broadcast-able.\nPanics if the descriptor wildcard is hardened.Source§fn descriptor_id(&self) -> DescriptorId
Returns the descriptor ID, calculated as the sha256 hash of the spk derived from the\ndescriptor at index 0.","DescriptorExt","bdk_wallet::descriptor::ExtendedDescriptor"],["§impl<'de, Pk> Deserialize<'de> for Descriptor<Pk>where\n Pk: FromStrKey,
§fn deserialize<D>(\n deserializer: D,\n) -> Result<Descriptor<Pk>, <D as Deserializer<'de>>::Error>where\n D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more","Deserialize<'de>","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> Display for Descriptor<Pk>where\n Pk: MiniscriptKey,
","Display","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["Source§impl ExtractPolicy for Descriptor<DescriptorPublicKey>
Source§fn extract_policy(\n &self,\n signers: &SignersContainer,\n build_sat: BuildSatisfaction<'_>,\n secp: &Secp256k1<All>,\n) -> Result<Option<Policy>, Error>
Extract the spending policy","ExtractPolicy","bdk_wallet::descriptor::ExtendedDescriptor"],["§impl<Pk> ForEachKey<Pk> for Descriptor<Pk>where\n Pk: MiniscriptKey,
§fn for_each_key<'a, F>(&'a self, pred: F) -> bool
Run a predicate on every key in the descriptor, returning whether\nthe predicate returned true for every key","ForEachKey","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> From<Bare<Pk>> for Descriptor<Pk>where\n Pk: MiniscriptKey,
§fn from(inner: Bare<Pk>) -> Descriptor<Pk>
Converts to this type from the input type.","From>","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> From<Pkh<Pk>> for Descriptor<Pk>where\n Pk: MiniscriptKey,
§fn from(inner: Pkh<Pk>) -> Descriptor<Pk>
Converts to this type from the input type.","From>","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> From<Sh<Pk>> for Descriptor<Pk>where\n Pk: MiniscriptKey,
§fn from(inner: Sh<Pk>) -> Descriptor<Pk>
Converts to this type from the input type.","From>","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> From<Tr<Pk>> for Descriptor<Pk>where\n Pk: MiniscriptKey,
§fn from(inner: Tr<Pk>) -> Descriptor<Pk>
Converts to this type from the input type.","From>","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> From<Wpkh<Pk>> for Descriptor<Pk>where\n Pk: MiniscriptKey,
§fn from(inner: Wpkh<Pk>) -> Descriptor<Pk>
Converts to this type from the input type.","From>","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> From<Wsh<Pk>> for Descriptor<Pk>where\n Pk: MiniscriptKey,
§fn from(inner: Wsh<Pk>) -> Descriptor<Pk>
Converts to this type from the input type.","From>","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> FromStr for Descriptor<Pk>where\n Pk: FromStrKey,
","FromStr","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> FromTree for Descriptor<Pk>where\n Pk: FromStrKey,
§fn from_tree(top: &Tree<'_>) -> Result<Descriptor<Pk>, Error>
Parse an expression tree into a descriptor.
\n","FromTree","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> Hash for Descriptor<Pk>where\n Pk: Hash + MiniscriptKey,
","Hash","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> Liftable<Pk> for Descriptor<Pk>where\n Pk: MiniscriptKey,
","Liftable","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> Ord for Descriptor<Pk>where\n Pk: Ord + MiniscriptKey,
§fn cmp(&self, other: &Descriptor<Pk>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere\n Self: Sized,
Compares and returns the maximum of two values. Read more","Ord","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> PartialEq for Descriptor<Pk>where\n Pk: PartialEq + MiniscriptKey,
","PartialEq","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> PartialOrd for Descriptor<Pk>where\n Pk: PartialOrd + MiniscriptKey,
","PartialOrd","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<'de, Pk> Serialize for Descriptor<Pk>where\n Pk: MiniscriptKey,
§fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where\n S: Serializer,
Serialize this value into the given Serde serializer. Read more","Serialize","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<P, Q> TranslatePk<P, Q> for Descriptor<P>where\n P: MiniscriptKey,\n Q: MiniscriptKey,
§fn translate_pk<T, E>(\n &self,\n t: &mut T,\n) -> Result<<Descriptor<P> as TranslatePk<P, Q>>::Output, TranslateErr<E>>where\n T: Translator<P, Q, E>,
Converts a descriptor using abstract keys to one using specific keys.
\n§type Output = Descriptor<Q>
The associated output type. This must be Self<Q>.","TranslatePk","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> Eq for Descriptor<Pk>where\n Pk: Eq + MiniscriptKey,
","Eq","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> StructuralPartialEq for Descriptor<Pk>where\n Pk: MiniscriptKey,
","StructuralPartialEq","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"]]]]);
+ var type_impls = Object.fromEntries([["bdk_wallet",[["§impl<Pk> Clone for Descriptor<Pk>where\n Pk: Clone + MiniscriptKey,
§fn clone(&self) -> Descriptor<Pk>
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more","Clone","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> Debug for Descriptor<Pk>where\n Pk: MiniscriptKey,
","Debug","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl Descriptor<DefiniteDescriptorKey>
pub fn derived_descriptor<C>(\n &self,\n secp: &Secp256k1<C>,\n) -> Result<Descriptor<PublicKey>, ConversionError>where\n C: Verification,
Convert all the public keys in the descriptor to [bitcoin::PublicKey] by deriving them or\notherwise converting them. All [bitcoin::secp256k1::XOnlyPublicKey]s are converted to by adding a\ndefault(0x02) y-coordinate.
\n§Examples
\nuse miniscript::descriptor::{Descriptor, DescriptorPublicKey};\nuse miniscript::bitcoin::secp256k1;\nuse std::str::FromStr;\n\n// test from bip 86\nlet secp = secp256k1::Secp256k1::verification_only();\nlet descriptor = Descriptor::<DescriptorPublicKey>::from_str(\"tr(xpub6BgBgsespWvERF3LHQu6CnqdvfEvtMcQjYrcRzx53QJjSxarj2afYWcLteoGVky7D3UKDP9QyrLprQ3VCECoY49yfdDEHGCtMMj92pReUsQ/0/*)\")\n .expect(\"Valid ranged descriptor\");\nlet result = descriptor.at_derivation_index(0).unwrap().derived_descriptor(&secp).expect(\"Non-hardened derivation\");\nassert_eq!(result.to_string(), \"tr(03cc8a4bc64d897bddc5fbc2f670f7a8ba0b386779106cf1223c6fc5d7cd6fc115)#6qm9h8ym\");
\n§Errors
\nThis function will return an error if hardened derivation is attempted.
\n",0,"bdk_wallet::descriptor::DerivedDescriptor"],["§impl Descriptor<DefiniteDescriptorKey>
pub fn plan<P>(\n self,\n provider: &P,\n) -> Result<Plan, Descriptor<DefiniteDescriptorKey>>where\n P: AssetProvider<DefiniteDescriptorKey>,
Returns a plan if the provided assets are sufficient to produce a non-malleable satisfaction
\nIf the assets arenât sufficient for generating a Plan, the descriptor is returned
\npub fn plan_mall<P>(\n self,\n provider: &P,\n) -> Result<Plan, Descriptor<DefiniteDescriptorKey>>where\n P: AssetProvider<DefiniteDescriptorKey>,
Returns a plan if the provided assets are sufficient to produce a malleable satisfaction
\nIf the assets arenât sufficient for generating a Plan, the descriptor is returned
\n",0,"bdk_wallet::descriptor::DerivedDescriptor"],["§impl Descriptor<DescriptorPublicKey>
pub fn is_deriveable(&self) -> bool
ðDeprecated: use has_wildcards instead
Whether or not the descriptor has any wildcards
\npub fn has_wildcard(&self) -> bool
Whether or not the descriptor has any wildcards i.e. /*.
\npub fn at_derivation_index(\n &self,\n index: u32,\n) -> Result<Descriptor<DefiniteDescriptorKey>, ConversionError>
Replaces all wildcards (i.e. /*) in the descriptor with a particular derivation index,\nturning it into a definite descriptor.
\n§Errors
\n\n- If index ⥠2^31
\n
\npub fn derive(\n &self,\n index: u32,\n) -> Result<Descriptor<DefiniteDescriptorKey>, ConversionError>
ðDeprecated: use at_derivation_index instead
Deprecated name for Self::at_derivation_index.
\npub fn derived_descriptor<C>(\n &self,\n secp: &Secp256k1<C>,\n index: u32,\n) -> Result<Descriptor<PublicKey>, ConversionError>where\n C: Verification,
Convert all the public keys in the descriptor to [bitcoin::PublicKey] by deriving them or\notherwise converting them. All [bitcoin::secp256k1::XOnlyPublicKey]s are converted to by adding a\ndefault(0x02) y-coordinate.
\nThis is a shorthand for:
\n\n .expect(\"Valid ranged descriptor\");\nlet derived_descriptor = descriptor.at_derivation_index(index).unwrap().derived_descriptor(&secp).unwrap();
\nand is only here really here for backwards compatibility.\nSee at_derivation_index and [derived_descriptor] for more documentation.
\n§Errors
\nThis function will return an error if hardened derivation is attempted.
\npub fn parse_descriptor<C>(\n secp: &Secp256k1<C>,\n s: &str,\n) -> Result<(Descriptor<DescriptorPublicKey>, BTreeMap<DescriptorPublicKey, DescriptorSecretKey>), Error>where\n C: Signing,
Parse a descriptor that may contain secret keys
\nInternally turns every secret key found into the corresponding public key and then returns a\na descriptor that only contains public keys and a map to lookup the secret key given a public key.
\npub fn to_string_with_secret(\n &self,\n key_map: &BTreeMap<DescriptorPublicKey, DescriptorSecretKey>,\n) -> String
Serialize a descriptor to string with its secret keys
\npub fn find_derivation_index_for_spk<C>(\n &self,\n secp: &Secp256k1<C>,\n script_pubkey: &Script,\n range: Range<u32>,\n) -> Result<Option<(u32, Descriptor<PublicKey>)>, ConversionError>where\n C: Verification,
Utility method for deriving the descriptor at each index in a range to find one matching\nscript_pubkey.
\nIf it finds a match then it returns the index it was derived at and the concrete\ndescriptor at that index. If the descriptor is non-derivable then it will simply check the\nscript pubkey against the descriptor and return it if it matches (in this case the index\nreturned will be meaningless).
\npub fn is_multipath(&self) -> bool
Whether this descriptor contains a key that has multiple derivation paths.
\npub fn into_single_descriptors(\n self,\n) -> Result<Vec<Descriptor<DescriptorPublicKey>>, Error>
Get as many descriptors as different paths in this descriptor.
\nFor multipath descriptors it will return as many descriptors as there is\nâparallelâ paths. For regular descriptors it will just return itself.
\n",0,"bdk_wallet::descriptor::ExtendedDescriptor"],["§impl<Pk> Descriptor<Pk>where\n Pk: MiniscriptKey + ToPublicKey,
pub fn address(&self, network: Network) -> Result<Address, Error>
Computes the Bitcoin address of the descriptor, if one exists
\nSome descriptors like pk() donât have an address.
\n§Errors
\nFor raw/bare descriptors that donât have an address.
\npub fn script_pubkey(&self) -> ScriptBuf
Computes the scriptpubkey of the descriptor.
\npub fn unsigned_script_sig(&self) -> ScriptBuf
Computes the scriptSig that will be in place for an unsigned input\nspending an output with this descriptor. For pre-segwit descriptors,\nwhich use the scriptSig for signatures, this returns the empty script.
\nThis is used in Segwit transactions to produce an unsigned transaction\nwhose txid will not change during signing (since only the witness data\nwill change).
\npub fn explicit_script(&self) -> Result<ScriptBuf, Error>
Computes the the underlying script before any hashing is done. For\nBare, Pkh and Wpkh this is the scriptPubkey; for ShWpkh and Sh\nthis is the redeemScript; for the others it is the witness script.
\n§Errors
\nIf the descriptor is a taproot descriptor.
\npub fn script_code(&self) -> Result<ScriptBuf, Error>
Computes the scriptCode of a transaction output.
\nThe scriptCode is the Script of the previous transaction output being\nserialized in the sighash when evaluating a CHECKSIG & co. OP code.
\n§Errors
\nIf the descriptor is a taproot descriptor.
\npub fn get_satisfaction<S>(\n &self,\n satisfier: S,\n) -> Result<(Vec<Vec<u8>>, ScriptBuf), Error>where\n S: Satisfier<Pk>,
Returns satisfying non-malleable witness and scriptSig to spend an\noutput controlled by the given descriptor if it possible to\nconstruct one using the satisfier S.
\npub fn get_satisfaction_mall<S>(\n &self,\n satisfier: S,\n) -> Result<(Vec<Vec<u8>>, ScriptBuf), Error>where\n S: Satisfier<Pk>,
Returns a possilbly mallable satisfying non-malleable witness and scriptSig to spend an\noutput controlled by the given descriptor if it possible to\nconstruct one using the satisfier S.
\n",0,"bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> Descriptor<Pk>where\n Pk: MiniscriptKey,
pub fn new_pk(pk: Pk) -> Descriptor<Pk>
Create a new pk descriptor
\npub fn new_pkh(pk: Pk) -> Result<Descriptor<Pk>, Error>
Create a new PkH descriptor
\npub fn new_wpkh(pk: Pk) -> Result<Descriptor<Pk>, Error>
Create a new Wpkh descriptor\nWill return Err if uncompressed key is used
\npub fn new_sh_wpkh(pk: Pk) -> Result<Descriptor<Pk>, Error>
Create a new sh wrapped wpkh from Pk.\nErrors when uncompressed keys are supplied
\npub fn new_sh(ms: Miniscript<Pk, Legacy>) -> Result<Descriptor<Pk>, Error>
Create a new sh for a given redeem script\nErrors when miniscript exceeds resource limits under p2sh context\nor does not type check at the top level
\npub fn new_wsh(ms: Miniscript<Pk, Segwitv0>) -> Result<Descriptor<Pk>, Error>
Create a new wsh descriptor from witness script\nErrors when miniscript exceeds resource limits under p2sh context\nor does not type check at the top level
\npub fn new_sh_wsh(ms: Miniscript<Pk, Segwitv0>) -> Result<Descriptor<Pk>, Error>
Create a new sh wrapped wsh descriptor with witness script\nErrors when miniscript exceeds resource limits under wsh context\nor does not type check at the top level
\npub fn new_bare(ms: Miniscript<Pk, BareCtx>) -> Result<Descriptor<Pk>, Error>
Create a new bare descriptor from witness script\nErrors when miniscript exceeds resource limits under bare context\nor does not type check at the top level
\npub fn new_sh_with_wpkh(wpkh: Wpkh<Pk>) -> Descriptor<Pk>
Create a new sh wrapper for the given wpkh descriptor
\npub fn new_sh_with_wsh(wsh: Wsh<Pk>) -> Descriptor<Pk>
Create a new sh wrapper for the given wsh descriptor
\npub fn new_sh_sortedmulti(\n k: usize,\n pks: Vec<Pk>,\n) -> Result<Descriptor<Pk>, Error>
Create a new sh sortedmulti descriptor with threshold k\nand Vec of pks.\nErrors when miniscript exceeds resource limits under p2sh context
\npub fn new_sh_wsh_sortedmulti(\n k: usize,\n pks: Vec<Pk>,\n) -> Result<Descriptor<Pk>, Error>
Create a new sh wrapped wsh sortedmulti descriptor from threshold\nk and Vec of pks\nErrors when miniscript exceeds resource limits under segwit context
\npub fn new_wsh_sortedmulti(\n k: usize,\n pks: Vec<Pk>,\n) -> Result<Descriptor<Pk>, Error>
Create a new wsh sorted multi descriptor\nErrors when miniscript exceeds resource limits under p2sh context
\npub fn new_tr(\n key: Pk,\n script: Option<TapTree<Pk>>,\n) -> Result<Descriptor<Pk>, Error>
Create new tr descriptor\nErrors when miniscript exceeds resource limits under Tap context
\npub fn desc_type(&self) -> DescriptorType
Get the [DescriptorType] of Descriptor
\npub fn sanity_check(&self) -> Result<(), Error>
Checks whether the descriptor is safe.
\nChecks whether all the spend paths in the descriptor are possible on the\nbitcoin network under the current standardness and consensus rules. Also\nchecks whether the descriptor requires signatures on all spend paths and\nwhether the script is malleable.
\nIn general, all the guarantees of miniscript hold only for safe scripts.\nThe signer may not be able to find satisfactions even if one exists.
\npub fn max_weight_to_satisfy(&self) -> Result<Weight, Error>
Computes an upper bound on the difference between a non-satisfied\nTxInâs segwit_weight and a satisfied TxInâs segwit_weight
\nSince this method uses segwit_weight instead of legacy_weight,\nif you want to include only legacy inputs in your transaction,\nyou should remove 1WU from each inputâs max_weight_to_satisfy\nfor a more accurate estimate.
\nIn other words, for segwit inputs or legacy inputs included in\nsegwit transactions, the following will hold for each input if\nthat input was satisfied with the largest possible witness:
\n\nâfor i in 0..transaction.input.len() {\n assert_eq!(\n descriptor_for_input[i].max_weight_to_satisfy(),\n transaction.input[i].segwit_weight() - TxIn::default().segwit_weight()\n );\n}
\nInstead, for legacy transactions, the following will hold for each input\nif that input was satisfied with the largest possible witness:
\n\nâfor i in 0..transaction.input.len() {\n assert_eq!(\n descriptor_for_input[i].max_weight_to_satisfy(),\n transaction.input[i].legacy_weight() - TxIn::default().legacy_weight()\n );\n}
\nAssumes all ECDSA signatures are 73 bytes, including push opcode and\nsighash suffix.\nAssumes all Schnorr signatures are 66 bytes, including push opcode and\nsighash suffix.
\n§Errors
\nWhen the descriptor is impossible to safisfy (ex: sh(OP_FALSE)).
\npub fn max_satisfaction_weight(&self) -> Result<usize, Error>
ðDeprecated since 10.0.0: Use max_weight_to_satisfy instead. The method to count bytes was redesigned and the results will differ from max_weight_to_satisfy. For more details check rust-bitcoin/rust-miniscript#476.
Computes an upper bound on the weight of a satisfying witness to the\ntransaction.
\nAssumes all ec-signatures are 73 bytes, including push opcode and\nsighash suffix. Includes the weight of the VarInts encoding the\nscriptSig and witness stack length.
\n§Errors
\nWhen the descriptor is impossible to safisfy (ex: sh(OP_FALSE)).
\n",0,"bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl DescriptorExt for Descriptor<DescriptorPublicKey>
§fn dust_value(&self) -> Amount
Returns the minimum [Amount] at which an output is broadcast-able.\nPanics if the descriptor wildcard is hardened.§fn descriptor_id(&self) -> DescriptorId
Returns the descriptor ID, calculated as the sha256 hash of the spk derived from the\ndescriptor at index 0.","DescriptorExt","bdk_wallet::descriptor::ExtendedDescriptor"],["§impl<'de, Pk> Deserialize<'de> for Descriptor<Pk>where\n Pk: FromStrKey,
§fn deserialize<D>(\n deserializer: D,\n) -> Result<Descriptor<Pk>, <D as Deserializer<'de>>::Error>where\n D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more","Deserialize<'de>","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> Display for Descriptor<Pk>where\n Pk: MiniscriptKey,
","Display","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["Source§impl ExtractPolicy for Descriptor<DescriptorPublicKey>
Source§fn extract_policy(\n &self,\n signers: &SignersContainer,\n build_sat: BuildSatisfaction<'_>,\n secp: &Secp256k1<All>,\n) -> Result<Option<Policy>, Error>
Extract the spending policy","ExtractPolicy","bdk_wallet::descriptor::ExtendedDescriptor"],["§impl<Pk> ForEachKey<Pk> for Descriptor<Pk>where\n Pk: MiniscriptKey,
§fn for_each_key<'a, F>(&'a self, pred: F) -> bool
Run a predicate on every key in the descriptor, returning whether\nthe predicate returned true for every key","ForEachKey","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> From<Bare<Pk>> for Descriptor<Pk>where\n Pk: MiniscriptKey,
§fn from(inner: Bare<Pk>) -> Descriptor<Pk>
Converts to this type from the input type.","From>","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> From<Pkh<Pk>> for Descriptor<Pk>where\n Pk: MiniscriptKey,
§fn from(inner: Pkh<Pk>) -> Descriptor<Pk>
Converts to this type from the input type.","From>","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> From<Sh<Pk>> for Descriptor<Pk>where\n Pk: MiniscriptKey,
§fn from(inner: Sh<Pk>) -> Descriptor<Pk>
Converts to this type from the input type.","From>","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> From<Tr<Pk>> for Descriptor<Pk>where\n Pk: MiniscriptKey,
§fn from(inner: Tr<Pk>) -> Descriptor<Pk>
Converts to this type from the input type.","From>","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> From<Wpkh<Pk>> for Descriptor<Pk>where\n Pk: MiniscriptKey,
§fn from(inner: Wpkh<Pk>) -> Descriptor<Pk>
Converts to this type from the input type.","From>","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> From<Wsh<Pk>> for Descriptor<Pk>where\n Pk: MiniscriptKey,
§fn from(inner: Wsh<Pk>) -> Descriptor<Pk>
Converts to this type from the input type.","From>","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> FromStr for Descriptor<Pk>where\n Pk: FromStrKey,
","FromStr","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> FromTree for Descriptor<Pk>where\n Pk: FromStrKey,
§fn from_tree(top: &Tree<'_>) -> Result<Descriptor<Pk>, Error>
Parse an expression tree into a descriptor.
\n","FromTree","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> Hash for Descriptor<Pk>where\n Pk: Hash + MiniscriptKey,
","Hash","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> Liftable<Pk> for Descriptor<Pk>where\n Pk: MiniscriptKey,
","Liftable","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> Ord for Descriptor<Pk>where\n Pk: Ord + MiniscriptKey,
§fn cmp(&self, other: &Descriptor<Pk>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere\n Self: Sized,
Compares and returns the maximum of two values. Read more","Ord","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> PartialEq for Descriptor<Pk>where\n Pk: PartialEq + MiniscriptKey,
","PartialEq","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> PartialOrd for Descriptor<Pk>where\n Pk: PartialOrd + MiniscriptKey,
","PartialOrd","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<'de, Pk> Serialize for Descriptor<Pk>where\n Pk: MiniscriptKey,
§fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where\n S: Serializer,
Serialize this value into the given Serde serializer. Read more","Serialize","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<P, Q> TranslatePk<P, Q> for Descriptor<P>where\n P: MiniscriptKey,\n Q: MiniscriptKey,
§fn translate_pk<T, E>(\n &self,\n t: &mut T,\n) -> Result<<Descriptor<P> as TranslatePk<P, Q>>::Output, TranslateErr<E>>where\n T: Translator<P, Q, E>,
Converts a descriptor using abstract keys to one using specific keys.
\n§type Output = Descriptor<Q>
The associated output type. This must be Self<Q>.","TranslatePk","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> Eq for Descriptor<Pk>where\n Pk: Eq + MiniscriptKey,
","Eq","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"],["§impl<Pk> StructuralPartialEq for Descriptor<Pk>where\n Pk: MiniscriptKey,
","StructuralPartialEq","bdk_wallet::descriptor::ExtendedDescriptor","bdk_wallet::descriptor::DerivedDescriptor"]]]]);
if (window.register_type_impls) {
window.register_type_impls(type_impls);
} else {
window.pending_type_impls = type_impls;
}
})()
-//{"start":55,"fragment_lengths":[94101]}
\ No newline at end of file
+//{"start":55,"fragment_lengths":[93403]}
\ No newline at end of file
--
2.49.0