37 Commits

Author SHA1 Message Date
r4bbit
fdd00c1060
feat(programs): add Associated Token Account program with wallet CLI and tutorial
Introduce the ATA program, which derives deterministic per-token holding
accounts from (owner, token_definition) via SHA256, eliminating the need
to manually create and track holding account IDs.

Program (programs/associated_token_account/):
- Create, Transfer, and Burn instructions with PDA-based authorization
- Deterministic address derivation: SHA256(owner || definition) → seed → AccountId
- Idempotent Create (no-op if ATA already exists)

Wallet CLI (`wallet ata`):
- `address` — derive ATA address locally (no network call)
- `create`  — initialize an ATA on-chain
- `send`    — transfer tokens from owner's ATA to a recipient
- `burn`    — burn tokens from owner's ATA
- `list`    — query ATAs across multiple token definitions

Usage:
  wallet deploy-program artifacts/program_methods/associated_token_account.bin
  wallet ata address --owner <ID> --token-definition <DEF_ID>
  wallet ata create --owner Public/<ID> --token-definition <DEF_ID>
  wallet ata send --from Public/<ID> --token-definition <DEF_ID> --to <RECIPIENT> --amount 100
  wallet ata burn --holder Public/<ID> --token-definition <DEF_ID> --amount 50
  wallet ata list --owner <ID> --token-definition <DEF1> <DEF2>

Includes tutorial: docs/LEZ testnet v0.1 tutorials/associated-token-accounts.md
2026-03-23 13:58:29 +01:00
jonesmarvin8
b81b725bd1 fmt 2026-03-18 13:47:21 -04:00
jonesmarvin8
5d9980cf63 lint fixes 2026-03-18 13:10:36 -04:00
jonesmarvin8
0bcb626adc lint fixes 2026-03-18 10:28:52 -04:00
jonesmarvin8
bd79e982fd fix additional main merge errors 2026-03-17 19:23:27 -04:00
jonesmarvin8
8dd5037e28 Merge branch 'main' into marvin/nonce 2026-03-17 16:45:08 -04:00
jonesmarvin8
66d501e4d7 fixed tests 2026-03-17 14:50:21 -04:00
Daniil Polyakov
252848a145 feat: update rust to 1.94.0 2026-03-17 21:25:30 +03:00
Daniil Polyakov
aa462b66eb feat: add nursery clippy lints 2026-03-17 21:25:30 +03:00
Daniil Polyakov
e3b93b6e9a feat: add restriction clippy lints 2026-03-17 21:25:30 +03:00
Daniil Polyakov
efe8393ba0 feat: add pedantic clippy lints 2026-03-17 21:25:30 +03:00
Daniil Polyakov
756f2f4135 feat: add workspace lints to every crate 2026-03-17 15:13:44 +03:00
jonesmarvin8
bf8c47b9b7 format fixes 2026-02-16 20:50:14 -05:00
jonesmarvin8
77f2fb6994 update nonce mechanism 2026-02-12 19:22:03 -05:00
jonesmarvin8
0930e4dd86 Merge branch 'main' into marvin/refactor-amm-program 2026-02-10 20:28:13 -05:00
jonesmarvin8
8d5e6a37e6 various fixes 2026-01-27 18:24:03 -05:00
jonesmarvin8
7a395d07c4 remove redundant dependency 2026-01-23 17:14:00 -05:00
jonesmarvin8
7c231ae955 artifacts fixes 2026-01-23 16:56:53 -05:00
jonesmarvin8
2367bf343b refactor AMM 2026-01-23 16:30:54 -05:00
jonesmarvin8
e4e476fde9 begin refactoring 2026-01-22 20:48:05 -05:00
Daniil Polyakov
652be426ae refactor: split token program into crates 2026-01-23 00:53:21 +03:00
Daniil Polyakov
2b2a52d0b8 feat: error on unclaimed modified accounts 2026-01-19 17:29:59 +03:00
Daniil Polyakov
67d5a3e9f4 fix: check public account authorization in privacy preserving circuit 2026-01-17 02:28:31 +03:00
Daniil Polyakov
5d7f44aa3e feat: implement private multi chain calls in circuit 2026-01-17 02:28:31 +03:00
Daniil Polyakov
9d37a88069 fix: proper type for token program instruction 2025-12-26 00:24:55 +03:00
Daniil Polyakov
de751952af fix: fmt and lints 2025-12-25 17:05:06 +03:00
Daniil Polyakov
e81d7f099d Merge branch 'main' into marvin/nfts 2025-12-25 17:01:46 +03:00
Daniil Polyakov
5d30de695f fix: use u128::MAX instead of overflowing 2.pow(128) 2025-12-25 16:59:49 +03:00
Daniil Polyakov
2e82d2ddb8 chore: fix lints, fmt and artifacts 2025-12-24 03:39:39 +03:00
jonesmarvin8
c25e93edd5 cargo fmt and clippy 2025-12-23 17:31:03 -05:00
jonesmarvin8
fcdd6e96a5 clippy and fmt 2025-12-23 17:26:38 -05:00
jonesmarvin8
c5e640d56c Merge branch 'main' into marvin/nfts 2025-12-23 14:01:28 -05:00
jonesmarvin8
8289c07b28 Merge branch 'main' into simple_amm 2025-12-23 11:03:11 -05:00
Daniil Polyakov
621b7c0bfa fix: commit Cargo lock 2025-12-19 18:48:19 +03:00
Daniil Polyakov
d6d722c016 fix: fix token program unit test in debug mode 2025-12-19 18:48:19 +03:00
Daniil Polyakov
87f45b8215 feat: move all crates into workspace 2025-12-19 18:30:40 +03:00
Daniil Polyakov
90a1ee994f refactor: move program_methods to the root of repo 2025-12-19 18:30:40 +03:00