Skip to main content

Overview

The tomo 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.
Make sure you remember the password you gave when creating a new account (with either new or import). Without it you are not able to unlock your account.
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

string
Data directory for the databases and keystore
string
Directory for the keystore (default = inside the datadir)

Example

Output Format

new

Create a new account.

Options

string
Data directory for the databases and keystore
string
Directory for the keystore (default = inside the datadir)
string
Password file to use for non-interactive password input
boolean
Reduce key-derivation RAM & CPU usage at some expense of KDF strength

Interactive Example

You will be prompted to enter and confirm a password:

Non-Interactive Example

For non-interactive use, the passphrase can be specified with the —password flag. This is meant to be used for testing only. It is a bad idea to save your password to file or expose in any other way.

update

Update an existing account.

Options

string
Data directory for the databases and keystore
string
Directory for the keystore (default = inside the datadir)
boolean
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

You will be prompted:
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

string
Data directory for the databases and keystore
string
Directory for the keystore (default = inside the datadir)
string
Password file to use for non-interactive password input
boolean
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 file private_key.txt containing your private key:
Then import it:
Output:

Non-Interactive Example

As you can directly copy your encrypted accounts to another Viction instance, this import mechanism is not needed when you transfer an account between nodes. Simply copy the keystore files instead.

Wallet Commands

The tomo wallet command manages Tomochain presale wallets.

wallet import

Import Tomochain presale wallet.

Options

string
Data directory for the databases and keystore
string
Directory for the keystore (default = inside the datadir)
string
Password file to use for non-interactive password input
boolean
Reduce key-derivation RAM & CPU usage at some expense of KDF strength

Example

You will be prompted for the wallet password:

Common Workflows

Creating a Masternode Account

  1. Create a new account:
  1. Backup the keystore file (located in ~/.tomo/keystore/)
  2. Note the address printed after creation
  3. Fund the account with VIC tokens
  4. Register the account as a masternode on TomoMaster

Recovering an Account

  1. Obtain your private key
  2. Save it to a temporary file (remove after import):
  1. Import the key:
  1. 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
Example filename format:

Troubleshooting

Account Not Found

If tomo account list doesn’t show your account:
  1. Verify you’re using the correct --datadir
  2. Check if keystore files exist in <datadir>/keystore/
  3. Ensure keystore files have proper permissions (readable by tomo)

Failed to Unlock Account

If you cannot unlock an account:
  1. Verify you’re using the correct password
  2. Check if the keystore file is corrupted (restore from backup)
  3. Ensure the account address matches the keystore file

Ambiguous Address Error

If multiple keystore files exist for the same address:
The CLI will test your password against all matches and select the correct one. Remove duplicate files after verification.

See Also