Skip to main content

Accounts

XYZ Chain uses standard account types with the xyz address prefix.

Address Formats

TypePrefixExample
Accountxyz1xyz1abc123def456ghi789jkl012mno345pqr678stu
Validatorxyzvaloper1xyzvaloper1abc123def456ghi789jkl012mno345pqr678stu
Consensusxyzvalcons1xyzvalcons1abc123def456ghi789jkl012mno345pqr678stu

Account Derivation

XYZ Chain uses the following HD path for key derivation:
m/44'/118'/0'/0/0
LevelValueMeaning
Purpose44’BIP44 standard
Coin Type118’XYZ Chain
Account0’First account
Change0External chain
Index0First address
The coin type 118 ensures compatibility with wallets like Keplr.

Key Generation

Generate New Key

xyz keys generate mykey
Output:
Generated new keypair: mykey

Address: xyz1qwertyuiopasdfghjklzxcvbnm12345678
Mnemonic (save this securely):
word1 word2 word3 word4 word5 word6 word7 word8 word9 word10 word11 word12

WARNING: Write down your mnemonic phrase and store it securely.

Import Existing Key

xyz keys import mykey --mnemonic "word1 word2 word3 ... word12"
Or interactively:
xyz keys import mykey
# Enter your 12 or 24 word mnemonic:

List Keys

xyz keys list
Output:
NAME      ADDRESS
mykey     xyz1qwertyuiopasdfghjklzxcvbnm12345678
alice     xyz1aliceaddress...
bob       xyz1bobaddress...

Export Key

xyz keys export mykey
This exports an armored ASCII format that can be imported into other wallets.

Test Accounts

The local development network (xyz localnet) includes pre-funded test accounts:
NameBalanceMnemonic
alice1,000,000 XYZabandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about
bob500,000 XYZStandard test mnemonic
Never use test mnemonics for real funds. These are well-known phrases used only for development.

Keyring Backends

The CLI supports multiple storage backends for private keys: Uses the operating system’s secure keychain:
  • macOS: Keychain
  • Windows: Credential Manager
  • Linux: Secret Service (GNOME Keyring, KWallet)
xyz config set keyring-backend os

File Backend

Stores keys in an encrypted file at ~/.xyz/keyring-file/:
xyz config set keyring-backend file
File backend requires a passphrase for each operation.

Test Backend

Stores keys unencrypted (development only):
xyz config set keyring-backend test
Never use test backend for real funds. Keys are stored in plain text.

Account Operations

Check Balance

# By address
xyz balance xyz1abc123...

# By key name
xyz balance --key mykey

View Transaction History

xyz tx history xyz1abc123...
# or
xyz tx history --key mykey

Using xyzd

For advanced operations, use the chain daemon:
# List all keys
xyzd keys list --home ~/.xyz --keyring-backend os

# Show specific key
xyzd keys show mykey --home ~/.xyz --keyring-backend os

# Get account info from chain
xyzd query auth account xyz1abc123... --node tcp://localhost:26657

Account Types

Standard Account

Regular user accounts created with xyz keys generate.
{
  "@type": "/cosmos.auth.v1beta1.BaseAccount",
  "address": "xyz1...",
  "pub_key": {
    "@type": "/cosmos.crypto.secp256k1.PubKey",
    "key": "..."
  },
  "account_number": "42",
  "sequence": "7"
}

Module Account

System accounts owned by chain modules (not user-controlled):
ModuleAddressPermissions
fee_collectorxyz1...None (receives fees)
distributionxyz1...None (holds rewards)
bonded_tokens_poolxyz1...Burner, Staking
not_bonded_tokens_poolxyz1...Burner, Staking
govxyz1...Burner
wasmxyz1...Burner

Contract Account

Accounts created when instantiating WASM contracts:
xyz program info xyz1contractaddress...

Security Best Practices

  • Write it on paper (not digital)
  • Store in multiple secure locations
  • Consider metal backup for fire/water resistance
  • Never share with anyone
For significant holdings, use Ledger or similar hardware wallets with XYZ Chain support.
Always double-check the first and last 4-6 characters of addresses before sending.
Keep real funds on separate keys from development/testing activities.