2189 Commits

Author SHA1 Message Date
moudyellaz
27299e75cc feat: add self_program_id to ProgramInput and read_nssa_inputs 2026-04-02 20:29:10 +02:00
Sergio Chouhy
fbdfd8f7ef
Merge pull request #417 from ygd58/fix/ci-fork-pr-permissions
fix: add explicit permissions to allow CI on fork PRs
2026-04-02 12:27:32 -03: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
ygd58
e71a0b9375 fix: use pull_request.head.sha for fork PR checkout
github.head_ref is empty for fork PRs, causing checkout to fail.
Use github.event.pull_request.head.sha as primary ref with
github.head_ref as fallback for branch pushes.
2026-04-01 12:56:29 +02:00
ygd58
ef83bb2e91 chore: remove redundant comment from permissions block 2026-04-01 12:54:26 +02:00
ygd58
868781f992 fix: add explicit permissions to allow CI on fork PRs
Fixes #278
2026-04-01 12:54:26 +02:00
Sergio Chouhy
9fa541f3d1
Merge pull request #404 from logos-blockchain/feature/validity-window-timestamps
feat: extend ValidityWindow with Unix timestamp bounds
2026-03-31 16:46:58 -03:00
Moudy
a560562874 fix: use force_insert_account in pinata PDA test
The pda_mechanism_with_pinata_token_program test was broken after
PR #414 introduced Claim::Authorized for token account claiming.
Set up token accounts directly to focus the test on the PDA mechanism
in the pinata program's chained call.
2026-03-31 18:51:37 +02:00
Moudy
e3edabcaa2 rebuild artifacts after ValidityWindow struct change 2026-03-31 15:47:43 +02:00
Moudy
5f0f8a78d3 fix: use infallible .into() instead of .try_into() for ValidityWindow conversion
Clippy flagged unnecessary fallible conversion since RangeFrom<u64> to
ValidityWindow<u64> cannot fail.
2026-03-31 15:34:52 +02:00
Moudy
103198f981 remove .unwrap() 2026-03-31 14:58:52 +02:00
Moudy
12bdc256d4 rebuild artifacts 2026-03-31 14:55:37 +02:00
Moudy
d4fb326f66 fix: remove stale validity_window ref and add missing timestamp args 2026-03-31 14:38:05 +02:00
Moudy
5113b212d6
Update nssa/core/src/circuit_io.rs
Co-authored-by: Daniil Polyakov <arjentix@gmail.com>
2026-03-31 14:10:43 +02:00
Moudy
df375ad04a fix: add missing nssa_core dependency to common crate 2026-03-31 14:08:12 +02:00
Moudy
be2b2db1f5 rebuild artifacts after rebase onto main 2026-03-31 13:58:53 +02:00
Sergio Chouhy
eb14b8bf98 clippy 2026-03-31 13:51:12 +02:00
Sergio Chouhy
f627910468 fmt 2026-03-31 13:51:12 +02:00
Sergio Chouhy
f1a42c6f97 minor refactor 2026-03-31 13:50:47 +02:00
Sergio Chouhy
8bfaf9ef4a remove blockid from common 2026-03-31 13:50:47 +02:00
Sergio Chouhy
9d830411a1 rename timestamp_ms to timestamp 2026-03-31 13:50:30 +02:00
Sergio Chouhy
77c5032527 remove common TimeStamp 2026-03-31 13:50:30 +02:00
Sergio Chouhy
35273aa02f use curr_time from new block 2026-03-31 13:50:07 +02:00
Sergio Chouhy
99f0ed03dc add type aliases 2026-03-31 13:50:06 +02:00
Sergio Chouhy
27b0ba7592 add tests for timestamp validity windows 2026-03-31 13:49:37 +02:00
Sergio Chouhy
9aa7caf3bf refactor validity window with generic 2026-03-31 13:49:12 +02:00
Moudy
6d690a8d25 fix: add backticks to doc comment for clippy doc_markdown 2026-03-31 13:47:21 +02:00
Moudy
d861f2018c rebuild artifacts with validity_window field in ProgramOutput 2026-03-31 13:47:03 +02:00
moudyellaz
c9d9d77316 fix: remove unused self from next_block_timestamp_ms 2026-03-31 13:46:43 +02:00
moudyellaz
0823461012 style: apply nightly cargo fmt 2026-03-31 13:46:43 +02:00
moudyellaz
c4567d163d style: apply cargo fmt 2026-03-31 13:46:25 +02:00
moudyellaz
5c592312f9 feat: extend ValidityWindow with Unix timestamp bounds 2026-03-31 13:46:08 +02:00
Daniil Polyakov
b8bb6913be
Merge pull request #414 from logos-blockchain/arjentix/protect-from-pda-griefing-attack
feat: protect from public pda griefing attacks
2026-03-31 13:56:10 +03:00
jonesmarvin8
ffcbc15972
Issue 258 - remove secp256k1 for k256 (#399)
* initialize branch

* fix signatures to use k256

* fixed error

* lint fix

* lint fix

* clippy fixes

* clippy
2026-03-30 17:15:25 -04:00
Daniil Polyakov
6780f1c9a4 feat: protect from public pda griefing attacks 2026-03-28 01:23:57 +03:00
Sergio Chouhy
085ca69e42
Merge pull request #400 from logos-blockchain/schouhy/add-block-context
Add validity windows to program output
2026-03-27 10:07:38 -03:00
Sergio Chouhy
99071a4ef9 Merge branch 'main' into schouhy/add-block-context 2026-03-26 21:23:36 -03:00
Sergio Chouhy
73fdc1d70c artifacts 2026-03-26 18:30:03 -03:00
Sergio Chouhy
287b196569 remove redundant docstring 2026-03-26 18:16:18 -03:00
Sergio Chouhy
e618e08bdc use validity window as intstruction type in test programs 2026-03-26 18:10:31 -03:00
Sergio Chouhy
25a86d4bac move standard derives to beginning 2026-03-26 15:27:37 -03:00
Sergio Chouhy
57b83f4e1a move to impl display 2026-03-26 15:21:29 -03:00
Pravdyvy
9c23c5fd8a
Merge pull request #393 from logos-blockchain/Pravdyvy/hardcoded-initial-state
feat: general initial state
2026-03-26 19:17:20 +02:00
Pravdyvy
9d5eb3e3bd
Merge pull request #390 from logos-blockchain/Pravdyvy/indexer-db-batching
Indexer db batching
2026-03-26 18:27:02 +02: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
Pravdyvy
b8a754449a Merge branch 'main' into Pravdyvy/indexer-db-batching 2026-03-26 17:51:03 +02:00
Sergio Chouhy
9e6820f2a4
Merge pull request #412 from logos-blockchain/schouhy/remove-indexer-ci-tests
Temporarily remove integration tests indexer
2026-03-26 12:41:23 -03:00