Skip to main content

IAuthorizationModule

Title: IAuthorizationModule

Author: amser

Standard interface for on-chain authorization checks.

This interface answers: "Is this subject currently authorized for this scope?" It is intentionally orthogonal to execution. Authorization ≠ execution. Some modules need execution but no auth (credits, prepaid, auctions), some need auth but no execution (access passes, gating, login), and some need both (subscriptions).

Functions

isActive

Returns whether a subject is currently authorized.

function isActive(address subject, uint256 scope) external view returns (bool);

Parameters

NameTypeDescription
subjectaddressAddress being checked (user, agent, wallet)
scopeuint256Module-defined authorization scope (e.g. planId, tierId, roleId)

Returns

NameTypeDescription
<none>boolbool True if authorized

isActiveAny

Returns whether a subject is currently authorized for any of the provided scopes.

function isActiveAny(address subject, uint32[] calldata scopes) external view returns (bool);

Parameters

NameTypeDescription
subjectaddressAddress being checked (user, agent, wallet)
scopesuint32[]Module-defined authorization scopes (uint32 in practice)

Returns

NameTypeDescription
<none>boolbool True if authorized in any supplied scope