Struct OnchainDelivery
pub struct OnchainDelivery
{ /* private fields */ }
Implementations
impl OnchainDelivery
pub fn with_sender(&mut self, sender: AztecAddress) -> Self
Overrides the sender address used for discovery tag derivation.
On-chain messages are tagged so that the recipient can find them efficiently without scanning all logs. The tag is derived from a shared secret between a "sender" and the recipient. By default, the sender is the wallet-supplied address (typically the account that initiated the transaction), but some contracts need to override it so that recipients can discover the notes correctly. This is the case for account contracts in their constructor: the deployer is the one that initiated the transaction, but any notes generated during deployment should be tagged by the account contract itself.
Examples
MessageDelivery::onchain_constrained().with_sender(self.address)Trait implementations
impl MessageDeliveryBuilder for OnchainDelivery
pub fn build_message_delivery(self) -> MessageDelivery
On-chain delivery. Returned by
MessageDelivery::onchain_unconstrainedandMessageDelivery::onchain_constrained.Delivery can be further configured via
with_sender, which overrides the default sender address used during discovery tag derivation.