# Shekyl Executables This document describes every binary produced by a Shekyl build. All binaries are placed in `build/release/bin/` (or `build/debug/bin/`). ## Quick reference | Binary | Purpose | |--------|---------| | `shekyld` | Full-node daemon (P2P, consensus, RPC) | | `shekyl-cli` | Interactive command-line wallet (Rust) | | `shekyl-wallet-rpc` | Headless wallet exposed via JSON-RPC | | `shekyl-gen-trusted-multisig` | Offline multisig wallet set generator | | `shekyl-gen-ssl-cert` | TLS certificate / key generator for RPC | | `shekyl-blockchain-import` | Import a bootstrap file into the chain DB | | `shekyl-blockchain-export` | Export chain DB to a bootstrap file | | `shekyl-blockchain-usage` | Output-reuse histogram | | `shekyl-blockchain-ancestry` | Trace output ancestry graphs | | `shekyl-blockchain-depth` | Measure transaction depth to coinbase (historical/analytical) | | `shekyl-blockchain-stats` | Time-series chain statistics | | `shekyl-mdb-copy` | Compact a stopped daemon's LMDB database | | `shekyl-utils-deserialize` | Decode hex blobs to human-readable JSON | | `shekyl-utils-object-sizes` | Print sizeof for core data structures | The `shekyl-utils-*` executables are only built when `BUILD_DEBUG_UTILITIES=ON`. --- ## Default network ports | Network | P2P | RPC (HTTP) | Reserved | |---------|-----|------------|----------| | Mainnet | 11021 | 11029 | 11025 | | Testnet | 12021 | 12029 | 12025 | | Stagenet | 13021 | 13029 | 13025 | Select a network with `--testnet` or `--stagenet`. Mainnet is the default. --- ## 1. `shekyld` — Full-Node Daemon The core network participant. Validates blocks and transactions, relays them over P2P, serves the JSON-RPC API, and optionally mines. ### Usage ``` shekyld [options] [command] ``` ### Key options | Option | Description | |--------|-------------| | `--data-dir ` | Blockchain and config directory (default `~/.shekyl`) | | `--config-file ` | Read options from a config file | | `--testnet` | Run on testnet | | `--stagenet` | Run on stagenet | | `--log-level <0-4>` | Logging verbosity | | `--log-file ` | Log output file (default `~/.shekyl/logs/shekyld.log`, suffixed `-testnet` / `-stagenet` / `-regtest` as applicable). The live file and every rotated archive are written with POSIX mode `0600`. | | `--max-log-file-size ` | Rotate the log file at this size (default ~100 MB) | | `--max-log-files ` | Number of rotated archives to retain (default 50; `0` disables pruning) | | `--non-interactive` | Disable interactive console (for use under a service manager) | | `--rpc-bind-ip ` | RPC listen address (default `127.0.0.1`); IPv4 or IPv6 (`::1`). Loopback only — a wildcard or a network address is refused at start (`RPC_TRANSPORT_POSTURE.md` RT-1/RT-2) | | `--rpc-bind-port ` | RPC listen port (default per network, see table above); Axum sole transport | | `--rpc-use-ipv6` | Also bind `--rpc-bind-ipv6-address` (default `::1`) on the same RPC start; same loopback-only refusals. Not a second security model | | `--restricted-rpc` | Restrict RPC to view-only / safe methods | | `--rpc-restricted-bind-port ` | Separate restricted RPC listener | | `--rpc-access-control-origins ` | Comma-separated CORS allow-list (default: deny) | | `--p2p-bind-port ` | P2P listen port | | `--add-peer ` | Add a persistent peer | | `--add-priority-node ` | Always try to connect to this peer | | `--add-exclusive-node ` | Connect only to these peers | | `--seed-node ` | Connect to a seed node for initial peer discovery | | `--out-peers ` | Maximum outbound connections | | `--in-peers ` | Maximum inbound connections | | `--no-igd` | Disable UPnP port forwarding | | `--prune-blockchain` | Enable blockchain pruning | | `--offline` | Run without P2P networking | | `--ban-list ` | File of IPs to ban | | `--max-txpool-weight ` | Maximum transaction pool size | | `--block-notify ` | Execute command on new block (substitutes `%s` with hash) | | `--db-sync-mode ` | Database sync mode: `safe`, `fast`, `fastest` | ### Interactive console commands When running interactively (without `--non-interactive`), the daemon provides a command console. Under a service manager (systemd, launchd, Task Scheduler, or the GUI wallet's Tauri sidecar), run with `--non-interactive`: | Command | Description | |---------|-------------| | `help` | List available commands | | `status` | Current sync height, network, hashrate | | `print_height` | Current blockchain height | | `print_bc [end]` | Print block range | | `print_block ` | Print a single block | | `print_tx ` | Print transaction details | | `print_pl` | Print peer list | | `print_cn` | Print active connections | | `print_net_stats` | Network traffic statistics | | `print_pool` | Full transaction pool contents | | `print_pool_sh` | Short transaction pool summary | | `print_pool_stats` | Pool statistics | | `start_mining [threads]` | Start mining to an address | | `stop_mining` | Stop mining | | `mining_status` | Current mining status | | `diff` | Current network difficulty | | `sync_info` | Blockchain sync progress and peer states | | `hard_fork_info` | Hard fork voting status | | `bans` | List banned peers | | `ban [seconds]` | Ban an IP address | | `unban ` | Remove a ban | | `flush_txpool [txid]` | Remove transactions from the pool | | `pop_blocks ` | Remove the top N blocks (for recovery) | | `set_log ` | Change log level at runtime | | `limit [up\|down] [kB/s]` | View or set bandwidth limits | | `out_peers ` | Change max outbound peers | | `in_peers ` | Change max inbound peers | | `version` | Print daemon version | | `save` | Force a blockchain save | | `exit` / `stop_daemon` | Shut down the daemon | ### Examples ```bash # Start a mainnet full node with default settings shekyld # Start a testnet node (RPC on loopback; a wildcard or network bind is refused) shekyld --testnet # Start a restricted (view-only) listener for your own wallet on a second # port; admin stays on the main RPC. RPC is operator-to-operator — this is # not a public remote node (shekyld does not advertise RPC over P2P). shekyld --non-interactive --rpc-restricted-bind-port 11030 \ --config-file /etc/shekyl/shekyld.conf # Use a custom data directory shekyld --data-dir /mnt/ssd/shekyl-data # Pruned node (saves ~2/3 disk space) shekyld --prune-blockchain ``` --- ## 2. `shekyl-cli` — Interactive CLI Wallet (Rust) A Rust-native interactive CLI wallet. It is a pure JSON-RPC client of `shekyl-wallet-rpc` (Shape B): by default it self-hosts a wallet-RPC server in-process over a private, owner-only local endpoint; with `--rpc-url` it connects to an external one instead. The contract is [`docs/api/wallet_rpc.yaml`](api/wallet_rpc.yaml); the capability ledger is [`docs/CLI_PARITY_MATRIX.md`](CLI_PARITY_MATRIX.md). Replaces the legacy `shekyl-wallet-cli` (C++ simplewallet), which has been removed. ### Usage ``` shekyl-cli [options] ``` ### Key options | Option | Description | |--------|-------------| | `--daemon-address ` | Daemon to connect to. Default: this machine's daemon at the RPC port for `--network` (`11029` / `12029` / `13029`). With `--rpc-url` the self-hosted wallet RPC is not started, but the REPL still queries the daemon at this address directly. A daemon that is not loopback is disclosed on stderr at startup (USER_GUIDE "Connecting to a daemon"; `RPC_TRANSPORT_POSTURE.md` §1) | | `--rpc-url ` | Connect to an external `shekyl-wallet-rpc` instead of self-hosting one (`http://host:port`, or `uds:///path/to.sock` on Unix) | | `--network ` | Network the self-hosted wallet server binds to: `mainnet` (default), `testnet`, `stagenet`. With `--rpc-url` that server is not started, and the flag is then read only to supply the default daemon port for the REPL's own daemon queries — so a run that names its own `--daemon-address` never consults it | | `--testnet` / `--stagenet` | Shorthand for `--network testnet` / `--network stagenet` — the same flags `shekyld` takes (CU-1). The prompt names the selected network | | `--wallet-dir ` | Directory for wallet files. Default: the per-network `~/.shekyl/wallets//`, created on demand, so wallets on different networks never share a directory (CU-1). Ignored with `--rpc-url`. `--engine-dir` is a hidden alias (CU-2) | | `--wallet ` | Open a wallet immediately on startup. `--engine-file` is a hidden alias (CU-2) | | `--proxy ` | SOCKS proxy for the daemon connections. Prefer `socks5h://`: the REPL's direct daemon queries honor the scheme, and `socks5://` resolves the hostname locally (a DNS leak, warned at startup) | | `--daemon-ca-cert ` | PEM CA certificate for an `https://` daemon with a custom CA | | `--debug` | Show structured RPC error details on failures | ### Interactive commands This section mirrors the live `help` output; where they disagree, the binary's `help` wins. Deleted wallet2-era commands (accounts, subaddresses, secret display, key images, sweeps, `get_tx_key`) refuse at parse time with guidance naming the Shekyl-native replacement; the full disposition ledger is [`docs/CLI_PARITY_MATRIX.md`](CLI_PARITY_MATRIX.md). **Wallet lifecycle** | Command | Description | |---------|-------------| | `create ` | Create a new wallet (also non-interactive: `create --seed-out `) | | `open ` | Open an existing wallet | | `close` | Close the current wallet | | `restore ` | Restore from mnemonic seed | | `password` | Change wallet password | | `refresh` | Sync with the daemon | | `rescan` | Rebuild transaction history from the chain (`hard` accepted; same rescan) | | `status` | Wallet and daemon sync heights | **Address and balance** | Command | Description | |---------|-------------| | `address [--full] [--out ]` | Show the wallet's primary address (short display form by default; `--full` prints all ~2,030 characters; `--out` writes the full form to a new private file) | | `balance` | Balance breakdown | **Transfers** | Command | Description | |---------|-------------| | `transfer
[--priority N] [--no-confirm]` | Send SKL (build → confirm → submit/discard) | | `transfers` | Recent transactions | | `show_transfer ` | Details for a transaction | | `get_tx_note ` | Show the local note for a transaction | | `set_tx_note ` | Attach a local note (the note is everything after the txid, verbatim) | | `abandon ` | Give up on a dispatched send; funds stay locked until the network is confirmed to have dropped it | | `fee [--inputs N] [--outputs N]` | Fee quotes and size estimate | **Receiving (payment requests)** | Command | Description | |---------|-------------| | `request new