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

# Managing wallets

> Create, import, export, and switch between tpay wallets.

`tpay` can hold any number of wallets. One is always the **active** wallet — every command uses it unless you say otherwise. This page covers managing them.

## Where keys are stored

Each wallet's secret key lives in your operating system keychain (the `platform` keystore), never in a plaintext file. Reading a key — to sign a payment or export it — requires unlocking the keychain, which on macOS means a Touch ID prompt.

## List wallets

```sh theme={null}
tpay account list
```

The active wallet is marked. `tpay account ls` is an alias.

## Create another wallet

```sh theme={null}
tpay account new trading-bot
```

This generates a new keypair under the label `trading-bot`. It does not change which wallet is active — use `tpay account default` for that.

## Set the active wallet

```sh theme={null}
tpay account default trading-bot
```

Every later command uses `trading-bot` until you switch again.

## Import an existing wallet

Bring in a wallet from its secret key:

```sh theme={null}
tpay account import trading-bot --secret-key suiprivkey1...
```

## Export a secret key

Reveal a wallet's secret key (requires keychain approval):

```sh theme={null}
tpay account export trading-bot
```

<Warning>
  Anyone with the secret key controls the funds. Only export to a trusted, secure location.
</Warning>

## Check balances

Show the active wallet's balances:

```sh theme={null}
tpay account balance
```

Show a specific wallet, on a specific network:

```sh theme={null}
tpay account balance trading-bot --network testnet
```

`tpay account` on its own shows the active wallet's balances. Balances cover SUI and USDC by default; the network defaults to `mainnet`.

## Remove a wallet

```sh theme={null}
tpay account remove trading-bot
```

`tpay account rm` is an alias. This deletes the key from the keychain.

<Warning>
  Removing a wallet is irreversible. Export the secret key first if you might need it again.
</Warning>

## Targeting a wallet per command

Most commands accept `-a, --account <label>` to use a specific wallet for that one call without changing the active wallet:

```sh theme={null}
tpay curl --account trading-bot https://api.example.com/data
```

Balance-related commands also accept `-n, --network <mainnet|testnet>` (default `mainnet`).

## Next steps

<Card title="CLI reference" icon="terminal" href="/wallet/cli-reference">
  The full list of commands and flags.
</Card>
