Overview
Thetomo account command provides a comprehensive set of subcommands for managing Viction blockchain accounts. Accounts are stored in encrypted format using the keystore mechanism.
Synopsis
Description
Manage accounts, list all existing accounts, import a private key into a new account, create a new account or update an existing account. It supports interactive mode, when you are prompted for password as well as non-interactive mode where passwords are supplied via a given password file. Non-interactive mode is only meant for scripted use on test networks or known safe environments.Keys are stored under
<DATADIR>/keystore. It is safe to transfer the entire directory or the individual keys therein between nodes by simply copying.Subcommands
list
Print summary of existing accounts.Options
Data directory for the databases and keystore
Directory for the keystore (default = inside the datadir)
Example
Output Format
new
Create a new account.Options
Data directory for the databases and keystore
Directory for the keystore (default = inside the datadir)
Password file to use for non-interactive password input
Reduce key-derivation RAM & CPU usage at some expense of KDF strength
Interactive Example
Non-Interactive Example
update
Update an existing account.Options
Data directory for the databases and keystore
Directory for the keystore (default = inside the datadir)
Reduce key-derivation RAM & CPU usage at some expense of KDF strength
Description
Update an existing account. The account is saved in the newest version in encrypted format. You are prompted for a passphrase to unlock the account and another to save the updated file. This command can be used to:- Migrate an account to the newest format
- Change the password for an account (interactive mode only)
Example
When using —password flag, only format update can be performed. Changing your password is only possible interactively.
import
Import a private key into a new account.Options
Data directory for the databases and keystore
Directory for the keystore (default = inside the datadir)
Password file to use for non-interactive password input
Reduce key-derivation RAM & CPU usage at some expense of KDF strength
Description
Imports an unencrypted private key from<keyfile> and creates a new account. The keyfile is assumed to contain an unencrypted private key in hexadecimal format.
The account is saved in encrypted format, you are prompted for a passphrase.
Example - Private Key File
Create a fileprivate_key.txt containing your private key:
Non-Interactive Example
Wallet Commands
Thetomo wallet command manages Tomochain presale wallets.
wallet import
Import Tomochain presale wallet.Options
Data directory for the databases and keystore
Directory for the keystore (default = inside the datadir)
Password file to use for non-interactive password input
Reduce key-derivation RAM & CPU usage at some expense of KDF strength
Example
Common Workflows
Creating a Masternode Account
- Create a new account:
-
Backup the keystore file (located in
~/.tomo/keystore/) - Note the address printed after creation
- Fund the account with VIC tokens
- Register the account as a masternode on TomoMaster
Recovering an Account
- Obtain your private key
- Save it to a temporary file (remove after import):
- Import the key:
- Securely delete the temporary file:
Listing All Accounts
Updating Account Security
To update an old keystore format or change password:Security Best Practices
Backup Your Keystore
Always backup the keystore directory before making changes. Store backups in multiple secure locations.
Use Strong Passwords
Use strong, unique passwords for each account. Consider using a password manager.
Secure Private Keys
Never share your private keys or keystore files. Never store private keys in plain text.
Test on Testnet First
Always test account operations on testnet before using on mainnet, especially for automation scripts.
Keystore File Format
Keystore files are JSON files encrypted with your password using the Web3 Secret Storage Definition. They contain:- Encrypted private key
- Encryption parameters (cipher, KDF settings)
- MAC for integrity verification
- Account address
Troubleshooting
Account Not Found
Iftomo account list doesn’t show your account:
- Verify you’re using the correct
--datadir - Check if keystore files exist in
<datadir>/keystore/ - Ensure keystore files have proper permissions (readable by tomo)
Failed to Unlock Account
If you cannot unlock an account:- Verify you’re using the correct password
- Check if the keystore file is corrupted (restore from backup)
- Ensure the account address matches the keystore file
Ambiguous Address Error
If multiple keystore files exist for the same address:See Also
- tomo Command - Main command overview
- Console Commands - Interactive console for account management
- Flags Reference - Complete flag reference