Update README
This commit is contained in:
@@ -1,20 +1,21 @@
|
|||||||
# salvium-rs
|
# salvium-rs
|
||||||
|
|
||||||
Rust implementation of Salvium cryptocurrency tooling — wallet management, transaction construction, blockchain consensus, cryptographic operations, mining, and multisig support.
|
Rust implementation of Salvium cryptocurrency tooling — wallet management, transaction construction, blockchain consensus, cryptographic operations, mining, multisig support, and C FFI for mobile/desktop apps.
|
||||||
|
|
||||||
## Workspace Crates
|
## Workspace Crates
|
||||||
|
|
||||||
| Crate | Description |
|
| Crate | Description |
|
||||||
|-------|-------------|
|
|-------|-------------|
|
||||||
| **salvium-crypto** | Core cryptographic primitives: Ed25519/Curve25519, CLSAG/TCLSAG signatures, Bulletproofs+ range proofs, key images, CryptoNote + CARROT output scanning, SQLCipher wallet storage, WASM compilation target |
|
| **salvium-crypto** | Core cryptographic primitives: Ed25519/Curve25519, CLSAG/TCLSAG signatures, Bulletproofs+ range proofs, key images, CryptoNote + CARROT output scanning, SQLCipher wallet storage, WASM compilation target |
|
||||||
| **salvium-types** | Shared types: network IDs, address prefixes, consensus constants, hardfork table, fee calculation, transaction types |
|
| **salvium-types** | Shared types: network IDs, address prefixes, consensus constants, hardfork table (HF1–HF11), fee calculation, transaction types, mnemonic seeds (12 languages) |
|
||||||
| **salvium-consensus** | Blockchain consensus: chain state, difficulty, block weight limits, alternative chain management, miner TX creation, block/transaction validation |
|
| **salvium-consensus** | Blockchain consensus: chain state, difficulty, block weight limits, alternative chain management, miner TX creation, block/transaction validation |
|
||||||
| **salvium-wallet** | Wallet functionality: key derivation, mnemonic seeds (12 languages), address generation (18 types), sync engine, encrypted storage (AES-256-GCM + Argon2id), UTXO selection, stake lifecycle tracking, subaddress generation |
|
| **salvium-wallet** | Wallet functionality: key derivation, address generation (18 types), sync engine, mempool scanning, encrypted storage (AES-256-GCM + Argon2id), UTXO selection, stake lifecycle tracking, token creation, subaddress generation |
|
||||||
| **salvium-tx** | Transaction construction: builder, signing, decoy selection, fee estimation, offline signing (cold wallet support), serialization |
|
| **salvium-tx** | Transaction construction: builder (v2–v5), signing, decoy selection, fee estimation, offline signing (cold wallet support), serialization |
|
||||||
| **salvium-rpc** | Async RPC clients for Salvium daemon (block/tx/output queries, submission) and wallet service |
|
| **salvium-rpc** | Async RPC clients for Salvium daemon (block/tx/output queries, submission) and wallet service |
|
||||||
|
| **salvium-ffi** | C FFI library for mobile/desktop apps: wallet lifecycle, sync, transfers, staking, sweeps, token creation, mempool scanning, PIN-encrypted blob export/import |
|
||||||
| **salvium-miner** | RandomX proof-of-work mining: large pages, pipelined hashing, Blake2 generator, difficulty checking |
|
| **salvium-miner** | RandomX proof-of-work mining: large pages, pipelined hashing, Blake2 generator, difficulty checking |
|
||||||
| **salvium-multisig** | M-of-N multisig: key exchange protocol (KEX), partial signatures, transaction sets, CARROT-aware multisig accounts and addresses |
|
| **salvium-multisig** | M-of-N multisig: key exchange protocol (KEX), partial signatures, transaction sets, CARROT-aware multisig accounts and addresses |
|
||||||
| **salvium-cli** | Command-line wallet: create/restore, sync, transfer, stake, balance, history, status |
|
| **salvium-cli** | Command-line wallet: create/restore, sync, transfer, stake, burn, create-token, balance, history, status |
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
@@ -26,7 +27,7 @@ cargo build --workspace --release
|
|||||||
## Testing
|
## Testing
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Run all 703 unit + integration tests
|
# Run all 1,010 unit + integration tests
|
||||||
cargo test --workspace
|
cargo test --workspace
|
||||||
|
|
||||||
# Run tests for a specific crate
|
# Run tests for a specific crate
|
||||||
@@ -38,11 +39,8 @@ cargo test -p salvium-consensus
|
|||||||
# Default daemon: http://node12.whiskymine.io:29081
|
# Default daemon: http://node12.whiskymine.io:29081
|
||||||
cargo test --workspace -- --ignored --nocapture
|
cargo test --workspace -- --ignored --nocapture
|
||||||
|
|
||||||
# Specific testnet tests
|
# Full orchestration test (HF1–HF10 validation, ~2.5 hours)
|
||||||
cargo test -p salvium-wallet --test testnet_transfer -- --ignored --nocapture
|
cargo test -p salvium-tx --test full_testnet -- --ignored --nocapture
|
||||||
cargo test -p salvium-wallet --test testnet_stake -- --ignored --nocapture
|
|
||||||
cargo test -p salvium-wallet --test testnet_burn -- --ignored --nocapture
|
|
||||||
cargo test -p salvium-rpc --test testnet -- --ignored --nocapture
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Testnet Environment
|
### Testnet Environment
|
||||||
@@ -57,7 +55,7 @@ Wallet files expected at `~/testnet-wallet/`:
|
|||||||
- `wallet-a.json` + `wallet-a.pin` (sender)
|
- `wallet-a.json` + `wallet-a.pin` (sender)
|
||||||
- `wallet-b.json` + `wallet-b.pin` (receiver)
|
- `wallet-b.json` + `wallet-b.pin` (receiver)
|
||||||
|
|
||||||
Legacy JS integration tests (burn-in, stress, full hardfork validation) remain in `test/legacy-js/` and can be run with `bun`.
|
See [docs/integration-testing.md](docs/integration-testing.md) for full orchestration test documentation.
|
||||||
|
|
||||||
## CLI Usage
|
## CLI Usage
|
||||||
|
|
||||||
@@ -70,6 +68,7 @@ salvium-cli --network testnet sync
|
|||||||
salvium-cli --network testnet balance
|
salvium-cli --network testnet balance
|
||||||
salvium-cli --network testnet transfer --address SaLvT... --amount 1.0
|
salvium-cli --network testnet transfer --address SaLvT... --amount 1.0
|
||||||
salvium-cli --network testnet stake --amount 100.0
|
salvium-cli --network testnet stake --amount 100.0
|
||||||
|
salvium-cli --network testnet create-token --ticker TEST --supply 1000000 --decimals 8
|
||||||
salvium-cli --network testnet history
|
salvium-cli --network testnet history
|
||||||
salvium-cli --network testnet stakes
|
salvium-cli --network testnet stakes
|
||||||
salvium-cli --network testnet status
|
salvium-cli --network testnet status
|
||||||
@@ -86,6 +85,18 @@ salvium-cli --network testnet --daemon http://127.0.0.1:29081 sync
|
|||||||
| Testnet | 29081 |
|
| Testnet | 29081 |
|
||||||
| Stagenet | 39081 |
|
| Stagenet | 39081 |
|
||||||
|
|
||||||
|
## FFI (Mobile/Desktop)
|
||||||
|
|
||||||
|
The `salvium-ffi` crate exposes a C API for integration with Flutter, React Native, Swift, Kotlin, etc.
|
||||||
|
|
||||||
|
Key exports:
|
||||||
|
- `salvium_wallet_create`, `salvium_wallet_open`, `salvium_wallet_close`
|
||||||
|
- `salvium_wallet_sync`, `salvium_wallet_stop_sync`, `salvium_wallet_scan_mempool`
|
||||||
|
- `salvium_wallet_transfer`, `salvium_wallet_stake`, `salvium_wallet_sweep`
|
||||||
|
- `salvium_wallet_create_token`
|
||||||
|
- `salvium_wallet_get_balance`, `salvium_wallet_get_transfers`, `salvium_wallet_get_outputs`
|
||||||
|
- `salvium_wallet_export_blob`, `salvium_wallet_import_blob` (PIN-encrypted key storage)
|
||||||
|
|
||||||
## Address Types
|
## Address Types
|
||||||
|
|
||||||
| Network | Format | Standard | Integrated | Subaddress |
|
| Network | Format | Standard | Integrated | Subaddress |
|
||||||
@@ -119,14 +130,9 @@ RUSTFLAGS="-Ctarget-feature=+simd128" \
|
|||||||
|
|
||||||
## CI/CD
|
## CI/CD
|
||||||
|
|
||||||
- **CI** (push/PR to main): formatting, clippy, workspace compile, WASM target check, per-crate test matrix, doc tests
|
- **CI** (push/PR to main, manual dispatch): formatting, clippy, workspace compile, WASM target check, per-crate test matrix, doc tests — runs on self-hosted runner
|
||||||
- **Release** (on `v*` tags): pre-release tests, cross-platform miner binaries (Linux x86_64/aarch64, macOS x86_64/aarch64, Windows x86_64), WASM artifacts, GitHub Release with checksums
|
- **Release** (on `v*` tags): pre-release tests, cross-platform builds (Android, iOS, Linux, macOS, Windows, WASM), miner binaries, GitHub Release with checksums
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
Contributions welcome. Reference implementation: https://github.com/salvium/salvium
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Apache 2.0 + Commercial
|
Salvium-RS Source-Available License — Copyright (c) 2024-2026 Whisky
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user