7 Commits

Author SHA1 Message Date
bristinWild
aee5372f2a fix(lp-0013): address review feedback — docs alignment and missing rotation test
- Add integration test `token_rotate_authority_then_new_authority_can_mint`:
  create with self-authority, rotate to external key, verify new authority
  mints as rest account, verify old authority is rejected (RFP-001 end-to-end)
- Fix README error table: 'must sign' -> 'must authorize' (matches mint.rs:36)
- Fix guest doc comments for mint/set_authority to describe the 0-or-1
  external authority model correctly
- Fix example scripts: new-fungible-definition-with-authority -> new-fungible-definition,
  --initial-supply -> --total-supply (align to token-idl.json and demo-full-flow.sh)
2026-07-02 01:20:33 +05:30
bristinWild
686a7d066a fix(token): owner-guard set_authority; align demo script to token IDL
Second review round on PR #125 (LP-0013):

- set_authority now rejects foreign-owned definitions. It takes the
  ProgramContext and asserts definition_account.program_owner ==
  self_program_id, matching mint and initialize_account. Without this a
  foreign-owned account with token-shaped data could have its authority
  field rewritten. Added test_set_authority_rejects_foreign_owned_definition.

- demo-full-flow.sh now calls instruction and flag names that exist in
  the regenerated token IDL: new-fungible-definition (was the nonexistent
  new-fungible-definition-with-authority), --total-supply (was
  --initial-supply), and drops --authority-account for the self-authority
  mint/set-authority path (the rest account is --authority-accounts and is
  empty when the definition is its own authority).

- Stripped a trailing-space lint nit in docs/LP-0013-README.md.
2026-07-02 01:20:32 +05:30
bristinWild
c2a7d753d7 fix: address Copilot review round 2
- set_authority rejects all-zero new_authority on rotation (matches creation guard)
- SetAuthority/Mint doc comments now list the required authority signer account
- README: add --authority-account to mint/set-authority CLI examples,
  correct error-code table to actual panic strings, make program ID build-dependent
2026-07-02 01:17:06 +05:30
bristinWild
7e788f4215 docs: add RFP-001 compliance section explaining lez-authority alignment 2026-07-02 01:11:53 +05:30
bristinWild
d15eec7959 docs: clean up LP-0013 README with accurate CLI commands and scaffold setup 2026-07-02 01:11:53 +05:30
bristinWild
3ba6139b4c docs: add program ID, CU costs, CLI usage, SDK docs, fix demo script timeout 2026-07-02 01:11:53 +05:30
bristinWild
a8863ab7ea feat(LP-0013): add mint authority model to token program
- Add lez-authority crate: agnostic AuthoritySlot library (RFP-001)
- Add mint_authority field to TokenDefinition::Fungible
- Add NewFungibleDefinitionWithAuthority instruction
- Add SetAuthority instruction (rotation + permanent revocation)
- Update Mint to enforce authority guard
- Wire new instructions into guest binary
- Add 8 authority unit tests (53 total passing)
- Add LP-0013 README, IDL, demo script, and example scripts
2026-07-02 01:11:53 +05:30