[][src]Struct bitcoin::util::bip143::SighashComponents

pub struct SighashComponents {
    pub hash_prevouts: Hash,
    pub hash_sequence: Hash,
    pub hash_outputs: Hash,
    // some fields omitted
}

Parts of a sighash which are common across inputs or signatures, and which are sufficient (in conjunction with a private key) to sign the transaction

Fields

hash_prevouts: Hash

Hash of all the previous outputs

hash_sequence: Hash

Hash of all the input sequence nos

hash_outputs: Hash

Hash of all the outputs in this transaction

Methods

impl SighashComponents[src]

pub fn new(tx: &Transaction) -> SighashComponents[src]

Compute the sighash components from an unsigned transaction and auxiliary information about its inputs. For the generated sighashes to be valid, no fields in the transaction may change except for script_sig and witnesses.

pub fn sighash_all(
    &self,
    txin: &TxIn,
    witness_script: &Script,
    value: u64
) -> Hash
[src]

Compute the BIP143 sighash for a SIGHASH_ALL signature for the given input.

Trait Implementations

impl Eq for SighashComponents[src]

impl Clone for SighashComponents[src]

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

Performs copy-assignment from source. Read more

impl PartialEq<SighashComponents> for SighashComponents[src]

impl Debug for SighashComponents[src]

Auto Trait Implementations

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = !

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

The type returned in the event of a conversion error.

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

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

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

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

The type returned in the event of a conversion error.

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

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