sign

Function sign 

Source
pub fn sign(
    private_key: FpBN256,
    commitment: FpBN256,
    merkle_path: FpBN256,
) -> FpBN256
Expand description

Generate a signature using Poseidon2 hash

Computes signature = Poseidon2(privateKey, commitment, merklePath) with domain separation value 4.

§Arguments

  • private_key - Private key scalar value
  • commitment - Commitment scalar value
  • merkle_path - Merkle path scalar value

§Returns

Returns the signature as a scalar value.