Struct miniscript::descriptor::Wsh [−][src]
pub struct Wsh<Pk: MiniscriptKey> { /* fields omitted */ }
Expand description
A Segwitv0 wsh descriptor
Implementations
Get the Inner
Create a new sortedmulti wsh descriptor
Get the descriptor without the checksum
Trait Implementations
Whether the descriptor is safe Checks whether all the spend paths in the descriptor are possible on the bitcoin network under the current standardness and consensus rules Also checks whether the descriptor requires signauture on all spend paths And whether the script is malleable. In general, all the guarantees of miniscript hold only for safe scripts. All the analysis guarantees of miniscript only hold safe scripts. The signer may not be able to find satisfactions even if one exists Read more
Computes the Bitcoin address of the descriptor, if one exists Some descriptors like pk() don’t have any address. Read more
Computes the scriptpubkey of the descriptor
Computes the scriptSig that will be in place for an unsigned input spending an output with this descriptor. For pre-segwit descriptors, which use the scriptSig for signatures, this returns the empty script. Read more
Computes the “witness script” of the descriptor, i.e. the underlying
script before any hashing is done. For Bare
, Pkh
and Wpkh
this
is the scriptPubkey; for ShWpkh
and Sh
this is the redeemScript;
for the others it is the witness script. Read more
Returns satisfying witness and scriptSig to spend an output controlled by the given descriptor if it possible to construct one using the satisfier S. Read more
Computes an upper bound on the weight of a satisfying witness to the transaction. Assumes all signatures are 73 bytes, including push opcode and sighash suffix. Includes the weight of the VarInts encoding the scriptSig and witness stack length. Returns Error when the descriptor is impossible to safisfy (ex: sh(OP_FALSE)) Read more
Get the scriptCode
of a transaction output. Read more
Run a predicate on every key in the descriptor, returning whether the predicate returned true for every key Read more
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
Translate a struct from one Generic to another where the translation for Pk is provided by translatefpk, and translation for PkH is provided by translatefpkh Read more
Auto Trait Implementations
impl<Pk> RefUnwindSafe for Wsh<Pk> where
Pk: RefUnwindSafe,
<Pk as MiniscriptKey>::Hash: RefUnwindSafe,
impl<Pk> UnwindSafe for Wsh<Pk> where
Pk: RefUnwindSafe + UnwindSafe,
<Pk as MiniscriptKey>::Hash: RefUnwindSafe + UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<P, Q, T> TranslatePk1<P, Q> for T where
P: MiniscriptKey,
Q: MiniscriptKey<Hash = <P as MiniscriptKey>::Hash>,
T: TranslatePk<P, Q>,
impl<P, Q, T> TranslatePk1<P, Q> for T where
P: MiniscriptKey,
Q: MiniscriptKey<Hash = <P as MiniscriptKey>::Hash>,
T: TranslatePk<P, Q>,
fn translate_pk1<Fpk, E>(
&self,
translatefpk: Fpk
) -> Result<<Self as TranslatePk<P, Q>>::Output, E> where
Fpk: FnMut(&P) -> Result<Q, E>,
fn translate_pk1<Fpk, E>(
&self,
translatefpk: Fpk
) -> Result<<Self as TranslatePk<P, Q>>::Output, E> where
Fpk: FnMut(&P) -> Result<Q, E>,
Translate a struct from one generic to another where the translation for Pk is provided by translatefpk Read more
fn translate_pk1_infallible<Fpk: FnMut(&P) -> Q>(
&self,
translatefpk: Fpk
) -> <Self as TranslatePk<P, Q>>::Output
fn translate_pk1_infallible<Fpk: FnMut(&P) -> Q>(
&self,
translatefpk: Fpk
) -> <Self as TranslatePk<P, Q>>::Output
Translate a struct from one generic to another where the translation for Pk is provided by translatefpk Read more
impl<P, Q, T> TranslatePk2<P, Q> for T where
P: MiniscriptKey<Hash = P>,
Q: MiniscriptKey,
T: TranslatePk<P, Q>,
impl<P, Q, T> TranslatePk2<P, Q> for T where
P: MiniscriptKey<Hash = P>,
Q: MiniscriptKey,
T: TranslatePk<P, Q>,
fn translate_pk2<Fpk: Fn(&P) -> Result<Q, E>, E>(
&self,
translatefpk: Fpk
) -> Result<<Self as TranslatePk<P, Q>>::Output, E>
fn translate_pk2<Fpk: Fn(&P) -> Result<Q, E>, E>(
&self,
translatefpk: Fpk
) -> Result<<Self as TranslatePk<P, Q>>::Output, E>
Translate a struct from one generic to another where the translation for Pk is provided by translatefpk Read more
fn translate_pk2_infallible<Fpk: Fn(&P) -> Q>(
&self,
translatefpk: Fpk
) -> <Self as TranslatePk<P, Q>>::Output
fn translate_pk2_infallible<Fpk: Fn(&P) -> Q>(
&self,
translatefpk: Fpk
) -> <Self as TranslatePk<P, Q>>::Output
Translate a struct from one generic to another where the translation for Pk is provided by translatefpk Read more
impl<P, Q, T> TranslatePk3<P, Q> for T where
P: MiniscriptKey + ToPublicKey,
Q: MiniscriptKey<Hash = Hash>,
T: TranslatePk<P, Q>,
impl<P, Q, T> TranslatePk3<P, Q> for T where
P: MiniscriptKey + ToPublicKey,
Q: MiniscriptKey<Hash = Hash>,
T: TranslatePk<P, Q>,
fn translate_pk3<Fpk, E>(
&self,
translatefpk: Fpk
) -> Result<<Self as TranslatePk<P, Q>>::Output, E> where
Fpk: FnMut(&P) -> Result<Q, E>,
fn translate_pk3<Fpk, E>(
&self,
translatefpk: Fpk
) -> Result<<Self as TranslatePk<P, Q>>::Output, E> where
Fpk: FnMut(&P) -> Result<Q, E>,
Translate a struct from one generic to another where the translation for Pk is provided by translatefpk Read more
fn translate_pk3_infallible<Fpk: FnMut(&P) -> Q>(
&self,
translatefpk: Fpk
) -> <Self as TranslatePk<P, Q>>::Output
fn translate_pk3_infallible<Fpk: FnMut(&P) -> Q>(
&self,
translatefpk: Fpk
) -> <Self as TranslatePk<P, Q>>::Output
Translate a struct from one generic to another where the translation for Pk is provided by translatefpk Read more