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 Ord for Legacy
[src]
impl Ord for Legacy
[src]impl PartialOrd<Legacy> for Legacy
[src]
impl PartialOrd<Legacy> for Legacy
[src]pub fn partial_cmp(&self, other: &Legacy) -> Option<Ordering>
[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]
#[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]
#[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
impl ScriptContext for Legacy
[src]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[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]
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
[src]pub fn equivalent(&self, key: &K) -> bool
[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]
impl<Ctx> ExtScriptContext for Ctx where
Ctx: 'static + ScriptContext,
[src]pub fn as_enum() -> ScriptContextEnum
[src]
pub fn as_enum() -> ScriptContextEnum
[src]Returns the ScriptContext
as a ScriptContextEnum
fn is_segwit_v0() -> bool
[src]
fn is_segwit_v0() -> bool
[src]Returns whether the script context is Segwitv0
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[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]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
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]
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<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,