Struct miniscript::miniscript::analyzable::ExtParams
source · pub struct ExtParams {
pub top_unsafe: bool,
pub resource_limitations: bool,
pub timelock_mixing: bool,
pub malleability: bool,
pub repeated_pk: bool,
pub raw_pkh: bool,
}
Expand description
Params for parsing miniscripts that either non-sane or non-specified(experimental) in the spec.
Used as a parameter Miniscript::from_str_ext
and Miniscript::parse_with_ext
.
This allows parsing miniscripts if
- It is unsafe(does not require a digital signature to spend it)
- It contains a unspendable path because of either a. Resource limitations b. Timelock Mixing
- The script is malleable and thereby some of satisfaction weight guarantees are not satisfied.
- It has repeated public keys
- raw pkh fragments without the pk. This could be obtained when parsing miniscript from script
Fields§
§top_unsafe: bool
Allow parsing of non-safe miniscripts
resource_limitations: bool
Allow parsing of miniscripts with unspendable paths
timelock_mixing: bool
Allow parsing of miniscripts with timelock mixing
malleability: bool
Allow parsing of malleable miniscripts
repeated_pk: bool
Allow parsing of miniscripts with repeated public keys
raw_pkh: bool
Allow parsing of miniscripts with raw pkh fragments without the pk. This could be obtained when parsing miniscript from script
Implementations§
source§impl ExtParams
impl ExtParams
sourcepub fn insane() -> ExtParams
pub fn insane() -> ExtParams
Create a new ExtParams that insanity rules
This enables parsing well specified but “insane” miniscripts.
Refer to the ExtParams
documentation for more details on “insane” miniscripts.
sourcepub fn top_unsafe(self) -> ExtParams
pub fn top_unsafe(self) -> ExtParams
Builder that allows non-safe miniscripts.
sourcepub fn exceed_resource_limitations(self) -> ExtParams
pub fn exceed_resource_limitations(self) -> ExtParams
Builder that allows miniscripts with exceed resource limitations.
sourcepub fn timelock_mixing(self) -> ExtParams
pub fn timelock_mixing(self) -> ExtParams
Builder that allows miniscripts with timelock mixing.
sourcepub fn malleability(self) -> ExtParams
pub fn malleability(self) -> ExtParams
Builder that allows malleable miniscripts.
sourcepub fn repeated_pk(self) -> ExtParams
pub fn repeated_pk(self) -> ExtParams
Builder that allows miniscripts with repeated public keys.
Trait Implementations§
source§impl Ord for ExtParams
impl Ord for ExtParams
source§impl PartialEq<ExtParams> for ExtParams
impl PartialEq<ExtParams> for ExtParams
source§impl PartialOrd<ExtParams> for ExtParams
impl PartialOrd<ExtParams> for ExtParams
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 more