parallax-cli binary is Parallax’s JSON-RPC client for talking to a running node, in the same spirit as Bitcoin Core’s bitcoin-cli. Rather than curling the RPC endpoint directly or entering the JavaScript console for a quick status check, you invoke short subcommands:
Endpoint resolution
By default every command connects to<datadir>/parallax.ipc, picking the data directory from --datadir (honoring --testnet as <datadir>/testnet/parallax.ipc). You can override the endpoint with --rpc, which accepts a filesystem path (IPC) or a http://, https://, or ws:// URL:
Output conventions
The command output mirrorsbitcoin-cli:
- Object or array responses are pretty-printed JSON (2-space indent), safe to pipe into
jq. - Scalar responses (numbers, hashes, decimal amounts) are printed as a bare value plus a newline, so
$(parallax-cli blockcount)works in shell scripts. - Mutating commands (
stop,addpeer,removepeer) print nothing on success and return exit code 0. Errors are written to stderr and produce exit code 1.
Command reference
All commands below accept--datadir, --testnet, and --rpc.
start [config]
Convenience wrapper for parallaxd --daemon. Starts the node in the background, detached from the controlling terminal, with logs redirected to <datadir>/parallax.log. An optional positional argument points at a TOML configuration file to pass through as --config.
Every global flag placed before start on the command line is preserved, so:
stop
Gracefully shuts down the running daemon. Equivalent to bitcoin-cli stop. Prints Parallax server stopping on success. Uses the admin_stop RPC.
info
Combined overview of chain, network, and mempool state. Merges the fields you would get from getblockchaininfo, getnetworkinfo, and getmempoolinfo in Bitcoin Core into a single JSON object.
chaininfo
Chain state only (no network or mempool). Equivalent to bitcoin-cli getblockchaininfo.
netinfo
Network state only. Equivalent to bitcoin-cli getnetworkinfo. Uses admin_nodeInfo + net_peerCount + net_listening.
uptime
Seconds since the running node started. Equivalent to bitcoin-cli uptime. Backed by a new admin_uptime RPC.
blockcount
Prints the latest block number as a bare integer. Equivalent to bitcoin-cli getblockcount. Uses eth_blockNumber.
syncing
Prints false if the node is caught up, otherwise a JSON object with sync progress. Uses eth_syncing.
mempool
Summary of the node’s transaction pool. Uses txpool_status.
mempool-content
Dump the full transaction pool as JSON, or narrow it with --address <sender> (useful when you’re debugging a specific account). Pass --inspect for one-line summaries instead of full transaction objects — handy when the pool is large.
Uses txpool_content, txpool_contentFrom, or txpool_inspect depending on the flags.
estimategas
Estimates the gas required to execute a transaction. Prints a bare integer, matching the scalar-output convention used by gasprice. Errors from the RPC (e.g. insufficient funds, revert) are surfaced to stderr with exit 1.
--value accepts decimal wei or 0x-prefixed hex. Uses eth_estimateGas.
peers
JSON array of connected peers. Equivalent to bitcoin-cli getpeerinfo. Uses admin_peers.
balance <address>
Prints the balance of an account. Equivalent to bitcoin-cli getbalance (applied to a specific address, since the daemon has no wallet of its own). By default prints a decimal LAX value; pass --wei for the exact integer. Supports --block for historical queries.
eth_getBalance.
nonce <address>
Prints the transaction count (nonce) of an account as a bare integer. Essential when crafting raw transactions. Supports --block for historical queries. Uses eth_getTransactionCount.
code <address>
Prints the deployed bytecode at an address as a 0x-prefixed hex string, or 0x if the address is an externally owned account. Uses eth_getCode.
[ "$(parallax-cli code $addr)" = "0x" ] to branch on contract vs EOA in shell scripts.
storage <address> <slot>
Reads a 32-byte storage slot from a contract and prints it as a 0x-prefixed hex string. <slot> accepts a decimal index or a 0x-prefixed hex key. Uses eth_getStorageAt.
--block for historical reads.
gettx <txhash>
Fetches a transaction by hash and prints it as JSON. Equivalent to bitcoin-cli getrawtransaction <txid> 1. Uses eth_getTransactionByHash.
transaction ... not found if the node does not know the hash.
getreceipt <txhash>
Fetches the receipt of a mined transaction as JSON. Uses eth_getTransactionReceipt. Exits non-zero if the transaction is not mined yet or unknown.
getblock <number|hash> [--full]
Fetches a block as JSON. Accepts a decimal block number, a hex block hash, or one of the tags latest, earliest, pending, safe, finalized. Pass --full to include full transaction objects instead of only hashes.
eth_getBlockByNumber or eth_getBlockByHash depending on the argument shape.
getblockhash <number>
Prints the canonical hash of the block at a given height. Equivalent to bitcoin-cli getblockhash. Refuses hash input (use getheader for the hash → header direction).
eth_getBlockByNumber(n, false) since there is no dedicated eth_getBlockHash RPC.
getheader <number|hash>
Fetches a block header as JSON — same shape as getblock but without the transactions list, so it’s smaller and faster when you only need metadata. Equivalent to bitcoin-cli getblockheader.
eth_getHeaderByNumber or eth_getHeaderByHash depending on the argument shape.
tip
Condensed JSON view of the chain tip: number, hash, parent, timestamp, miner, gas used and limit, transaction count, size, difficulty. Useful at the top of operational scripts or in health checks.
eth_getBlockByNumber("latest", false) call.
gasprice
Prints the current suggested gas price as a bare wei integer. Uses eth_gasPrice.
sendraw <hex>
Submits a signed, hex-encoded transaction and prints the resulting hash on a single line. Equivalent to bitcoin-cli sendrawtransaction. The 0x prefix is optional. Uses eth_sendRawTransaction.
Peer identifiers
The four peer-admin commands (addpeer, removepeer, addtrusted, removetrusted) accept either form:
- Full enode URL —
enode://<64-hex-id>@host:port[?discport=…], or anenr:<base64>record. Always works. host:port— resolved against the running node’s current peer list by matching IP and advertised listen port.host— as above, but without the port constraint; must uniquely identify a connected peer. If multiple peers share the same host, the error message lists them so you can disambiguate.
addpeer <enode|host[:port]>
Adds a static peer. Equivalent to bitcoin-cli addnode <node> add. Silent on success, non-zero exit on failure. Uses admin_addPeer.
removepeer <enode|host[:port]>
Removes a static peer. Silent on success. Uses admin_removePeer.
addtrusted <enode|host[:port]>
Marks a peer as trusted, so it is always allowed to connect even when the node has hit its --maxpeers limit. Silent on success. Uses admin_addTrustedPeer.
removetrusted <enode|host[:port]>
Removes a peer from the trusted list. The peer is not disconnected automatically — run removepeer afterwards if you also want to drop the connection. Uses admin_removeTrustedPeer.
mining
Shows the miner’s current state as JSON: whether mining is enabled, current hashrate, configured coinbase, and a snippet of chain-tip context. Equivalent to bitcoin-cli getmininginfo.
coinbase is null when no coinbase is configured (e.g. fresh dev node without --miner.coinbase). Hashrate is printed as a bare decimal string so it composes cleanly with other scalar-output commands.
startmining [threads]
Starts the built-in miner, optionally pinned to the given number of CPU threads. Silent on success. Uses miner_start.
stopmining
Stops the miner. Silent on success. Uses miner_stop.
setcoinbase <address>
Updates the coinbase — the address credited with block rewards — without restarting the node. Silent on success. Uses miner_setCoinbase.
setextra <data>
Updates the extra-data bytes embedded in blocks this node mines. Accepts a plain string or a 0x-prefixed hex blob (auto-detected). Must fit the 32-byte extradata limit; longer values are rejected by the miner with a clear error. Uses miner_setExtra.
loglevel <level|pattern>
Adjusts log verbosity at runtime, without restarting the node. Equivalent to bitcoin-cli logging.
- Integer
0..5(silent, error, warn, info, debug, detail) →debug_verbosity. - Anything else is treated as a vmodule pattern like
eth/*=5,p2p=4→debug_vmodule.
trace <txhash>
Traces the execution of a mined transaction. Equivalent to geth’s debug.traceTransaction from the JS console. Two modes:
- Without
--tracer: returns the full opcode-by-opcode execution log. Output can be very large; consider redirecting to a file. - With
--tracer <name>: runs a named tracer and returns its condensed output. Common values:callTracer(call tree),prestateTracer(pre-execution state),4byteTracer(function-selector histogram).
--timeout accepts any Go duration (30s, 2m, 10m). Default is 5 minutes because non-tracer runs can take a while on large transactions. Uses debug_traceTransaction.
dbstats
Summary of on-disk database state: per-category ancient-freezer sizes in bytes plus the raw LevelDB compaction stats. Uses a new debug_dbStats RPC.
parallaxd db inspect (offline, reads the database directly).
Wallet / accounts
All commands below hit the running node’spersonal_* namespace. By default personal_* is refused over HTTP-RPC (it can expose key material); the sugar commands reach it via the IPC socket, which is the intended transport. If you must expose it over HTTP, enable it explicitly with --http.api personal and combine with --allow-insecure-unlock.
Never pass a passphrase as a CLI argument — it would land in process listings and shell history. Pass it through --password <file> (first non-empty line) or let the command prompt on stdin.
listaccounts
JSON array of addresses the running node can see. Equivalent to the offline parallax-wallet list, but works without stopping the daemon. Uses personal_listAccounts.
newaccount
Creates a new keystore entry on the running node. Prompts for a passphrase with confirmation, or reads it from --password <file>. Prints the bare address. Uses personal_newAccount.
unlock <address>
Unlocks an account so the node can sign transactions on its behalf. Equivalent to bitcoin-cli walletpassphrase. Silent on success. Uses personal_unlockAccount.
--duration 0 passes a null duration to the RPC, which geth interprets as “until node stops”.
lock <address>
Clears the in-memory decrypted key for an account. Silent on success. Uses personal_lockAccount.
sign <address> <data>
Signs <data> with the account’s key (prefixed with the standard Ethereum signed-message preamble). Prints the 65-byte signature as a 0x-prefixed hex string.
<data> accepts a plain UTF-8 string or a 0x-prefixed hex blob (auto-detected). Prompts for the passphrase unless --password is set.
personal_sign.
sendtx --from <addr> ...
Builds a transaction from flags and submits it via personal_sendTransaction (signs client-side at the node using the sender’s unlocked key). Prints the transaction hash on success.
Required: --from.
Optional: --to (omit for contract deploy), --value (wei, decimal or 0x-hex), --data (hex), --gas, --gasprice, --nonce (all decimal or 0x-hex).
--password is set.
Offline utilities
Two commands run entirely client-side and do not require a running daemon — useful for air-gapped key handling and tx inspection.decoderaw <hex>
Decodes a 0x-prefixed RLP-encoded signed transaction and prints its fields as JSON, including the recovered sender. Equivalent to bitcoin-cli decoderawtransaction. Works for legacy, EIP-2930, and EIP-1559 transactions; dynamic-fee fields (maxfeepergas, maxpriorityfeepergas) only appear on EIP-1559 txs so legacy output stays clean.
toaddr <privkey-hex>
Derives and prints the 0x-address for a hex-encoded secp256k1 private key. Runs entirely client-side — the key is never sent to any node or written to disk. Useful when verifying a backup or wiring up a key before funding it.
When to use the JS console instead
For one-off scripted calls and shell pipelines these subcommands are the quickest path. For interactive exploration of the full RPC surface, or any call that doesn’t have a sugar wrapper, prefer the JavaScript console viaparallaxd attach.
