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

# Wallet Connection

> How to connect Base and Solana wallets

# Wallet Connection

x402 Studio uses crypto wallets for authentication and receiving payments. Connect wallets on Base (EVM), MegaETH (EVM), and Solana networks.

## Supported Wallets

<CardGroup cols={2}>
  <Card title="Base (EVM)">
    * Coinbase Wallet - Direct integration
    * MetaMask - RainbowKit modal
    * WalletConnect - RainbowKit modal
    * Rainbow - RainbowKit modal
  </Card>

  <Card title="MegaETH (EVM)">
    * MetaMask - RainbowKit modal (auto chain-switch to MegaETH 4326)
    * Coinbase Wallet - RainbowKit modal
    * WalletConnect - RainbowKit modal
  </Card>

  <Card title="Solana">
    * Phantom - Native adapter
    * Solflare - Native adapter
    * Backpack - Native adapter
  </Card>
</CardGroup>

## Connecting Your Wallet

### Step 1: Click Connect

On any page, click the **Connect Wallet** button in the top navigation bar.

### Step 2: Choose Your Network

Select **Base**, **MegaETH**, or **Solana** to see available wallets. For MegaETH, the wallet auto-switches to chain ID 4326.

### Step 3: Approve the Connection

Your wallet will ask you to connect and sign a message to prove ownership. No transaction, no gas fees!

## Managing Multiple Wallets

You can connect wallets from different chains to the same account:

1. Go to **Dashboard → Settings**
2. Add additional wallets
3. Choose which wallet receives payments for each endpoint

## Agentic Wallet Access

Human dashboard users connect wallets in the UI. Agents do not need the website. They authenticate by signing a one-time challenge through the worker API:

1. Call `POST /agent/auth/challenge`
2. Sign the returned message with the wallet
3. Call `POST /agent/auth/verify`
4. Use the returned short-lived session token with wallet-first registration or update routes

## Troubleshooting

### Wallet not showing up?

Make sure your wallet extension is installed and unlocked. Try refreshing the page.

### Connection rejected?

Look for a popup in your wallet that may be hidden. Some wallets require manual approval.

### Wrong network?

Open your wallet, switch to Base Mainnet, MegaETH Mainnet, or Solana Mainnet, then reconnect.
