aztec-nr - noir_aztec::messages::processing::offchain

Type alias OffchainInboxSync

pub type OffchainInboxSync = unconstrained fn(AztecAddress, AztecAddress) -> EphemeralArray<OffchainMessageWithContext>;

A function that manages offchain-delivered messages for processing during sync.

Offchain messages are messages that are not broadcasted via onchain logs. They are instead delivered to the recipient by calling the offchain_receive utility function (injected by the #[aztec] macro). Message transport is the app's responsibility. Typical examples of transport methods are: messaging apps, email, QR codes, etc.

Once offchain messages are delivered to the recipient's private environment via offchain_receive, messages are locally stored in a persistent inbox.

This function determines when each message in said inbox is ready for processing, when it can be safely disposed of, etc.

The only current implementation of an OffchainInboxSync is sync_inbox, which manages an inbox with expiration based eviction and automatic transaction context resolution.