feat: add stellar-spp CLI plugin#138
Closed
tomerweller wants to merge 11 commits intoNethermindEth:mainfrom
Closed
feat: add stellar-spp CLI plugin#138tomerweller wants to merge 11 commits intoNethermindEth:mainfrom
tomerweller wants to merge 11 commits intoNethermindEth:mainfrom
Conversation
Implements a Stellar CLI plugin (`stellar spp`) that provides full
feature parity with the browser UI from the terminal.
Commands: init, sync, status, keys (derive/show), register, deposit,
withdraw, transfer, notes (list/scan/export/import), admin
(add-member/remove-member/update-admin).
Architecture:
- Delegates all network operations to `stellar` CLI (no reqwest/tokio)
- Embeds compiled circuit artifacts for Groth16 proof generation
- SQLite local state at ~/.config/stellar/spp/{network}.db
- Deterministic key derivation matching Freighter browser wallet
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests cover: - db.rs: all CRUD operations (pool leaves, nullifiers, encrypted outputs, ASP leaves, user notes, registered keys, sync metadata) - crypto.rs: cross-validation against circuits crate reference implementations (Poseidon2 hashing, key derivation, commitment, sign, nullifier pipeline), scalar conversions, encrypt/decrypt round-trip - merkle.rs: root/proof determinism, proof verification by manual root reconstruction, build_pool_leaves/build_asp_leaves from DB - transaction.rs: note selection, ext_data_hash, BN256 modulus, ASP membership index lookup, serialization helpers - notes.rs: note scanning with pre-populated encrypted outputs, detection of spent notes, skip-already-known behavior - config.rs: JSON/TOML serialization round-trips Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix RPC scan window: start from max_ledger-10000 instead of min_ledger
so events within the ~10k scan window are reachable
- Handle "No events" string response from `stellar events` (exit 0)
- Fix ASP non-membership proof: use empty overrides for empty on-chain tree
- Fix Merkle zero leaf: use Poseidon2("XLM") matching on-chain contracts
- Fix proof serialization: correct Groth16 point encoding and public inputs
- Add stellar-xdr base64 feature for XDR decoding in sync
- Add scalar_to_hex_le helper, deduplicate note scanning logic
- Remove dead code (resolve_address), fix clippy warnings
- Add integration test script (35 end-to-end tests against testnet)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This reverts commit 0fdd321.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace rusqlite (bundled SQLite C library) with a JSON file backend using serde + base64. Same public API via RefCell<Store> for interior mutability. Atomic writes via tmp+rename. - Remove dead code: contract_invoke_view, unused ProofResult fields (public_inputs, vk), blanket #[allow(dead_code)] on modules. - Gate test-only functions (poseidon2_compression, scalar_to_be_bytes) with #[cfg(test)]. - Extract duplicated transaction helpers: user_notes_to_inputs, pad_inputs_to_two, save_note. - Remove unused StellarEvent fields (event_type, contract_id). All 67 unit tests and 35 integration test assertions pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Support multiple independent pool deployments per network with named
pool aliases. Storage moves from flat {network}.toml/.json to a
per-pool directory layout ({network}/pools/{pool}.toml/.json) with
automatic migration of existing configs.
New pool subcommands: add, ls, rm, use (following stellar-cli patterns).
The --pool flag and STELLAR_SPP_POOL env select a pool; --network gets
STELLAR_NETWORK env support. Fixes hardcoded "testnet" in notes
import/export.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace all SQLite references with JSON storage, document the new per-pool directory layout, add Pool Management command reference, document STELLAR_NETWORK/STELLAR_SPP_POOL env vars and pool resolution order. Fix platform-specific config paths. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Merge `spp init` into `spp pool add <name> --sync` to eliminate the redundant command. Also fix a scan window boundary bug in get_oldest_ledger where `max - 10,000` could miss recent events (the actual RPC window is ~9,965 ledgers); now uses `max - 9,000`. Add deploy retry logic (3 attempts) to handle transient testnet errors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Open
torisamples
pushed a commit
to torisamples/stellar-private-payments
that referenced
this pull request
Apr 9, 2026
fix (backend): claim nft options supply find
Contributor
|
Hey @tomerweller ! thanks a lot for the contribution! we're refactoring to a single app core with a unified storage (#148) - this pr won't be merged but some ideas to be re-used in the tasks #158 and #159 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cli/crate (stellar-spp) that provides a full-featured CLI plugin for Stellar private payments, with feature parity to the browser UIstellar spp <command>— supports deposits, transfers, withdrawals, key management, syncing, and proof generationpool add/ls/rm/use), JSON file storage, and circuit artifact embedding viabuild.rs🤖 Generated with Claude Code