Commit Graph
347 Commits
Author SHA1 Message Date
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
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
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 e6ad1d3eea resubmit interval 2026-04-09 14:35:51 +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
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
Sergio Chouhy 99071a4ef9 Merge branch 'main' into schouhy/add-block-context 2026-03-26 21:23:36 -03:00
Sergio Chouhy acf609ecc8 Merge branch 'main' into schouhy/add-block-context 2026-03-26 13:24:46 -03:00
Pravdyvy 8a806899e4 Merge branch 'main' into Pravdyvy/hardcoded-initial-state 2026-03-26 17:53:05 +02: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
Pravdyvy 9c90930bd6 Merge branch 'main' into Pravdyvy/hardcoded-initial-state 2026-03-20 14:55:42 +02:00
Sergio Chouhy 607a34058d Merge branch 'main' into schouhy/add-block-context 2026-03-20 09:52:16 -03:00
Sergio Chouhy 0d46f0798a clippy 2026-03-19 18:55:02 -03:00
Daniil Polyakov 7b20a83379 fix: fixes after rebase & address comments 2026-03-20 00:48:04 +03:00
Daniil Polyakov 325960d696 feat: remove override_rust_log from wallet config 2026-03-20 00:48:04 +03:00
Daniil Polyakov b631ef02c6 fix: final fixes & polishing 2026-03-20 00:47:37 +03:00
Daniil Polyakov 9d87e3b046 fix: fix lints 2026-03-20 00:41:05 +03:00
Daniil Polyakov b254ebb185 feat: refactor sequencer RPC client-side 2026-03-20 00:41:05 +03:00
Daniil Polyakov bffc711470 refactor: move sequencer_ directories into sequencer 2026-03-20 00:36:07 +03:00
Pravdyvy dc3650edd7 Merge branch 'main' into Pravdyvy/hardcoded-initial-state 2026-03-19 19:02:19 +02:00
Pravdyvy afa0a63c95 fix: suggestions fix 2 2026-03-19 18:01:15 +02:00
Pravdyvy 2c9361c6b5 fix: suggestions 1 2026-03-19 13:01:43 +02:00
jonesmarvin8 83ef789002 lint issues 2026-03-18 18:44:07 -04:00
jonesmarvin8 ce729f112d Merge branch 'main' into marvin/bip-32-comp 2026-03-18 16:47:39 -04:00
jonesmarvin8 5d9980cf63 lint fixes 2026-03-18 13:10:36 -04:00