zebra_chain::primitives::zcash_primitives

Function sighash

source
pub(crate) fn sighash(
    precomputed_tx_data: &PrecomputedTxData<'_>,
    hash_type: HashType,
    input_index_script_code: Option<(usize, Vec<u8>)>,
) -> SigHash
Expand description

Compute a signature hash using librustzcash.

§Inputs

  • precomputed_tx_data: precomputed data for the transaction whose signature hash is being computed.
  • hash_type: the type of hash (SIGHASH) being used.
  • input_index_script_code: a tuple with the index of the transparent Input for which we are producing a sighash and the respective script code being validated, or None if it’s a shielded input.