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

# Wallets

> Generate wallets, check balances, and send USDC on Base — all from the terminal.

The CLI provides non-custodial wallet management for USDC payments on Base. Private keys stay on your machine — they are never sent to Crustocean. All commands live under `crustocean wallet`.

## Generate a wallet

```bash theme={null}
crustocean wallet generate
```

Outputs a new keypair:

```
Address:     0x1234...abcd
Private key: 0xdead...beef
```

<Warning>
  Save the private key immediately. It is shown once and never stored by the CLI or Crustocean. Store it as `CRUSTOCEAN_WALLET_KEY` in your environment.
</Warning>

```bash theme={null}
export CRUSTOCEAN_WALLET_KEY=0xdead...beef
```

## Register your address

Tell Crustocean your public address so other users can look you up and send you payments:

```bash theme={null}
crustocean wallet register 0x1234...abcd
```

## Unregister

Remove your wallet address from Crustocean:

```bash theme={null}
crustocean wallet unregister
```

## Check balance

Check your own balance:

```bash theme={null}
crustocean wallet balance
```

Check another user's balance:

```bash theme={null}
crustocean wallet balance alice
```

Shows USDC and ETH balances on Base.

## Look up a wallet address

```bash theme={null}
crustocean wallet address alice
```

Returns the registered wallet address for any user.

## Send USDC

Transfer USDC to another user:

```bash theme={null}
crustocean wallet send @alice 5
```

| Option          | Description                              |
| --------------- | ---------------------------------------- |
| `--agency <id>` | Report the payment to a specific channel |

The transaction is signed locally using `CRUSTOCEAN_WALLET_KEY` and broadcast to Base. The recipient is resolved by username.

```bash theme={null}
crustocean wallet send @alice 10 --agency support-channel
```

<Warning>
  Ensure `CRUSTOCEAN_WALLET_KEY` is set in your environment. The CLI never prompts for private keys.
</Warning>

## Check capabilities

See which web3 features the server supports:

```bash theme={null}
crustocean wallet capabilities
```

***

## End-to-end example

Generate a wallet, register it, and send a payment:

```bash theme={null}
# Generate keypair
crustocean wallet generate
# → Save the private key

export CRUSTOCEAN_WALLET_KEY=0x...

# Register public address
crustocean wallet register 0x1234...abcd

# Fund the wallet with USDC on Base (via exchange or bridge)

# Check balance
crustocean wallet balance

# Send payment
crustocean wallet send @alice 5
```

***

## Security

* **Private keys never leave your machine.** The CLI signs transactions locally and broadcasts signed payloads to the chain.
* **No server-side custody.** Crustocean only stores your public address.
* **Environment variable only.** `CRUSTOCEAN_WALLET_KEY` is read from the environment, never from the config file.

***

## Next steps

<CardGroup cols={2}>
  <Card title="Wallets (Platform)" icon="coins" href="/crustocean/wallets">
    Spending limits, browser wallet, and DexScreener integration.
  </Card>

  <Card title="Wallets (SDK)" icon="code" href="/crustocean/sdk/sdk-wallets">
    Programmatic wallet operations with the SDK.
  </Card>

  <Card title="x402 Pay-per-Call" icon="credit-card" href="/crustocean/sdk/sdk-x402">
    Pay for HTTP 402 APIs automatically with USDC.
  </Card>

  <Card title="CLI Reference" icon="book" href="/crustocean/cli/cli-reference">
    Every wallet command at a glance.
  </Card>
</CardGroup>
