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§
- Chain
Info - Chain identification information.
Enums§
- Message
Hash OrIntent - 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_CALLDATAseparator. - 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_ARGSseparator. - poseidon2_
hash - Compute a Poseidon2 sponge hash over
inputs. - poseidon2_
hash_ with_ separator - Compute a Poseidon2 hash of
inputswith a domain separator prepended. - poseidon2_
hash_ with_ separator_ field - Compute a Poseidon2 hash of
inputswith 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.