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

# Function decode_message

Module: `noir_aztec::messages::encoding`

```rust
pub unconstrained fn decode_message(
    message: BoundedVec<Field, 12>,
) -> Option<(u64, u64, BoundedVec<Field, 11>)>
```

Decodes a standard aztec-nr message, i.e. one created via `encode_message`, returning the original encoded values.

Returns `None` if the message is empty or has invalid (>128 bit) expanded metadata.

Note that `encode_message` returns a fixed size array while this function takes a `BoundedVec`: this is because prior to decoding the message type is unknown, and consequentially not known at compile time. If working with fixed-size messages, consider using `BoundedVec::from_array` to convert them.
