Enum bdk::descriptor::Legacy[][src]

pub enum Legacy {}
Expand description

Legacy ScriptContext To be used as P2SH scripts For creation of Bare scriptpubkeys, construct the Miniscript under Bare ScriptContext

Trait Implementations

impl Clone for Legacy[src]

pub fn clone(&self) -> Legacy[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Legacy[src]

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl Hash for Legacy[src]

pub fn hash<__H>(&self, state: &mut __H) where
    __H: Hasher
[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl Ord for Legacy[src]

pub fn cmp(&self, other: &Legacy) -> Ordering[src]

This method returns an Ordering between self and other. Read more

#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]

Compares and returns the maximum of two values. Read more

#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]

Compares and returns the minimum of two values. Read more

#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]

Restrict a value to a certain interval. Read more

impl PartialEq<Legacy> for Legacy[src]

pub fn eq(&self, other: &Legacy) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialOrd<Legacy> for Legacy[src]

pub fn partial_cmp(&self, other: &Legacy) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl ScriptContext for Legacy[src]

pub fn check_terminal_non_malleable<Pk, Ctx>(
    frag: &Terminal<Pk, Ctx>
) -> Result<(), ScriptContextError> where
    Ctx: ScriptContext,
    Pk: MiniscriptKey
[src]

Depending on ScriptContext, fragments can be malleable. For Example, under Legacy context, PkH is malleable because it is possible to estimate the cost of satisfaction because of compressed keys This is currently only used in compiler code for removing malleable compilations. This does NOT recursively check if the children of the fragment are valid or not. Since the compilation proceeds in a leaf to root fashion, a recursive check is unnecessary. Read more

pub fn check_witness<Pk, Ctx>(
    witness: &[Vec<u8, Global>]
) -> Result<(), ScriptContextError> where
    Ctx: ScriptContext,
    Pk: MiniscriptKey
[src]

Check whether the given satisfaction is valid under the ScriptContext For example, segwit satisfactions may fail if the witness len is more 3600 or number of stack elements are more than 100. Read more

pub fn check_global_consensus_validity<Pk, Ctx>(
    ms: &Miniscript<Pk, Ctx>
) -> Result<(), ScriptContextError> where
    Ctx: ScriptContext,
    Pk: MiniscriptKey
[src]

Depending on script Context, some of the Terminals might not be valid under the current consensus rules. Or some of the script resource limits may have been exceeded. These miniscripts would never be accepted by the Bitcoin network and hence it is safe to discard them For example, in Segwit Context with MiniscriptKey as bitcoin::PublicKey uncompressed public keys are non-standard and thus invalid. In LegacyP2SH context, scripts above 520 bytes are invalid. Post Tapscript upgrade, this would have to consider other nodes. This does NOT recursively check the miniscript fragments. Read more

pub fn check_local_consensus_validity<Pk, Ctx>(
    ms: &Miniscript<Pk, Ctx>
) -> Result<(), ScriptContextError> where
    Ctx: ScriptContext,
    Pk: MiniscriptKey
[src]

Consensus rules at the Miniscript satisfaction time. It is possible that some paths of miniscript may exceed resource limits and our current satisfier and lifting analysis would not work correctly. For example, satisfaction path(Legacy/Segwitv0) may require more than 201 opcodes. Read more

pub fn check_local_policy_validity<Pk, Ctx>(
    ms: &Miniscript<Pk, Ctx>
) -> Result<(), ScriptContextError> where
    Ctx: ScriptContext,
    Pk: MiniscriptKey
[src]

Policy rules at the Miniscript satisfaction time. It is possible that some paths of miniscript may exceed resource limits and our current satisfier and lifting analysis would not work correctly. For example, satisfaction path in Legacy context scriptSig more than 1650 bytes Read more

pub fn max_satisfaction_size<Pk, Ctx>(ms: &Miniscript<Pk, Ctx>) -> Option<usize> where
    Ctx: ScriptContext,
    Pk: MiniscriptKey
[src]

Depending on script context, the size of a satifaction witness may slightly differ.

fn check_global_policy_validity<Pk, Ctx>(
    _ms: &Miniscript<Pk, Ctx>
) -> Result<(), ScriptContextError> where
    Ctx: ScriptContext,
    Pk: MiniscriptKey
[src]

Depending on script Context, some of the script resource limits may have been exceeded under the current bitcoin core policy rules These miniscripts would never be accepted by the Bitcoin network and hence it is safe to discard them. (unless explicitly disabled by non-standard flag) For example, in Segwit Context with MiniscriptKey as bitcoin::PublicKey scripts over 3600 bytes are invalid. Post Tapscript upgrade, this would have to consider other nodes. This does NOT recursively check the miniscript fragments. Read more

fn check_global_validity<Pk, Ctx>(
    ms: &Miniscript<Pk, Ctx>
) -> Result<(), ScriptContextError> where
    Ctx: ScriptContext,
    Pk: MiniscriptKey
[src]

Check the consensus + policy(if not disabled) rules that are not based satisfaction Read more

fn check_local_validity<Pk, Ctx>(
    ms: &Miniscript<Pk, Ctx>
) -> Result<(), ScriptContextError> where
    Ctx: ScriptContext,
    Pk: MiniscriptKey
[src]

Check the consensus + policy(if not disabled) rules including the ones for satisfaction Read more

fn top_level_type_check<Pk, Ctx>(ms: &Miniscript<Pk, Ctx>) -> Result<(), Error> where
    Ctx: ScriptContext,
    Pk: MiniscriptKey
[src]

Check whether the top-level is type B

fn other_top_level_checks<Pk, Ctx>(
    _ms: &Miniscript<Pk, Ctx>
) -> Result<(), Error> where
    Ctx: ScriptContext,
    Pk: MiniscriptKey
[src]

Other top level checks that are context specific

fn top_level_checks<Pk, Ctx>(ms: &Miniscript<Pk, Ctx>) -> Result<(), Error> where
    Ctx: ScriptContext,
    Pk: MiniscriptKey
[src]

Check top level consensus rules.

impl Eq for Legacy[src]

impl StructuralEq for Legacy[src]

impl StructuralPartialEq for Legacy[src]

Auto Trait Implementations

impl RefUnwindSafe for Legacy

impl Send for Legacy

impl Sync for Legacy

impl Unpin for Legacy

impl UnwindSafe for Legacy

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<Q, K> Equivalent<K> for Q where
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized
[src]

pub fn equivalent(&self, key: &K) -> bool[src]

Compare self to key and return true if they are equal.

impl<Ctx> ExtScriptContext for Ctx where
    Ctx: 'static + ScriptContext
[src]

pub fn as_enum() -> ScriptContextEnum[src]

fn is_legacy() -> bool[src]

Returns whether the script context is Legacy

fn is_segwit_v0() -> bool[src]

Returns whether the script context is Segwitv0

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointable for T

pub const ALIGN: usize

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V