141 Commits

Author SHA1 Message Date
Moudy
8a8bac8b69 ci: address fmt-rs, lint, and unit-tests failures from the merge 2026-04-30 22:16:26 +02:00
Moudy
8517906025 Merge branch 'main' into moudy/feat-strong-type-circuit-input 2026-04-30 20:17:47 +02:00
Moudy
98da9b26cc fix: address PR review feedback
- Rename PrivacyPreservingCircuitInputAccount to InputAccountIdentity (drop the PrivacyPreservingCircuit prefix; add Identity suffix)
- Rename PrivacyPreservingCircuitInput.accounts to account_identities
- Rename AccountManager.accounts() to account_identities() and loop variables to account_identity
- Drop legacy mask-1/2/3 references from variant doc comments and guest comments
- Remove the explanatory comments about deleted parallel-vec tests; moved to the PR description
- Rebake privacy_preserving_circuit and test program artifacts
2026-04-30 15:46:36 +02:00
Sergio Chouhy
18642f9b6c artifacts 2026-04-29 13:31:22 -03:00
Sergio Chouhy
72756e8622 Merge branch 'main' into schouhy/generalize-npk-to-multiple-accounts 2026-04-29 12:28:05 -03:00
Moudy
f7349656c7 refactor: strong-type PrivacyPreservingCircuitInput with per-account enum 2026-04-29 07:37:30 +02:00
Sergio Chouhy
a23e44a8df fmt and clippy 2026-04-28 00:18:57 -03:00
Sergio Chouhy
aea397565d add test. Remove private sync skip when no private accounts 2026-04-28 00:04:42 -03:00
Sergio Chouhy
c3f47f6685 use option<identifier> for all wallet commands 2026-04-27 19:57:25 -03:00
Pravdyvy
02949e961a
Merge branch 'main' into Pravdyvy/indexer-ffi-spawns-rpc-for-communication 2026-04-27 13:58:10 +03:00
Sergio Chouhy
7c45b5af3c Merge branch 'main' into schouhy/generalize-npk-to-multiple-accounts 2026-04-24 01:04:55 -03:00
Sergio Chouhy
a5565e0875 make identifier random by default for wallet cli send commands 2026-04-23 23:31:21 -03:00
Sergio Chouhy
9d2abc76a1 fix tests 2026-04-21 22:39:14 -03:00
Sergio Chouhy
145198a078 fix test 2026-04-21 21:32:47 -03:00
Sergio Chouhy
b4d883e275 fix test 2026-04-21 19:34:08 -03:00
Pravdyvy
33557b122f fix: comments fix 1 2026-04-21 17:46:16 +03:00
Sergio Chouhy
3ec166ff7c bring back new private account command for simplicity 2026-04-21 02:35:50 -03:00
Sergio Chouhy
42842dfbb1 clippy 2026-04-20 22:07:03 -03:00
Sergio Chouhy
7ccd6ae331 wip 2026-04-20 11:27:15 -03:00
Sergio Chouhy
6316f59777 fmt 2026-04-19 23:13:51 -03:00
Sergio Chouhy
a42144cb3c minor refactor. update ffi 2026-04-17 19:45:30 -03:00
Moudy
390bf59660 fix: nightly fmt 2026-04-16 19:11:46 +02:00
Moudy
d1fd6fe945 fix: clippy issue 2026-04-16 19:07:27 +02:00
Sergio Chouhy
4c050f35dd refactor private key tree to store a vec<(Identifier, AccountId)> 2026-04-16 03:03:13 -03:00
Sergio Chouhy
3a3358e389 adapt wallet ffi 2026-04-15 19:35:48 -03:00
Sergio Chouhy
0fd2682d2e add identifier arguments to cli commands 2026-04-15 19:01:58 -03:00
Sergio Chouhy
985f610cea wip 2026-04-15 15:42:04 -03:00
Sergio Chouhy
dae617c673 wip: add dummy identifier 2026-04-14 18:02:38 -03:00
Pravdyvy
b864ff22d4 Merge branch 'main' into Pravdyvy/indexer-ffi-spawns-rpc-for-communication 2026-04-14 10:58:18 +03:00
Pravdyvy
dd3ac54318 fix: all ffi tests added 2026-04-14 10:51:57 +03:00
Pravdyvy
a921d63750 Merge branch 'main' into Pravdyvy/indexer-ffi-spawns-rpc-for-communication 2026-04-13 16:01:14 +03:00
Pravdyvy
5fc397c2ee fix: ci fix 2026-04-13 15:53:31 +03:00
Pravdyvy
5f86e597d5 fix: tests running 2026-04-13 13:34:01 +03:00
Petar Radovic
427e1cea45 debug 2026-04-09 17:10:40 +02:00
Petar Radovic
d96e7aed68 debug 2026-04-09 15:45:54 +02:00
Petar Radovic
35b7712b12 debugging 2026-04-09 15:04:15 +02:00
Petar Radovic
a8202603b6 reduce coefficient 2026-04-09 14:29:36 +02:00
Petar Radovic
0eb389b62c increase timeout 2026-04-09 13:51:53 +02:00
fryorcraken
c0a3bee924
clippy 2026-04-08 15:01:22 +10:00
fryorcraken
45c3834da9
format 2026-04-08 14:54:31 +10:00
fryorcraken
bb461fac2a
revert some changes 2026-04-08 14:54:31 +10:00
fryorcraken
ba3c72ae50
revert changes and add tests 2026-04-08 14:54:31 +10:00
fryorcraken
9f292f9b78
fix tests 2026-04-08 14:54:31 +10:00
Pravdyvy
1ae7192c7a fix: trying to run tests 2026-04-03 15:50:24 +03:00
Andrea Franz
7d75eb2d59 chore(programs/amm): rename Swap to SwapExactInput 2026-04-02 16:10:12 +02:00
r4bbit
3e24ae2736 fix(wallet): use cryptographically secure entropy for mnemonic generation
The mnemonic/wallet generation was using a constant zero-byte array for entropy ([0u8; 32]), making all wallets deterministic based
solely on the password. This commit introduces proper random entropy using OsRng and enables users to back up their recovery phrase.

Changes:

- SeedHolder::new_mnemonic() now uses OsRng for 256-bit random entropy and returns the generated mnemonic
- Added SeedHolder::from_mnemonic() to recover a wallet from an existing mnemonic phrase
- WalletChainStore::new_storage() returns the mnemonic for user backup
- Added WalletChainStore::restore_storage() for recovery from a mnemonic
- WalletCore::new_init_storage() now returns the mnemonic
- Renamed reset_storage to restore_storage, which accepts a mnemonic for recovery
- CLI displays the recovery phrase when a new wallet is created
- RestoreKeys command now prompts for the mnemonic phrase via read_mnemonic_from_stdin()

Note: The password parameter is retained for future storage encryption but is no longer used in seed derivation (empty passphrase is used
 instead). This means the mnemonic alone is sufficient to recover accounts.

Usage:

On first wallet initialization, users will see:
IMPORTANT: Write down your recovery phrase and store it securely.
This is the only way to recover your wallet if you lose access.

Recovery phrase:
  word1 word2 word3 ... word24

To restore keys:
wallet restore-keys --depth 5
Input recovery phrase: <24 words>
Input password: <password>
2026-04-01 16:04:47 +02:00
Daniil Polyakov
6780f1c9a4 feat: protect from public pda griefing attacks 2026-03-28 01:23:57 +03:00
r4bbit
0ed91e869e 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-26 13:19:29 +01:00
Daniil Polyakov
b254ebb185 feat: refactor sequencer RPC client-side 2026-03-20 00:41:05 +03:00
jonesmarvin8
ce729f112d Merge branch 'main' into marvin/bip-32-comp 2026-03-18 16:47:39 -04:00