Struct bdk::descriptor::policy::Policy [−][src]
pub struct Policy {
pub id: String,
pub item: SatisfiableItem,
pub satisfaction: Satisfaction,
pub contribution: Satisfaction,
}
Expand description
Descriptor spending policy
Fields
id: String
Identifier for this policy node
item: SatisfiableItem
Type of this policy node
satisfaction: Satisfaction
How much a given PSBT already satisfies this policy node in terms of signatures
contribution: Satisfaction
How the wallet’s descriptor can satisfy this policy node
Implementations
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.
pub 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
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Policy
impl UnwindSafe for Policy
Blanket Implementations
Mutably borrows from an owned value. Read more