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.
buffer_as_fields
Encode a byte buffer as field elements (31 bytes per field).
compute_artifact_hash
Compute the artifact hash for a contract.
compute_auth_wit_message_hash
Compute the full authwit message hash from an intent and chain info.
compute_contract_address_from_instance
Compute the contract address from a ContractInstance.
compute_contract_class_id
Compute the contract class ID from its components.
compute_contract_class_id_from_artifact
Compute contract class ID directly from a ContractArtifact.
compute_initialization_hash
Compute the initialization hash for a contract deployment.
compute_initialization_hash_from_encoded
Compute initialization hash from pre-encoded selector and args.
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_partial_address
Compute the partial address from class ID and salted init hash.
compute_private_functions_root
Compute the root of the private functions Merkle tree.
compute_private_functions_root_from_artifact
Extract private functions from an artifact and compute the root.
compute_public_bytecode_commitment
Compute the commitment to packed public bytecode.
compute_salted_initialization_hash
Compute the salted initialization hash.
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.
poseidon2_hash_with_separator_field
Compute a Poseidon2 hash of inputs with a full field-element domain separator prepended.