Skip to main content

Module hash

Module hash 

Source
Expand description

Poseidon2 hash functions for the Aztec protocol.

Provides poseidon2_hash_with_separator and derived functions that mirror the TypeScript SDK’s hashing utilities.

Structs§

ChainInfo
Chain identification information.

Enums§

MessageHashOrIntent
Either a raw message hash, a structured call intent, or a pre-computed inner hash with its consumer address.

Functions§

abi_values_to_fields
Flatten ABI values into their field element representation.
compute_auth_wit_message_hash
Compute the full authwit message hash from an intent and chain info.
compute_inner_auth_wit_hash
Compute the inner authwit hash — the “intent” before siloing with consumer.
compute_inner_auth_wit_hash_from_action
Compute the inner authwit hash from a caller address and a function call.
compute_outer_auth_wit_hash
Compute the outer authwit hash — the value the approver signs.
compute_var_args_hash
Hash function arguments using Poseidon2 with the FUNCTION_ARGS separator.
poseidon2_hash_with_separator
Compute a Poseidon2 hash of inputs with a domain separator prepended.