# Connect your wallet — Crypto Center

The **Crypto Center** is where Fincept Terminal reads your $FNCPT identity. It shows your public address, SOL balance, $FNCPT balance, and live USD value. **Your private keys never touch the terminal.**

## Supported wallets

The terminal works with any Solana wallet that exposes the Wallet Standard provider in the browser:

| Wallet | Status |
|---|---|
| Phantom | ✅ |
| Solflare | ✅ |
| Backpack | ✅ |
| Glow | ✅ |
| Coinbase Wallet (Solana mode) | ✅ via `window.solana` |
| Any other extension exposing `window.solana` | ✅ |

Hardware wallets (Ledger, Trezor) work transparently — connect them through Phantom or Solflare and the terminal sees the resulting public key with no extra setup.

## How connect works (high level)

1. You click **Connect Wallet** in the Crypto Center.
2. The terminal opens **a single-use page in your default browser** at `http://127.0.0.1:<random-port>`.
3. The page asks your wallet extension to share its public key and to **sign a one-time challenge message** generated by the terminal.
4. The terminal verifies that signature locally, stores the public key (only) in your OS credential store, and closes the browser tab.
5. Balances start streaming from Solana RPC.

The browser tab self-destructs after the handshake. The local server only listens on `127.0.0.1`, only on a random port, only for the duration of the handshake (max 2 minutes), and only accepts requests carrying a fresh single-use token.

## Step by step (Phantom)

1. Install the [Phantom extension](https://phantom.app/) in Chrome, Brave, Edge, or Firefox.
2. In Fincept Terminal: **Navigate → Crypto → Crypto Center**.
3. Click **Connect Wallet**.
4. A new browser tab opens. Click the row labelled **Phantom**.
5. Phantom prompts you to authorise the connection — review the message, click **Connect**.
6. Phantom shows a second prompt: a *signed message* request. Verify it begins with `Fincept Terminal wallet-connect challenge.` then click **Sign**.
7. Tab closes. Terminal shows your public key and balances.

The Solflare flow is identical — pick the Solflare row instead.

## Step by step (other extensions)

If you don't see your wallet in the list, click **Other Solana wallet (window.solana)**. Most non-listed wallets inject themselves under that hook.

## Step by step (hardware wallet)

The terminal does **not** talk to Ledger or Trezor directly. Instead:

1. Pair your hardware wallet with **Phantom** or **Solflare** (one-time setup inside that wallet's UI).
2. Use the regular Phantom/Solflare connect flow above.
3. When Phantom asks you to sign the challenge, your hardware device will display the message — confirm on the device.

## Disconnecting

In Crypto Center → click **Disconnect**. The terminal:

- Wipes the saved public key from secure storage.
- Stops fetching balances.
- Resets the screen to the empty state.

The browser/wallet itself keeps its own session — to fully revoke access, also use Phantom's **Settings → Trusted Apps → Revoke**.

## What we store

Only on your local machine, in your OS credential store (Windows Credential Manager / macOS Keychain / Linux Secret Service):

- Your wallet's **public address** (base58).
- A short label (`phantom`, `solflare`, …) so the UI can display the right name.
- The timestamp you connected.

We never store, transmit, or even temporarily hold:

- Private keys.
- Seed phrases.
- Signed transaction blobs.
- Authentication tokens from the wallet provider.

## What we never do

- We never auto-sign anything. Every signing request goes through the wallet's own approval UI.
- We never hold custody of $FNCPT or SOL — your wallet is the only signer.
- We never expose the local connect server beyond `127.0.0.1`. Other devices on your LAN cannot reach it.
- We never use a remote CDN to load wallet-connect code. The connect page is bundled with the terminal and served from your local disk.

## Troubleshooting

**The browser tab opens but no wallet rows show "detected"**
Your extension may be installed but disabled for `127.0.0.1`. Open `chrome://extensions`, find your wallet, click **Details**, and ensure **Allow on localhost / all sites** is enabled.

**"Signature verification failed"**
The challenge message in your wallet didn't match what the terminal expected. This usually means the wallet returned a signature for a different message than was requested. Try again with a fresh connect.

**"Timed out waiting for browser callback"**
You took longer than 2 minutes to approve, or the browser couldn't reach `127.0.0.1`. Click **Reopen browser** in the dialog — the existing handshake session is still valid for a moment.

**Balances stuck at "—"**
The terminal falls back to the public Solana RPC, which is rate-limited. Add a free Helius API key for reliable balance fetching:
1. Sign up at [helius.dev](https://www.helius.dev/) (free tier is enough).
2. In Settings → Secrets, add the key under `solana.helius_api_key`.
3. Click the **Refresh** button on the Balance card.

**$FNCPT shows zero but I have tokens**
Your tokens might be at a different mint than the one the terminal is configured for. The current mint is hard-coded as the pump.fun deployment — `9LUqJ5aQTjQiUCL93gi33LZcscUoSBJNhVCYpPzEpump`. If your tokens were minted elsewhere, file an issue.

## Privacy

The terminal makes outbound requests to:

- The Solana RPC endpoint (Helius if you set a key, otherwise the public mainnet endpoint) — for `getBalance` and `getTokenAccountsByOwner`. The endpoint sees your public key.
- `lite-api.jup.ag` — for the $FNCPT spot price. The endpoint sees only the mint address (not your wallet).

Both requests are made by the terminal directly. Your wallet provider (Phantom/Solflare) is not contacted by the terminal at any point — it only runs in your browser, owned by you.
