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_address
Compute an Aztec address from public keys and a partial address.
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_calldata_hash
Hash public calldata using Poseidon2 with the PUBLIC_CALLDATA separator.
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_l1_to_l2_message_nullifier
Compute the nullifier for an L1-to-L2 message consumption.
compute_l2_to_l1_message_hash
Compute an L2-to-L1 message hash.
compute_note_hash_nonce
Compute the nonce for a note hash from the first nullifier and index.
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_protocol_contracts_hash
Compute the protocol contracts hash from the known protocol contract addresses.
compute_protocol_nullifier
Compute the protocol nullifier from a tx request hash.
compute_public_bytecode_commitment
Compute the commitment to packed public bytecode.
compute_salted_initialization_hash
Compute the salted initialization hash.
compute_secret_hash
Hash a secret for use in L1-L2 message flow and TransparentNote.
compute_siloed_private_log_first_field
Silo the first field of a private log with a contract address.
compute_unique_note_hash
Compute a unique note hash from its nonce and siloed hash.
compute_var_args_hash
Hash function arguments using Poseidon2 with the FUNCTION_ARGS separator.
poseidon2_hash
Compute a Poseidon2 sponge hash over inputs.
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.
sha256_to_field_pub
Compute the SHA256 hash of a byte slice, returning the result as an Fr.
silo_note_hash
Silo a note hash with a contract address.
silo_nullifier
Silo a nullifier with a contract address.