From: github-actions Date: Mon, 29 Aug 2022 14:24:18 +0000 (+0000) Subject: Publish autogenerated nightly docs X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/scripts/trait.Engine.html?a=commitdiff_plain;h=ebea35cb003715a172448c22559ec6116d31368b;p=bitcoindevkit.org Publish autogenerated nightly docs --- diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/memory/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/memory/index.html index 866d68db78..0418debb57 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/memory/index.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/memory/index.html @@ -6,7 +6,7 @@ logo

Module memory

logo
-

Module bdk::database::memory

source · []
Expand description

In-memory ephemeral database

+

Module bdk::database::memory

source · []
Expand description

In-memory ephemeral database

This module defines an in-memory database type called MemoryDatabase that is based on a BTreeMap.

Structs

diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/enum.AddressIndex.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/enum.AddressIndex.html index 7245180238..b789f23635 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/enum.AddressIndex.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/enum.AddressIndex.html @@ -6,7 +6,7 @@ logo

AddressIndex

logo
pub enum AddressIndex {
+    

Enum bdk::wallet::AddressIndex

source · []
pub enum AddressIndex {
     New,
     LastUnused,
     Peek(u32),
@@ -31,7 +31,7 @@ then the returned address and subsequent addresses returned by calls to Ad
 and AddressIndex::LastUsed may have already been used. Also if the index is reset to a
 value earlier than the crate::blockchain::Blockchain stop_gap (default is 20) then a
 larger stop_gap should be used to monitor for all possibly used addresses.

-

Trait Implementations

Formats the value using the given formatter. Read more

+

Trait Implementations

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

diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/fn.get_funded_wallet.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/fn.get_funded_wallet.html index 88286fb758..9de696581b 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/fn.get_funded_wallet.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/fn.get_funded_wallet.html @@ -6,6 +6,6 @@ logo
logo
pub fn get_funded_wallet(
    descriptor: &str
) -> (Wallet<AnyDatabase>, (String, Option<String>), Txid)
Expand description

Return a fake wallet that appears to be funded for testing.

+

Function bdk::wallet::get_funded_wallet

source · []
pub fn get_funded_wallet(
    descriptor: &str
) -> (Wallet<AnyDatabase>, (String, Option<String>), Txid)
Expand description

Return a fake wallet that appears to be funded for testing.

\ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/fn.wallet_name_from_descriptor.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/fn.wallet_name_from_descriptor.html index 927a2c1b14..b1ebb22193 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/fn.wallet_name_from_descriptor.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/fn.wallet_name_from_descriptor.html @@ -6,7 +6,7 @@ logo
logo
pub fn wallet_name_from_descriptor<T>(
    descriptor: T,
    change_descriptor: Option<T>,
    network: Network,
    secp: &Secp256k1<All>
) -> Result<String, Error> where
    T: IntoWalletDescriptor
Expand description

Deterministically generate a unique name given the descriptors defining the wallet

+

Function bdk::wallet::wallet_name_from_descriptor

source · []
pub fn wallet_name_from_descriptor<T>(
    descriptor: T,
    change_descriptor: Option<T>,
    network: Network,
    secp: &Secp256k1<All>
) -> Result<String, Error> where
    T: IntoWalletDescriptor
Expand description

Deterministically generate a unique name given the descriptors defining the wallet

Compatible with wallet_name_from_descriptor

\ No newline at end of file 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 a014a082db..e637b75150 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 @@ -6,7 +6,7 @@ logo

Module wallet

logo
-

Module bdk::wallet

source · []
Expand description

Wallet

+

Module bdk::wallet

source · []
Expand description

Wallet

This module defines the Wallet structure.

Modules

Address validation callbacks

diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/enum.SignerContext.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/enum.SignerContext.html index 479364da1a..da1b94b0ef 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/enum.SignerContext.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/enum.SignerContext.html @@ -6,7 +6,7 @@ logo

SignerContext

logo
pub enum SignerContext {
+    

Enum bdk::wallet::signer::SignerContext

source · []
pub enum SignerContext {
     Legacy,
     Segwitv0,
     Tap {
@@ -18,13 +18,13 @@
 

Segwitv0

Segwit v0 context (BIP 143)

Tap

Fields

is_internal_key: bool

Whether the signer can sign for the internal key or not

Taproot context (BIP 340)

-

Trait Implementations

Returns a copy of the value. Read more

+

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

-

This method tests for self and other values to be equal, and is used +

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 !=.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

This method tests for !=.

+

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

Performs the conversion.

diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/enum.SignerError.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/enum.SignerError.html index 378e8bed69..1eced7a24c 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/enum.SignerError.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/enum.SignerError.html @@ -6,7 +6,7 @@ logo

SignerError

logo
pub enum SignerError {
+    

Enum bdk::wallet::signer::SignerError

source · []
pub enum SignerError {
     MissingKey,
     InvalidKey,
     UserCanceled,
@@ -38,12 +38,12 @@ explicitly allowed them

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

-

Formats the value using the given formatter. Read more

-

The lower-level source of this error, if any. Read more

+

Formats the value using the given formatter. Read more

+

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

-

Performs the conversion.

+

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/enum.TapLeavesOptions.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/enum.TapLeavesOptions.html index 55e0aa5dca..42a2ad6c44 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/enum.TapLeavesOptions.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/enum.TapLeavesOptions.html @@ -6,7 +6,7 @@ logo

TapLeavesOptions

logo
pub enum TapLeavesOptions {
+    

Enum bdk::wallet::signer::TapLeavesOptions

source · []
pub enum TapLeavesOptions {
     All,
     Include(Vec<TapLeafHash>),
     Exclude(Vec<TapLeafHash>),
@@ -17,14 +17,14 @@
 some of the specified leaves, if it doesn’t have the right key to sign them.

Exclude(Vec<TapLeafHash>)

The signer won’t sign the specified leaves.

None

The signer won’t sign any leaf.

-

Trait Implementations

Returns a copy of the value. Read more

+

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 “default value” for a type. Read more

-

This method tests for self and other values to be equal, and is used +

Formats the value using the given formatter. Read more

+

Returns the “default value” for a type. Read more

+

This method tests for self and other values to be equal, and is used by ==. Read more

-

This method tests for !=.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

This method tests for !=.

+

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

Performs the conversion.

diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/index.html index 79090534d7..2aa15c1f8a 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/index.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/index.html @@ -6,7 +6,7 @@ logo

Module signer

logo
-

Module bdk::wallet::signer

source · []
Expand description

Generalized signers

+

Module bdk::wallet::signer

source · []
Expand description

Generalized signers

This module provides the ability to add customized signers to a Wallet through the Wallet::add_signer function.

diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/struct.SignOptions.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/struct.SignOptions.html index 038d3a06db..82e0f2c528 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/struct.SignOptions.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/struct.SignOptions.html @@ -6,7 +6,7 @@ logo

SignOptions

logo
pub struct SignOptions {
+    

Struct bdk::wallet::signer::SignOptions

source · []
pub struct SignOptions {
     pub trust_witness_utxo: bool,
     pub assume_height: Option<u32>,
     pub allow_all_sighashes: bool,
@@ -43,10 +43,10 @@ ignored if we’re signing a non-taproot PSBT.

sign_with_tap_internal_key: bool

Whether we should try to sign a taproot transaction with the taproot internal key or not. This option is ignored if we’re signing a non-taproot PSBT.

Defaults to true, i.e., we always try to sign with the taproot internal key.

-

Trait Implementations

Returns a copy of the value. Read more

+

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 “default value” for a type. Read more

+

Formats the value using the given formatter. Read more

+

Returns the “default value” for a type. 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

diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/struct.SignerOrdering.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/struct.SignerOrdering.html index b14f96e853..17edf87685 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/struct.SignerOrdering.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/struct.SignerOrdering.html @@ -6,29 +6,29 @@ logo

SignerOrdering

logo
pub struct SignerOrdering(pub usize);
Expand description

Defines the order in which signers are called

+

Struct bdk::wallet::signer::SignerOrdering

source · []
pub struct SignerOrdering(pub usize);
Expand description

Defines the order in which signers are called

The default value is 100. Signers with an ordering above that will be called later, and they will thus see the partial signatures added to the transaction once they get to sign themselves.

-

Tuple Fields

0: usize

Trait Implementations

Returns a copy of the value. Read more

+

Tuple Fields

0: usize

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 “default value” for a type. Read more

-

This method returns an Ordering between self and other. Read more

+

Formats the value using the given formatter. Read more

+

Returns the “default value” for a type. Read more

+

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 +

This method tests for self and other values to be equal, and is used by ==. Read more

-

This method tests for !=.

-

This method returns an ordering between self and other values if one exists. Read more

+

This method tests for !=.

+

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. 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

Performs the conversion.

diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/struct.SignerWrapper.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/struct.SignerWrapper.html index 2453066746..3f5b83c2d0 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/struct.SignerWrapper.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/struct.SignerWrapper.html @@ -6,19 +6,19 @@ logo

SignerWrapper

logo
pub struct SignerWrapper<S: Sized + Debug + Clone> { /* private fields */ }
Expand description

Wrapper structure to pair a signer with its context

-

Implementations

Create a wrapped signer from a signer and a context

-

Trait Implementations

Returns a copy of the value. Read more

+

Struct bdk::wallet::signer::SignerWrapper

source · []
pub struct SignerWrapper<S: Sized + Debug + Clone> { /* private fields */ }
Expand description

Wrapper structure to pair a signer with its context

+

Implementations

Create a wrapped signer from a signer and a context

+

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

-

The resulting type after dereferencing.

-

Dereferences the value.

-

Sign a single psbt input

-

Sign a single psbt input

-

Return the SignerId for this signer Read more

-

Return the secret key for the signer Read more

-

Return the SignerId for this signer Read more

-

Return the secret key for the signer Read more

+

Formats the value using the given formatter. Read more

+

The resulting type after dereferencing.

+

Dereferences the value.

+

Sign a single psbt input

+

Sign a single psbt input

+

Return the SignerId for this signer Read more

+

Return the secret key for the signer Read more

+

Return the SignerId for this signer Read more

+

Return the secret key for the signer 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

@@ -33,7 +33,7 @@

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

-

Sign all the inputs of the psbt

+

Sign all the inputs of the psbt

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/struct.SignersContainer.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/struct.SignersContainer.html index 2194880ce4..05b5413029 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/struct.SignersContainer.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/struct.SignersContainer.html @@ -6,22 +6,22 @@ logo

SignersContainer

logo
pub struct SignersContainer(_);
Expand description

Container for multiple signers

-

Implementations

Create a map of public keys to secret keys

-

Build a new signer container from a KeyMap

+

Struct bdk::wallet::signer::SignersContainer

source · []
pub struct SignersContainer(_);
Expand description

Container for multiple signers

+

Implementations

Create a map of public keys to secret keys

+

Build a new signer container from a KeyMap

Also looks at the corresponding descriptor to determine the SignerContext to attach to the signers

-

Default constructor

-

Adds an external signer to the container for the specified id. Optionally returns the +

Default constructor

+

Adds an external signer to the container for the specified id. Optionally returns the signer that was previously in the container, if any

-

Removes a signer from the container and returns it

-

Returns the list of identifiers of all the signers in the container

-

Returns the list of signers in the container, sorted by lowest to highest ordering

-

Finds the signer with lowest ordering for a given id in the container.

-

Trait Implementations

Returns a copy of the value. Read more

+

Removes a signer from the container and returns it

+

Returns the list of identifiers of all the signers in the container

+

Returns the list of signers in the container, sorted by lowest to highest ordering

+

Finds the signer with lowest ordering for a given id in the container.

+

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 “default value” for a type. Read more

+

Formats the value using the given formatter. Read more

+

Returns the “default value” for a type. 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

diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/trait.InputSigner.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/trait.InputSigner.html index 20180f68c1..5e5b2d3134 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/trait.InputSigner.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/trait.InputSigner.html @@ -6,12 +6,12 @@ logo

InputSigner

logo
pub trait InputSigner: SignerCommon {
+    

Trait bdk::wallet::signer::InputSigner

source · []
pub trait InputSigner: SignerCommon {
     fn sign_input(
        &self,
        psbt: &mut PartiallySignedTransaction,
        input_index: usize,
        sign_options: &SignOptions,
        secp: &Secp256k1<All>
    ) -> Result<(), SignerError>; }
Expand description

PSBT Input signer

This trait can be implemented to provide custom signers to the wallet. If the signer supports signing individual inputs, this trait should be implemented and BDK will provide automatically an implementation for TransactionSigner.

-

Required methods

Sign a single psbt input

-

Implementors

+

Required methods

Sign a single psbt input

+

Implementors

\ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/trait.SignerCommon.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/trait.SignerCommon.html index 58746ad8c3..2fe8b26448 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/trait.SignerCommon.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/trait.SignerCommon.html @@ -6,17 +6,17 @@ logo

SignerCommon

logo
pub trait SignerCommon: Debug + Send + Sync {
+    

Trait bdk::wallet::signer::SignerCommon

source · []
pub trait SignerCommon: Debug + Send + Sync {
     fn id(&self, secp: &Secp256k1<All>) -> SignerId;
 
     fn descriptor_secret_key(&self) -> Option<DescriptorSecretKey> { ... }
 }
Expand description

Common signer methods

-

Required methods

Return the SignerId for this signer

+

Required methods

Return the SignerId for this signer

The SignerId can be used to lookup a signer in the Wallet’s signers map or to compare two signers.

-

Provided methods

Return the secret key for the signer

+

Provided methods

Return the secret key for the signer

This is used internally to reconstruct the original descriptor that may contain secrets. External signers that are meant to keep key isolated should just return None here (which is the default for this method, if not overridden).

-

Implementors

+

Implementors

\ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/trait.TransactionSigner.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/trait.TransactionSigner.html index e3b7ea08a3..5c231233e8 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/trait.TransactionSigner.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/trait.TransactionSigner.html @@ -6,11 +6,11 @@ logo

TransactionSigner

logo
pub trait TransactionSigner: SignerCommon {
+    

Trait bdk::wallet::signer::TransactionSigner

source · []
pub trait TransactionSigner: SignerCommon {
     fn sign_transaction(
        &self,
        psbt: &mut PartiallySignedTransaction,
        sign_options: &SignOptions,
        secp: &Secp256k1<All>
    ) -> Result<(), SignerError>; }
Expand description

PSBT signer

This trait can be implemented when the signer can’t sign inputs individually, but signs the whole transaction at once.

-

Required methods

Sign all the inputs of the psbt

-

Implementors

+

Required methods

Sign all the inputs of the psbt

+

Implementors

\ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/struct.AddressInfo.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/struct.AddressInfo.html index 469cac3220..4c9613fa9f 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/struct.AddressInfo.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/struct.AddressInfo.html @@ -6,7 +6,7 @@ logo

AddressInfo

logo
pub struct AddressInfo {
+    

Struct bdk::wallet::AddressInfo

source · []
pub struct AddressInfo {
     pub index: u32,
     pub address: Address,
     pub keychain: KeychainKind,
@@ -52,14 +52,14 @@ given key. For taproot addresses, the supplied key is assumed to be tweaked

Returns true if the supplied xonly public key can be used to derive the address.

This will only work for Taproot addresses. The Public Key is assumed to have already been tweaked.

-

Trait Implementations

Formats the value using the given formatter. Read more

-

The resulting type after dereferencing.

-

Dereferences the value.

-

Formats the value using the given formatter. Read more

-

This method tests for self and other values to be equal, and is used +

Trait Implementations

Formats the value using the given formatter. Read more

+

The resulting type after dereferencing.

+

Dereferences the value.

+

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 !=.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

This method tests for !=.

+

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

Performs the conversion.

diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/struct.SyncOptions.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/struct.SyncOptions.html index 2307e64e8b..88bd66da0b 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/struct.SyncOptions.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/struct.SyncOptions.html @@ -6,12 +6,12 @@ logo

SyncOptions

logo
pub struct SyncOptions {
+    

Struct bdk::wallet::SyncOptions

source · []
pub struct SyncOptions {
     pub progress: Option<Box<dyn Progress>>,
 }
Expand description

Options to a sync.

Fields

progress: Option<Box<dyn Progress>>

The progress tracker which may be informed when progress is made.

-

Trait Implementations

Formats the value using the given formatter. Read more

-

Returns the “default value” for a type. Read more

+

Trait Implementations

Formats the value using the given formatter. Read more

+

Returns the “default value” for a type. 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

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 9cc165306a..87a32ce509 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 @@ -6,7 +6,7 @@ logo

Wallet

logo
-

Struct bdk::wallet::Wallet

source · []
pub struct Wallet<D> { /* private fields */ }
Expand description

A Bitcoin wallet

+

Struct bdk::wallet::Wallet

source · []
pub struct Wallet<D> { /* private fields */ }
Expand description

A Bitcoin wallet

The Wallet struct acts as a way of coherently interfacing with output descriptors and related transactions. Its main components are:

    @@ -14,37 +14,37 @@ Its main components are:

  1. A Database where it tracks transactions and utxos related to the descriptors.
  2. signers that can contribute signatures to addresses instantiated from the descriptors.
-

Implementations

👎 Deprecated:

Just use Wallet::new – all wallets are offline now!

+

Implementations

👎 Deprecated:

Just use Wallet::new – all wallets are offline now!

Create a new “offline” wallet

-

Create a wallet.

+

Create a wallet.

The only way this can fail is if the descriptors passed in do not match the checksums in database.

-

Get the Bitcoin network the wallet is using.

-

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

Get the Bitcoin network the wallet is using.

+

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 be returned for any AddressIndex.

-

Ensures that there are at least max_addresses addresses cached in the database if the +

Ensures that there are at least max_addresses addresses cached in the database if the descriptor is derivable, or 1 address if it is not. Will return Ok(true) if there are new addresses generated (either external or internal), and Ok(false) if all the required addresses are already cached. This function is useful to explicitly cache addresses in a wallet to do things like check Wallet::is_mine on transaction output scripts.

-

Return whether or not a script is part of this wallet (either internal or external)

-

Return the list of unspent outputs of this wallet

+

Return whether or not a script is part of this wallet (either internal or external)

+

Return the list of unspent outputs of this wallet

Note that this method only operates on the internal database, which first needs to be Wallet::sync manually.

-

Returns the UTXO owned by this wallet corresponding to outpoint if it exists in the +

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

-

Return a single transactions made and received by the wallet

+

Return a single transactions made and received by the wallet

Optionally fill the TransactionDetails::transaction field with the raw transaction if include_raw is true.

Note that this method only operates on the internal database, which first needs to be Wallet::sync manually.

-

Return an unsorted list of transactions made and received by the wallet

+

Return an unsorted list of transactions made and received by the wallet

Optionally fill the TransactionDetails::transaction field with the raw transaction if include_raw is true.

To sort transactions, the following code can be used:

@@ -57,13 +57,13 @@ wallet’s database.

});

Note that this method only operates on the internal database, which first needs to be Wallet::sync manually.

-

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

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

Note that this method only operates on the internal database, which first needs to be Wallet::sync manually.

-

Add an external signer

+

Add an external signer

See the signer module for an example.

-

Get the signers

+

Get the signers

Example
let wallet = Wallet::new("wpkh(tprv8ZgxMBicQKsPe73PBRSmNbTfbcsZnwWhz5eVmhHpi31HW29Z7mc9B4cWGRQzopNUzZUT391DeDJxL2PefNunWyLgqCKRMDkU1s2s8bAfoSk/84'/0'/0'/0/*)", None, Network::Testnet, MemoryDatabase::new())?;
 for secret_key in wallet.get_signers(KeychainKind::External).signers().iter().filter_map(|s| s.descriptor_secret_key()) {
@@ -72,11 +72,11 @@ values.

} Ok::<(), Box<dyn std::error::Error>>(())
-
👎 Deprecated

Add an address validator

+
👎 Deprecated

Add an address validator

See the address_validator module for an example.

-
👎 Deprecated

Get the address validators

+
👎 Deprecated

Get the address validators

See the address_validator module.

-

Start building a transaction.

+

Start building a transaction.

This returns a blank TxBuilder from which you can specify the parameters for the transaction.

Example
let (psbt, details) = {
@@ -87,7 +87,7 @@ values.

}; // sign and broadcast ...
-

Bump the fee of a transaction previously created with this wallet.

+

Bump the fee of a transaction previously created with this wallet.

Returns an error if the transaction is already confirmed or doesn’t explicitly signal replace by fee (RBF). If the transaction can be fee bumped then it returns a TxBuilder pre-populated with the inputs and outputs of the original transaction.

@@ -112,7 +112,7 @@ pre-populated with the inputs and outputs of the original transaction.

let _ = wallet.sign(&mut psbt, SignOptions::default())?; let fee_bumped_tx = psbt.extract_tx(); // broadcast fee_bumped_tx to replace original
-

Sign a transaction with all the wallet’s signers, in the order specified by every signer’s +

Sign a transaction with all the wallet’s signers, in the order specified by every signer’s SignerOrdering

The SignOptions can be used to tweak the behavior of the software signers, and the way the transaction is finalized at the end. Note that it can’t be guaranteed that every @@ -126,20 +126,20 @@ in this library will.

}; let finalized = wallet.sign(&mut psbt, SignOptions::default())?; assert!(finalized, "we should have signed all the inputs");
-

Return the spending policies for the wallet’s descriptor

-

Return the “public” version of the wallet’s descriptor, meaning a new descriptor that has +

Return the spending policies for the wallet’s descriptor

+

Return the “public” version of the wallet’s descriptor, meaning a new descriptor that has the same structure but with every secret key removed

This can be used to build a watch-only version of a wallet

-

Try to finalize a PSBT

+

Try to finalize a PSBT

The SignOptions can be used to tweak the behavior of the finalizer.

-

Return the secp256k1 context used for all signing operations

-

Returns the descriptor used to create addresses for a particular keychain.

-

get the corresponding PSBT Input for a LocalUtxo

-

Return an immutable reference to the internal database

-

Sync the internal database with the blockchain

-

Return the checksum of the public descriptor associated to keychain

+

Return the secp256k1 context used for all signing operations

+

Returns the descriptor used to create addresses for a particular keychain.

+

get the corresponding PSBT Input for a LocalUtxo

+

Return an immutable reference to the internal database

+

Sync the internal database with the blockchain

+

Return the checksum of the public descriptor associated to keychain

Internally calls Self::get_descriptor_for_keychain to fetch the right descriptor

-

Trait Implementations

Formats the value using the given formatter. Read more

+

Trait Implementations

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

diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/database/memory.rs.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/database/memory.rs.html index 0f086f62a2..f28aa7f015 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/database/memory.rs.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/database/memory.rs.html @@ -655,7 +655,6 @@ 648 649 650 -651
// Bitcoin Dev Kit
 // Written in 2020 by Alekos Filini <alekos.filini@gmail.com>
 //
@@ -1149,11 +1148,10 @@
         let mut db = $db;
         let tx_meta = $tx_meta;
         let current_height: Option<u32> = $current_height;
-        let input = if $is_coinbase {
-            vec![$crate::bitcoin::TxIn::default()]
-        } else {
-            vec![]
-        };
+        let mut input = vec![$crate::bitcoin::TxIn::default()];
+        if !$is_coinbase {
+            input[0].previous_output.vout = 0;
+        }
         let tx = $crate::bitcoin::Transaction {
             version: 1,
             lock_time: 0,
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/mod.rs.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/mod.rs.html
index edd459dc96..3511b8d83d 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/mod.rs.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/mod.rs.html
@@ -5474,6 +5474,38 @@
 5467
 5468
 5469
+5470
+5471
+5472
+5473
+5474
+5475
+5476
+5477
+5478
+5479
+5480
+5481
+5482
+5483
+5484
+5485
+5486
+5487
+5488
+5489
+5490
+5491
+5492
+5493
+5494
+5495
+5496
+5497
+5498
+5499
+5500
+5501
 
// Bitcoin Dev Kit
 // Written in 2020 by Alekos Filini <alekos.filini@gmail.com>
 //
@@ -5524,6 +5556,9 @@
 #[cfg_attr(docsrs, doc(cfg(feature = "verify")))]
 pub mod verify;
 
+#[cfg(feature = "hardware-signer")]
+pub mod hardwaresigner;
+
 pub use utils::IsDust;
 
 #[allow(deprecated)]
@@ -10942,6 +10977,35 @@
         // ...and checking that everything is fine
         assert_fee_rate!(psbt, details.fee.unwrap_or(0), fee_rate);
     }
+
+    #[cfg(feature = "test-hardware-signer")]
+    #[test]
+    fn test_create_signer() {
+        use crate::wallet::hardwaresigner::HWISigner;
+        use hwi::types::HWIChain;
+        use hwi::HWIClient;
+
+        let devices = HWIClient::enumerate().unwrap();
+        let device = devices.first().expect("No devices found");
+        let client = HWIClient::get_client(device, true, HWIChain::Regtest).unwrap();
+        let descriptors = client.get_descriptors(None).unwrap();
+        let custom_signer = HWISigner::from_device(device, HWIChain::Regtest).unwrap();
+
+        let (mut wallet, _, _) = get_funded_wallet(&descriptors.internal[0]);
+        wallet.add_signer(
+            KeychainKind::External,
+            SignerOrdering(200),
+            Arc::new(custom_signer),
+        );
+
+        let addr = wallet.get_address(LastUnused).unwrap();
+        let mut builder = wallet.build_tx();
+        builder.drain_to(addr.script_pubkey()).drain_wallet();
+        let (mut psbt, _) = builder.finish().unwrap();
+
+        let finalized = wallet.sign(&mut psbt, Default::default()).unwrap();
+        assert!(finalized);
+    }
 }
 
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/signer.rs.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/signer.rs.html index 5c7e83be40..188ba63f7f 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/signer.rs.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/signer.rs.html @@ -1103,6 +1103,16 @@ 1096 1097 1098 +1099 +1100 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108
// Bitcoin Dev Kit
 // Written in 2020 by Alekos Filini <alekos.filini@gmail.com>
 //
@@ -1264,6 +1274,16 @@
     InvalidSighash,
     /// Error while computing the hash to sign
     SighashError(sighash::Error),
+    /// Error while signing using hardware wallets
+    #[cfg(feature = "hardware-signer")]
+    HWIError(hwi::error::Error),
+}
+
+#[cfg(feature = "hardware-signer")]
+impl From<hwi::error::Error> for SignerError {
+    fn from(e: hwi::error::Error) -> Self {
+        SignerError::HWIError(e)
+    }
 }
 
 impl From<sighash::Error> for SignerError {