Function get_next_tagging_index
pub unconstrained fn get_next_tagging_index<M>(secret: Field, mode: M) -> u32
where
M: Into<OnchainDeliveryMode>
pub unconstrained fn get_next_tagging_index<M>(secret: Field, mode: M) -> u32
where
M: Into<OnchainDeliveryMode>
Returns the next sender-side tagging index for a given secret and delivery mode.
The caller already holds the tagging
secret, whether obtained fromget_app_tagging_secretor computed by the contract, and only needs the simulator to hand out a fresh per-secret, per-mode index; the caller computes the tag itself.modeis converted into theOnchainDeliveryModeselecting the per-mode index counter, so callers can pass either a concrete on-chain delivery builder or an explicit mode. Offchain messages are not tagged, so only the onchain delivery variants can be used by this oracle.The simulator persists the index increment only if the tagged log is found in an actual block; a reverting transaction can otherwise cause the sender to skip indices and later produce notes that are not found by the recipient.