Struct bitcoin_scripts::RedeemScript
source · pub struct RedeemScript(_);Expand description
Redeem script as part of the witness or scriptSig structure; it is
hashed for P2(W)SH output.
Implementations§
source§impl RedeemScript
impl RedeemScript
sourcepub fn script_hash(&self) -> ScriptHash
pub fn script_hash(&self) -> ScriptHash
Computes script commitment hash which participates in PubkeyScript
sourcepub fn to_p2sh(&self) -> PubkeyScript
pub fn to_p2sh(&self) -> PubkeyScript
Generates PubkeyScript matching given redeemScript
Trait Implementations§
source§impl AsMut<<RedeemScript as Wrapper>::Inner> for RedeemScript
impl AsMut<<RedeemScript as Wrapper>::Inner> for RedeemScript
source§impl AsRef<<RedeemScript as Wrapper>::Inner> for RedeemScript
impl AsRef<<RedeemScript as Wrapper>::Inner> for RedeemScript
source§impl Borrow<<RedeemScript as Wrapper>::Inner> for RedeemScript
impl Borrow<<RedeemScript as Wrapper>::Inner> for RedeemScript
source§impl BorrowMut<<RedeemScript as Wrapper>::Inner> for RedeemScript
impl BorrowMut<<RedeemScript as Wrapper>::Inner> for RedeemScript
source§impl Clone for RedeemScript
impl Clone for RedeemScript
source§fn clone(&self) -> RedeemScript
fn clone(&self) -> RedeemScript
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for RedeemScript
impl Debug for RedeemScript
source§impl Default for RedeemScript
impl Default for RedeemScript
source§fn default() -> RedeemScript
fn default() -> RedeemScript
Returns the “default value” for a type. Read more
source§impl Deref for RedeemScript
impl Deref for RedeemScript
source§impl DerefMut for RedeemScript
impl DerefMut for RedeemScript
source§impl Display for RedeemScript
impl Display for RedeemScript
source§impl From<LockScript> for RedeemScript
impl From<LockScript> for RedeemScript
source§fn from(lock_script: LockScript) -> Self
fn from(lock_script: LockScript) -> Self
Converts to this type from the input type.
source§impl From<RedeemScript> for LockScript
impl From<RedeemScript> for LockScript
source§fn from(redeem_script: RedeemScript) -> Self
fn from(redeem_script: RedeemScript) -> Self
Converts to this type from the input type.
source§impl From<RedeemScript> for Script
impl From<RedeemScript> for Script
source§fn from(wrapped: RedeemScript) -> Self
fn from(wrapped: RedeemScript) -> Self
Converts to this type from the input type.
source§impl From<RedeemScript> for SigScript
impl From<RedeemScript> for SigScript
source§fn from(redeem_script: RedeemScript) -> Self
fn from(redeem_script: RedeemScript) -> Self
Converts to this type from the input type.
source§impl From<Script> for RedeemScript
impl From<Script> for RedeemScript
source§impl From<WitnessScript> for RedeemScript
impl From<WitnessScript> for RedeemScript
source§fn from(witness_script: WitnessScript) -> Self
fn from(witness_script: WitnessScript) -> Self
Converts to this type from the input type.
source§impl Hash for RedeemScript
impl Hash for RedeemScript
source§impl LowerHex for RedeemScript
impl LowerHex for RedeemScript
source§impl Ord for RedeemScript
impl Ord for RedeemScript
source§fn cmp(&self, other: &RedeemScript) -> Ordering
fn cmp(&self, other: &RedeemScript) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<RedeemScript> for RedeemScript
impl PartialEq<RedeemScript> for RedeemScript
source§fn eq(&self, other: &RedeemScript) -> bool
fn eq(&self, other: &RedeemScript) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<RedeemScript> for RedeemScript
impl PartialOrd<RedeemScript> for RedeemScript
source§fn partial_cmp(&self, other: &RedeemScript) -> Option<Ordering>
fn partial_cmp(&self, other: &RedeemScript) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Strategy for RedeemScript
impl Strategy for RedeemScript
source§impl ToPubkeyScript for RedeemScript
impl ToPubkeyScript for RedeemScript
source§fn to_pubkey_script(&self, strategy: ConvertInfo) -> Option<PubkeyScript>
fn to_pubkey_script(&self, strategy: ConvertInfo) -> Option<PubkeyScript>
Generates scriptPubkey matching the given RedeemScript. Fails by
returning None for the following contexts, where redeemScript is not
present:
source§impl UpperHex for RedeemScript
impl UpperHex for RedeemScript
source§impl Wrapper for RedeemScript
impl Wrapper for RedeemScript
source§fn from_inner(inner: Self::Inner) -> Self
fn from_inner(inner: Self::Inner) -> Self
Instantiates wrapper type with the inner data
source§fn as_inner(&self) -> &Self::Inner
fn as_inner(&self) -> &Self::Inner
Returns reference to the inner representation for the wrapper type
source§fn as_inner_mut(&mut self) -> &mut Self::Inner
fn as_inner_mut(&mut self) -> &mut Self::Inner
Returns a mutable reference to the inner representation for the wrapper
type
source§fn into_inner(self) -> Self::Inner
fn into_inner(self) -> Self::Inner
Unwraps the wrapper returning the inner type