Getting Started
Getting Started
Build the workspace, create an HD wallet, and run a local two-node devnet in a few minutes.
Scruple is alpha software and a mainnet candidate. Start on devnet or testnet, back up your 24-word recovery phrase offline, and verify commands with --help before using real funds.
Requirements
| Requirement | Notes |
|---|---|
| Operating system | Linux or macOS. Windows is expected to work through the Rust toolchain, but the GUI is tested primarily on Linux/Wayland/X11. |
| Rust toolchain | Stable Rust with Cargo. Build the workspace from the repository root. |
| RAM | ~256 MB for a validating node in RandomX Light mode; at least ~2.5 GB free RAM for solo mining with --full-mem. |
| Disk | Depends on chain size and pruning policy. Archive nodes store raw blocks and undo logs; pruned nodes keep headers, UTXOs, and recent blocks. |
| Network | Outbound TCP for peer connections. Inbound TCP only if you want to accept peers. RPC should remain on localhost. |
| Build time | RandomX and SQIsign dependencies make the first release build relatively heavy. Use a release build for mining. |
Build from source
cd /path/to/scruple
cargo build --release --workspace
This produces two binaries:
| Binary | Purpose |
|---|---|
./target/release/scruple | Headless full node, wallet CLI, multisig cosigner, solo miner controller, and genesis inspector. No GUI dependencies. |
./target/release/scruple-gui | Pure-Rust eframe/egui desktop wallet with an embedded full node, multi-wallet manager, miner, coin control, QR receive, and multisig tab. |
For development builds, replace --release with a debug build, but expect mining and cryptographic operations to be much slower.
Inspect the deterministic genesis block and RandomX Epoch-0 seed for a network. The printed values should match a running node's info output bit-for-bit.
./target/release/scruple genesis --network devnet
./target/release/scruple --help
./target/release/scruple wallet --help
./target/release/scruple node --help
Create a wallet
A new wallet is a deterministic HD wallet backed by a 24-word BIP-39 mnemonic. The phrase recovers every receive address (even HD indices) and every change address (odd HD indices) on the scruple-hd-v1 scheme.
./target/release/scruple wallet new \
--wallet ./wallet.json \
--encrypt
--encrypt prompts for a passphrase without echo and encrypts the wallet at rest with Argon2id and ChaCha20-Poly1305. You can also set SCRUPLE_PASSPHRASE for non-interactive runs; avoid --passphrase on the command line because it can leak through shell history and ps.
The 24-word phrase is printed once when the wallet is created. Store it offline on paper or metal. Anyone with the phrase can spend the funds. The wallet file alone is not enough if you lose the phrase and the file is damaged.
The command prints the first receive address, for example:
Created new SQIsign Level 1 HD wallet in ./wallet.json (encrypted (Argon2id + ChaCha20-Poly1305)):
mnemonic: word1 word2 ... word24
[0] xsl1:<64-hex>
For a checksummed, network-scoped address, use wallet list --network devnet or the GUI. Bech32m addresses start with dxsl1 on devnet, txsl1 on testnet, and xsl1 on mainnet.
Run a two-node devnet
Devnet uses the same consensus rules as mainnet but an easy initial target, so a laptop can mine blocks almost instantly. The default devnet P2P port is 18333 and the default RPC port is 18332.
Open three terminals from the repository root.
Terminal 1 — node 1
./target/release/scruple node \
--network devnet \
--data-dir ./n1 \
--p2p 127.0.0.1:18333 \
--rpc 127.0.0.1:18332
The node writes a fresh RPC cookie to ./n1/.cookie with mode 0600 on startup. The cookie is regenerated on every restart.
Terminal 2 — node 2
./target/release/scruple node \
--network devnet \
--data-dir ./n2 \
--p2p 127.0.0.1:18334 \
--rpc 127.0.0.1:18335 \
--seed 127.0.0.1:18333
--seed adds an explicit bootstrap peer. Explicit --peer and RPC add_peer targets bypass the /16 outbound subnet diversity check, which is useful for LAN clusters.
Terminal 3 — wallets, mining, and a transfer
# Create Alice and Bob wallets
./target/release/scruple wallet new --wallet alice.json
./target/release/scruple wallet new --wallet bob.json
# Mine 3 devnet blocks to Alice on node 1
./target/release/scruple mine \
--data-dir ./n1 --rpc 127.0.0.1:18332 \
--wallet alice.json --threads 2 --blocks 3
# Check that node 2 synced the blocks
./target/release/scruple info --data-dir ./n2 --rpc 127.0.0.1:18335
# Send 0.4 XSL from Alice to Bob at 1 grain/byte
./target/release/scruple send \
--data-dir ./n1 --rpc 127.0.0.1:18332 \
--wallet alice.json \
--to <BOB_XSL1_ADDRESS> \
--amount 0.4 --fee-rate 1
# Mine one confirmation block, then check Bob's balance on node 2
./target/release/scruple mine \
--data-dir ./n1 --rpc 127.0.0.1:18332 \
--wallet alice.json --blocks 1
./target/release/scruple balance \
--data-dir ./n2 --rpc 127.0.0.1:18335 \
--wallet bob.json
Devnet coinbase maturity is 2 blocks; testnet is 6; mainnet is 24. A freshly mined coinbase output is immature until spend_height >= outpoint.height + coinbase_maturity. The balance command reports mature, immature, and pending balances separately.
Launch the desktop GUI
The GUI embeds a full validating node in-process and can manage multiple wallets. It defaults to mainnet and localhost ports; use --network devnet for local testing.
./target/release/scruple-gui \
--network devnet \
--data-dir ./data \
--wallet ./wallet.json
To use a multi-wallet directory instead of a direct wallet file:
./target/release/scruple-gui \
--network devnet \
--data-dir ./data \
--wallets ./data/wallets \
--open my-wallet
The GUI provides eight tabs: Overview & Miner, Activity, Addresses, Coins, Send, Receive, Multisig / Cosign, and Node & Peers. See Desktop GUI for a walkthrough.
Common first-run issues
| Symptom | Fix |
|---|---|
| Build fails on RandomX or SQIsign | Update the Rust toolchain, ensure a C/C++ toolchain and build essentials are installed, and rebuild with cargo build --release --workspace. |
error: wallet file ... already exists | wallet new derives the next address when the file exists. Use a different --wallet path to create a fresh wallet, or wallet recover for a new file. |
unauthorized: missing or invalid RPC cookie | Read <data-dir>/.cookie again. The token rotates on every node restart. |
transaction not found ... --txindex | Confirmed transaction lookups require an archive node started with --txindex. Mempool transactions are always available. |
another RPC mine operation is already in progress | Only one synchronous RPC mine call runs at a time. Use the CLI continuous miner or wait for the current call. |
| GUI opens but shows no peers | Check the network preset, firewall, and seed settings. Devnet has no built-in DNS seeds; pass --peer or --seed explicitly. |
Next steps
Run a real node
Mainnet/testnet presets, VPS setup, peer discovery, pruning, and txindex.
Learn the wallet
Recovery, BYOE entropy, coin control, fee bumps, and safe sending.
Start mining
Continuous CPU solo mining, payout rotation, and external miner integration.
Build on RPC
Authenticate, call every method, and understand limits and errors.