For the complete documentation index, see llms.txt.
aztec-nr - noir_aztec::messages::processing::offchain

Function receive

pub unconstrained fn receive(
    contract_address: AztecAddress,
    messages: BoundedVec<OffchainMessage, 16>,
)

Delivers offchain messages to the given contract's offchain inbox for subsequent processing.

Offchain messages are transaction effects that are not broadcasted via onchain logs. Instead, the sender shares the message to the recipient through an external channel (e.g. a URL accessible by the recipient). The recipient then calls this function to hand the messages to the contract so they can be processed through the same mechanisms as onchain messages.

Messages are processed when their originating transaction is found onchain (providing the context needed to validate resulting notes and events).

Messages are eventually removed from the inbox: an unprocessed message once its TTL (anchor_block_timestamp + MAX_MSG_TTL) elapses, and a processed message once the block its transaction was found in finalizes.

Processing order is not guaranteed.