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
| Name | Type | Description |
|---|---|---|
subject | address | Address being checked (user, agent, wallet) |
scope | uint256 | Module-defined authorization scope (e.g. planId, tierId, roleId) |
Returns
| Name | Type | Description |
|---|---|---|
<none> | bool | bool 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
| Name | Type | Description |
|---|---|---|
subject | address | Address being checked (user, agent, wallet) |
scopes | uint32[] | Module-defined authorization scopes (uint32 in practice) |
Returns
| Name | Type | Description |
|---|---|---|
<none> | bool | bool True if authorized in any supplied scope |