aztec-nr - noir_aztec::macros::authorization

Function authorization

pub comptime fn authorization(s: TypeDefinition) -> Quoted

An Authorization is a struct that represents an action a user can allow others to do on their behalf. By definition, an Authorization must be human-readable and contain enough information to be interpreted on its own. Authorizations are:

This allows a contract developer to convey to a user in a human-readable way what they are asked to sign, while keeping the account contract interface simple (it just has to check if a hash was signed). It should always be possible to recompute the inner_hash from the Authorization alone, so the user/wallet can verify the action they are signing.