pub struct InputUpdater<'a>(/* private fields */);
Expand description
An updater for a transparent PCZT input.
Implementations§
Source§impl InputUpdater<'_>
impl InputUpdater<'_>
Sourcepub fn set_redeem_script(
&mut self,
redeem_script: Script,
) -> Result<(), UpdaterError>
pub fn set_redeem_script( &mut self, redeem_script: Script, ) -> Result<(), UpdaterError>
Sets the redeem script for this input.
Returns an error if the input is not P2SH, or the given redeem_script
does not
match the input’s script_pubkey
.
Sourcepub fn set_bip32_derivation(
&mut self,
pubkey: [u8; 33],
derivation: Bip32Derivation,
)
pub fn set_bip32_derivation( &mut self, pubkey: [u8; 33], derivation: Bip32Derivation, )
Sets the BIP 32 derivation path for the given pubkey.
Sourcepub fn set_ripemd160_preimage(&mut self, value: Vec<u8>)
pub fn set_ripemd160_preimage(&mut self, value: Vec<u8>)
Stores the given value along with key = RIPEMD160(value)
.
Sourcepub fn set_sha256_preimage(&mut self, value: Vec<u8>)
pub fn set_sha256_preimage(&mut self, value: Vec<u8>)
Stores the given value along with key = SHA256(value)
.
Sourcepub fn set_hash160_preimage(&mut self, value: Vec<u8>)
pub fn set_hash160_preimage(&mut self, value: Vec<u8>)
Stores the given value along with key = RIPEMD160(SHA256(value))
.
Sourcepub fn set_hash256_preimage(&mut self, value: Vec<u8>)
pub fn set_hash256_preimage(&mut self, value: Vec<u8>)
Stores the given value along with key = SHA256(SHA256(value))
.
Sourcepub fn set_proprietary(&mut self, key: String, value: Vec<u8>)
pub fn set_proprietary(&mut self, key: String, value: Vec<u8>)
Stores the given proprietary value at the given key.
Auto Trait Implementations§
impl<'a> Freeze for InputUpdater<'a>
impl<'a> RefUnwindSafe for InputUpdater<'a>
impl<'a> Send for InputUpdater<'a>
impl<'a> Sync for InputUpdater<'a>
impl<'a> Unpin for InputUpdater<'a>
impl<'a> !UnwindSafe for InputUpdater<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more