240 Commits

Author SHA1 Message Date
jonesmarvin8
a8156b579c adding support to other programs 2026-05-01 02:44:36 -04:00
jonesmarvin8
8d398646ca Merge branch 'marvin/keycard-commands' into marvin/keycard-privacy-commands 2026-04-30 21:04:22 -04: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
jonesmarvin8
a4692fc735 Merge branch 'main' into marvin/refactor-wallet-pub-acc 2026-04-30 14:22:43 -04:00
jonesmarvin8
5b159e2668 addressed comments 2026-04-30 11:28:32 -04:00
jonesmarvin8
ab65c4be86 privacy command fixes 2026-04-29 07:52:15 -04:00
jonesmarvin8
d031b10e45 Merge branch 'marvin/keycard-commands' into marvin/keycard-privacy-commands 2026-04-28 18:11:47 -04:00
jonesmarvin8
27905d94d6 addressed more comments 2026-04-28 14:13:04 -04:00
jonesmarvin8
0369cd093d Merge branch 'marvin/keycard-commands' into marvin/keycard-privacy-commands 2026-04-27 20:22:49 -04:00
jonesmarvin8
b12222641b initialize branch 2026-04-27 20:16:39 -04:00
jonesmarvin8
b396756e8d addressed some comments 2026-04-27 20:07:47 -04: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
5bcf1a253b Revert "fixes"
This reverts commit 41f34f4ff4145b7abb60fd9bec168ae4b60f23b4.
2026-04-26 21:28:11 -04:00
jonesmarvin8
41f34f4ff4 fixes 2026-04-26 20:27:22 -04:00
jonesmarvin8
7b4f973f96 refactor and add pin support to program facades 2026-04-24 22:10:04 -04:00
Sergio Chouhy
52992a124a fix identifier for pda 2026-04-24 17:04:40 -03:00
jonesmarvin8
93a1487553 Merge branch 'marvin/refactor-wallet-pub-acc' into marvin/keycard-commands 2026-04-24 12:05:17 -04:00
jonesmarvin8
1cea188e38 Merge branch 'marvin/signature-bip340-fixes' into marvin/refactor-wallet-pub-acc 2026-04-24 12:04:15 -04:00
Sergio Chouhy
7c45b5af3c Merge branch 'main' into schouhy/generalize-npk-to-multiple-accounts 2026-04-24 01:04:55 -03:00
Sergio Chouhy
e19c9ff20a return impl iterator 2026-04-24 00:04:22 -03:00
jonesmarvin8
fac4e86e40 Updates for signatures with keycard 2026-04-23 17:45:43 -04:00
jonesmarvin8
0390977acf reorganization 2026-04-21 13:40:15 -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
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
3cf7972425 add identifier to ciphertext and use it on sync mechanism 2026-04-16 23:22:40 -03: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
0ecec7016e refactor key trees 2026-04-15 23:34:49 -03:00
Sergio Chouhy
985f610cea wip 2026-04-15 15:42:04 -03:00
Sergio Chouhy
a4af8da13b replace npk for account id in commitment and init nullifier formulas 2026-04-14 23:45:34 -03: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
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
7b20a83379 fix: fixes after rebase & address comments 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
be94e133fa feat: refactor sequencer RPC server-side 2026-03-20 00:41:05 +03:00
jonesmarvin8
4fdefd3557 fix typo 2026-03-18 16:53:07 -04:00
jonesmarvin8
ce729f112d Merge branch 'main' into marvin/bip-32-comp 2026-03-18 16:47:39 -04:00
jonesmarvin8
0bcb626adc lint fixes 2026-03-18 10:28:52 -04:00
jonesmarvin8
ba8fdf4f29 fix conflicts from merging main 2026-03-17 19:16:09 -04:00
jonesmarvin8
8dd5037e28 Merge branch 'main' into marvin/nonce 2026-03-17 16:45:08 -04:00
Daniil Polyakov
d79ac3f9a8 fix: formatting 2026-03-17 21:25:30 +03:00