Expand description
Agnostic single-admin approval library for LEZ programs.
Provides a reusable Authority primitive with gate, rotate, and revoke
operations. Satisfies RFP-001.
§Usage
use lez_approval::Authority;
let admin = [1u8; 32];
let mut auth = Authority::new(admin);
// Only the admin can call gated operations.
auth.gate(admin); // OK
// Rotate to a new admin.
let new_admin = [2u8; 32];
auth.rotate(admin, new_admin);
// Permanently revoke — terminal, cannot be reversed.
auth.revoke(new_admin);
assert!(auth.is_renounced());Structs§
Enums§
Type Aliases§
- Account
Id - A 32-byte account identifier, compatible with
nssa_core::account::AccountId.