# Wallet Management

ARCHONE manages Solana wallets with bank-grade encryption. Your private keys are encrypted and stored securely — never leaving the system unencrypted.

***

## How Wallets Work

When you create or import a wallet in ARCHONE:

1. Your private key is encrypted with AES-256-GCM encryption
2. The encrypted key is stored in our database
3. A unique Data Encryption Key (DEK) protects your wallet
4. The DEK itself is encrypted with a Master Key

This means even if our database is compromised, your private keys remain encrypted. Only you (with your password) can decrypt them.

***

## Creating a New Wallet

### Step-by-Step

1. **Send `/wallet`**
2. **Select "Generate New Wallet"**
3. **ARCHONE generates a new keypair** — A brand new Solana wallet is created
4. **Your seed phrase is displayed** — This appears ONCE and only here. Write it down immediately.
5. **Verify you've saved it** — After you acknowledge, the phrase is no longer shown
6. **Set a local encryption password** — This password encrypts your wallet locally for additional security

### What to Do With Your Seed Phrase

**Write it down.** Paper only. Not digital.

**Store it safely.** Fireproof safe, bank deposit box, or hidden secure location.

**Never share it.** Anyone with your seed phrase has complete access to your funds.

**Never type it into Telegram.** The bot never asks for your seed phrase after this moment.

***

## Importing an Existing Wallet

### Step-by-Step

1. **Send `/wallet`**
2. **Select "Import Wallet"**
3. **Enter your base58 private key** — This is NOT your seed phrase. It's the base58-encoded private key from your existing wallet.
4. **Set a local encryption password** — Same as above

### Finding Your Private Key

In most Solana wallets (Phantom, Solflare, etc.):

* Open wallet settings
* Look for "Export Private Key" or "Show Private Key"
* Confirm your identity (password/biometric)
* Copy the base58 key

**Never share this key with anyone.**

***

## Viewing Your Wallet

Send `/wallet` to see:

* **Address** — Your public Solana address (safe to share)
* **Balance** — Current SOL balance
* **Encrypted Status** — Whether your key is encrypted

You can copy your address by tapping it.

***

## Depositing SOL

### Step-by-Step

1. **Send `/deposit`**
2. **Copy your ARCHONE wallet address** — Tap to copy
3. **Open your external wallet or exchange** — Where your SOL currently is
4. **Send SOL to this address** — Standard Solana transfer
5. **Wait for confirmation** — Usually 3–5 seconds on Solana
6. **Balance updates automatically** — ARCHONE detects incoming transfers and credits your wallet

***

## Withdrawing SOL

### Step-by-Step

1. **Send `/withdraw`**
2. **Select "Withdraw SOL"**
3. **Enter the recipient address** — Any valid Solana address
4. **Enter the amount** — In SOL
5. **Review the transaction** — Address, amount, network fee
6. **Confirm** — Tap the confirmation button
7. **Transaction sent** — You'll receive the transaction hash when confirmed

### Withdrawal Fees

Withdrawals cost a small network fee (typically 0.000005 SOL) plus priority fees if you want faster confirmation. These fees go to Solana validators, not ARCHONE.

### Token Withdrawals

To withdraw tokens (not SOL):

1. Send `/withdraw`
2. Select "Withdraw Token"
3. Paste the token mint address
4. Enter recipient address and amount
5. Confirm

***

## Exporting Your Private Key

Exporting lets you move your wallet to another wallet application.

### Step-by-Step

1. **Send `/export`**
2. **ARCHONE shows a security warning** — Read this carefully
3. **Confirm you want to export** — This unlocks your key temporarily
4. **Your private key is revealed** — For 5 minutes only
5. **Copy and store it securely** — The key auto-hides after 5 minutes

### Security Cooldown

After export, there's a cooldown before you can export again. This prevents hasty decisions if you're feeling pressured.

***

## Multiple Wallets

Currently, ARCHONE supports one wallet per Telegram account. If you need multiple wallets:

* Create additional Telegram accounts
* Each account can have its own ARCHONE wallet

***

## Wallet Security Features

| Feature                    | What It Does                                   |
| -------------------------- | ---------------------------------------------- |
| **AES-256-GCM Encryption** | Military-grade encryption for your private key |
| **Envelope Encryption**    | Two-layer encryption for extra security        |
| **Export Cooldown**        | Prevents hasty key exports                     |
| **Trading Lock**           | Disable all trading with `/lock`               |
| **No Unencrypted Storage** | Keys never stored in plaintext                 |

***

## What ARCHONE Stores

| Data                    | Stored?   | Why                                      |
| ----------------------- | --------- | ---------------------------------------- |
| **Private Key**         | Encrypted | To execute trades on your behalf         |
| **Seed Phrase**         | Never     | Not stored — only shown once at creation |
| **Wallet Password**     | Never     | Not stored — only you know it            |
| **Public Address**      | Yes       | To identify your wallet                  |
| **Transaction History** | Yes       | To show your trade history               |
| **Positions**           | Yes       | To track your portfolio                  |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.archone.trade/wallet-and-security/wallet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
