Create a New Account (CLI)

Quickstart tl;dr

Add a new wallet:

Create wallet
pocketd keys add $USER

Retrieve the address:

Show address
pocketd keys show $USER -a

Prerequisites: Install pocketd

Ensure you have pocketd installed on your system.

Follow the installation guide specific to your operating system:

https://dev.poktroll.com/explore/account_management/pocketd_cli

Exporting & Importing Hex Private Keys

You can import a hex private key into your keyring like so:

Import hex private key
pocketd keys import-hex <wallet_name> <hex_private_key>

And export a hex private key from your keyring like so:

Export hex private key
pocketd keys export <wallet_name> --unsafe --unarmored-hex --yes

For more details, see:

Creating a new wallet

To create a new wallet, use the pocketd keys add command followed by your desired wallet name. This will generate a new address and mnemonic phrase for your wallet.

After running the command, you'll receive an output similar to the following:

Backing Up Your Wallet

After creating your wallet, YOU MUST back up your mnemonic phrase. This phrase is the key to your wallet, and losing it means losing access to your funds.

Here are some tips for securely backing up your mnemonic phrase:

  • Write it down on paper and store it in multiple secure locations.

  • Consider using a password manager to store it digitally, ensuring the service is reputable and secure.

  • Avoid storing it in plaintext on your computer or online services prone to hacking.

🔑 HD Derivation Path

pocketd supports BIP-0044-compatible HD wallets, with POKT registered under coin_type = 635 ( path_component = 0x8000027b). This assignment is defined in SLIP-0044.

The default derivation path used is:

To use this path, run:

You can view additional options with:

References:

  • BIP-0044: https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki

  • SLIP-0044: https://github.com/satoshilabs/slips/blob/master/slip-0044.md

Keyring Backends

Before proceeding, it's critical to understand the implications of keyring backends for securing your wallet.

By default, --keyring-backend=test is used for demonstration purposes in this documentation, suitable for initial testing.

In production, operators should consider using a more secure keyring backend such as os, file, or kwallet. For more information on keyring backends, refer to the Cosmos SDK Keyring documentation:

https://docs.cosmos.network/main/user/run-node/keyring

Keyring Directory Behavior: --home, --keyring-backend, and --keyring-dir

In the Cosmos SDK (and thus in pocketd):

  • --home sets the root directory for app state (default: ~/.pocket)

  • --keyring-backend sets how keys are stored (os, file, test, memory)

  • --keyring-dir overrides where keys are stored, but still nests by backend

Example:

This creates:

So --keyring-dir works, but the backend (e.g. test) decides the final subfolder. That’s why you see foo/keyring-test.

This creates the keyring directory inside of the path you provide to --keyring-dir, with a subfolder corresponding to the backend you choose.

Was this helpful?