[][src]Struct btc_transaction_utils::p2wsh::InputSigner

pub struct InputSigner { /* fields omitted */ }

An input signer.

Methods

impl InputSigner[src]

pub fn new(script: RedeemScript) -> InputSigner[src]

Creates an input signer for the given redeem script.

pub fn secp256k1_context(&self) -> &Secp256k1<All>[src]

Returns a reference to the secp256k1 engine, used to execute all signature operations.

pub fn secp256k1_context_mut(&mut self) -> &mut Secp256k1<All>[src]

Returns a mutable reference to the secp256k1 engine, used to execute all signature operations.

pub fn signature_hash<'a, 'b, V: Into<UnspentTxOutValue<'b>>>(
    &mut self,
    txin: TxInRef<'a>,
    value: V
) -> Sha256dHash
[src]

Computes the BIP-143 compliant sighash for a SIGHASH_ALL signature for the given input.

pub fn sign_input<'a, 'b, V: Into<UnspentTxOutValue<'b>>>(
    &mut self,
    txin: TxInRef<'a>,
    value: V,
    secret_key: &SecretKey
) -> Result<InputSignature, Error>
[src]

Computes the BIP-143 compliant signature for the given input. Under the hood this method signs sighash for the given input with the given secret key.

pub fn verify_input<'a, 'b, 'c, V, S>(
    &self,
    txin: TxInRef<'a>,
    value: V,
    public_key: &PublicKey,
    signature: S
) -> Result<(), Error> where
    V: Into<UnspentTxOutValue<'b>>,
    S: Into<InputSignatureRef<'c>>, 
[src]

Checks correctness of the signature for the given input.

pub fn spend_input<I: IntoIterator<Item = InputSignature>>(
    &self,
    input: &mut TxIn,
    signatures: I
)
[src]

Collects the given input signatures into the witness data for the given transaction input. Thus, the input becomes spent.

Trait Implementations

impl Debug for InputSigner[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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.

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.