lookup_validity

Function lookup_validity 

pub async fn lookup_validity<W>(
    wallet: &W,
    on_behalf_of: &AztecAddress,
    intent: &MessageHashOrIntent,
    witness: &AuthWitness,
) -> Result<AuthWitValidity, Error>
where W: Wallet,
Expand description

Check whether an authorization witness is valid in both private and public contexts.

  • Private: Simulates a lookup_validity(consumer, inner_hash) utility call on the on_behalf_of account contract, passing the witness. If simulation succeeds and returns true, the authwit is valid privately.

  • Public: Simulates a utility_is_consumable(address, message_hash) utility call on the AuthRegistry protocol contract. If it returns true, the authwit is valid publicly.

Mirrors TS lookupValidity(wallet, onBehalfOf, intent, witness).