From: github-actions Date: Fri, 1 Sep 2023 07:50:04 +0000 (+0000) Subject: Publish autogenerated nightly docs X-Git-Url: http://internal-gitweb-vhost/script/%22https:/enum.AnyDatabaseConfig.html?a=commitdiff_plain;h=38fd1157576fe7bedf5a6cdce5dda5ccee49f64d;p=bitcoindevkit.org Publish autogenerated nightly docs --- diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/enum.Descriptor.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/enum.Descriptor.html index 534abbcc29..d33358a86b 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/enum.Descriptor.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/enum.Descriptor.html @@ -169,8 +169,8 @@ default(0x02) y-coordinate.

assert_eq!(result.to_string(), "tr(03cc8a4bc64d897bddc5fbc2f670f7a8ba0b386779106cf1223c6fc5d7cd6fc115)#6qm9h8ym");
Errors

This function will return an error if hardened derivation is attempted.

-

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the minimum value (in satoshis) at which an output is broadcastable. -Panics if the descriptor wildcard is hardened. Read more
Deserialize this value from the given Serde deserializer. Read more
Formats the value using the given formatter. Read more
Extract the spending policy
Run a predicate on every key in the descriptor, returning whether +

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the minimum value (in satoshis) at which an output is broadcastable. +Panics if the descriptor wildcard is hardened. Read more
Deserialize this value from the given Serde deserializer. Read more
Formats the value using the given formatter. Read more
Extract the spending policy
Run a predicate on every key in the descriptor, returning whether the predicate returned true for every key Read more
Run a predicate on every key in the descriptor, returning whether the predicate returned true for any key Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
The associated error which can be returned from parsing.
Parses a string s to return a value of this type. Read more

Parse an expression tree into a descriptor.

Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
Convert the object into an abstract policy
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/index.html index 1f272096bf..1765a29788 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/index.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/index.html @@ -166,4 +166,4 @@ Right now this is Re-exports
pub extern crate bitcoin;
pub extern crate miniscript;
pub use descriptor::template;
pub use descriptor::HdKeyPaths;
pub use wallet::signer;
pub use wallet::signer::SignOptions;
pub use wallet::tx_builder::TxBuilder;
pub use wallet::Wallet;
pub use bdk_chain as chain;

Modules

Descriptors
Key formats
Additional functions on the rust-bitcoin PartiallySignedTransaction structure.
Wallet

Macros

Macro to write full descriptors with code
Macro to write descriptor fragments with code

Structs

Fee rate
An unspent output owned by a Wallet.
A Utxo with its satisfaction_weight.

Enums

Errors that can be thrown by the Wallet
Types of keychains
An unspent transaction output (UTXO).

Traits

Trait implemented by types that can be used to measure weight units.

Functions

Get the version of BDK at runtime
\ No newline at end of file +

Re-exports

pub extern crate bitcoin;
pub extern crate miniscript;
pub use descriptor::template;
pub use descriptor::HdKeyPaths;
pub use wallet::signer;
pub use wallet::signer::SignOptions;
pub use wallet::tx_builder::TxBuilder;
pub use wallet::Wallet;
pub use bdk_chain as chain;

Modules

Descriptors
Key formats
Additional functions on the rust-bitcoin PartiallySignedTransaction structure.
Wallet

Macros

Macro to write full descriptors with code
Macro to write descriptor fragments with code

Structs

Fee rate
An unspent output owned by a Wallet.
A Utxo with its satisfaction_weight.

Enums

Errors that can be thrown by the Wallet
Types of keychains
An unspent transaction output (UTXO).

Traits

Trait implemented by types that can be used to measure weight units.

Functions

Get the version of BDK at runtime
\ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/struct.LocalUtxo.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/struct.LocalUtxo.html index c5119050cf..f47065de99 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/struct.LocalUtxo.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/struct.LocalUtxo.html @@ -5,14 +5,14 @@ pub keychain: KeychainKind, pub is_spent: bool, pub derivation_index: u32, - pub confirmation_time: ConfirmationTime, + pub confirmation_time: ConfirmationTime, }
Expand description

An unspent output owned by a Wallet.

Fields§

§outpoint: OutPoint

Reference to a transaction output

§txout: TxOut

Transaction output

§keychain: KeychainKind

Type of keychain

§is_spent: bool

Whether this UTXO is spent or not

§derivation_index: u32

The derivation index for the script pubkey in the wallet

-
§confirmation_time: ConfirmationTime

The confirmation time for transaction containing this utxo

+
§confirmation_time: ConfirmationTime

The confirmation time for transaction containing this utxo

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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 f88c2edf07..fca3b9b2ad 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,5 +1,5 @@ Balance in bdk::wallet - Rust

Struct bdk::wallet::Balance

pub struct Balance {
+                    logo

Balance

Struct bdk::wallet::Balance

source ·
pub struct Balance {
     pub immature: u64,
     pub trusted_pending: u64,
     pub untrusted_pending: u64,
@@ -9,13 +9,13 @@
 
§trusted_pending: u64

Unconfirmed UTXOs generated by a wallet tx

§untrusted_pending: u64

Unconfirmed UTXOs received from an external wallet

§confirmed: u64

Confirmed and immediately spendable balance

-

Implementations§

Get sum of trusted_pending and confirmed coins.

+

Implementations§

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.

-

Get the whole balance visible to the wallet.

-

Trait Implementations§

The resulting type after applying the + operator.
Performs the + operation. Read more
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used +

Get the whole balance visible to the wallet.

+

Trait Implementations§

The resulting type after applying the + operator.
Performs the + operation. Read more
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/struct.Wallet.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/struct.Wallet.html index 66d461f985..964962ac6a 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 @@ -7,14 +7,14 @@ Its main components are:

  • signers that can contribute signatures to addresses instantiated from the descriptors.
  • Implementations§

    Creates a wallet that does not persist data.

    -

    Create a wallet from a descriptor (and an optional change_descriptor) and load related +

    Create a wallet from a descriptor (and an optional change_descriptor) and load related transaction data from db.

    Get the Bitcoin network the wallet is using.

    Iterator over all keychains in this wallet

    -

    Return a derived address using the external descriptor, see AddressIndex for +

    Return a derived address using the external descriptor, see AddressIndex for available address index selection strategies. If none of the keys in the descriptor are derivable (i.e. does not end with /*) then the same address will always be returned for any AddressIndex.

    -

    Return a derived address using the internal (change) descriptor.

    +

    Return a derived address using the internal (change) descriptor.

    If the wallet doesn’t have an internal descriptor it will use the external descriptor.

    see AddressIndex for available address index selection strategies. If none of the keys in the descriptor are derivable (i.e. does not end with /*) then the same address will always @@ -23,8 +23,8 @@ be returned for any

    Finds how the wallet derived the script pubkey spk.

    Will only return Some(_) if the wallet has given out the spk.

    Return the list of unspent outputs of this wallet

    -

    Get all the checkpoints the wallet is currently storing indexed by height.

    -

    Returns the latest checkpoint.

    +

    Get all the checkpoints the wallet is currently storing indexed by height.

    +

    Returns the latest checkpoint.

    Returns a iterators of all the script pubkeys for the Internal and Externalvariants inKeychainKind`.

    This is inteded to be used when doing a full scan of your addresses (e.g. after restoring from seed words). You pass the BTreeMap of iterators to a blockchain data source (e.g. @@ -35,12 +35,12 @@ script pubkeys the wallet is storing internally).

    See spks_of_all_keychains for more documentation

    Returns the utxo owned by this wallet corresponding to outpoint if it exists in the wallet’s database.

    -

    Inserts a [TxOut] at [OutPoint] into the wallet’s transaction graph. +

    Inserts a [TxOut] at [OutPoint] into the wallet’s transaction graph. Any inserted TxOuts are not persisted until commit is called.

    This can be used to add a TxOut that the wallet doesn’t own but is used as an input to a [Transaction] passed to the calculate_fee or calculate_fee_rate functions.

    Only insert TxOuts you trust the values for!

    -

    Calculates the fee of a given transaction. Returns 0 if tx is a coinbase transaction.

    +

    Calculates the fee of a given transaction. Returns 0 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.

    @@ -50,7 +50,7 @@ manually insert the TxOut(s) into the tx graph using the
    let tx = &psbt.clone().extract_tx();
     let fee = wallet.calculate_fee(tx).expect("fee");
    -

    Calculate the FeeRate for a given transaction.

    +

    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.

    @@ -71,12 +71,12 @@ so it will be correct even if it has not been scanned.

    let tx = &psbt.clone().extract_tx();
     let (sent, received) = wallet.sent_and_received(tx);
    -

    Get a single transaction from the wallet as a [CanonicalTx] (if the transaction exists).

    +

    Get a single transaction from the wallet as a CanonicalTx (if the transaction exists).

    CanonicalTx 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.
    • @@ -109,11 +109,11 @@ the transaction was last seen in the mempool is provided. last_seen, ), }
    -

    Add a new checkpoint to the wallet’s internal view of the chain. +

    Add a new checkpoint to the wallet’s internal view of the chain. This stages but does not commit the change.

    Returns whether anything changed with the insertion (e.g. false if checkpoint was already there).

    -

    Add a transaction to the wallet’s internal view of the chain. This stages but does not +

    Add a transaction to the wallet’s internal view of the chain. This stages but does not commit the change.

    Returns whether anything changed with the transaction insertion (e.g. false if the transaction was already inserted at the same position).

    @@ -123,7 +123,7 @@ inserting new transactions.

    WARNING: If position is confirmed, we anchor the tx to a the lowest checkpoint that is >= the position’s height. The caller is responsible for ensuring the tx exists in our local view of the best chain’s history.

    -

    Iterate over the transactions in the wallet.

    +

    Iterate over the transactions in the wallet.

    Return the balance, separated into available, trusted-pending, untrusted-pending and immature values.

    Add an external signer

    @@ -207,17 +207,17 @@ Otherwise, it will return the index of the highest address it has derived.

    get the corresponding PSBT Input for a LocalUtxo

    Return the checksum of the public descriptor associated to keychain

    Internally calls Self::get_descriptor_for_keychain to fetch the right descriptor

    -

    Applies an update to the wallet and stages the changes (but does not commit them).

    +

    Applies an update to the wallet and stages the changes (but does not commit them).

    Usually you create an update by interacting with some blockchain data source and inserting transactions related to your wallet into it.

    -

    Commits all currently staged changed to the persistence backend returning and error when +

    Commits all currently staged changed to the persistence backend returning and error when this fails.

    This returns whether the update resulted in any changes.

    -

    Returns the changes that will be staged with the next call to commit.

    -

    Get a reference to the inner [TxGraph].

    -

    Get a reference to the inner [KeychainTxOutIndex].

    -

    Get a reference to the inner [LocalChain].

    -

    Trait Implementations§

    Converts this type into a shared reference of the (usually inferred) input type.
    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Gets the TypeId of self. Read more
    Immutably borrows from an owned value. Read more
    Mutably borrows from an owned value. Read more

    Returns the argument unchanged.

    +

    Returns the changes that will be staged with the next call to commit.

    +

    Get a reference to the inner TxGraph.

    +

    Get a reference to the inner KeychainTxOutIndex.

    +

    Get a reference to the inner LocalChain.

    +

    Trait Implementations§

    Converts this type into a shared reference of the (usually inferred) input type.
    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Gets the TypeId of self. Read more
    Immutably borrows from an owned value. Read more
    Mutably borrows from an owned value. Read more

    Returns the argument unchanged.

    Calls U::from(self).

    That is, this conversion is whatever the implementation of From<T> for U chooses to do.

    diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/tx_builder/struct.TxBuilder.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/tx_builder/struct.TxBuilder.html index 721a9cf3c0..3433aa2a4f 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/tx_builder/struct.TxBuilder.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/tx_builder/struct.TxBuilder.html @@ -164,7 +164,7 @@ BitBox and ColdCard are known to require this.

    Choose the coin selection algorithm

    Overrides the DefaultCoinSelectionAlgorithm.

    Note that this function consumes the builder and returns it so it is usually best to put this as the first call on the builder.

    -

    Finish building the transaction.

    +

    Finish building the transaction.

    Returns the BIP174 “PSBT” and summary details about the transaction.

    Enable signaling RBF

    This will use the default nSequence value of 0xFFFFFFFD.

    diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/type.ChangeSet.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/type.ChangeSet.html index 48cd94d27f..32571f1f38 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/type.ChangeSet.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/type.ChangeSet.html @@ -1,3 +1,3 @@ ChangeSet in bdk::wallet - Rust

    Type Definition bdk::wallet::ChangeSet

    source ·
    pub type ChangeSet = WalletChangeSet<KeychainKind, ConfirmationTimeAnchor>;
    Expand description

    The changeset produced internally by Wallet when mutated.

    + logo

    ChangeSet

    Type Definition bdk::wallet::ChangeSet

    source ·
    Expand description

    The changeset produced internally by Wallet when mutated.

    \ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/type.Update.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/type.Update.html index fa70cc01e7..54fc3c7f2b 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/type.Update.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/type.Update.html @@ -1,3 +1,3 @@ Update in bdk::wallet - Rust

    Type Definition bdk::wallet::Update

    source ·
    pub type Update = WalletUpdate<KeychainKind, ConfirmationTimeAnchor>;
    Expand description

    The update to a Wallet used in Wallet::apply_update. This is usually returned from blockchain data sources.

    + logo

    Update

    Type Definition bdk::wallet::Update

    source ·
    Expand description

    The update to a Wallet used in Wallet::apply_update. This is usually returned from blockchain data sources.

    \ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/struct.SpkIterator.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/struct.SpkIterator.html index 305ab0c4b3..3d0021c063 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/struct.SpkIterator.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_chain/struct.SpkIterator.html @@ -9,8 +9,8 @@ when using their default implementations.

    let mut spk_iter = SpkIterator::new(&descriptor); assert_eq!(spk_iter.next(), Some((0, external_spk_0))); assert_eq!(spk_iter.next(), None);
    -

    Implementations§

    Creates a new script pubkey iterator starting at 0 from a descriptor.

    -

    Trait Implementations§

    Returns a copy of the value. Read more
    Performs copy-assignment from source. Read more
    The type of the elements being iterated over.
    Advances the iterator and returns the next value. Read more
    Returns the nth element of the iterator. Read more
    🔬This is a nightly-only experimental API. (iter_next_chunk)
    Advances the iterator and returns an array containing the next N values. Read more
    Returns the bounds on the remaining length of the iterator. Read more
    Consumes the iterator, counting the number of iterations and returning it. Read more
    Consumes the iterator, returning the last element. Read more
    🔬This is a nightly-only experimental API. (iter_advance_by)
    Advances the iterator by n elements. Read more
    Creates an iterator starting at the same point, but stepping by +

    Implementations§

    Creates a new script pubkey iterator starting at 0 from a descriptor.

    +

    Trait Implementations§

    Returns a copy of the value. Read more
    Performs copy-assignment from source. Read more
    The type of the elements being iterated over.
    Advances the iterator and returns the next value. Read more
    Returns the nth element of the iterator. Read more
    🔬This is a nightly-only experimental API. (iter_next_chunk)
    Advances the iterator and returns an array containing the next N values. Read more
    Returns the bounds on the remaining length of the iterator. Read more
    Consumes the iterator, counting the number of iterations and returning it. Read more
    Consumes the iterator, returning the last element. Read more
    🔬This is a nightly-only experimental API. (iter_advance_by)
    Advances the iterator by n elements. Read more
    Creates an iterator starting at the same point, but stepping by the given amount at each iteration. Read more
    Takes two iterators and creates a new iterator over both in sequence. Read more
    ‘Zips up’ two iterators into a single iterator of pairs. Read more
    🔬This is a nightly-only experimental API. (iter_intersperse)
    Creates a new iterator which places an item generated by separator between adjacent items of the original iterator. Read more
    Takes a closure and creates an iterator which calls that closure on each element. Read more
    Calls a closure on each element of an iterator. Read more
    Creates an iterator which uses a closure to determine if an element diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_electrum/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_electrum/index.html index 033b106809..008172a2a2 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_electrum/index.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_electrum/index.html @@ -1,4 +1,4 @@ -bdk_electrum - Rust

    Crate bdk_electrum

    source ·
    Expand description

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

    +bdk_electrum - Rust

    Crate bdk_electrum

    source ·
    Expand description

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

    The star of the show is the ElectrumExt::scan method, which scans for relevant blockchain data (via electrum) and outputs an ElectrumUpdate.

    An ElectrumUpdate only includes txids and no full transactions. The caller is responsible @@ -15,4 +15,4 @@ these steps:

    Refer to bdk_electrum_example for a complete example.

    -

    Re-exports

    pub use bdk_chain;
    pub use electrum_client;

    Structs

    Represents an update fetched from an Electrum server, but excludes full transactions.

    Traits

    Trait to extend [Client] functionality.
    \ No newline at end of file +

    Re-exports

    pub use bdk_chain;
    pub use electrum_client;

    Structs

    Represents an update fetched from an Electrum server, but excludes full transactions.

    Traits

    Trait to extend [Client] functionality.
    \ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_electrum/struct.ElectrumUpdate.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_electrum/struct.ElectrumUpdate.html index 59af13fd61..c70fc88681 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_electrum/struct.ElectrumUpdate.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_electrum/struct.ElectrumUpdate.html @@ -1,20 +1,20 @@ ElectrumUpdate in bdk_electrum - Rust
    pub struct ElectrumUpdate<K, A> {
         pub graph_update: HashMap<Txid, BTreeSet<A>>,
    -    pub new_tip: CheckPoint,
    +    pub new_tip: CheckPoint,
         pub keychain_update: BTreeMap<K, u32>,
     }
    Expand description

    Represents an update fetched from an Electrum server, but excludes full transactions.

    -

    To provide a complete update to [TxGraph], you’ll need to call Self::missing_full_txs to -determine the full transactions missing from [TxGraph]. Then call Self::finalize to fetch +

    To provide a complete update to TxGraph, you’ll need to call Self::missing_full_txs to +determine the full transactions missing from TxGraph. Then call Self::finalize to fetch the full transactions from Electrum and finalize the update.

    -

    Fields§

    §graph_update: HashMap<Txid, BTreeSet<A>>

    Map of [Txid]s to associated [Anchor]s.

    -
    §new_tip: CheckPoint

    The latest chain tip, as seen by the Electrum server.

    -
    §keychain_update: BTreeMap<K, u32>

    Last-used index update for KeychainTxOutIndex.

    -

    Implementations§

    Determine the full transactions that are missing from graph.

    +

    Fields§

    §graph_update: HashMap<Txid, BTreeSet<A>>

    Map of [Txid]s to associated Anchors.

    +
    §new_tip: CheckPoint

    The latest chain tip, as seen by the Electrum server.

    +
    §keychain_update: BTreeMap<K, u32>

    Last-used index update for KeychainTxOutIndex.

    +

    Implementations§

    Determine the full transactions that are missing from graph.

    Refer to ElectrumUpdate.

    -

    Finalizes update with missing txids to fetch from client.

    +

    Finalizes update with missing txids to fetch from client.

    Refer to ElectrumUpdate.

    -

    Finalizes the ElectrumUpdate with new_txs and anchors of type -[ConfirmationTimeAnchor].

    +

    Finalizes the ElectrumUpdate with new_txs and anchors of type +ConfirmationTimeAnchor.

    Note: The confirmation time might not be precisely correct if there has been a reorg. Electrum’s API intends that we use the merkle proof API, we should change bdk_electrum to use it.

    diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_electrum/trait.ElectrumExt.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_electrum/trait.ElectrumExt.html index 7142fbc965..0fbe07ae31 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_electrum/trait.ElectrumExt.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_electrum/trait.ElectrumExt.html @@ -1,18 +1,18 @@ ElectrumExt in bdk_electrum - Rust
    pub trait ElectrumExt<A> {
    -    fn scan<K: Ord + Clone>(
            &self,
            prev_tip: Option<CheckPoint>,
            keychain_spks: BTreeMap<K, impl IntoIterator<Item = (u32, ScriptBuf)>>,
            txids: impl IntoIterator<Item = Txid>,
            outpoints: impl IntoIterator<Item = OutPoint>,
            stop_gap: usize,
            batch_size: usize
        ) -> Result<ElectrumUpdate<K, A>, Error>; + fn scan<K: Ord + Clone>(
            &self,
            prev_tip: Option<CheckPoint>,
            keychain_spks: BTreeMap<K, impl IntoIterator<Item = (u32, ScriptBuf)>>,
            txids: impl IntoIterator<Item = Txid>,
            outpoints: impl IntoIterator<Item = OutPoint>,
            stop_gap: usize,
            batch_size: usize
        ) -> Result<ElectrumUpdate<K, A>, Error>; - fn scan_without_keychain(
            &self,
            prev_tip: Option<CheckPoint>,
            misc_spks: impl IntoIterator<Item = ScriptBuf>,
            txids: impl IntoIterator<Item = Txid>,
            outpoints: impl IntoIterator<Item = OutPoint>,
            batch_size: usize
        ) -> Result<ElectrumUpdate<(), A>, Error> { ... } + fn scan_without_keychain(
            &self,
            prev_tip: Option<CheckPoint>,
            misc_spks: impl IntoIterator<Item = ScriptBuf>,
            txids: impl IntoIterator<Item = Txid>,
            outpoints: impl IntoIterator<Item = OutPoint>,
            batch_size: usize
        ) -> Result<ElectrumUpdate<(), A>, Error> { ... } }
    Expand description

    Trait to extend [Client] functionality.

    -

    Required Methods§

    Scan the blockchain (via electrum) for the data specified and returns a ElectrumUpdate.

    +

    Required Methods§

    Scan the blockchain (via electrum) for the data specified and returns a ElectrumUpdate.

    • prev_tip: the most recent blockchain tip present locally
    • keychain_spks: keychains that we want to scan transactions for
    • -
    • txids: transactions for which we want updated [Anchor]s
    • +
    • txids: transactions for which we want updated Anchors
    • outpoints: transactions associated with these outpoints (residing, spending) that we want to included in the update

    The scan for each keychain stops after a gap of stop_gap script pubkeys with no associated transactions. batch_size specifies the max number of script pubkeys to request for in a single batch request.

    -

    Provided Methods§

    Convenience method to call scan without requiring a keychain.

    -

    Implementations on Foreign Types§

    Implementors§

    \ No newline at end of file +

    Provided Methods§

    Convenience method to call scan without requiring a keychain.

    +

    Implementations on Foreign Types§

    Implementors§

    \ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_esplora/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_esplora/index.html index ab1dd0fb13..4ae9e734f6 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_esplora/index.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_esplora/index.html @@ -1,5 +1,5 @@ bdk_esplora - Rust

    Crate bdk_esplora

    source ·
    Expand description

    BDK Esplora

    -

    BDK Esplora extends esplora_client to update [bdk_chain] structures +

    BDK Esplora extends esplora_client to update bdk_chain structures from an Esplora server.

    Usage

    There are two versions of the extension trait (blocking and async).

    diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_esplora/trait.EsploraAsyncExt.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_esplora/trait.EsploraAsyncExt.html index 0218d90018..18af7682e2 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_esplora/trait.EsploraAsyncExt.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_esplora/trait.EsploraAsyncExt.html @@ -1,27 +1,27 @@ EsploraAsyncExt in bdk_esplora - Rust
    pub trait EsploraAsyncExt {
    -    fn update_local_chain<'life0, 'async_trait>(
            &'life0 self,
            local_tip: Option<CheckPoint>,
            request_heights: impl 'async_trait + IntoIterator<IntoIter = impl 'async_trait + Iterator<Item = u32> + Send> + Send
        ) -> Pin<Box<dyn Future<Output = Result<Update, Error>> + Send + 'async_trait>>
        where
            Self: 'async_trait,
            'life0: 'async_trait
    ; - fn update_tx_graph<'life0, 'async_trait, K>(
            &'life0 self,
            keychain_spks: BTreeMap<K, impl 'async_trait + IntoIterator<IntoIter = impl 'async_trait + Iterator<Item = (u32, ScriptBuf)> + Send> + Send>,
            txids: impl 'async_trait + IntoIterator<IntoIter = impl 'async_trait + Iterator<Item = Txid> + Send> + Send,
            outpoints: impl 'async_trait + IntoIterator<IntoIter = impl 'async_trait + Iterator<Item = OutPoint> + Send> + Send,
            stop_gap: usize,
            parallel_requests: usize
        ) -> Pin<Box<dyn Future<Output = Result<(TxGraph<ConfirmationTimeAnchor>, BTreeMap<K, u32>), Error>> + Send + 'async_trait>>
        where
            K: 'async_trait + Ord + Clone + Send,
            Self: 'async_trait,
            'life0: 'async_trait
    ; + fn update_local_chain<'life0, 'async_trait>(
            &'life0 self,
            local_tip: Option<CheckPoint>,
            request_heights: impl 'async_trait + IntoIterator<IntoIter = impl 'async_trait + Iterator<Item = u32> + Send> + Send
        ) -> Pin<Box<dyn Future<Output = Result<Update, Error>> + Send + 'async_trait>>
        where
            Self: 'async_trait,
            'life0: 'async_trait
    ; + fn update_tx_graph<'life0, 'async_trait, K>(
            &'life0 self,
            keychain_spks: BTreeMap<K, impl 'async_trait + IntoIterator<IntoIter = impl 'async_trait + Iterator<Item = (u32, ScriptBuf)> + Send> + Send>,
            txids: impl 'async_trait + IntoIterator<IntoIter = impl 'async_trait + Iterator<Item = Txid> + Send> + Send,
            outpoints: impl 'async_trait + IntoIterator<IntoIter = impl 'async_trait + Iterator<Item = OutPoint> + Send> + Send,
            stop_gap: usize,
            parallel_requests: usize
        ) -> Pin<Box<dyn Future<Output = Result<(TxGraph<ConfirmationTimeAnchor>, BTreeMap<K, u32>), Error>> + Send + 'async_trait>>
        where
            K: 'async_trait + Ord + Clone + Send,
            Self: 'async_trait,
            'life0: 'async_trait
    ; - fn update_tx_graph_without_keychain<'life0, 'async_trait>(
            &'life0 self,
            misc_spks: impl 'async_trait + IntoIterator<IntoIter = impl 'async_trait + Iterator<Item = ScriptBuf> + Send> + Send,
            txids: impl 'async_trait + IntoIterator<IntoIter = impl 'async_trait + Iterator<Item = Txid> + Send> + Send,
            outpoints: impl 'async_trait + IntoIterator<IntoIter = impl 'async_trait + Iterator<Item = OutPoint> + Send> + Send,
            parallel_requests: usize
        ) -> Pin<Box<dyn Future<Output = Result<TxGraph<ConfirmationTimeAnchor>, Error>> + Send + 'async_trait>>
        where
            Self: Sync + 'async_trait,
            'life0: 'async_trait
    , + fn update_tx_graph_without_keychain<'life0, 'async_trait>(
            &'life0 self,
            misc_spks: impl 'async_trait + IntoIterator<IntoIter = impl 'async_trait + Iterator<Item = ScriptBuf> + Send> + Send,
            txids: impl 'async_trait + IntoIterator<IntoIter = impl 'async_trait + Iterator<Item = Txid> + Send> + Send,
            outpoints: impl 'async_trait + IntoIterator<IntoIter = impl 'async_trait + Iterator<Item = OutPoint> + Send> + Send,
            parallel_requests: usize
        ) -> Pin<Box<dyn Future<Output = Result<TxGraph<ConfirmationTimeAnchor>, Error>> + Send + 'async_trait>>
        where
            Self: Sync + 'async_trait,
            'life0: 'async_trait
    , { ... } }
    Expand description

    Trait to extend the functionality of [esplora_client::AsyncClient].

    Refer to crate-level documentation for more.

    -

    Required Methods§

    Prepare an LocalChain update with blocks fetched from Esplora.

    +

    Required Methods§

    Prepare an LocalChain update with blocks fetched from Esplora.

      -
    • prev_tip is the previous tip of LocalChain::tip.
    • +
    • prev_tip is the previous tip of LocalChain::tip.
    • get_heights is the block heights that we are interested in fetching from Esplora.
    -

    The result of this method can be applied to LocalChain::apply_update.

    -

    Scan Esplora for the data specified and return a [TxGraph] and a map of last active +

    The result of this method can be applied to LocalChain::apply_update.

    +

    Scan Esplora for the data specified and return a TxGraph and a map of last active indices.

    • keychain_spks: keychains that we want to scan transactions for
    • -
    • txids: transactions for which we want updated [ConfirmationTimeAnchor]s
    • +
    • txids: transactions for which we want updated ConfirmationTimeAnchors
    • outpoints: transactions associated with these outpoints (residing, spending) that we want to include in the update

    The scan for each keychain stops after a gap of stop_gap script pubkeys with no associated transactions. parallel_requests specifies the max number of HTTP requests to make in parallel.

    -

    Provided Methods§

    Convenience method to call update_tx_graph without requiring a keychain.

    -

    Implementations on Foreign Types§

    Implementors§

    \ No newline at end of file +

    Provided Methods§

    Convenience method to call update_tx_graph without requiring a keychain.

    +

    Implementations on Foreign Types§

    Implementors§

    \ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_esplora/trait.EsploraExt.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_esplora/trait.EsploraExt.html index 194be410cf..2205548e53 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_esplora/trait.EsploraExt.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_esplora/trait.EsploraExt.html @@ -1,26 +1,26 @@ EsploraExt in bdk_esplora - Rust

    Trait bdk_esplora::EsploraExt

    source ·
    pub trait EsploraExt {
    -    fn update_local_chain(
            &self,
            local_tip: Option<CheckPoint>,
            request_heights: impl IntoIterator<Item = u32>
        ) -> Result<Update, Error>; - fn update_tx_graph<K: Ord + Clone>(
            &self,
            keychain_spks: BTreeMap<K, impl IntoIterator<Item = (u32, ScriptBuf)>>,
            txids: impl IntoIterator<Item = Txid>,
            outpoints: impl IntoIterator<Item = OutPoint>,
            stop_gap: usize,
            parallel_requests: usize
        ) -> Result<(TxGraph<ConfirmationTimeAnchor>, BTreeMap<K, u32>), Error>; + fn update_local_chain(
            &self,
            local_tip: Option<CheckPoint>,
            request_heights: impl IntoIterator<Item = u32>
        ) -> Result<Update, Error>; + fn update_tx_graph<K: Ord + Clone>(
            &self,
            keychain_spks: BTreeMap<K, impl IntoIterator<Item = (u32, ScriptBuf)>>,
            txids: impl IntoIterator<Item = Txid>,
            outpoints: impl IntoIterator<Item = OutPoint>,
            stop_gap: usize,
            parallel_requests: usize
        ) -> Result<(TxGraph<ConfirmationTimeAnchor>, BTreeMap<K, u32>), Error>; - fn update_tx_graph_without_keychain(
            &self,
            misc_spks: impl IntoIterator<Item = ScriptBuf>,
            txids: impl IntoIterator<Item = Txid>,
            outpoints: impl IntoIterator<Item = OutPoint>,
            parallel_requests: usize
        ) -> Result<TxGraph<ConfirmationTimeAnchor>, Error> { ... } + fn update_tx_graph_without_keychain(
            &self,
            misc_spks: impl IntoIterator<Item = ScriptBuf>,
            txids: impl IntoIterator<Item = Txid>,
            outpoints: impl IntoIterator<Item = OutPoint>,
            parallel_requests: usize
        ) -> Result<TxGraph<ConfirmationTimeAnchor>, Error> { ... } }
    Expand description

    Trait to extend the functionality of [esplora_client::BlockingClient].

    Refer to crate-level documentation for more.

    -

    Required Methods§

    Prepare an LocalChain update with blocks fetched from Esplora.

    +

    Required Methods§

    Prepare an LocalChain update with blocks fetched from Esplora.

      -
    • prev_tip is the previous tip of LocalChain::tip.
    • +
    • prev_tip is the previous tip of LocalChain::tip.
    • get_heights is the block heights that we are interested in fetching from Esplora.
    -

    The result of this method can be applied to LocalChain::apply_update.

    -

    Scan Esplora for the data specified and return a [TxGraph] and a map of last active +

    The result of this method can be applied to LocalChain::apply_update.

    +

    Scan Esplora for the data specified and return a TxGraph and a map of last active indices.

    • keychain_spks: keychains that we want to scan transactions for
    • -
    • txids: transactions for which we want updated [ConfirmationTimeAnchor]s
    • +
    • txids: transactions for which we want updated ConfirmationTimeAnchors
    • outpoints: transactions associated with these outpoints (residing, spending) that we want to include in the update

    The scan for each keychain stops after a gap of stop_gap script pubkeys with no associated transactions. parallel_requests specifies the max number of HTTP requests to make in parallel.

    -

    Provided Methods§

    Convenience method to call update_tx_graph without requiring a keychain.

    -

    Implementations on Foreign Types§

    Implementors§

    \ No newline at end of file +

    Provided Methods§

    Convenience method to call update_tx_graph without requiring a keychain.

    +

    Implementations on Foreign Types§

    Implementors§

    \ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_file_store/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_file_store/index.html index de9ea6528c..a8ba16633d 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_file_store/index.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_file_store/index.html @@ -1,6 +1,6 @@ bdk_file_store - Rust

    Crate bdk_file_store

    source ·
    Expand description

    BDK File Store

    This is a simple append-only flat file implementation of -Persist.

    +Persist.

    The main structure is Store, which can be used with bdk’s Wallet to persist wallet data into a flat file.

    Structs

    Iterator over entries in a file store.
    Persists an append-only list of changesets (C) to a single file.

    Enums

    Error that occurs due to problems encountered with the file.
    Error type for EntryIter.
    \ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_file_store/struct.Store.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_file_store/struct.Store.html index 23efed5d9d..69715acd93 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_file_store/struct.Store.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk_file_store/struct.Store.html @@ -1,6 +1,6 @@ Store in bdk_file_store - Rust

    Struct bdk_file_store::Store

    source ·
    pub struct Store<'a, C> { /* private fields */ }
    Expand description

    Persists an append-only list of changesets (C) to a single file.

    The changesets are the results of altering a tracker implementation (T).

    -

    Implementations§

    Creates a new store from a File.

    +

    Implementations§

    Creates a new store from a File.

    The file must have been opened with read and write permissions.

    magic is the expected prefixed bytes of the file. If this does not match, an error will be returned.

    @@ -27,7 +27,7 @@ changeset will be written over the erroring entry (or the end of the file if non changeset.

    The truncation is to avoid the possibility of having a valid but inconsistent changeset directly after the appended changeset.

    -

    Trait Implementations§

    Formats the value using the given formatter. Read more
    The error the backend returns when it fails to write.
    The error the backend returns when it fails to load changesets C.
    Writes a changeset to the persistence backend. Read more
    Return the aggregate changeset C from persistence.

    Auto Trait Implementations§

    Blanket Implementations§

    Gets the TypeId of self. Read more
    Immutably borrows from an owned value. Read more
    Mutably borrows from an owned value. Read more

    Returns the argument unchanged.

    +

    Trait Implementations§

    Formats the value using the given formatter. Read more
    The error the backend returns when it fails to write.
    The error the backend returns when it fails to load changesets C.
    Writes a changeset to the persistence backend. Read more
    Return the aggregate changeset C from persistence.

    Auto Trait Implementations§

    Blanket Implementations§

    Gets the TypeId of self. Read more
    Immutably borrows from an owned value. Read more
    Mutably borrows from an owned value. Read more

    Returns the argument unchanged.

    Calls U::from(self).

    That is, this conversion is whatever the implementation of From<T> for U chooses to do.

    diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.create_tx.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.create_tx.html index e84d86839d..238cfb4444 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 +1 @@ -create_tx in example_cli - Rust

    Function example_cli::create_tx

    source ·
    pub fn create_tx<A: Anchor, O: ChainOracle>(
        graph: &mut KeychainTxGraph<A>,
        chain: &O,
        keymap: &HashMap<DescriptorPublicKey, DescriptorSecretKey>,
        cs_algorithm: CoinSelectionAlgo,
        address: Address,
        value: u64
    ) -> Result<(Transaction, Option<(ChangeSet<Keychain>, (Keychain, u32))>)>where
        O::Error: Error + Send + Sync + 'static,
    \ No newline at end of file +create_tx in example_cli - Rust

    Function example_cli::create_tx

    source ·
    pub fn create_tx<A: Anchor, O: ChainOracle>(
        graph: &mut KeychainTxGraph<A>,
        chain: &O,
        keymap: &HashMap<DescriptorPublicKey, DescriptorSecretKey>,
        cs_algorithm: CoinSelectionAlgo,
        address: Address,
        value: u64
    ) -> Result<(Transaction, Option<(ChangeSet<Keychain>, (Keychain, u32))>)>where
        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 e2265d3e99..fb0b627fdb 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 +1 @@ -handle_commands in example_cli - Rust

    Function example_cli::handle_commands

    source ·
    pub fn handle_commands<S: Subcommand, A: Anchor, O: ChainOracle, C>(
        graph: &Mutex<KeychainTxGraph<A>>,
        db: &Mutex<Database<'_, C>>,
        chain: &Mutex<O>,
        keymap: &HashMap<DescriptorPublicKey, DescriptorSecretKey>,
        network: Network,
        broadcast: impl FnOnce(&Transaction) -> Result<()>,
        cmd: Commands<S>
    ) -> Result<()>where
        O::Error: Error + Send + Sync + 'static,
        C: Default + Append + DeserializeOwned + Serialize + From<KeychainChangeSet<A>>,
    \ No newline at end of file +handle_commands in example_cli - Rust

    Function example_cli::handle_commands

    source ·
    pub fn handle_commands<S: Subcommand, A: Anchor, O: ChainOracle, C>(
        graph: &Mutex<KeychainTxGraph<A>>,
        db: &Mutex<Database<'_, C>>,
        chain: &Mutex<O>,
        keymap: &HashMap<DescriptorPublicKey, DescriptorSecretKey>,
        network: Network,
        broadcast: impl FnOnce(&Transaction) -> Result<()>,
        cmd: Commands<S>
    ) -> Result<()>where
        O::Error: Error + Send + Sync + 'static,
        C: Default + Append + DeserializeOwned + Serialize + From<KeychainChangeSet<A>>,
    \ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.init.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.init.html index 71e8465d38..0edd0ee9aa 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.init.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.init.html @@ -1 +1 @@ -init in example_cli - Rust

    Function example_cli::init

    source ·
    pub fn init<'m, S: Subcommand, C>(
        db_magic: &'m [u8],
        db_default_path: &str
    ) -> Result<(Args<S>, KeyMap, KeychainTxOutIndex<Keychain>, Mutex<Database<'m, C>>, C)>where
        C: Default + Append + Serialize + DeserializeOwned,
    \ No newline at end of file +init in example_cli - Rust

    Function example_cli::init

    source ·
    pub fn init<'m, S: Subcommand, C>(
        db_magic: &'m [u8],
        db_default_path: &str
    ) -> Result<(Args<S>, KeyMap, KeychainTxOutIndex<Keychain>, Mutex<Database<'m, C>>, C)>where
        C: Default + Append + Serialize + DeserializeOwned,
    \ No newline at end of file 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 06afd4e953..dfac074392 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 +1 @@ -planned_utxos in example_cli - Rust

    Function example_cli::planned_utxos

    source ·
    pub fn planned_utxos<A: Anchor, O: ChainOracle, K: Clone + CanDerive>(
        graph: &KeychainTxGraph<A>,
        chain: &O,
        assets: &Assets<K>
    ) -> Result<Vec<(Plan<K>, FullTxOut<A>)>, O::Error>
    \ No newline at end of file +planned_utxos in example_cli - Rust

    Function example_cli::planned_utxos

    source ·
    pub fn planned_utxos<A: Anchor, O: ChainOracle, K: Clone + CanDerive>(
        graph: &KeychainTxGraph<A>,
        chain: &O,
        assets: &Assets<K>
    ) -> Result<Vec<(Plan<K>, FullTxOut<A>)>, O::Error>
    \ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.run_address_cmd.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.run_address_cmd.html index f36138b793..45d12d18ea 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.run_address_cmd.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.run_address_cmd.html @@ -1 +1 @@ -run_address_cmd in example_cli - Rust

    Function example_cli::run_address_cmd

    source ·
    pub fn run_address_cmd<A, C>(
        graph: &mut KeychainTxGraph<A>,
        db: &Mutex<Database<'_, C>>,
        network: Network,
        cmd: AddressCmd
    ) -> Result<()>where
        C: Default + Append + DeserializeOwned + Serialize + From<KeychainChangeSet<A>>,
    \ No newline at end of file +run_address_cmd in example_cli - Rust

    Function example_cli::run_address_cmd

    source ·
    pub fn run_address_cmd<A, C>(
        graph: &mut KeychainTxGraph<A>,
        db: &Mutex<Database<'_, C>>,
        network: Network,
        cmd: AddressCmd
    ) -> Result<()>where
        C: Default + Append + DeserializeOwned + Serialize + From<KeychainChangeSet<A>>,
    \ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.run_balance_cmd.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.run_balance_cmd.html index 3b87bd3dce..6666f84432 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.run_balance_cmd.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.run_balance_cmd.html @@ -1 +1 @@ -run_balance_cmd in example_cli - Rust

    Function example_cli::run_balance_cmd

    source ·
    pub fn run_balance_cmd<A: Anchor, O: ChainOracle>(
        graph: &KeychainTxGraph<A>,
        chain: &O
    ) -> Result<(), O::Error>
    \ No newline at end of file +run_balance_cmd in example_cli - Rust

    Function example_cli::run_balance_cmd

    source ·
    pub fn run_balance_cmd<A: Anchor, O: ChainOracle>(
        graph: &KeychainTxGraph<A>,
        chain: &O
    ) -> Result<(), O::Error>
    \ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.run_send_cmd.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.run_send_cmd.html index 5db0d3354c..fb2cb5ec4f 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.run_send_cmd.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.run_send_cmd.html @@ -1 +1 @@ -run_send_cmd in example_cli - Rust

    Function example_cli::run_send_cmd

    source ·
    pub fn run_send_cmd<A: Anchor, O: ChainOracle, C>(
        graph: &Mutex<KeychainTxGraph<A>>,
        db: &Mutex<Database<'_, C>>,
        chain: &O,
        keymap: &HashMap<DescriptorPublicKey, DescriptorSecretKey>,
        cs_algorithm: CoinSelectionAlgo,
        address: Address,
        value: u64,
        broadcast: impl FnOnce(&Transaction) -> Result<()>
    ) -> Result<()>where
        O::Error: Error + Send + Sync + 'static,
        C: Default + Append + DeserializeOwned + Serialize + From<KeychainChangeSet<A>>,
    \ No newline at end of file +run_send_cmd in example_cli - Rust

    Function example_cli::run_send_cmd

    source ·
    pub fn run_send_cmd<A: Anchor, O: ChainOracle, C>(
        graph: &Mutex<KeychainTxGraph<A>>,
        db: &Mutex<Database<'_, C>>,
        chain: &O,
        keymap: &HashMap<DescriptorPublicKey, DescriptorSecretKey>,
        cs_algorithm: CoinSelectionAlgo,
        address: Address,
        value: u64,
        broadcast: impl FnOnce(&Transaction) -> Result<()>
    ) -> Result<()>where
        O::Error: Error + Send + Sync + 'static,
        C: Default + Append + DeserializeOwned + Serialize + From<KeychainChangeSet<A>>,
    \ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.run_txo_cmd.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.run_txo_cmd.html index d60a600abe..b9887a724b 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.run_txo_cmd.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/fn.run_txo_cmd.html @@ -1 +1 @@ -run_txo_cmd in example_cli - Rust

    Function example_cli::run_txo_cmd

    source ·
    pub fn run_txo_cmd<A: Anchor, O: ChainOracle>(
        graph: &KeychainTxGraph<A>,
        chain: &O,
        network: Network,
        cmd: TxOutCmd
    ) -> Result<()>where
        O::Error: Error + Send + Sync + 'static,
    \ No newline at end of file +run_txo_cmd in example_cli - Rust

    Function example_cli::run_txo_cmd

    source ·
    pub fn run_txo_cmd<A: Anchor, O: ChainOracle>(
        graph: &KeychainTxGraph<A>,
        chain: &O,
        network: Network,
        cmd: TxOutCmd
    ) -> Result<()>where
        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/type.Database.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/type.Database.html index 767fb63b45..674a7aad5b 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/type.Database.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/type.Database.html @@ -1 +1 @@ -Database in example_cli - Rust

    Type Definition example_cli::Database

    source ·
    pub type Database<'m, C> = Persist<Store<'m, C>, C>;
    \ No newline at end of file +Database in example_cli - Rust

    Type Definition example_cli::Database

    source ·
    pub type Database<'m, C> = Persist<Store<'m, C>, C>;
    \ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/type.KeychainChangeSet.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/type.KeychainChangeSet.html index 13128b405a..01dfa5d48b 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/type.KeychainChangeSet.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_cli/type.KeychainChangeSet.html @@ -1 +1 @@ -KeychainChangeSet in example_cli - Rust

    Type Definition example_cli::KeychainChangeSet

    source ·
    pub type KeychainChangeSet<A> = ChangeSet<A, ChangeSet<Keychain>>;
    \ No newline at end of file +KeychainChangeSet in example_cli - Rust

    Type Definition example_cli::KeychainChangeSet

    source ·
    pub type KeychainChangeSet<A> = ChangeSet<A, ChangeSet<Keychain>>;
    \ No newline at end of file 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 71f5898a9b..16ce84c487 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 +1 @@ -KeychainTxGraph in example_cli - Rust

    Type Definition example_cli::KeychainTxGraph

    source ·
    pub type KeychainTxGraph<A> = IndexedTxGraph<A, KeychainTxOutIndex<Keychain>>;
    \ No newline at end of file +KeychainTxGraph in example_cli - Rust

    Type Definition example_cli::KeychainTxGraph

    source ·
    pub type KeychainTxGraph<A> = IndexedTxGraph<A, KeychainTxOutIndex<Keychain>>;
    \ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_electrum/type.ChangeSet.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_electrum/type.ChangeSet.html index 6805f437ea..26fee61cc8 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_electrum/type.ChangeSet.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/example_electrum/type.ChangeSet.html @@ -1 +1 @@ -ChangeSet in example_electrum - Rust

    Type Definition example_electrum::ChangeSet

    source ·
    pub(crate) type ChangeSet = WalletChangeSet<Keychain, ConfirmationHeightAnchor>;
    \ No newline at end of file +ChangeSet in example_electrum - Rust

    Type Definition example_electrum::ChangeSet

    source ·
    pub(crate) type ChangeSet = WalletChangeSet<Keychain, ConfirmationHeightAnchor>;
    \ 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 8659dfcc0d..a3d7f86a29 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 @@ -Rustdoc help

    Rustdoc help

    Back
    \ No newline at end of file +Rustdoc help

    Rustdoc help

    Back
    \ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/implementors/bdk_chain/persist/trait.PersistBackend.js b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/implementors/bdk_chain/persist/trait.PersistBackend.js index 16f523c3b8..8ca56e88b1 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/implementors/bdk_chain/persist/trait.PersistBackend.js +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/implementors/bdk_chain/persist/trait.PersistBackend.js @@ -1,4 +1,4 @@ (function() {var implementors = { "bdk_chain":[], -"bdk_file_store":[["impl<'a, C> PersistBackend<C> for Store<'a, C>where
        C: Default + Append + Serialize + DeserializeOwned,
    "]] +"bdk_file_store":[["impl<'a, C> PersistBackend<C> for Store<'a, C>where
        C: Default + Append + Serialize + DeserializeOwned,
    "]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/implementors/core/convert/trait.AsRef.js b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/implementors/core/convert/trait.AsRef.js index 4f5166c566..e2eb65d73a 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/implementors/core/convert/trait.AsRef.js +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/implementors/core/convert/trait.AsRef.js @@ -1,4 +1,4 @@ (function() {var implementors = { -"bdk":[["impl AsRef<[u8]> for KeychainKind"],["impl<D> AsRef<TxGraph<ConfirmationTimeAnchor>> for Wallet<D>"]], +"bdk":[["impl AsRef<[u8]> for KeychainKind"],["impl<D> AsRef<TxGraph<ConfirmationTimeAnchor>> for Wallet<D>"]], "bdk_chain":[["impl<K> AsRef<BTreeMap<K, u32, Global>> for ChangeSet<K>"],["impl<A> AsRef<TxGraph<A>> for TxGraph<A>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ 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 84a9af5c58..f950d574b1 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 @@ -Rustdoc settings

    Rustdoc settings

    Back
    \ No newline at end of file +Rustdoc settings

    Rustdoc settings

    Back
    \ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk_chain/spk_iter.rs.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk_chain/spk_iter.rs.html index f1bc703af2..e09d37191a 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk_chain/spk_iter.rs.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk_chain/spk_iter.rs.html @@ -212,6 +212,54 @@ 212 213 214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262
    use crate::{
         bitcoin::{secp256k1::Secp256k1, ScriptBuf},
         miniscript::{Descriptor, DescriptorPublicKey},
    @@ -259,34 +307,43 @@
     {
         /// Creates a new script pubkey iterator starting at 0 from a descriptor.
         pub fn new(descriptor: D) -> Self {
    -        let end = if descriptor.borrow().has_wildcard() {
    -            BIP32_MAX_INDEX
    -        } else {
    -            0
    -        };
    -
    -        SpkIterator::new_with_range(descriptor, 0..=end)
    +        SpkIterator::new_with_range(descriptor, 0..=BIP32_MAX_INDEX)
         }
     
         // Creates a new script pubkey iterator from a descriptor with a given range.
    +    // If the descriptor doesn't have a wildcard, we shorten whichever range you pass in
    +    // to have length <= 1. This means that if you pass in 0..0 or 0..1 the range will
    +    // remain the same, but if you pass in 0..10, we'll shorten it to 0..1
    +    // Also note that if the descriptor doesn't have a wildcard, passing in a range starting
    +    // from n > 0, will return an empty iterator.
         pub(crate) fn new_with_range<R>(descriptor: D, range: R) -> Self
         where
             R: RangeBounds<u32>,
         {
    +        let start = match range.start_bound() {
    +            Bound::Included(start) => *start,
    +            Bound::Excluded(start) => *start + 1,
    +            Bound::Unbounded => u32::MIN,
    +        };
    +
             let mut end = match range.end_bound() {
                 Bound::Included(end) => *end + 1,
                 Bound::Excluded(end) => *end,
                 Bound::Unbounded => u32::MAX,
             };
    +
             // Because `end` is exclusive, we want the maximum value to be BIP32_MAX_INDEX + 1.
             end = end.min(BIP32_MAX_INDEX + 1);
     
    +        if !descriptor.borrow().has_wildcard() {
    +            // The length of the range should be at most 1
    +            if end != start {
    +                end = start + 1;
    +            }
    +        }
    +
             Self {
    -            next_index: match range.start_bound() {
    -                Bound::Included(start) => *start,
    -                Bound::Excluded(start) => *start + 1,
    -                Bound::Unbounded => u32::MIN,
    -            },
    +            next_index: start,
                 end,
                 descriptor,
                 secp: Secp256k1::verification_only(),
    @@ -307,6 +364,11 @@
                 return None;
             }
     
    +        // If the descriptor is non-wildcard, only index 0 will return an spk.
    +        if !self.descriptor.borrow().has_wildcard() && self.next_index != 0 {
    +            return None;
    +        }
    +
             let script = self
                 .descriptor
                 .borrow()
    @@ -374,18 +436,18 @@
             let mut external_spk = SpkIterator::new(&external_desc);
             let max_index = BIP32_MAX_INDEX - 22;
     
    -        assert_eq!(external_spk.next().unwrap(), (0, external_spk_0));
    -        assert_eq!(external_spk.nth(15).unwrap(), (16, external_spk_16));
    -        assert_eq!(external_spk.nth(3).unwrap(), (20, external_spk_20.clone()));
    -        assert_eq!(external_spk.next().unwrap(), (21, external_spk_21));
    +        assert_eq!(external_spk.next(), Some((0, external_spk_0)));
    +        assert_eq!(external_spk.nth(15), Some((16, external_spk_16)));
    +        assert_eq!(external_spk.nth(3), Some((20, external_spk_20.clone())));
    +        assert_eq!(external_spk.next(), Some((21, external_spk_21)));
             assert_eq!(
    -            external_spk.nth(max_index as usize).unwrap(),
    -            (BIP32_MAX_INDEX, external_spk_max)
    +            external_spk.nth(max_index as usize),
    +            Some((BIP32_MAX_INDEX, external_spk_max))
             );
             assert_eq!(external_spk.nth(0), None);
     
             let mut external_spk = SpkIterator::new_with_range(&external_desc, 0..21);
    -        assert_eq!(external_spk.nth(20).unwrap(), (20, external_spk_20));
    +        assert_eq!(external_spk.nth(20), Some((20, external_spk_20)));
             assert_eq!(external_spk.next(), None);
     
             let mut external_spk = SpkIterator::new_with_range(&external_desc, 0..21);
    @@ -404,13 +466,47 @@
     
             let mut external_spk = SpkIterator::new(&no_wildcard_descriptor);
     
    -        assert_eq!(external_spk.next().unwrap(), (0, external_spk_0.clone()));
    +        assert_eq!(external_spk.next(), Some((0, external_spk_0.clone())));
             assert_eq!(external_spk.next(), None);
     
             let mut external_spk = SpkIterator::new(&no_wildcard_descriptor);
     
    -        assert_eq!(external_spk.nth(0).unwrap(), (0, external_spk_0));
    +        assert_eq!(external_spk.nth(0), Some((0, external_spk_0.clone())));
    +        assert_eq!(external_spk.nth(0), None);
    +
    +        let mut external_spk = SpkIterator::new_with_range(&no_wildcard_descriptor, 0..0);
    +
    +        assert_eq!(external_spk.next(), None);
    +
    +        let mut external_spk = SpkIterator::new_with_range(&no_wildcard_descriptor, 0..1);
    +
    +        assert_eq!(external_spk.nth(0), Some((0, external_spk_0.clone())));
    +        assert_eq!(external_spk.next(), None);
    +
    +        // We test that using new_with_range with range_len > 1 gives back an iterator with
    +        // range_len = 1
    +        let mut external_spk = SpkIterator::new_with_range(&no_wildcard_descriptor, 0..10);
    +
    +        assert_eq!(external_spk.nth(0), Some((0, external_spk_0)));
             assert_eq!(external_spk.nth(0), None);
    +
    +        // non index-0 should NOT return an spk
    +        assert_eq!(
    +            SpkIterator::new_with_range(&no_wildcard_descriptor, 1..1).next(),
    +            None
    +        );
    +        assert_eq!(
    +            SpkIterator::new_with_range(&no_wildcard_descriptor, 1..=1).next(),
    +            None
    +        );
    +        assert_eq!(
    +            SpkIterator::new_with_range(&no_wildcard_descriptor, 1..2).next(),
    +            None
    +        );
    +        assert_eq!(
    +            SpkIterator::new_with_range(&no_wildcard_descriptor, 1..=2).next(),
    +            None
    +        );
         }
     
         // The following dummy traits were created to test if SpkIterator is working properly.