lez-approval 0.1.0

Agnostic single-admin approval library for LEZ programs (RFP-001)
Documentation
  • Coverage
  • 15.38%
    2 out of 13 items documented1 out of 10 items with examples
  • Size
  • Source code size: 11.81 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 437.53 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • edenbd1/lp-0013-token-authorities
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • edenbd1

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());