This document describes the mint authority model added to the LEZ Token program as part of LP-0013.
## Overview
The LEZ Token program now supports a mint authority model for fungible tokens:
- **Mint authority set at initialization** — create a token with a designated minter
- **Minting by the authority** — the authority can mint additional tokens at any time
- **Authority rotation** — transfer minting rights to a new key
- **Authority revocation** — permanently fix the supply by setting authority to `None`
The `lez-authority` crate provides a reusable, program-agnostic authority library (RFP-001).
## Architecture
### Authority Model
`mint_authority: Option<[u8; 32]>` is added to `TokenDefinition::Fungible`:
-`Some(key)` — the key holder can mint and rotate/revoke
-`None` — supply is permanently fixed, minting rejected
### New Instructions
| Instruction | Description |
|---|---|
| `NewFungibleDefinitionWithAuthority` | Create token with mint authority |
| `Mint` (updated) | Now authority-gated — rejects if authority is None |
| `SetAuthority` | Rotate or revoke mint authority |
### Atomicity
`SetAuthority` only mutates state after all checks pass. A failed authorization check returns an error before any write occurs, leaving the prior authority intact.
### Error Codes
| Condition | Message |
|---|---|
| Mint with revoked authority | Mint authority has been revoked; this token has a fixed supply |
| SetAuthority without authorization | Definition account authorization is missing |
| SetAuthority on already-revoked | Mint authority already revoked; supply is permanently fixed |
`token_core` provides the reusable types and instructions for building Logos modules. It is already consumed by `amm`, `ata`, `stablecoin`, and `integration_tests` in this workspace:
Note: With `RISC0_DEV_MODE=0`, full ZK proof generation takes 3–10 minutes per transaction on Apple M-series hardware. LEZ's per-transaction compute budget may change during testnet.