Type Alias sapio_base::Clause

source ·
pub type Clause = Policy<XOnlyPublicKey>;
Expand description

Concrete Instantiation of Miniscript Policy. Because we need to be able to generate exact transactions, we only work with bitcoin::PublicKey types.

Aliased Type§

enum Clause {
Show 13 variants Unsatisfiable, Trivial, Key(XOnlyPublicKey), After(u32), Older(u32), Sha256(Hash), Hash256(Hash), Ripemd160(Hash), Hash160(Hash), And(Vec<Policy<XOnlyPublicKey>>), Or(Vec<(usize, Policy<XOnlyPublicKey>)>), Threshold(usize, Vec<Policy<XOnlyPublicKey>>), TxTemplate(Hash),
}

Variants§

§

Unsatisfiable

Unsatisfiable

§

Trivial

Trivially satisfiable

§

Key(XOnlyPublicKey)

A public key which must sign to satisfy the descriptor

§

After(u32)

An absolute locktime restriction

§

Older(u32)

A relative locktime restriction

§

Sha256(Hash)

A SHA256 whose preimage must be provided to satisfy the descriptor

§

Hash256(Hash)

A SHA256d whose preimage must be provided to satisfy the descriptor

§

Ripemd160(Hash)

A RIPEMD160 whose preimage must be provided to satisfy the descriptor

§

Hash160(Hash)

A HASH160 whose preimage must be provided to satisfy the descriptor

§

And(Vec<Policy<XOnlyPublicKey>>)

A list of sub-policies, all of which must be satisfied

§

Or(Vec<(usize, Policy<XOnlyPublicKey>)>)

A list of sub-policies, one of which must be satisfied, along with relative probabilities for each one

§

Threshold(usize, Vec<Policy<XOnlyPublicKey>>)

A set of descriptors, satisfactions must be provided for k of them

§

TxTemplate(Hash)

A SHA256 whose must match the tx template

Trait Implementations§

source§

impl From<AnyAbsTimeLock> for Clause

source§

fn from(lt: AnyAbsTimeLock) -> Self

Converts to this type from the input type.
source§

impl From<AnyRelTimeLock> for Clause

source§

fn from(lt: AnyRelTimeLock) -> Self

Converts to this type from the input type.
source§

impl From<AnyTimeLock> for Clause

source§

fn from(lt: AnyTimeLock) -> Self

Converts to this type from the input type.
source§

impl<A, TT> From<LockTime<A, TT>> for Clause
where A: Absolutivity, TT: TimeType,

source§

fn from(lt: LockTime<A, TT>) -> Clause

Converts to this type from the input type.