poseidon2_hash3_sparse

Function poseidon2_hash3_sparse 

Source
pub fn poseidon2_hash3_sparse(key: &BigInt, value: &BigInt) -> BigInt
Expand description

Poseidon2 hash function for leaf nodes (key, value, 1)

Computes the hash for leaf nodes using Poseidon2 with three inputs. Mirrors circomlibjs “hash1” function so roots generated here match the JavaScript prover and test tooling.

§Arguments

  • key - Leaf key as BigInt
  • value - Leaf value as BigInt

§Returns

Returns the leaf hash as a BigInt value.