175 Commits

Author SHA1 Message Date
jonesmarvin8
3fce53f663 Merge branch 'main' into marvin/keycard-commands 2026-05-14 10:29:40 -04:00
jonesmarvin8
e7b42a5177 first round of comments 2026-05-12 18:07:44 -04:00
Sergio Chouhy
67b6916b72 clippy 2026-05-12 13:55:30 -03:00
Sergio Chouhy
f3389571f8 use identifier in private gms command 2026-05-12 13:29:06 -03:00
Moudy
27e2850b5c refactor: make SealingPublicKey a newtype wrapper 2026-05-08 23:59:08 +02:00
Moudy
6e376900f7 fix: remove export/import commands, rewrite test to use invite/join 2026-05-08 20:28:39 +02:00
Moudy
1bed9ecef2 fix: resolve shared accounts in all facades, use SealingPublicKey alias, ignore fund test 2026-05-08 17:44:10 +02:00
Moudy
4e7963c655 feat: add dedicated sealing key for GMS distribution 2026-05-08 08:19:55 +02:00
Moudy
4ace6e1570 fix: address review feedback 2026-05-07 22:48:32 +02:00
Moudy
69b81ea621 fix: address review feedback, persist group data in wallet storage 2026-05-07 17:35:51 +02:00
Moudy
d0a88e91e1 feat: extend sync to scan shared accounts with GMS-derived keys 2026-05-06 14:22:49 +02:00
Moudy
cd545819e7 feat(wallet)!: add group CLI commands with --for-gms account creation
BREAKING CHANGE: `NewSubcommand::Private` has new required fields (`for_gms`, `pda`, `seed`, `program_id`). Code constructing this variant must include them (use `None`/`false` for defaults). `shared_accounts` value type changed from `Account` to `SharedAccountEntry`.
2026-05-06 14:22:40 +02:00
jonesmarvin8
143c697c4e Merge branch 'marvin/refactor-wallet-pub-acc' into marvin/keycard-commands 2026-04-30 19:05:18 -04:00
jonesmarvin8
5d035d9f8f comment fixes 2026-04-30 19:02:33 -04:00
Moudy
4c28133448 fix: resolve merge conflicts 2026-04-30 15:04:33 +02:00
Sergio Chouhy
72756e8622 Merge branch 'main' into schouhy/generalize-npk-to-multiple-accounts 2026-04-29 12:28:05 -03:00
jonesmarvin8
8312bf6c2a update artifacts 2026-04-28 21:33:12 -04:00
jonesmarvin8
01cc7e24b6 fixed integration tests 2026-04-28 20:45:43 -04:00
jonesmarvin8
d5dea3e115 fix integration test issue and updated keycard firmware 2026-04-28 14:10:54 -04: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
jonesmarvin8
e5eae57a5f fix ci 2026-04-27 20:12:57 -04:00
Sergio Chouhy
c3f47f6685 use option<identifier> for all wallet commands 2026-04-27 19:57:25 -03:00
jonesmarvin8
016d063329 CI fixes 2026-04-27 18:47:02 -04:00
jonesmarvin8
2926c808d3 Removed privacy txs for keycard 2026-04-27 16:37:21 -04:00
jonesmarvin8
8386d3ab17 fixes 2026-04-26 22:50:16 -04:00
jonesmarvin8
24f6f1f8ca fixes 2026-04-26 21:29:54 -04:00
jonesmarvin8
7b4f973f96 refactor and add pin support to program facades 2026-04-24 22:10:04 -04:00
Sergio Chouhy
584bfb2052 clippy 2026-04-24 00:42:54 -03:00
Sergio Chouhy
a5565e0875 make identifier random by default for wallet cli send commands 2026-04-23 23:31:21 -03:00
jonesmarvin8
fac4e86e40 Updates for signatures with keycard 2026-04-23 17:45:43 -04:00
jonesmarvin8
9f1c8bdf29 fixed load for non continuous run 2026-04-23 09:47:09 -04:00
jonesmarvin8
096522ebb9 fixes 2026-04-22 21:23:33 -04:00
jonesmarvin8
f892b92ee7 update commands 2026-04-21 18:27:14 -04:00
jonesmarvin8
d88d297574 add script file for easier wallet access 2026-04-21 17:42:27 -04:00
Sergio Chouhy
3ec166ff7c bring back new private account command for simplicity 2026-04-21 02:35:50 -03:00
Sergio Chouhy
6316f59777 fmt 2026-04-19 23:13:51 -03:00
jonesmarvin8
04344f1fce feat: add basic commands for communicating with keycard 2026-04-17 19:08:45 -04:00
Sergio Chouhy
a42144cb3c minor refactor. update ffi 2026-04-17 19:45:30 -03:00
Sergio Chouhy
b34e301023 rollback and remove identifier arguments in new private account wallet command 2026-04-17 14:26:50 -03:00
Sergio Chouhy
f28ac0f092 return account id on new private account creation 2026-04-17 12:52:07 -03:00
Sergio Chouhy
4c050f35dd refactor private key tree to store a vec<(Identifier, AccountId)> 2026-04-16 03:03:13 -03:00
Sergio Chouhy
0fd2682d2e add identifier arguments to cli commands 2026-04-15 19:01:58 -03:00
Sergio Chouhy
4ab8696d85 update facades to receive identifiers 2026-04-15 17:21:16 -03:00
Sergio Chouhy
985f610cea wip 2026-04-15 15:42:04 -03:00
fryorcraken
0dc8409efc
feat: add --account-label as alternative to --account-id across all wallet subcommands
Allow users to identify accounts by their human-readable label instead of the
full `Privacy/base58` account ID. This makes the CLI much more ergonomic for
users who have labeled their accounts.

- [x] Add `resolve_account_label()` in `helperfunctions.rs` that looks up a label,
  determines account privacy (public/private), and returns the full `Privacy/id` string
- [x] Add `--account-label` (or `--from-label`, `--to-label`, `--definition-label`,
  `--holder-label`, `--user-holding-*-label`) as mutually exclusive alternative to
  every `--account-id`-style flag across all subcommands:
  - `account get`, `account label`
  - `auth-transfer init`, `auth-transfer send`
  - `token new`, `token send`, `token burn`, `token mint`
  - `pinata claim`
  - `amm new`, `amm swap`, `amm add-liquidity`, `amm remove-liquidity`
- [x] Update zsh completion script with `_wallet_account_labels()` helper
- [x] Add bash completion script with `_wallet_get_account_labels()` helper

1. Start a local sequencer
2. Create accounts and label them: `wallet account new public --label alice`
3. Use labels in commands: `wallet account get --account-label alice`
4. Verify mutual exclusivity: `wallet account get --account-id <id> --account-label alice` should error
5. Test shell completions: `wallet account get --account-label <TAB>` should list labels

None

None

- [x] Complete PR description
- [x] Implement the core functionality
- [ ] Add/update tests
- [x] Add/update documentation and inline comments

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 14:53:27 +10:00
Andrea Franz
7d75eb2d59 chore(programs/amm): rename Swap to SwapExactInput 2026-04-02 16:10:12 +02:00
Andrea Franz
9a6ec0018b feat(programs/amm): add swap exact output functionality 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
Pravdyvy
8a806899e4 Merge branch 'main' into Pravdyvy/hardcoded-initial-state 2026-03-26 17:53:05 +02:00