-
Notifications
You must be signed in to change notification settings - Fork 31
Wallet RPC Daemon
The wallet-rpc-daemon is a headless wallet service that exposes an RPC interface. It is designed for server environments where the wallet needs to run continuously (e.g. for staking), while the wallet-cli — or any other RPC client — is used to control it remotely.
wallet-rpc-daemon <COMMAND> [OPTIONS]| Command | Description |
|---|---|
mainnet |
Run the mainnet wallet RPC daemon |
testnet |
Run the testnet wallet RPC daemon |
regtest |
Run the regtest wallet RPC daemon |
The following options apply to each network subcommand. Environment variable prefixes differ by network (e.g. ML_MAINNET_WALLET_RPC_DAEMON_*).
-
--wallet-file <PATH>: The wallet file to operate on.- Env:
ML_MAINNET_WALLET_RPC_DAEMON_WALLET_FILE
- Env:
-
--force-change-wallet-type: Force-change the wallet type between hot and cold.- Env:
ML_MAINNET_WALLET_RPC_DAEMON_FORCE_CHANGE_WALLET_TYPE
- Env:
-
--hardware-wallet <HARDWARE_WALLET>: Specify that the wallet file is associated with a hardware wallet.- Env:
ML_MAINNET_WALLET_RPC_DAEMON_HARDWARE_WALLET - Possible values:
trezor
- Env:
-
--start-staking-for-account <ACC_NUMBER>: Start staking for the specified account after startup.- Env:
ML_MAINNET_WALLET_RPC_DAEMON_START_STAKING_FOR_ACCOUNT
- Env:
-
--cold-wallet: Run without connecting to a node (cold/offline mode).- Env:
ML_MAINNET_WALLET_RPC_DAEMON_COLD_WALLET
- Env:
-
--node-rpc-address <ADDR>: RPC address of the node to connect to.- Env:
ML_MAINNET_WALLET_RPC_DAEMON_NODE_RPC_ADDRESS
- Env:
-
--node-rpc-cookie-file <PATH>: Node RPC cookie file path.- Env:
ML_MAINNET_WALLET_RPC_DAEMON_NODE_RPC_COOKIE_FILE
- Env:
-
--node-rpc-username <NAME>: Node RPC username.- Env:
ML_MAINNET_WALLET_RPC_DAEMON_NODE_RPC_USERNAME
- Env:
-
--node-rpc-password <PASS>: Node RPC password.- Env:
ML_MAINNET_WALLET_RPC_DAEMON_NODE_RPC_PASSWORD
- Env:
Authentication is required. Provide either a username/password pair, a cookie file, or use --rpc-no-authentication.
-
--rpc-bind-address <ADDR>: Address to bind the wallet RPC server to.- Env:
ML_MAINNET_WALLET_RPC_DAEMON_RPC_BIND_ADDRESS
- Env:
-
--rpc-cookie-file <PATH>: Custom path for the wallet RPC cookie file. Defaults to the data directory.- Env:
ML_MAINNET_WALLET_RPC_DAEMON_RPC_COOKIE_FILE
- Env:
-
--rpc-username <USER>: Username for wallet RPC basic authorization. If not set, a cookie file is created automatically.- Env:
ML_MAINNET_WALLET_RPC_DAEMON_RPC_USERNAME
- Env:
-
--rpc-password <PASS>: Password for wallet RPC basic authorization.- Env:
ML_MAINNET_WALLET_RPC_DAEMON_RPC_PASSWORD
- Env:
-
--rpc-no-authentication: Run the wallet RPC server without authentication. Use with caution.- Env:
ML_MAINNET_WALLET_RPC_DAEMON_RPC_NO_AUTHENTICATION
- Env:
-
--force-allow-run-as-root: Allow running as root. Not recommended.- Env:
ML_MAINNET_WALLET_RPC_DAEMON_FORCE_ALLOW_RUN_AS_ROOT
- Env:
To control a running wallet-rpc-daemon from the CLI, use --remote-rpc-wallet-address:
wallet-rpc-daemon mainnet \
--wallet-file ~/staking-wallet.dat \
--start-staking-for-account 0 \
--rpc-cookie-file ~/.mintlayer/mainnet/wallet-rpc-cookie
# In a separate terminal:
wallet-cli mainnet \
--remote-rpc-wallet-address 127.0.0.1:3034 \
--remote-rpc-wallet-cookie-file ~/.mintlayer/mainnet/wallet-rpc-cookie- Home
- Installing Mintlayer
- Upgrade Mintlayer
- Node
- Addresses
- Wallet CLI
- Wallet RPC
- API
- Advanced Tools
- Guides
- CHANGELOG