Function poseidonHash

  • Hashes up to 16 scalar elements via the Poseidon hashing algorithm. Each element must be scalar fields of the BN254 elliptic curve group.

    Parameters

    • inputs: (string | number | bigint)[]

      An array of elements to be hashed, which can be of type number, bigint, or string.

    Returns bigint

    bigint - The result of the hash.

    Error - Throws an error if the input length exceeds the maximum allowed.