Module bdk::descriptor
source · Expand description
Descriptors
+
Module descriptor
Module bdk::descriptor
source · Expand description
Descriptors
This module contains generic utilities to work with descriptors, plus some re-exported types
from [miniscript].
Re-exports
pub use self::checksum::calc_checksum;pub use self::error::Error as DescriptorError;pub use self::policy::Policy;Modules
Structs
Enums
Enum bdk::descriptor::policy::BuildSatisfaction
source · pub enum BuildSatisfaction<'a> {
+ 
BuildSatisfaction
Enum bdk::descriptor::policy::BuildSatisfaction
source · pub enum BuildSatisfaction<'a> {
None,
Psbt(&'a Psbt),
PsbtTimelocks {
@@ -15,7 +15,7 @@
Like Psbt variant and also check for expired timelocks
Trait Implementations§
source§impl<'a> Clone for BuildSatisfaction<'a>
impl<'a> Clone for BuildSatisfaction<'a>
source§fn clone(&self) -> BuildSatisfaction<'a>
fn clone(&self) -> BuildSatisfaction<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl<'a> Debug for BuildSatisfaction<'a>
impl<'a> Debug for BuildSatisfaction<'a>
impl<'a> Copy for BuildSatisfaction<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for BuildSatisfaction<'a>
impl<'a> Send for BuildSatisfaction<'a>
impl<'a> Sync for BuildSatisfaction<'a>
impl<'a> Unpin for BuildSatisfaction<'a>
impl<'a> UnwindSafe for BuildSatisfaction<'a>
Blanket Implementations§
source§impl<T> From<T> for T
impl<T> From<T> for T
Trait Implementations§
source§impl<'a> Clone for BuildSatisfaction<'a>
impl<'a> Clone for BuildSatisfaction<'a>
source§fn clone(&self) -> BuildSatisfaction<'a>
fn clone(&self) -> BuildSatisfaction<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl<'a> Debug for BuildSatisfaction<'a>
impl<'a> Debug for BuildSatisfaction<'a>
impl<'a> Copy for BuildSatisfaction<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for BuildSatisfaction<'a>
impl<'a> Send for BuildSatisfaction<'a>
impl<'a> Sync for BuildSatisfaction<'a>
impl<'a> Unpin for BuildSatisfaction<'a>
impl<'a> UnwindSafe for BuildSatisfaction<'a>
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
Enum bdk::descriptor::policy::PkOrF
source · pub enum PkOrF {
+ 
PkOrF
Enum bdk::descriptor::policy::PkOrF
source · pub enum PkOrF {
Pubkey(PublicKey),
XOnlyPubkey(XOnlyPublicKey),
Fingerprint(Fingerprint),
@@ -7,9 +7,9 @@
Variants§
Pubkey(PublicKey)
A legacy public key
XOnlyPubkey(XOnlyPublicKey)
A x-only public key
Fingerprint(Fingerprint)
An extended key fingerprint
-Trait Implementations§
source§impl PartialEq<PkOrF> for PkOrF
impl PartialEq<PkOrF> for PkOrF
Trait Implementations§
impl Eq for PkOrF
impl StructuralEq for PkOrF
impl StructuralPartialEq for PkOrF
Auto Trait Implementations§
impl RefUnwindSafe for PkOrF
impl Send for PkOrF
impl Sync for PkOrF
impl Unpin for PkOrF
impl UnwindSafe for PkOrF
Blanket Implementations§
impl Eq for PkOrF
impl StructuralEq for PkOrF
impl StructuralPartialEq for PkOrF
Auto Trait Implementations§
impl RefUnwindSafe for PkOrF
impl Send for PkOrF
impl Sync for PkOrF
impl Unpin for PkOrF
impl UnwindSafe for PkOrF
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
Enum bdk::descriptor::policy::PolicyError
source · pub enum PolicyError {
+ 
PolicyError
Enum bdk::descriptor::policy::PolicyError
source · pub enum PolicyError {
NotEnoughItemsSelected(String),
IndexOutOfRange(usize),
AddOnLeaf,
@@ -13,9 +13,9 @@
AddOnPartialComplete
Can not add to an item that is Satisfaction::PartialComplete
MixedTimelockUnits
Can not merge CSV or timelock values unless both are less than or both are equal or greater than 500_000_000
IncompatibleConditions
Incompatible conditions (not currently used)
-Trait Implementations§
source§impl Debug for PolicyError
impl Debug for PolicyError
source§impl Display for PolicyError
impl Display for PolicyError
source§impl Error for PolicyError
impl Error for PolicyError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl<P> From<PolicyError> for CreateTxError<P>
impl<P> From<PolicyError> for CreateTxError<P>
source§fn from(err: PolicyError) -> Self
fn from(err: PolicyError) -> Self
source§impl From<PolicyError> for Error
impl From<PolicyError> for Error
source§fn from(err: PolicyError) -> Self
fn from(err: PolicyError) -> Self
source§impl PartialEq<PolicyError> for PolicyError
impl PartialEq<PolicyError> for PolicyError
source§fn eq(&self, other: &PolicyError) -> bool
fn eq(&self, other: &PolicyError) -> bool
self and other values to be equal, and is used
+Trait Implementations§
source§impl Debug for PolicyError
impl Debug for PolicyError
source§impl Display for PolicyError
impl Display for PolicyError
source§impl Error for PolicyError
impl Error for PolicyError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl<P> From<PolicyError> for CreateTxError<P>
impl<P> From<PolicyError> for CreateTxError<P>
source§fn from(err: PolicyError) -> Self
fn from(err: PolicyError) -> Self
source§impl From<PolicyError> for Error
impl From<PolicyError> for Error
source§fn from(err: PolicyError) -> Self
fn from(err: PolicyError) -> Self
source§impl PartialEq<PolicyError> for PolicyError
impl PartialEq<PolicyError> for PolicyError
source§fn eq(&self, other: &PolicyError) -> bool
fn eq(&self, other: &PolicyError) -> bool
impl Eq for PolicyError
impl StructuralEq for PolicyError
impl StructuralPartialEq for PolicyError
Auto Trait Implementations§
impl RefUnwindSafe for PolicyError
impl Send for PolicyError
impl Sync for PolicyError
impl Unpin for PolicyError
impl UnwindSafe for PolicyError
Blanket Implementations§
impl Eq for PolicyError
impl StructuralEq for PolicyError
impl StructuralPartialEq for PolicyError
Auto Trait Implementations§
impl RefUnwindSafe for PolicyError
impl Send for PolicyError
impl Sync for PolicyError
impl Unpin for PolicyError
impl UnwindSafe for PolicyError
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
Enum bdk::descriptor::policy::Satisfaction
source · pub enum Satisfaction {
+ 
Satisfaction
Enum bdk::descriptor::policy::Satisfaction
source · Complete
Can satisfy the policy item
None
Cannot satisfy or contribute to the policy item
-Implementations§
source§impl Satisfaction
impl Satisfaction
sourcepub fn is_leaf(&self) -> bool
pub fn is_leaf(&self) -> bool
Returns whether the Satisfaction is a leaf item
Trait Implementations§
source§impl Clone for Satisfaction
impl Clone for Satisfaction
source§fn clone(&self) -> Satisfaction
fn clone(&self) -> Satisfaction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for Satisfaction
impl Debug for Satisfaction
source§impl From<bool> for Satisfaction
impl From<bool> for Satisfaction
source§impl PartialEq<Satisfaction> for Satisfaction
impl PartialEq<Satisfaction> for Satisfaction
source§fn eq(&self, other: &Satisfaction) -> bool
fn eq(&self, other: &Satisfaction) -> bool
self and other values to be equal, and is used
+Implementations§
source§impl Satisfaction
impl Satisfaction
sourcepub fn is_leaf(&self) -> bool
pub fn is_leaf(&self) -> bool
Returns whether the Satisfaction is a leaf item
Trait Implementations§
source§impl Clone for Satisfaction
impl Clone for Satisfaction
source§fn clone(&self) -> Satisfaction
fn clone(&self) -> Satisfaction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for Satisfaction
impl Debug for Satisfaction
source§impl From<bool> for Satisfaction
impl From<bool> for Satisfaction
source§impl PartialEq<Satisfaction> for Satisfaction
impl PartialEq<Satisfaction> for Satisfaction
source§fn eq(&self, other: &Satisfaction) -> bool
fn eq(&self, other: &Satisfaction) -> bool
source§impl Serialize for Satisfaction
impl Serialize for Satisfaction
impl Eq for Satisfaction
impl StructuralEq for Satisfaction
impl StructuralPartialEq for Satisfaction
Auto Trait Implementations§
impl RefUnwindSafe for Satisfaction
impl Send for Satisfaction
impl Sync for Satisfaction
impl Unpin for Satisfaction
impl UnwindSafe for Satisfaction
Blanket Implementations§
source§impl Serialize for Satisfaction
impl Serialize for Satisfaction
impl Eq for Satisfaction
impl StructuralEq for Satisfaction
impl StructuralPartialEq for Satisfaction
Auto Trait Implementations§
impl RefUnwindSafe for Satisfaction
impl Send for Satisfaction
impl Sync for Satisfaction
impl Unpin for Satisfaction
impl UnwindSafe for Satisfaction
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
Enum bdk::descriptor::policy::SatisfiableItem
source · pub enum SatisfiableItem {
+ 
SatisfiableItem
Enum bdk::descriptor::policy::SatisfiableItem
source · pub enum SatisfiableItem {
EcdsaSignature(PkOrF),
SchnorrSignature(PkOrF),
Sha256Preimage {
@@ -49,11 +49,11 @@
Thresh
Threshold items with threshold count
-Implementations§
source§impl SatisfiableItem
impl SatisfiableItem
sourcepub fn is_leaf(&self) -> bool
pub fn is_leaf(&self) -> bool
Returns whether the SatisfiableItem is a leaf item
sourcepub fn id(&self) -> String
pub fn id(&self) -> String
Returns a unique id for the SatisfiableItem
Trait Implementations§
source§impl Clone for SatisfiableItem
impl Clone for SatisfiableItem
source§fn clone(&self) -> SatisfiableItem
fn clone(&self) -> SatisfiableItem
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for SatisfiableItem
impl Debug for SatisfiableItem
source§impl From<SatisfiableItem> for Policy
impl From<SatisfiableItem> for Policy
source§fn from(other: SatisfiableItem) -> Self
fn from(other: SatisfiableItem) -> Self
source§impl PartialEq<SatisfiableItem> for SatisfiableItem
impl PartialEq<SatisfiableItem> for SatisfiableItem
source§fn eq(&self, other: &SatisfiableItem) -> bool
fn eq(&self, other: &SatisfiableItem) -> bool
self and other values to be equal, and is used
+Implementations§
source§impl SatisfiableItem
impl SatisfiableItem
sourcepub fn is_leaf(&self) -> bool
pub fn is_leaf(&self) -> bool
Returns whether the SatisfiableItem is a leaf item
sourcepub fn id(&self) -> String
pub fn id(&self) -> String
Returns a unique id for the SatisfiableItem
Trait Implementations§
source§impl Clone for SatisfiableItem
impl Clone for SatisfiableItem
source§fn clone(&self) -> SatisfiableItem
fn clone(&self) -> SatisfiableItem
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for SatisfiableItem
impl Debug for SatisfiableItem
source§impl From<SatisfiableItem> for Policy
impl From<SatisfiableItem> for Policy
source§fn from(other: SatisfiableItem) -> Self
fn from(other: SatisfiableItem) -> Self
source§impl PartialEq<SatisfiableItem> for SatisfiableItem
impl PartialEq<SatisfiableItem> for SatisfiableItem
source§fn eq(&self, other: &SatisfiableItem) -> bool
fn eq(&self, other: &SatisfiableItem) -> bool
source§impl Serialize for SatisfiableItem
impl Serialize for SatisfiableItem
impl Eq for SatisfiableItem
impl StructuralEq for SatisfiableItem
impl StructuralPartialEq for SatisfiableItem
Auto Trait Implementations§
impl RefUnwindSafe for SatisfiableItem
impl Send for SatisfiableItem
impl Sync for SatisfiableItem
impl Unpin for SatisfiableItem
impl UnwindSafe for SatisfiableItem
Blanket Implementations§
source§impl Serialize for SatisfiableItem
impl Serialize for SatisfiableItem
impl Eq for SatisfiableItem
impl StructuralEq for SatisfiableItem
impl StructuralPartialEq for SatisfiableItem
Auto Trait Implementations§
impl RefUnwindSafe for SatisfiableItem
impl Send for SatisfiableItem
impl Sync for SatisfiableItem
impl Unpin for SatisfiableItem
impl UnwindSafe for SatisfiableItem
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
Module bdk::descriptor::policy
source · Expand description
Descriptor policy
+
Module policy
Module bdk::descriptor::policy
source · Expand description
Descriptor policy
This module implements the logic to extract and represent the spending policies of a descriptor in a more human-readable format.
This is an EXPERIMENTAL feature, API and other major changes are expected.
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/policy/struct.Condition.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/policy/struct.Condition.html index 2eb1d521d9..2e0adaad0f 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/policy/struct.Condition.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/policy/struct.Condition.html @@ -1,17 +1,17 @@Struct bdk::descriptor::policy::Condition
source · pub struct Condition {
+ 
Condition
Struct bdk::descriptor::policy::Condition
source · Expand description
An extra condition that must be satisfied but that is out of control of the user
TODO: use bitcoin::LockTime and bitcoin::Sequence
Fields§
§csv: Option<Sequence>Optional CheckSequenceVerify condition
timelock: Option<LockTime>Optional timelock condition
-Implementations§
Trait Implementations§
source§impl PartialEq<Condition> for Condition
impl PartialEq<Condition> for Condition
source§fn eq(&self, other: &Condition) -> bool
fn eq(&self, other: &Condition) -> bool
self and other values to be equal, and is used
+Implementations§
Trait Implementations§
source§impl PartialOrd<Condition> for Condition
impl PartialOrd<Condition> for Condition
source§impl PartialOrd<Condition> for Condition
impl PartialOrd<Condition> for Condition
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moreimpl Copy for Condition
impl Eq for Condition
impl StructuralEq for Condition
impl StructuralPartialEq for Condition
Auto Trait Implementations§
impl RefUnwindSafe for Condition
impl Send for Condition
impl Sync for Condition
impl Unpin for Condition
impl UnwindSafe for Condition
Blanket Implementations§
impl Copy for Condition
impl Eq for Condition
impl StructuralEq for Condition
impl StructuralPartialEq for Condition
Auto Trait Implementations§
impl RefUnwindSafe for Condition
impl Send for Condition
impl Sync for Condition
impl Unpin for Condition
impl UnwindSafe for Condition
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
Struct bdk::descriptor::policy::Policy
source · pub struct Policy {
+ 
Policy
Struct bdk::descriptor::policy::Policy
source · pub struct Policy {
pub id: String,
pub item: SatisfiableItem,
pub satisfaction: Satisfaction,
@@ -9,16 +9,16 @@
item: SatisfiableItemType of this policy node
satisfaction: SatisfactionHow much a given PSBT already satisfies this policy node in terms of signatures
contribution: SatisfactionHow the walletâs descriptor can satisfy this policy node
-Implementations§
source§impl Policy
impl Policy
sourcepub fn requires_path(&self) -> bool
pub fn requires_path(&self) -> bool
Return whether or not a specific path in the policy tree is required to unambiguously +
Implementations§
source§impl Policy
impl Policy
sourcepub fn requires_path(&self) -> bool
pub fn requires_path(&self) -> bool
Return whether or not a specific path in the policy tree is required to unambiguously create a transaction
What this means is that for some spending policies the user should select which paths in the tree it intends to satisfy while signing, because the transaction must be created differently based on that.
-sourcepub fn get_condition(
&self,
path: &BTreeMap<String, Vec<usize>>
) -> Result<Condition, PolicyError>
pub fn get_condition(
&self,
path: &BTreeMap<String, Vec<usize>>
) -> Result<Condition, PolicyError>
Return the conditions that are set by the spending policy for a given path in the +
sourcepub fn get_condition(
&self,
path: &BTreeMap<String, Vec<usize>>
) -> Result<Condition, PolicyError>
pub fn get_condition(
&self,
path: &BTreeMap<String, Vec<usize>>
) -> Result<Condition, PolicyError>
Return the conditions that are set by the spending policy for a given path in the policy tree
-Trait Implementations§
source§impl From<SatisfiableItem> for Policy
impl From<SatisfiableItem> for Policy
source§fn from(other: SatisfiableItem) -> Self
fn from(other: SatisfiableItem) -> Self
Trait Implementations§
source§impl From<SatisfiableItem> for Policy
impl From<SatisfiableItem> for Policy
source§fn from(other: SatisfiableItem) -> Self
fn from(other: SatisfiableItem) -> Self
impl Eq for Policy
impl StructuralEq for Policy
impl StructuralPartialEq for Policy
Auto Trait Implementations§
impl RefUnwindSafe for Policy
impl Send for Policy
impl Sync for Policy
impl Unpin for Policy
impl UnwindSafe for Policy
Blanket Implementations§
impl Eq for Policy
impl StructuralEq for Policy
impl StructuralPartialEq for Policy
Auto Trait Implementations§
impl RefUnwindSafe for Policy
impl Send for Policy
impl Sync for Policy
impl Unpin for Policy
impl UnwindSafe for Policy
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
Type Definition bdk::descriptor::policy::ConditionMap
source · Expand description
Type for a map of sets of Condition items keyed by each setâs index

ConditionMap
Type Definition bdk::descriptor::policy::ConditionMap
source · Expand description
Type for a map of sets of Condition items keyed by each setâs index
Type Definition bdk::descriptor::policy::FoldedConditionMap
source · Expand description
Type for a map of folded sets of Condition items keyed by a vector of the combined setâs indexes

FoldedConditionMap
Trait Implementations§
§impl<Pk, Ctx> Clone for Miniscript<Pk, Ctx>where
Pk: Clone + MiniscriptKey,
Ctx: Clone + ScriptContext,
impl<Pk, Ctx> Clone for Miniscript<Pk, Ctx>where
Pk: Clone + MiniscriptKey,
Ctx: Clone + ScriptContext,
§fn clone(&self) -> Miniscript<Pk, Ctx>
fn clone(&self) -> Miniscript<Pk, Ctx>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl<Pk, Ctx> Debug for Miniscript<Pk, Ctx>where
Pk: MiniscriptKey,
Ctx: ScriptContext,
impl<Pk, Ctx> Debug for Miniscript<Pk, Ctx>where
Pk: MiniscriptKey,
Ctx: ScriptContext,
§impl<'de, Pk, Ctx> Deserialize<'de> for Miniscript<Pk, Ctx>where
Pk: MiniscriptKey + FromStr,
<Pk as MiniscriptKey>::Sha256: FromStr,
<Pk as MiniscriptKey>::Hash256: FromStr,
<Pk as MiniscriptKey>::Ripemd160: FromStr,
<Pk as MiniscriptKey>::Hash160: FromStr,
<Pk as FromStr>::Err: Display,
<<Pk as MiniscriptKey>::Sha256 as FromStr>::Err: Display,
<<Pk as MiniscriptKey>::Hash256 as FromStr>::Err: Display,
<<Pk as MiniscriptKey>::Ripemd160 as FromStr>::Err: Display,
<<Pk as MiniscriptKey>::Hash160 as FromStr>::Err: Display,
Ctx: ScriptContext,
impl<'de, Pk, Ctx> Deserialize<'de> for Miniscript<Pk, Ctx>where
Pk: MiniscriptKey + FromStr,
<Pk as MiniscriptKey>::Sha256: FromStr,
<Pk as MiniscriptKey>::Hash256: FromStr,
<Pk as MiniscriptKey>::Ripemd160: FromStr,
<Pk as MiniscriptKey>::Hash160: FromStr,
<Pk as FromStr>::Err: Display,
<<Pk as MiniscriptKey>::Sha256 as FromStr>::Err: Display,
<<Pk as MiniscriptKey>::Hash256 as FromStr>::Err: Display,
<<Pk as MiniscriptKey>::Ripemd160 as FromStr>::Err: Display,
<<Pk as MiniscriptKey>::Hash160 as FromStr>::Err: Display,
Ctx: ScriptContext,
§fn deserialize<D>(
deserializer: D
) -> Result<Miniscript<Pk, Ctx>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Miniscript<Pk, Ctx>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
§impl<Pk, Ctx> Display for Miniscript<Pk, Ctx>where
Pk: MiniscriptKey,
Ctx: ScriptContext,
impl<Pk, Ctx> Display for Miniscript<Pk, Ctx>where
Pk: MiniscriptKey,
Ctx: ScriptContext,
source§impl<Ctx: ScriptContext + 'static> ExtractPolicy for Miniscript<DescriptorPublicKey, Ctx>
impl<Ctx: ScriptContext + 'static> ExtractPolicy for Miniscript<DescriptorPublicKey, Ctx>
source§fn extract_policy(
&self,
signers: &SignersContainer,
build_sat: BuildSatisfaction<'_>,
secp: &Secp256k1<All>
) -> Result<Option<Policy>, Error>
fn extract_policy(
&self,
signers: &SignersContainer,
build_sat: BuildSatisfaction<'_>,
secp: &Secp256k1<All>
) -> Result<Option<Policy>, Error>
policy§impl<Pk, Ctx> ForEachKey<Pk> for Miniscript<Pk, Ctx>where
Pk: MiniscriptKey,
Ctx: ScriptContext,
impl<Pk, Ctx> ForEachKey<Pk> for Miniscript<Pk, Ctx>where
Pk: MiniscriptKey,
Ctx: ScriptContext,
Trait Implementations§
§impl<Pk, Ctx> Clone for Miniscript<Pk, Ctx>where
Pk: Clone + MiniscriptKey,
Ctx: Clone + ScriptContext,
impl<Pk, Ctx> Clone for Miniscript<Pk, Ctx>where
Pk: Clone + MiniscriptKey,
Ctx: Clone + ScriptContext,
§fn clone(&self) -> Miniscript<Pk, Ctx>
fn clone(&self) -> Miniscript<Pk, Ctx>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl<Pk, Ctx> Debug for Miniscript<Pk, Ctx>where
Pk: MiniscriptKey,
Ctx: ScriptContext,
impl<Pk, Ctx> Debug for Miniscript<Pk, Ctx>where
Pk: MiniscriptKey,
Ctx: ScriptContext,
§impl<'de, Pk, Ctx> Deserialize<'de> for Miniscript<Pk, Ctx>where
Pk: MiniscriptKey + FromStr,
<Pk as MiniscriptKey>::Sha256: FromStr,
<Pk as MiniscriptKey>::Hash256: FromStr,
<Pk as MiniscriptKey>::Ripemd160: FromStr,
<Pk as MiniscriptKey>::Hash160: FromStr,
<Pk as FromStr>::Err: Display,
<<Pk as MiniscriptKey>::Sha256 as FromStr>::Err: Display,
<<Pk as MiniscriptKey>::Hash256 as FromStr>::Err: Display,
<<Pk as MiniscriptKey>::Ripemd160 as FromStr>::Err: Display,
<<Pk as MiniscriptKey>::Hash160 as FromStr>::Err: Display,
Ctx: ScriptContext,
impl<'de, Pk, Ctx> Deserialize<'de> for Miniscript<Pk, Ctx>where
Pk: MiniscriptKey + FromStr,
<Pk as MiniscriptKey>::Sha256: FromStr,
<Pk as MiniscriptKey>::Hash256: FromStr,
<Pk as MiniscriptKey>::Ripemd160: FromStr,
<Pk as MiniscriptKey>::Hash160: FromStr,
<Pk as FromStr>::Err: Display,
<<Pk as MiniscriptKey>::Sha256 as FromStr>::Err: Display,
<<Pk as MiniscriptKey>::Hash256 as FromStr>::Err: Display,
<<Pk as MiniscriptKey>::Ripemd160 as FromStr>::Err: Display,
<<Pk as MiniscriptKey>::Hash160 as FromStr>::Err: Display,
Ctx: ScriptContext,
§fn deserialize<D>(
deserializer: D
) -> Result<Miniscript<Pk, Ctx>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Miniscript<Pk, Ctx>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
§impl<Pk, Ctx> Display for Miniscript<Pk, Ctx>where
Pk: MiniscriptKey,
Ctx: ScriptContext,
impl<Pk, Ctx> Display for Miniscript<Pk, Ctx>where
Pk: MiniscriptKey,
Ctx: ScriptContext,
source§impl<Ctx: ScriptContext + 'static> ExtractPolicy for Miniscript<DescriptorPublicKey, Ctx>
impl<Ctx: ScriptContext + 'static> ExtractPolicy for Miniscript<DescriptorPublicKey, Ctx>
source§fn extract_policy(
&self,
signers: &SignersContainer,
build_sat: BuildSatisfaction<'_>,
secp: &Secp256k1<All>
) -> Result<Option<Policy>, Error>
fn extract_policy(
&self,
signers: &SignersContainer,
build_sat: BuildSatisfaction<'_>,
secp: &Secp256k1<All>
) -> Result<Option<Policy>, Error>
policy§impl<Pk, Ctx> ForEachKey<Pk> for Miniscript<Pk, Ctx>where
Pk: MiniscriptKey,
Ctx: ScriptContext,
impl<Pk, Ctx> ForEachKey<Pk> for Miniscript<Pk, Ctx>where
Pk: MiniscriptKey,
Ctx: ScriptContext,
§impl<Pk, Ctx> FromStr for Miniscript<Pk, Ctx>where
Pk: MiniscriptKey + FromStr,
<Pk as MiniscriptKey>::Sha256: FromStr,
<Pk as MiniscriptKey>::Hash256: FromStr,
<Pk as MiniscriptKey>::Ripemd160: FromStr,
<Pk as MiniscriptKey>::Hash160: FromStr,
<Pk as FromStr>::Err: ToString,
<<Pk as MiniscriptKey>::Sha256 as FromStr>::Err: ToString,
<<Pk as MiniscriptKey>::Hash256 as FromStr>::Err: ToString,
<<Pk as MiniscriptKey>::Ripemd160 as FromStr>::Err: ToString,
<<Pk as MiniscriptKey>::Hash160 as FromStr>::Err: ToString,
Ctx: ScriptContext,
impl<Pk, Ctx> FromStr for Miniscript<Pk, Ctx>where
Pk: MiniscriptKey + FromStr,
<Pk as MiniscriptKey>::Sha256: FromStr,
<Pk as MiniscriptKey>::Hash256: FromStr,
<Pk as MiniscriptKey>::Ripemd160: FromStr,
<Pk as MiniscriptKey>::Hash160: FromStr,
<Pk as FromStr>::Err: ToString,
<<Pk as MiniscriptKey>::Sha256 as FromStr>::Err: ToString,
<<Pk as MiniscriptKey>::Hash256 as FromStr>::Err: ToString,
<<Pk as MiniscriptKey>::Ripemd160 as FromStr>::Err: ToString,
<<Pk as MiniscriptKey>::Hash160 as FromStr>::Err: ToString,
Ctx: ScriptContext,
§fn from_str(s: &str) -> Result<Miniscript<Pk, Ctx>, Error>
fn from_str(s: &str) -> Result<Miniscript<Pk, Ctx>, Error>
Parse a Miniscript from string and perform sanity checks
See Miniscript::from_str_insane to parse scripts from string that
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/trait.ExtractPolicy.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/trait.ExtractPolicy.html
index 5220177493..b778bdfac6 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/trait.ExtractPolicy.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/trait.ExtractPolicy.html
@@ -3,4 +3,4 @@
fn extract_policy(
&self,
signers: &SignersContainer,
psbt: BuildSatisfaction<'_>,
secp: &Secp256k1<All>
) -> Result<Option<Policy>, DescriptorError>;
}
Expand description
Trait implemented on Descriptors to add a method to extract the spending policy
Required Methods§
sourcefn extract_policy(
&self,
signers: &SignersContainer,
psbt: BuildSatisfaction<'_>,
secp: &Secp256k1<All>
) -> Result<Option<Policy>, DescriptorError>
fn extract_policy(
&self,
signers: &SignersContainer,
psbt: BuildSatisfaction<'_>,
secp: &Secp256k1<All>
) -> Result<Option<Policy>, DescriptorError>
Extract the spending policy
Implementors§
impl ExtractPolicy for Descriptor<DescriptorPublicKey>
impl<Ctx: ScriptContext + 'static> ExtractPolicy for Miniscript<DescriptorPublicKey, Ctx>
Implementors§
impl ExtractPolicy for Descriptor<DescriptorPublicKey>
impl<Ctx: ScriptContext + 'static> ExtractPolicy for Miniscript<DescriptorPublicKey, Ctx>
pub fn version() -> &'static strExpand description
Get the version of BDK at runtime
+
Expand description

Crate bdk
Expand description
BDK
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/keys/trait.IntoDescriptorKey.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/keys/trait.IntoDescriptorKey.html index 28530f824b..59e233fec9 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/keys/trait.IntoDescriptorKey.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/keys/trait.IntoDescriptorKey.html @@ -103,4 +103,4 @@ makes the compiler (correctly) fail.
Required Methods§
sourcefn into_descriptor_key(self) -> Result<DescriptorKey<Ctx>, KeyError>
fn into_descriptor_key(self) -> Result<DescriptorKey<Ctx>, KeyError>
Turn the key into a DescriptorKey within the requested ScriptContext
Implementations on Foreign Types§
source§impl<Ctx: ScriptContext, T: DerivableKey<Ctx>> IntoDescriptorKey<Ctx> for (T, DerivationPath)
impl<Ctx: ScriptContext, T: DerivableKey<Ctx>> IntoDescriptorKey<Ctx> for (T, DerivationPath)
fn into_descriptor_key(self) -> Result<DescriptorKey<Ctx>, KeyError>
source§impl<Ctx: ScriptContext, T: DerivableKey<Ctx>> IntoDescriptorKey<Ctx> for (T, KeySource, DerivationPath)
impl<Ctx: ScriptContext, T: DerivableKey<Ctx>> IntoDescriptorKey<Ctx> for (T, KeySource, DerivationPath)
fn into_descriptor_key(self) -> Result<DescriptorKey<Ctx>, KeyError>
source§impl<Ctx: ScriptContext> IntoDescriptorKey<Ctx> for PublicKey
impl<Ctx: ScriptContext> IntoDescriptorKey<Ctx> for PublicKey
fn into_descriptor_key(self) -> Result<DescriptorKey<Ctx>, KeyError>
source§impl<Ctx: ScriptContext> IntoDescriptorKey<Ctx> for XOnlyPublicKey
impl<Ctx: ScriptContext> IntoDescriptorKey<Ctx> for XOnlyPublicKey
fn into_descriptor_key(self) -> Result<DescriptorKey<Ctx>, KeyError>
source§impl<Ctx: ScriptContext> IntoDescriptorKey<Ctx> for &str
impl<Ctx: ScriptContext> IntoDescriptorKey<Ctx> for &str
fn into_descriptor_key(self) -> Result<DescriptorKey<Ctx>, KeyError>
source§impl<Ctx: ScriptContext> IntoDescriptorKey<Ctx> for PrivateKey
impl<Ctx: ScriptContext> IntoDescriptorKey<Ctx> for PrivateKey
fn into_descriptor_key(self) -> Result<DescriptorKey<Ctx>, KeyError>
Implementors§
impl<Ctx, K> IntoDescriptorKey<Ctx> for GeneratedKey<K, Ctx>where
Ctx: ScriptContext,
K: IntoDescriptorKey<Ctx>,
impl<Ctx: ScriptContext> IntoDescriptorKey<Ctx> for DescriptorKey<Ctx>
The âidentityâ conversion is used internally by some bdk::fragments
impl<Ctx: ScriptContext> IntoDescriptorKey<Ctx> for DescriptorPublicKey
impl<Ctx: ScriptContext> IntoDescriptorKey<Ctx> for DescriptorSecretKey
impl<Ctx: ScriptContext> IntoDescriptorKey<Ctx> for DescriptorPublicKey
impl<Ctx: ScriptContext> IntoDescriptorKey<Ctx> for DescriptorSecretKey
Function bdk::wallet::coin_selection::decide_change
source · Expand description
Decide if change can be created
+
Function bdk::wallet::coin_selection::decide_change
source · Expand description
Decide if change can be created
remaining_amount: the amount in which the selected coins exceed the target amountfee_rate: required fee rate for the current selection
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/coin_selection/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/coin_selection/index.html
index 4d8adba3e9..cedfd1298e 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/coin_selection/index.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/coin_selection/index.html
@@ -1,5 +1,5 @@
drain_script: the script to use in case of change
-
Module bdk::wallet::coin_selection
source · Expand description
Coin selection
+
Module coin_selection
Module bdk::wallet::coin_selection
source · Expand description
Coin selection
This module provides the trait CoinSelectionAlgorithm that can be implemented to
define custom coin selection algorithms.
You can specify a custom coin selection algorithm through the coin_selection method on
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/coin_selection/struct.BranchAndBoundCoinSelection.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/coin_selection/struct.BranchAndBoundCoinSelection.html
index 48b025b861..a89e03ccd4 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/coin_selection/struct.BranchAndBoundCoinSelection.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/coin_selection/struct.BranchAndBoundCoinSelection.html
@@ -1,8 +1,8 @@
Struct bdk::wallet::coin_selection::BranchAndBoundCoinSelection
source · pub struct BranchAndBoundCoinSelection { /* private fields */ }Expand description
Branch and bound coin selection
+
BranchAndBoundCoinSelection
Struct bdk::wallet::coin_selection::BranchAndBoundCoinSelection
source · pub struct BranchAndBoundCoinSelection { /* private fields */ }Expand description
Branch and bound coin selection
Code adapted from Bitcoin Coreâs implementation and from Mark Erhardt Masterâs Thesis: http://murch.one/wp-content/uploads/2016/11/erhardt2016coinselection.pdf
-Implementations§
Trait Implementations§
source§impl Clone for BranchAndBoundCoinSelection
impl Clone for BranchAndBoundCoinSelection
source§fn clone(&self) -> BranchAndBoundCoinSelection
fn clone(&self) -> BranchAndBoundCoinSelection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl CoinSelectionAlgorithm for BranchAndBoundCoinSelection
impl CoinSelectionAlgorithm for BranchAndBoundCoinSelection
source§fn coin_select(
&self,
required_utxos: Vec<WeightedUtxo>,
optional_utxos: Vec<WeightedUtxo>,
fee_rate: FeeRate,
target_amount: u64,
drain_script: &Script
) -> Result<CoinSelectionResult, Error>
fn coin_select(
&self,
required_utxos: Vec<WeightedUtxo>,
optional_utxos: Vec<WeightedUtxo>,
fee_rate: FeeRate,
target_amount: u64,
drain_script: &Script
) -> Result<CoinSelectionResult, Error>
source§impl Debug for BranchAndBoundCoinSelection
impl Debug for BranchAndBoundCoinSelection
Auto Trait Implementations§
impl RefUnwindSafe for BranchAndBoundCoinSelection
impl Send for BranchAndBoundCoinSelection
impl Sync for BranchAndBoundCoinSelection
impl Unpin for BranchAndBoundCoinSelection
impl UnwindSafe for BranchAndBoundCoinSelection
Blanket Implementations§
source§impl<T> From<T> for T
impl<T> From<T> for T
Implementations§
Trait Implementations§
source§impl Clone for BranchAndBoundCoinSelection
impl Clone for BranchAndBoundCoinSelection
source§fn clone(&self) -> BranchAndBoundCoinSelection
fn clone(&self) -> BranchAndBoundCoinSelection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl CoinSelectionAlgorithm for BranchAndBoundCoinSelection
impl CoinSelectionAlgorithm for BranchAndBoundCoinSelection
source§fn coin_select(
&self,
required_utxos: Vec<WeightedUtxo>,
optional_utxos: Vec<WeightedUtxo>,
fee_rate: FeeRate,
target_amount: u64,
drain_script: &Script
) -> Result<CoinSelectionResult, Error>
fn coin_select(
&self,
required_utxos: Vec<WeightedUtxo>,
optional_utxos: Vec<WeightedUtxo>,
fee_rate: FeeRate,
target_amount: u64,
drain_script: &Script
) -> Result<CoinSelectionResult, Error>
source§impl Debug for BranchAndBoundCoinSelection
impl Debug for BranchAndBoundCoinSelection
Auto Trait Implementations§
impl RefUnwindSafe for BranchAndBoundCoinSelection
impl Send for BranchAndBoundCoinSelection
impl Sync for BranchAndBoundCoinSelection
impl Unpin for BranchAndBoundCoinSelection
impl UnwindSafe for BranchAndBoundCoinSelection
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.

LargestFirstCoinSelection
Struct bdk::wallet::coin_selection::LargestFirstCoinSelection
source · pub struct LargestFirstCoinSelection;Expand description
Simple and dumb coin selection
This coin selection algorithm sorts the available UTXOs by value and then picks them starting from the largest ones until the required amount is reached.
-Trait Implementations§
source§impl Clone for LargestFirstCoinSelection
impl Clone for LargestFirstCoinSelection
source§fn clone(&self) -> LargestFirstCoinSelection
fn clone(&self) -> LargestFirstCoinSelection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl CoinSelectionAlgorithm for LargestFirstCoinSelection
impl CoinSelectionAlgorithm for LargestFirstCoinSelection
source§fn coin_select(
&self,
required_utxos: Vec<WeightedUtxo>,
optional_utxos: Vec<WeightedUtxo>,
fee_rate: FeeRate,
target_amount: u64,
drain_script: &Script
) -> Result<CoinSelectionResult, Error>
fn coin_select(
&self,
required_utxos: Vec<WeightedUtxo>,
optional_utxos: Vec<WeightedUtxo>,
fee_rate: FeeRate,
target_amount: u64,
drain_script: &Script
) -> Result<CoinSelectionResult, Error>
source§impl Debug for LargestFirstCoinSelection
impl Debug for LargestFirstCoinSelection
source§impl Default for LargestFirstCoinSelection
impl Default for LargestFirstCoinSelection
source§fn default() -> LargestFirstCoinSelection
fn default() -> LargestFirstCoinSelection
impl Copy for LargestFirstCoinSelection
Auto Trait Implementations§
impl RefUnwindSafe for LargestFirstCoinSelection
impl Send for LargestFirstCoinSelection
impl Sync for LargestFirstCoinSelection
impl Unpin for LargestFirstCoinSelection
impl UnwindSafe for LargestFirstCoinSelection
Blanket Implementations§
source§impl<T> From<T> for T
impl<T> From<T> for T
Trait Implementations§
source§impl Clone for LargestFirstCoinSelection
impl Clone for LargestFirstCoinSelection
source§fn clone(&self) -> LargestFirstCoinSelection
fn clone(&self) -> LargestFirstCoinSelection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl CoinSelectionAlgorithm for LargestFirstCoinSelection
impl CoinSelectionAlgorithm for LargestFirstCoinSelection
source§fn coin_select(
&self,
required_utxos: Vec<WeightedUtxo>,
optional_utxos: Vec<WeightedUtxo>,
fee_rate: FeeRate,
target_amount: u64,
drain_script: &Script
) -> Result<CoinSelectionResult, Error>
fn coin_select(
&self,
required_utxos: Vec<WeightedUtxo>,
optional_utxos: Vec<WeightedUtxo>,
fee_rate: FeeRate,
target_amount: u64,
drain_script: &Script
) -> Result<CoinSelectionResult, Error>
source§impl Debug for LargestFirstCoinSelection
impl Debug for LargestFirstCoinSelection
source§impl Default for LargestFirstCoinSelection
impl Default for LargestFirstCoinSelection
source§fn default() -> LargestFirstCoinSelection
fn default() -> LargestFirstCoinSelection
impl Copy for LargestFirstCoinSelection
Auto Trait Implementations§
impl RefUnwindSafe for LargestFirstCoinSelection
impl Send for LargestFirstCoinSelection
impl Sync for LargestFirstCoinSelection
impl Unpin for LargestFirstCoinSelection
impl UnwindSafe for LargestFirstCoinSelection
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
Struct bdk::wallet::coin_selection::OldestFirstCoinSelection
source · pub struct OldestFirstCoinSelection;Expand description
OldestFirstCoinSelection always picks the utxo with the smallest blockheight to add to the selected coins next
+
OldestFirstCoinSelection
Struct bdk::wallet::coin_selection::OldestFirstCoinSelection
source · pub struct OldestFirstCoinSelection;Expand description
OldestFirstCoinSelection always picks the utxo with the smallest blockheight to add to the selected coins next
This coin selection algorithm sorts the available UTXOs by blockheight and then picks them starting from the oldest ones until the required amount is reached.
-Trait Implementations§
source§impl Clone for OldestFirstCoinSelection
impl Clone for OldestFirstCoinSelection
source§fn clone(&self) -> OldestFirstCoinSelection
fn clone(&self) -> OldestFirstCoinSelection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl CoinSelectionAlgorithm for OldestFirstCoinSelection
impl CoinSelectionAlgorithm for OldestFirstCoinSelection
source§fn coin_select(
&self,
required_utxos: Vec<WeightedUtxo>,
optional_utxos: Vec<WeightedUtxo>,
fee_rate: FeeRate,
target_amount: u64,
drain_script: &Script
) -> Result<CoinSelectionResult, Error>
fn coin_select(
&self,
required_utxos: Vec<WeightedUtxo>,
optional_utxos: Vec<WeightedUtxo>,
fee_rate: FeeRate,
target_amount: u64,
drain_script: &Script
) -> Result<CoinSelectionResult, Error>
source§impl Debug for OldestFirstCoinSelection
impl Debug for OldestFirstCoinSelection
source§impl Default for OldestFirstCoinSelection
impl Default for OldestFirstCoinSelection
source§fn default() -> OldestFirstCoinSelection
fn default() -> OldestFirstCoinSelection
impl Copy for OldestFirstCoinSelection
Auto Trait Implementations§
impl RefUnwindSafe for OldestFirstCoinSelection
impl Send for OldestFirstCoinSelection
impl Sync for OldestFirstCoinSelection
impl Unpin for OldestFirstCoinSelection
impl UnwindSafe for OldestFirstCoinSelection
Blanket Implementations§
source§impl<T> From<T> for T
impl<T> From<T> for T
Trait Implementations§
source§impl Clone for OldestFirstCoinSelection
impl Clone for OldestFirstCoinSelection
source§fn clone(&self) -> OldestFirstCoinSelection
fn clone(&self) -> OldestFirstCoinSelection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl CoinSelectionAlgorithm for OldestFirstCoinSelection
impl CoinSelectionAlgorithm for OldestFirstCoinSelection
source§fn coin_select(
&self,
required_utxos: Vec<WeightedUtxo>,
optional_utxos: Vec<WeightedUtxo>,
fee_rate: FeeRate,
target_amount: u64,
drain_script: &Script
) -> Result<CoinSelectionResult, Error>
fn coin_select(
&self,
required_utxos: Vec<WeightedUtxo>,
optional_utxos: Vec<WeightedUtxo>,
fee_rate: FeeRate,
target_amount: u64,
drain_script: &Script
) -> Result<CoinSelectionResult, Error>
source§impl Debug for OldestFirstCoinSelection
impl Debug for OldestFirstCoinSelection
source§impl Default for OldestFirstCoinSelection
impl Default for OldestFirstCoinSelection
source§fn default() -> OldestFirstCoinSelection
fn default() -> OldestFirstCoinSelection
impl Copy for OldestFirstCoinSelection
Auto Trait Implementations§
impl RefUnwindSafe for OldestFirstCoinSelection
impl Send for OldestFirstCoinSelection
impl Sync for OldestFirstCoinSelection
impl Unpin for OldestFirstCoinSelection
impl UnwindSafe for OldestFirstCoinSelection
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
Implementors§
Implementors§
Enum bdk::wallet::AddressIndex
source · pub enum AddressIndex {
+ 
AddressIndex
Enum bdk::wallet::AddressIndex
source · pub enum AddressIndex {
New,
LastUnused,
Peek(u32),
@@ -16,7 +16,7 @@ web page.
index used by AddressIndex::New and AddressIndex::LastUsed.
Use with caution, if an index is given that is less than the current descriptor index
then the returned address may have already been used.
-Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for AddressIndex
impl Send for AddressIndex
impl Sync for AddressIndex
impl Unpin for AddressIndex
impl UnwindSafe for AddressIndex
Blanket Implementations§
source§impl<T> From<T> for T
impl<T> From<T> for T
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for AddressIndex
impl Send for AddressIndex
impl Sync for AddressIndex
impl Unpin for AddressIndex
impl UnwindSafe for AddressIndex
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
Enum bdk::wallet::InsertTxError
source · pub enum InsertTxError {
+ 
InsertTxError
Enum bdk::wallet::InsertTxError
source · The error variant that occurs when the caller attempts to insert a transaction with a confirmation height that is greater than the internal chain tip.
-Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for InsertTxError
impl Send for InsertTxError
impl Sync for InsertTxError
impl Unpin for InsertTxError
impl UnwindSafe for InsertTxError
Blanket Implementations§
source§impl<T> From<T> for T
impl<T> From<T> for T
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for InsertTxError
impl Send for InsertTxError
impl Sync for InsertTxError
impl Unpin for InsertTxError
impl UnwindSafe for InsertTxError
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
pub enum LoadError<L> {
+ 
LoadError
pub enum LoadError<L> {
Descriptor(DescriptorError),
Load(L),
NotInitialized,
@@ -12,7 +12,7 @@
NotInitialized
Wallet not initialized, persistence backend is empty.
MissingNetwork
Data loaded from persistence is missing network type.
MissingGenesis
Data loaded from persistence is missing genesis hash.
-Trait Implementations§
source§impl<L> Error for LoadError<L>where
L: Display + Debug,
impl<L> Error for LoadError<L>where
L: Display + Debug,
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl<L> RefUnwindSafe for LoadError<L>where
L: RefUnwindSafe,
impl<L> Send for LoadError<L>where
L: Send,
impl<L> Sync for LoadError<L>where
L: Sync,
impl<L> Unpin for LoadError<L>where
L: Unpin,
impl<L> UnwindSafe for LoadError<L>where
L: UnwindSafe,
Blanket Implementations§
source§impl<T> From<T> for T
impl<T> From<T> for T
Trait Implementations§
source§impl<L> Error for LoadError<L>where
L: Display + Debug,
impl<L> Error for LoadError<L>where
L: Display + Debug,
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl<L> RefUnwindSafe for LoadError<L>where
L: RefUnwindSafe,
impl<L> Send for LoadError<L>where
L: Send,
impl<L> Sync for LoadError<L>where
L: Sync,
impl<L> Unpin for LoadError<L>where
L: Unpin,
impl<L> UnwindSafe for LoadError<L>where
L: UnwindSafe,
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
pub enum NewError<W> {
+ 
NewError
pub enum NewError<W> {
Descriptor(DescriptorError),
Write(W),
}Expand description
The error type when constructing a fresh Wallet.
Methods new and new_with_genesis_hash may return this error.
Variants§
Descriptor(DescriptorError)
There was problem with the passed-in descriptor(s).
Write(W)
We were unable to write the walletâs data to the persistence backend.
-Trait Implementations§
source§impl<W> Error for NewError<W>where
W: Display + Debug,
impl<W> Error for NewError<W>where
W: Display + Debug,
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl<W> RefUnwindSafe for NewError<W>where
W: RefUnwindSafe,
impl<W> Send for NewError<W>where
W: Send,
impl<W> Sync for NewError<W>where
W: Sync,
impl<W> Unpin for NewError<W>where
W: Unpin,
impl<W> UnwindSafe for NewError<W>where
W: UnwindSafe,
Blanket Implementations§
source§impl<T> From<T> for T
impl<T> From<T> for T
Trait Implementations§
source§impl<W> Error for NewError<W>where
W: Display + Debug,
impl<W> Error for NewError<W>where
W: Display + Debug,
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl<W> RefUnwindSafe for NewError<W>where
W: RefUnwindSafe,
impl<W> Send for NewError<W>where
W: Send,
impl<W> Sync for NewError<W>where
W: Sync,
impl<W> Unpin for NewError<W>where
W: Unpin,
impl<W> UnwindSafe for NewError<W>where
W: UnwindSafe,
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
Enum bdk::wallet::NewOrLoadError
source · pub enum NewOrLoadError<W, L> {
+ 
NewOrLoadError
Enum bdk::wallet::NewOrLoadError
source · pub enum NewOrLoadError<W, L> {
Descriptor(DescriptorError),
Write(W),
Load(L),
@@ -24,7 +24,7 @@
LoadedNetworkDoesNotMatch
Fields
expected: NetworkThe expected network type.
The loaded network type does not match what was provided.
-Trait Implementations§
source§impl<W, L> Error for NewOrLoadError<W, L>where
W: Display + Debug,
L: Display + Debug,
impl<W, L> Error for NewOrLoadError<W, L>where
W: Display + Debug,
L: Display + Debug,
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl<W, L> RefUnwindSafe for NewOrLoadError<W, L>where
L: RefUnwindSafe,
W: RefUnwindSafe,
impl<W, L> Send for NewOrLoadError<W, L>where
L: Send,
W: Send,
impl<W, L> Sync for NewOrLoadError<W, L>where
L: Sync,
W: Sync,
impl<W, L> Unpin for NewOrLoadError<W, L>where
L: Unpin,
W: Unpin,
impl<W, L> UnwindSafe for NewOrLoadError<W, L>where
L: UnwindSafe,
W: UnwindSafe,
Blanket Implementations§
source§impl<T> From<T> for T
impl<T> From<T> for T
Trait Implementations§
source§impl<W, L> Error for NewOrLoadError<W, L>where
W: Display + Debug,
L: Display + Debug,
impl<W, L> Error for NewOrLoadError<W, L>where
W: Display + Debug,
L: Display + Debug,
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl<W, L> RefUnwindSafe for NewOrLoadError<W, L>where
L: RefUnwindSafe,
W: RefUnwindSafe,
impl<W, L> Send for NewOrLoadError<W, L>where
L: Send,
W: Send,
impl<W, L> Sync for NewOrLoadError<W, L>where
L: Sync,
W: Sync,
impl<W, L> Unpin for NewOrLoadError<W, L>where
L: Unpin,
W: Unpin,
impl<W, L> UnwindSafe for NewOrLoadError<W, L>where
L: UnwindSafe,
W: UnwindSafe,
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
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, DescriptorError>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, DescriptorError>where
T: IntoWalletDescriptor,Expand description
Deterministically generate a unique name given the descriptors defining the wallet
Compatible with wallet_name_from_descriptor
Expand description
Wallet
+
Module wallet
Expand description
Wallet
This module defines the Wallet structure.
Modules
Structs
AddressEnums
Struct bdk::wallet::AddressInfo
source · pub struct AddressInfo {
+ 
AddressInfo
Struct bdk::wallet::AddressInfo
source · pub struct AddressInfo {
pub index: u32,
pub address: Address,
pub keychain: KeychainKind,
@@ -65,9 +65,9 @@ network a simple comparison is not enough anymore. Instead this function can be
let address: Address<NetworkUnchecked> = "32iVBEu4dxkUQk9dJbZUiBiQdmypcEyJRf".parse().unwrap();
assert!(address.is_valid_for_network(Network::Bitcoin));
assert_eq!(address.is_valid_for_network(Network::Testnet), false);Trait Implementations§
source§impl Debug for AddressInfo
impl Debug for AddressInfo
source§impl Deref for AddressInfo
impl Deref for AddressInfo
source§impl Display for AddressInfo
impl Display for AddressInfo
source§impl PartialEq<AddressInfo> for AddressInfo
impl PartialEq<AddressInfo> for AddressInfo
source§fn eq(&self, other: &AddressInfo) -> bool
fn eq(&self, other: &AddressInfo) -> bool
self and other values to be equal, and is used
+Trait Implementations§
source§impl Debug for AddressInfo
impl Debug for AddressInfo
source§impl Deref for AddressInfo
impl Deref for AddressInfo
source§impl Display for AddressInfo
impl Display for AddressInfo
source§impl PartialEq<AddressInfo> for AddressInfo
impl PartialEq<AddressInfo> for AddressInfo
source§fn eq(&self, other: &AddressInfo) -> bool
fn eq(&self, other: &AddressInfo) -> bool
impl Eq for AddressInfo
impl StructuralEq for AddressInfo
impl StructuralPartialEq for AddressInfo
Auto Trait Implementations§
impl RefUnwindSafe for AddressInfo
impl Send for AddressInfo
impl Sync for AddressInfo
impl Unpin for AddressInfo
impl UnwindSafe for AddressInfo
Blanket Implementations§
impl Eq for AddressInfo
impl StructuralEq for AddressInfo
impl StructuralPartialEq for AddressInfo
Auto Trait Implementations§
impl RefUnwindSafe for AddressInfo
impl Send for AddressInfo
impl Sync for AddressInfo
impl Unpin for AddressInfo
impl UnwindSafe for AddressInfo
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
pub struct ChangeSet {
+ 
ChangeSet
pub struct ChangeSet {
pub chain: ChangeSet,
pub indexed_tx_graph: ChangeSet<ConfirmationTimeHeightAnchor, ChangeSet<KeychainKind>>,
pub network: Option<Network>,
@@ -7,9 +7,9 @@
Fields§
§chain: ChangeSetChanges to the LocalChain.
indexed_tx_graph: ChangeSet<ConfirmationTimeHeightAnchor, ChangeSet<KeychainKind>>Changes to IndexedTxGraph.
network: Option<Network>Stores the network type of the wallet.
-Trait Implementations§
source§impl<'de> Deserialize<'de> for ChangeSet
impl<'de> Deserialize<'de> for ChangeSet
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<ChangeSet<ConfirmationTimeHeightAnchor, ChangeSet<KeychainKind>>> for ChangeSet
impl From<ChangeSet<ConfirmationTimeHeightAnchor, ChangeSet<KeychainKind>>> for ChangeSet
source§fn from(
indexed_tx_graph: ChangeSet<ConfirmationTimeHeightAnchor, ChangeSet<KeychainKind>>
) -> Self
fn from(
indexed_tx_graph: ChangeSet<ConfirmationTimeHeightAnchor, ChangeSet<KeychainKind>>
) -> Self
source§impl PartialEq<ChangeSet> for ChangeSet
impl PartialEq<ChangeSet> for ChangeSet
source§fn eq(&self, other: &ChangeSet) -> bool
fn eq(&self, other: &ChangeSet) -> bool
self and other values to be equal, and is used
+Trait Implementations§
source§impl<'de> Deserialize<'de> for ChangeSet
impl<'de> Deserialize<'de> for ChangeSet
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<ChangeSet<ConfirmationTimeHeightAnchor, ChangeSet<KeychainKind>>> for ChangeSet
impl From<ChangeSet<ConfirmationTimeHeightAnchor, ChangeSet<KeychainKind>>> for ChangeSet
source§fn from(
indexed_tx_graph: ChangeSet<ConfirmationTimeHeightAnchor, ChangeSet<KeychainKind>>
) -> Self
fn from(
indexed_tx_graph: ChangeSet<ConfirmationTimeHeightAnchor, ChangeSet<KeychainKind>>
) -> Self
impl StructuralPartialEq for ChangeSet
Auto Trait Implementations§
impl RefUnwindSafe for ChangeSet
impl Send for ChangeSet
impl Sync for ChangeSet
impl Unpin for ChangeSet
impl UnwindSafe for ChangeSet
Blanket Implementations§
impl StructuralPartialEq for ChangeSet
Auto Trait Implementations§
impl RefUnwindSafe for ChangeSet
impl Send for ChangeSet
impl Sync for ChangeSet
impl Unpin for ChangeSet
impl UnwindSafe for ChangeSet
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
pub struct Update {
+ 
Update
pub struct Update {
pub last_active_indices: BTreeMap<KeychainKind, u32>,
pub graph: TxGraph<ConfirmationTimeHeightAnchor>,
pub chain: Option<Update>,
@@ -9,7 +9,7 @@
KeychainTxOutIndex.
graph: TxGraph<ConfirmationTimeHeightAnchor>Update for the walletâs internal TxGraph.
chain: Option<Update>Update for the walletâs internal LocalChain.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Update
impl Send for Update
impl Sync for Update
impl Unpin for Update
impl UnwindSafe for Update
Blanket Implementations§
source§impl<T> From<T> for T
impl<T> From<T> for T
const: unstable · source§fn from(t: T) -> T
fn from(t: T) -> T
Returns the argument unchanged.
+Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Update
impl Send for Update
impl Sync for Update
impl Unpin for Update
impl UnwindSafe for Update
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.