Function zebra_chain::primitives::zcash_primitives::sighash

source ·
pub(crate) fn sighash(
    trans: &Transaction,
    hash_type: HashType,
    network_upgrade: NetworkUpgrade,
    all_previous_outputs: &[Output],
    input_index: Option<usize>
) -> SigHash
Expand description

Compute a signature hash using librustzcash.

§Inputs

  • transaction: the transaction whose signature hash to compute.
  • hash_type: the type of hash (SIGHASH) being used.
  • network_upgrade: the network upgrade of the block containing the transaction.
  • input: information about the transparent input for which this signature hash is being computed, if any. A tuple with the matching output of the previous transaction, the input itself, and the index of the input in the transaction.