> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Struct TxRequest

Module: `noir_aztec::protocol::abis::transaction::tx_request`

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

## Fields

```rust
origin: AztecAddress
```

```rust
args_hash: Field
```

```rust
tx_context: TxContext
```

```rust
function_data: FunctionData
```

```rust
salt: Field
```

## Implementations

```rust
impl TxRequest
```

```rust
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`.

```rust
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

```rust
impl Deserialize for TxRequest
```

```rust
pub fn deserialize(fields: [Field; 15]) -> Self
```

```rust
pub fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self
```

```rust
impl Empty for TxRequest
```

```rust
pub fn empty() -> Self
```

```rust
pub fn is_empty(self: Self) -> bool
where
    Self: Eq
```

```rust
pub fn assert_empty<let S: u32>(self: Self, msg: str<S>)
where
    Self: Eq
```

```rust
impl Eq for TxRequest
```

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

```rust
impl Serialize for TxRequest
```

```rust
pub fn serialize(self) -> [Field; 15]
```

```rust
pub fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>)
```
