For the complete documentation index, see llms.txt.
aztec-nr - noir_aztec::protocol::abis::transaction::tx_request

Struct TxRequest

pub struct TxRequest {
    pub origin: AztecAddress,
    pub args_hash: Field,
    pub tx_context: TxContext,
    pub function_data: FunctionData,
    pub salt: Field,
}

Fields

origin: AztecAddress
args_hash: Field
tx_context: TxContext
function_data: FunctionData
salt: Field

Implementations

impl TxRequest

pub fn compute_protocol_nullifier_value(self) -> Field

The unsiloed value of the protocol nullifier: a commitment to the tx request's salt.

The preimage is deliberately narrow. origin (the first call's contract), chain_id and version name the slot the salt belongs to; salt is the per-transaction nonce. Gas settings and the first call's arguments are left out so that a fee bump or a cancellation that reuses the salt produces the same nullifier and the two transactions are mutually exclusive. The proof is still pinned to the full request by validate_against_tx_request.

pub fn compute_protocol_nullifier(self) -> Field

The protocol nullifier as it is inserted into the nullifier tree: the value above siloed under NULL_MSG_SENDER_CONTRACT_ADDRESS, an address no contract can have. This is the value every private call receives in PrivateCircuitPublicInputs.protocol_nullifier.

Trait implementations

impl Deserialize for TxRequest

pub fn deserialize(fields: [Field; 15]) -> Self pub fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self

impl Empty for TxRequest

pub fn empty() -> Self pub fn is_empty(self: Self) -> bool
where Self: Eq
pub fn assert_empty<let S: u32>(self: Self, msg: str<S>)
where Self: Eq

impl Eq for TxRequest

pub fn eq(_self: Self, _other: Self) -> bool

impl Serialize for TxRequest

pub fn serialize(self) -> [Field; 15] pub fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>)