> ## Documentation Index
> Fetch the complete documentation index at: https://docs.initia.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Account

## Creating an Account

Before you can start building and transacting, you'll need to create an account.

```bash theme={null}
export ACCOUNT_NAME=test-account
initiad keys add $ACCOUNT_NAME

# - address: init17exjfvgtpn5ne4pgmuatjg52mvvtj08773tgfx
# name: test-account
# pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Ap+WnRzOsJGgfgsrgc4APi/EiTzl3t52ruiKGev7X9LW"}'
# type: local

# **Important** write this mnemonic phrase in a safe place.
# It is the only way to recover your account if you ever forget your password.

# glass easy miracle sign tent anchor position cluster shift calm march elite menu must nose inform antique reason meadow relief layer term crush gesture
```

<Warning>
  The mnemonic key is the only way to recover your account if you forget your
  password.
</Warning>

If you want to create an EVM account, you can use the following command:

```bash theme={null}
export ETH_KEY_TYPE=eth_secp256k1
export ETH_COIN_TYPE=60

initiad keys add $ACCOUNT_NAME --key-type $ETH_KEY_TYPE --coin-type $ETH_COIN_TYPE
```

<Note>
  Even with the same mnemonic phrase, the derived addresses differ because the
  method of generating the public key varies, leading to each account being
  treated separately.
</Note>

## Importing an Account

You can import an account by providing a mnemonic phrase.

```bash theme={null}
initiad keys add $ACCOUNT_NAME --recover
> Enter your bip39 mnemonic
glass easy miracle sign tent anchor position cluster shift calm march elite menu must nose inform antique reason meadow relief layer term crush gesture

# - address: init1x7jl4cx6pq4urdppmnhwtyzfdtn5w7ssw4hjfm
#   name: test-account
#   pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Am9tmvRft+pcol+h/unlMB9gRbKAZF/7Y8K3iWOtr9Dw"}'
#   type: local
```

To export the account's private key, run:

```bash theme={null}
initiad keys export $ACCOUNT_NAME > key.json

>Enter passphrase to encrypt the exported key:

# key.json
# -----BEGIN TENDERMINT PRIVATE KEY-----
# kdf: argon2
# salt: BE84B59652876BFBEEB0E01CA2AA753C
# type: secp256k1

# edch8EcPYgSQrWHdJlmRMZGmh7gqOLYvAHsynbovXonq2reSeP+eEgtvwNYEnrQu
# 2MZwMIs=
# =ObmR
# -----END TENDERMINT PRIVATE KEY-----
```

<Note>
  The exported private key is encrypted with a passphrase. So, you can only
  import it using `initiad` CLI. It is not possible to import it directly on
  Wallet Apps.
</Note>

To import the account using the exported private key, run:

```bash theme={null}
export NEW_ACCOUNT_NAME=test-account2

initiad keys import $NEW_ACCOUNT_NAME key.json
```

## Retrieving Account Data

You can retrieve account data stored in the keyring.

```bash theme={null}
initiad keys list

# - address: init1x7jl4cx6pq4urdppmnhwtyzfdtn5w7ssw4hjfm
#   name: test-account
#   pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Am9tmvRft+pcol+h/unlMB9gRbKAZF/7Y8K3iWOtr9Dw"}'
#   type: local
```

## Validator Address

If you run a validator node, you can get the validator address by running:

```bash theme={null}
initiad comet show-address

# initvalcons1kknrtmntc39v3z4hgv84hddeclyfsxdgzdtn3q
```

To get validator consensus public key, run:

```bash theme={null}
initiad comet show-validator

# {"@type":"/cosmos.crypto.ed25519.PubKey","key":"lusuUL6CKywnZDPul5COzCFKLPLDGEMbLEIZIZlDp44="}
```
