diff --git a/docs/Agent-Wallet/QuickStart.md b/docs/Agent-Wallet/QuickStart.md index 1a92242e..5f936eee 100644 --- a/docs/Agent-Wallet/QuickStart.md +++ b/docs/Agent-Wallet/QuickStart.md @@ -3,17 +3,58 @@ import TabItem from '@theme/TabItem'; # Quick Start -Three steps, from zero to invoking your Agent-wallet in the OpenClaw chat box. No coding required, no gas fees — just copy and paste. +From zero to invoking your Agent-wallet in your AI agent chat. We provide two ways to create your wallet — **conversational setup is the easiest**, done entirely from your AI chat; **command-line setup** gives you the most precise control. -:::tip Want CLI command details? -This page only walks you through the shortest path. For password-free configuration, managing multiple wallets, signature types, and other advanced topics, see the [CLI Reference](./Developer/CLI-Reference.md). +:::tip Prerequisites & CLI command details +- Your AI Agent supports shell command execution (OpenClaw, a Telegram bot, web chat, Claude Code, Cursor, etc.) +- This page only walks you through the shortest path. For password-free configuration, managing multiple wallets, signature types, and other advanced topics, see the [CLI Reference](./Developer/CLI-Reference.md). ::: --- -## Step 1: Install and Initialize Your Wallet +## Method 1: Conversational Setup (Easiest) -### 1.1 Prepare Your Environment: Install Node.js +If you've already installed [the BANK OF AI skill suite](../McpServer-Skills/SKILLS/QuickStart.md) (which includes `agent-wallet` and `bankofai-guide`), creating a wallet takes just one prompt in your AI chat — the AI generates the password, creates the wallet, and saves the config for you, with no manual file editing. + +**How it works:** + +1. Open your AI Agent chat +2. Copy and paste the following prompt: + + ``` + Create an AgentWallet + ``` + +3. The AI handles the entire flow automatically: + - **Checks current wallet status** — tells you whether one is already configured + - **Asks how to create it** — offers two options: + - **A. Quick setup (highly recommended)**: fully automated, ~10 seconds; auto-generates a secure password; encrypted wallet stored locally + - **B. Detailed setup**: manually pick wallet type; custom password; more configuration options +4. Reply `A` and the AI runs the three setup steps automatically: + - **Step 1**: Generate a secure password + - **Step 2**: Create the wallet + - **Step 3**: Retrieve the wallet addresses + + +:::caution Your master password is critical — back it up immediately +The master password is only shown once. Although it is auto-saved to `~/.agent-wallet/runtime_secrets.json`, you should also save it manually to a password manager (1Password, Bitwarden, etc.). If the local file is lost or corrupted and you have no external backup, your wallet will be permanently locked — there is no recovery mechanism, no support team, and no backdoor. + +⚠️ Never share this password via chat, email, screenshots, or public repositories. +::: + +:::tip Done — no env-var configuration needed +Conversational setup auto-saves the password to `~/.agent-wallet/runtime_secrets.json`, and your AI Agent reads it automatically when calling wallet functions. **You don't need to manually export `AGENT_WALLET_PASSWORD`.** If you'd rather use the env-var approach, see Method 2 below. +::: + +--- + +## Method 2: Command-Line Setup (Most Control) + +If you want to control every step yourself, or your environment doesn't support conversational install, follow the command-line flow below. + +### Step 1: Install and Initialize Your Wallet + +#### 1.1 Prepare Your Environment: Install Node.js Agent-wallet requires Node.js (a runtime environment, version >= 20) on your computer. @@ -42,7 +83,7 @@ nvm install 20 && nvm use 20 -### 1.2 Install Agent-wallet +#### 1.2 Install Agent-wallet ```bash npm install -g @bankofai/agent-wallet @@ -55,7 +96,7 @@ agent-wallet --help If you see the help output, you're good to go. -### 1.3 Create Your Agent-wallet Wallet +#### 1.3 Create Your Agent-wallet Wallet Run: ```bash @@ -95,11 +136,11 @@ Do this right now: --- -## Step 2: Feed the Password to Your AI (Critical!) +### Step 2: Feed the Password to Your AI (Critical!) -For OpenClaw to automatically use your wallet, you must configure the password in its runtime environment. Select the tab matching your operating system and **just copy-paste**: +For your AI agent to automatically use your wallet, you must configure the password in its runtime environment. Select the tab matching your operating system and **just copy-paste**: -### 2.1 Save and Activate the Password +#### 2.1 Save and Activate the Password @@ -167,13 +208,13 @@ export AGENT_WALLET_PASSWORD="P@ss$w0rd!" # actual value becomes "P@ss!" ``` ::: -### 2.2 Restart Your AI Backend Service +#### 2.2 Restart Your AI Backend Service :::danger Many people forget this step, then wonder why AI can't find the password! You just saved a new password, but the AI assistant running in the background hasn't refreshed yet — it's still blind to the change! You need to shut it down and restart it for the new password to take effect. ::: -Whether or not you currently have the OpenClaw backend service running, make sure to **shut it down**, then **restart it** from the same terminal window where you ran the commands above. +Whether or not you currently have your AI agent backend service running, make sure to **shut it down**, then **restart it** from the same terminal window where you ran the commands above. --- diff --git a/docs/BANK-OF-AI/Intro.md b/docs/BANK-OF-AI/Intro.md new file mode 100644 index 00000000..9d57cc46 --- /dev/null +++ b/docs/BANK-OF-AI/Intro.md @@ -0,0 +1,249 @@ +# Introduction + +## BANK OF AI in One Sentence + +**BANK OF AI — Your Web3 Gateway to AI.** + +One entry point gives your AI four core capabilities at once: + +- 💸 **Payment** — pay in crypto (x402) +- 🪪 **Identity** — a verifiable on-chain identity and reputation (8004) +- ⚙️ **Action** — call the full set of on-chain atomic capabilities, plus orchestration (Skills + MCP Server + Agent Wallet) +- 🧠 **Cognition** — every top-tier LLM in one account (LLM Service) + +You don't need to write code, switch wallets, or hop between multiple dApps — just hand the task to your AI, and BANK OF AI lines up payment, identity, action, and brain for it. + +--- + +## The BANK OF AI Product Matrix + +BANK OF AI is made up of **4 layers**: + +- **🧠 Model Layer | Top AI in One Account** — LLM Service (BANKOFAI APP + API Gateway), a single entry point to every leading LLM +- **🛤️ Protocol Layer | Payment. Verify. Build.** — x402 Payment · 8004 Protocol, two open protocols connecting AI and Web3 +- **🔧 Tool Layer | Everything Your Agent Needs** — Agent Wallet · Skills · MCP Server, the full toolkit giving your AI on-chain signing, operational SOPs, and protocol wrappers +- **🌐 Ecosystem Layer | AI Agent Ecosystem** — Third-party MCP Servers and Skills across TRON / Ethereum / BNB Chain, all plugged into the same protocols + +Each layer is usable on its own, or composable with the others — pick what you need. + +--- + +## 🧠 Model Layer | Top AI in One Account + +### LLM Service — A Unified Entry Point to Every Leading LLM + +**LLM Service is BANK OF AI's model-access layer.** It aggregates GPT, Claude, Gemini, DeepSeek, Kimi, GLM, MiniMax, and other leading models under a single account, exposed two ways: + +- **BANKOFAI APP** (the official app, corresponding to the `BANKOFAI APP →` button in the top-right of the website): an AI Chat app for end users — open [chat.bankofai.io/chat](https://chat.bankofai.io/chat) and use it directly, switch models on demand +- **API Gateway** (one API key for every model): a unified API for developers, billed by usage, OpenAI-compatible, usable from any OpenAI-compatible third-party AI client + +**Key points**: fund with crypto (supports TRON, BNB Chain, Ethereum, Base, Arbitrum, Optimism, Polygon), pay-as-you-go, no card linking, no subscription. + +👉 Learn more: [LLM Service Introduction](../llmservice/introduction.md) + +--- + +## 🛤️ Protocol Layer | Payment. Verify. Build. + +With the model layer in place, AI is still just a "brain." To let it spend on-chain and be verified, you first need two open protocols: **x402 defines how payments get made**, and **8004 defines who each Agent is.** + +### 01 · x402 Payment — One Line of Code for On-chain Payments + +**An open payment protocol built on an extension of HTTP `402 Payment Required`.** When AI calls a paid service, it automatically signs a small on-chain payment and instantly receives the content — no account, no credit card, no pre-funding. + +- **Currently supports**: TRON, BNB Chain (more chains rolling out) +- **SDK components**: Client SDK · Server SDK · Facilitator + +**Typical scenarios**: + +- MCP Server calls a paid off-chain API +- The `x402-payment` Skill triggers payment explicitly +- An AI Agent autonomously decides to buy paid content +- **Agent-to-Agent auto-settlement** — pay-per-call between two AIs + +> ⚙️ **Dependency**: The x402 SDK uses [Agent-Wallet](#03--agent-wallet--ais-local-signing-layer) to parse and manage wallet credentials — installing x402 pulls in agent-wallet automatically. + +👉 Learn more: [x402 Protocol Introduction](../x402/index.md) + +--- + +### 02 · 8004 Protocol — On-chain Identity and Reputation for AI Agents + +**A Web3-native "Agent Registry + Reputation System."** Any Agent can mint an identity NFT on-chain, bind its service endpoints (Web / MCP / DID), and openly accept feedback from other Agents and users. + +It solves one core question: **as AI Agents proliferate, how do you know which ones you can trust?** + +- **Standard metadata**: name, capability claims, service endpoints +- **Verifiable credentials**: signatures + rotation policy +- **Chain support**: TRON · BNB Chain + +**Typical uses**: + +- An AI Agent checks a stranger's on-chain reputation before calling its service +- Skills orchestration runs a pre-flight risk check +- MCP Servers verify each other's identity +- Check a counterparty's reputation before paying or granting authorization + +8004 is a **horizontal protocol** — any step that needs "identity verification" or "reputation lookup" can call it; it isn't tied to a specific layer. + +👉 Learn more: [8004 Protocol Introduction](../8004/general.md) + +--- + +## 🔧 Tool Layer | Everything Your Agent Needs + +The protocol layer is in place — now AI needs tools to actually use those protocols. For any on-chain operation, AI needs three things: **on-chain signing (Agent Wallet), on-chain operation SOPs (Skills), and protocol wrappers (MCP Server)**. + +### 03 · Agent Wallet — AI's Local Signing Layer + +**Agent Wallet is the AI Agent's local encrypted wallet**, providing unified signing for every Skill, MCP Server, and the x402 SDK. + +Your private key is encrypted and locked in a hidden local directory; the AI only ever holds an unlock password. **Even if the password leaks, the encrypted file alone is useless. Even if the file is stolen, without the password it's just gibberish.** + +- 🔒 **Encrypted storage**: Keystore encryption + `local_secure` mode, 100% local and offline +- 🔑 **Flexible import**: create new, or import from private key / mnemonic +- 🔄 **Multi-wallet switching**: manage multiple wallets and switch the active account any time +- ⛓️ **Multi-chain signing**: TRON + every EVM-compatible chain (Ethereum / BSC / Polygon / Base / Arbitrum…) + +> 💡 **Who depends on Agent-Wallet**: +> - **x402 SDK** — parses payment credentials, signs x402 micropayments (pulled in automatically when x402 is installed) +> - **Skills** — whenever an on-chain operation needs a signature +> - **MCP Servers** (when self-hosted) — write-type tools read the local wallet before executing + +**What users see**: when you first follow the [Quick Start](./QuickStart.md), Agent-Wallet is created and configured for you automatically — most users never touch it directly. + +👉 Learn more: [Agent-Wallet Introduction](../Agent-Wallet/Intro.md) + +--- + +### 04 · Skills — The SOP Playbook for AI On-chain Operations + +**Skills are pre-written standard operating procedures for AI on-chain actions.** The AI Agent follows the Skill's SOP step by step — **check balance → check approval → fetch quote → apply slippage protection → wait for your confirmation → call MCP Server to execute** — nothing skipped, common pitfalls avoided. + +Example: a user says "use 50 USDT to buy some TRX." A vanilla AI might generate a transaction that fails because USDT was never approved on SunSwap. An AI loaded with the `sunswap-dex-trading` Skill walks the full SOP automatically. + +**Key properties**: one sentence installs every Skill; invoked in natural language; automatically calls the underlying MCP Server to execute atomic on-chain operations. The BANK OF AI Skills suite covers wallet management, SunSwap swaps, SunPerp perpetuals, the TRC20 toolkit, TronScan lookups, TRX staking + SR voting, USDD/JUST, multi-sig permissions, x402 payments, and more — and keeps growing alongside the ecosystem. + +👉 Learn more: [Skills Introduction](../McpServer-Skills/SKILLS/Intro.md) · [Quick Start](./QuickStart.md) + +--- + +### 05 · MCP Server — The On-chain Atomic Capability Interface + +**MCP Server (Model Context Protocol Server)** is built on Anthropic's MCP standard. It wraps on-chain and off-chain capabilities into standardized, AI-callable tools. + +**Relationship between Skills and MCP Server:** + +| Layer | Role | Responsibility | +| :-- | :-- | :-- | +| **Skills** | Business Orchestration Layer | Stringing multi-step operations into SOPs, handling pre-checks and risk control | +| **MCP Server** | Capability Provider Layer | Exposing atomic capability tools for upper layers to call | + +BANK OF AI ships two **MCP Servers**, pointed at BANK OF AI cloud endpoints by default — ready to use out of the box: + +- **TRON MCP Server** — atomic TRON on-chain operations (query, transfer, contracts, staking, governance), 60+ tools. Supports local private deployment +- **SUN MCP Server** — SunSwap V2/V3/V4 swap and liquidity capabilities, 20+ tools. Supports local private deployment. Also ships **[SUN CLI](../McpServer-Skills/Tools/SUNCli/Intro.md)** — a command-line implementation fully equivalent to SUN MCP Server's capabilities, for scripting / automation / CI-CD scenarios + +> 💡 **Private deployment**: Skills call MCP Server via the official cloud endpoints by default — no separate install needed. For local deployment, see each MCP Server's deployment guide. + +> ⚙️ **Dependency**: A self-hosted MCP Server needs Agent-Wallet configured first — the wallet determines which identity the AI uses for on-chain actions. Without a wallet, write-type tools return an error. + +Beyond BANK OF AI's first-party MCP Servers, the ecosystem has more third-party MCP Servers and Skills — see [🌐 Ecosystem Layer](#-ecosystem-layer--ai-agent-ecosystem) below. + +👉 Learn more: [MCP Server Introduction](../McpServer-Skills/MCP/Intro.md) + +--- + +## 🌐 Ecosystem Layer | AI Agent Ecosystem + +Beyond BANK OF AI's first-party products, the ecosystem already includes several leading DeFi / data protocols across 3 chains — each shipping a **production-grade MCP Server or Skills** that AI can install and use immediately. + +### 🔴 TRON + +| Product | Provider | Capabilities | Install | +| :-- | :-- | :-- | :-- | +| **TRON MCP Server** | BANK OF AI | Transfer / Contract / Staking / Governance, 60+ tools | `npx -y @bankofai/mcp-server-tron` | +| **SUN MCP Server** | BANK OF AI | Swap / Liquidity / Farming, V2/V3/V4, 20+ tools | `npx -y @bankofai/sun-mcp-server` | +| **JustLend MCP Server** | JustLend DAO | Lend / Borrow / Staking / Governance, 50 tools | `npx -y @justlend/mcp-server-justlend` | +| **TronScan MCP Server** | TronScan | Query / Analytics / Security, 119 tools | `https://mcp.tronscan.org/mcp` | + +### 🔵 Ethereum + +| Product | Provider | Capabilities | Install | +| :-- | :-- | :-- | :-- | +| **Etherscan** | Etherscan Official | Query / Tracking / Analytics, 60+ chains | `npx skills add https://docs.etherscan.io` | +| **Uniswap AI** | Uniswap Labs | Swap / Liquidity / V4 Hooks / 5 Plugins | `npx skills add Uniswap/uniswap-ai` | + +### 🟡 BNB Chain + +| Product | Provider | Capabilities | Install | +| :-- | :-- | :-- | :-- | +| **BNB Chain** | BNB Chain Official | Transfer / Contract / Query / 8004 identity registry | `npx skills add bnb-chain/bnbchain-skills` | +| **PancakeSwap AI** | PancakeSwap Official | Swap / Liquidity / Farming, 3 Skills · 8 chains | `npx skills add pancakeswap/pancakeswap-ai` | +| **ListaDAO** | ListaDAO Official | Lending / Staking / CDP, 3 Skills · 9 MCP tools | `npx skills add lista-dao/lista-skills` | + +> 💡 The ecosystem is expanding — refer to the official **[AI Agent Ecosystem](https://bankofai.io)** page for the latest list. + +--- + +## How BANK OF AI Layers Work Together + +The sections above covered what each of the 4 layers does. Below is what happens when they collaborate on a real operation — a **TRC20 transfer**, the most common case. + +
+ +![AI Agent completes a TRC20 transfer through natural conversation](./image/bankofai-architecture.svg) + +
+ +**① Model Layer · Understanding Intent** + +In any AI client (OpenClaw / Cursor / Claude Code / Codex / …), you type a sentence: + +> Transfer 100 TRX to address `T....XXXXX` + +The AI client is powered by **LLM Service**, recognizes this as a TRC20 / TRX transfer, and decides to call the `trc20-token-toolkit` Skill. + +**② Tool Layer · Skills Orchestration** + +`trc20-token-toolkit` walks its SOP step by step: **check balance → validate the recipient address → build the transaction → wait for your confirmation.** If any step fails (insufficient balance, malformed address, etc.), it stops immediately and returns the reason. + +**③ Tool Layer · MCP + Wallet · Build · Sign · Submit** + +The Skill calls **TRON MCP Server** to assemble the TRC20 transfer, hands it to **Agent-Wallet** for local signing on your machine (**private keys never leave your computer**), and submits it to TRON Mainnet. + +**④ Return · The result travels back to the AI Agent** + +Once on-chain execution completes, the tx hash, status, and event logs travel back along the same path — MCP Server parses them into structured data, and the AI Agent turns that into a natural-language summary: + +> ✅ Transferred 100 TRX to `T....XXXXX`. Fee: 1.1 TRX. +> Tx hash: `0xabc123...def456` ([view on TronScan](https://tronscan.org)) + +:::tip When do the other two layers engage? +This example only involves the **Model Layer** and **Tool Layer**. The other two kick in by scenario: + +- **🛤️ Protocol Layer**: **x402** activates when a payment is involved (calling a paid API, subscribing to an Agent service, etc.); **8004** activates when verifying an unfamiliar Agent's identity or looking up its reputation +- **🌐 Ecosystem Layer**: when you need to call a third-party protocol (e.g. swapping on Ethereum via **Uniswap AI**, staking on BNB Chain via **ListaDAO**), the AI Agent calls the corresponding third-party MCP Server / Skills — the flow is identical to this example, just with a different MCP Server at the target chain +::: + +--- + +## Is BANK OF AI for Me? + +- **Web3 beginner:** Absolutely. Paste one install command into your AI client, and everything else is configured automatically; from there, plain-language conversation is all you need — no underlying knowledge required. +- **Web3 veteran:** Skip the "switch wallet → copy address → calculate slippage → wait for blocks" grind. Let AI handle the repetitive work; you focus on strategy. +- **AI Agent developer:** Full SDKs, CLIs, APIs, and MCP-standard interfaces — build your own AI Agents on top of BANK OF AI, giving them on-chain capability and autonomous payment. +- **API service provider:** With x402, your paid APIs can be called by AI and billed per call automatically — no traditional account registration, no credit-card binding required. Especially well-suited for micropayments and agent-to-agent settlement. + +--- + +## Ready? + +Want your AI client to gain BANK OF AI's on-chain capabilities? Just **two steps**, under **1 minute**: + +1. **Paste the install command** → AI installs Skills, checks wallet status, and asks whether to create a wallet +2. **Confirm wallet creation** → AI automatically creates your local encrypted wallet + +For standalone integration of **LLM Service / x402 / 8004**, or **local private deployment of MCP Server / using SUN CLI**, refer to each product's own docs. + +👉 **[Go to Quick Start](./QuickStart.md)** diff --git a/docs/BANK-OF-AI/QuickStart.md b/docs/BANK-OF-AI/QuickStart.md new file mode 100644 index 00000000..90821a49 --- /dev/null +++ b/docs/BANK-OF-AI/QuickStart.md @@ -0,0 +1,231 @@ +# Quick Start + +Want your AI client to gain BANK OF AI's on-chain capabilities? Just **two steps**, under **1 minute**: + +1. **Paste the install command** → AI installs every Skill, checks wallet status, and asks whether to create a wallet +2. **Confirm wallet creation** → AI automatically creates your local encrypted wallet + +--- + +## Step 1: Paste the Install Command + +Open whichever AI client you use (OpenClaw / Claude Code / Cursor / Codex / etc.) and paste this command in: + +``` +Run npx skills add BofAI/skills to install every BANK OF AI Skill. After the install completes, run bankofai-guide to walk me through the next steps. +Note: please install into this Agent's own skills directory. +``` + +The AI will install the Skills and then ask whether to create a wallet. + +
+Show example AI output + +> Got it — here we go. +> +> The command enters interactive mode to let me pick the Skills: I'll use the `-y` flag (without `-g`) so it selects everything by default and installs into this Agent's directory: +> +> ✅ **11 Skills installed.** (installed into this Agent's skills directory) +> +> Now running `bankofai-guide` to walk you through setup… +> +> ─── +> +> **📋 Section A — Post-install Onboarding** +> - Step 1: Install Agent Wallet CLI +> - Step 2: Check wallet status +> +> ─── +> +> ✅ **Skills installed.** +> Location: `~/.openclaw/workspace/.agents/skills/` (this Agent's directory) +> +> | # | Skill | +> | :-- | :-- | +> | 1 | `agent-wallet` | +> | 2 | `bankofai-guide` | +> | 3 | `multi-sig-account-permissions` | +> | 4 | `recharge-skill` | +> | 5 | `sunperp-perpetual-futures-trading` | +> | 6 | `sunswap-dex-trading` | +> | 7 | `trc20-token-toolkit` | +> | 8 | `tronscan-data-lookup` | +> | 9 | `trx-staking-sr-voting` | +> | 10 | `usdd-just-protocol` | +> | 11 | `x402-payment` | +> +> **📋 Current status** +> +> | Component | Status | +> | :-- | :-- | +> | Agent Wallet CLI | ✅ Installed | +> | Wallet | ⚠️ Not configured | +> +> **💼 Wallet setup** +> +> Note: you need a wallet for transfers and transactions (token swaps, transfers, balance checks, etc.). +> +> **Set up a wallet now?** +> +> **A. Create now (recommended, ~10 seconds)** +> - Quick setup, secure password auto-generated +> - Ready to use every BankOfAI feature right after creation +> +> **B. Create later** +> - You can run `bankofai-guide` again any time to continue setup +> - Until then, only read-only query features are available +> +> Please reply **A** or **B**. + +
+ +--- + +## Step 2: Confirm Wallet Creation + +Confirm wallet creation however the AI prompts you (e.g. reply "create", "go ahead", or whichever option the AI offers). The AI will create your local encrypted wallet and, in one message, show your wallet info, addresses, master password, and suggested next steps. + +
+Show example AI output + +> Got it — running quick-setup wallet creation. +> +> - Step 1: Generate a secure password +> - Step 2: Create the wallet +> - Step 3: Fetch the wallet address +> +> ─── +> +> **🎉 Wallet created.** +> +> **💼 Wallet info** +> +> | Field | Detail | +> | :-- | :-- | +> | Wallet ID | `default_local_secure` | +> | Type | `local_secure` (locally encrypted) | +> | Status | ✅ Active | +> +> **📍 Wallet addresses** +> +> | Network | Address | +> | :-- | :-- | +> | EVM | `0x7858...4bCA` | +> | TRON | `TLwYeH...q8usz` | +> +> 💡 **Tip**: the EVM address works across every EVM-compatible chain (Ethereum, BSC, Base, Polygon, Arbitrum, etc.). +> +> ─── +> +> **🔐 Wallet password** +> +> ``` +> +> ``` +> +> **⚠️ Important safety notes:** +> - This password encrypts the locally-stored private key +> - Every transaction, signature, or address query needs this password +> - It's auto-saved to `~/.agent-wallet/runtime_secrets.json` for convenience +> - **Please back it up!** If the runtime secrets file is deleted, this password is the only way to recover the wallet +> +> ─── +> +> **🚀 Next steps** +> +> Your wallet is ready. You can now: +> +> 1. **Top up USDT** → send USDT (TRC20) to your TRON address `TLwYeH...q8usz` +> 2. **Check balance** → use TronScan to view TRX and token balances +> 3. **Transfer / swap** → use SunSwap for token swaps or transfers +> +> **Onboarding complete. 🎉** +> +> Want me to check a balance or do anything else? + +
+ +--- + +## Verify the Install + +Open your AI chat and send: + +``` +Check the TRX and USDT balances of the wallet address you just created. +``` + +If the AI returns the balance — **congrats, the full stack is live and ready to use.** + +:::note What a brand-new wallet may show +A TRON address that has never received any transfer is considered **not activated**, so the query may report **balance 0 / account not activated**. This is completely normal for a fresh wallet and doesn't prevent you from using BANK OF AI. +::: + +--- + +## What Else Can You Do? + +Just describe what you want in plain language: + +### 🔍 On-chain Data Lookup (Free) + +> "What happened in transaction abc123…?" + +> "What's TRON's current network TPS?" + +### 💸 TRC20 Token Transfer + +> "Send 10 USDT to TRecipientAddress…" + +### 🔁 SunSwap Swaps + +> "On Nile testnet, swap 100 TRX for USDT with 1% slippage." + +### 📈 SunPerp Futures + +> "Open a 5x long on BTC-USDT with a 5% stop-loss." + +### 🗳️ TRX Staking & SR Voting + +> "Stake my 1,000 TRX with super representative SR XXX." + + + +--- + +## A Few Reminders + +:::warning Three Rules for Beginners · On-chain transactions are irreversible +1. **Always practice on testnet first.** Run 1–2 transactions on Nile testnet, confirm the AI behaves exactly as expected, *then* switch to mainnet. +2. **Review the AI's bill before every spending action.** +3. **Start small.** Even for operations you've tested, use a small amount the first time you run them on mainnet. +::: + +:::caution The master password is critical — back it up immediately +The master password is shown **exactly once in Step 2**. It's auto-saved to `~/.agent-wallet/runtime_secrets.json` locally, but we strongly recommend **also saving it manually in a password manager** (1Password / Bitwarden / etc.). If the local file is ever lost or corrupted *and* you have no external backup, your wallet becomes **permanently unrecoverable** (no recovery mechanism, no support, no backdoors). + +⚠️ **Never** paste this password into chat tools, emails, screenshots, or public repos. +::: + +:::info If you skip wallet creation in Step 2 +The AI skips wallet creation. When you're ready, you can trigger **conversational wallet creation** right in the AI chat at any time — no need to re-run the install command. See [Agent-Wallet Quick Start · Option 1: Conversational Creation](../Agent-Wallet/QuickStart.md). +::: + +:::tip Want to use the other products independently, or self-host? +**The full BANK OF AI product matrix is more than Skills.** To use the other products independently or to self-host the lower layers, see: + +- **LLM Service** (model-access layer): use BANKOFAI APP directly, or connect to the unified API Gateway → [LLM Service Introduction](../llmservice/introduction.md) +- **x402 Payment** (payment protocol): let AI auto-settle micropayments on-chain → [x402 Protocol Introduction](../x402/index.md) +- **8004 Protocol** (identity + reputation): on-chain reputation lookup for Agents → [8004 Protocol Introduction](../8004/general.md) +- **MCP Server local private deployment**: Skills call MCP Server through BANK OF AI's official cloud endpoints by default — no separate install needed. For local deployment, see [TRON MCP — Local Private Deployment](../McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md) · [SUN MCP — Local Private Deployment](../McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md) · [BSC MCP — Installation](../McpServer-Skills/MCP/BSCMCPServer/Installation.md) +- **SUN CLI**: a command-line tool with capabilities equivalent to SUN MCP Server, for scripting / automation / CI-CD → [SUN CLI Quick Start](../McpServer-Skills/Tools/SUNCli/QuickStart.md) +::: + +--- + +## What's Next + +| I want to… | Go here | +| :--- | :--- | +| Understand the full architecture | [BANK OF AI Introduction](./Intro.md) | +| Dive into a specific component | [Agent-Wallet](../Agent-Wallet/Intro.md) · [MCP Server](../McpServer-Skills/MCP/Intro.md) · [Skills](../McpServer-Skills/SKILLS/Intro.md) · [x402](../x402/index.md) · [8004](../8004/general.md) · [LLM Service](../llmservice/introduction.md) | diff --git a/docs/BANK-OF-AI/image/bankofai-architecture.svg b/docs/BANK-OF-AI/image/bankofai-architecture.svg new file mode 100644 index 00000000..931d8592 --- /dev/null +++ b/docs/BANK-OF-AI/image/bankofai-architecture.svg @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + How BANK OF AI Layers Work Together + Example: TRC20 Transfer · Transfer 100 TRX + + + + Result → AI Agent + + + + + + 👤 You · Natural-Language Command + "Transfer 100 TRX to address T....XXXXX" + + + + ↑ AI reply + ↓ Your command + + + + 🧠 AI Agent + Powered by LLM Service · GPT / Claude / Gemini / DeepSeek / Kimi ... + Parses the intent, picks the matching Skill + + + + + + + 🌟 Skills · trc20-token-toolkit + Business Orchestration Layer + SOP: check balance → validate address → build tx → wait for confirmation + + + + + + + ⚙️ TRON MCP Server + Capability Provider Layer · On-chain atomic capability tools + This example: build the TRC20 transfer transaction + + + + + + + 🔐 Agent-Wallet · Local Encrypted Wallet + Private key never leaves your machine · Signed locally, then submitted on-chain + This example: local signing of the TRC20 transfer transaction + + + + + + + ⛓️ TRON Blockchain + + + Legend: + + Skills orchestration + + Sign / submit + + Result feedback + diff --git a/docs/McpServer-Skills/MCP/SUNMCPServer/OfficialServerAccess.md b/docs/McpServer-Skills/MCP/SUNMCPServer/OfficialServerAccess.md index d0fa20a0..434ca786 100644 --- a/docs/McpServer-Skills/MCP/SUNMCPServer/OfficialServerAccess.md +++ b/docs/McpServer-Skills/MCP/SUNMCPServer/OfficialServerAccess.md @@ -26,9 +26,41 @@ The official cloud service only provides **read-only access**. It does **not sup ## How to Connect -### Quick Auto-Install +We provide three installation methods. **Pick the one that matches your level of comfort** — the conversational install is the easiest; the interactive install gives you the most control. -Simply tell your AI Agent to execute the following command: +### Method 1: Conversational Install (Easiest) + +If you're already using an AI Agent that can run shell commands (OpenClaw, a Telegram bot, web chat, Claude Code, Cursor, etc.), you can install everything by **simply chatting with the AI** — no need to open a terminal yourself, no manual file copying. + +:::tip Prerequisite +**Node.js is required** on the machine where the AI Agent runs (the Agent uses `npx` under the hood). If Node.js isn't installed yet, grab the LTS installer from [nodejs.org](https://nodejs.org) — install once, double-click and follow the prompts. +::: + +**How it works:** + +1. Open your AI Agent chat +2. Copy and paste the following prompt: + + ``` + Run npx add-mcp https://sun-mcp-server.bankofai.io/mcp -y to install the SUN MCP Server. + Note: Please install to the MCP config of the current Agent. + ``` + +3. The AI handles the entire flow automatically: + - Detects the remote MCP service URL + - Auto-detects which AI client is currently running + - Writes the `sun-mcp-server` entry into the right MCP config file (no manual JSON editing) + - Reports back with a ✅ confirmation when done + +Once the AI confirms the install, the SUN MCP Server is ready — you can start asking questions right away. + +:::tip Why this is the recommended path for beginners +You don't need to know what `npx`, `npm`, or "MCP config file" means. The AI handles every step including selecting the right config path for your client. +::: + +### Method 2: Quick Auto-Install (Command Line) + +If you have Node.js installed and prefer the command line, run the following directly in your terminal: ```bash npx add-mcp https://sun-mcp-server.bankofai.io/mcp -y @@ -36,9 +68,9 @@ npx add-mcp https://sun-mcp-server.bankofai.io/mcp -y The `-y` flag skips all interactive prompts and automatically installs to every AI tool detected on your computer. Once complete, it will show ✅ Installation complete! along with the list of agents it was installed to. -Once installation is complete, restart your AI Agent, and you can start interacting with SunSwap via SUN MCP Server. +Once installation is complete, you can start interacting with SunSwap via SUN MCP Server. -### Interactive Installation +### Method 3: Interactive Install (Most Control) If you want to choose which AI tools to install to, remove the `-y` flag: @@ -109,7 +141,7 @@ When you see output like this, SUN MCP Server has been successfully installed to └ Done! ``` -Once installation is complete, restart your AI Agent, and you can start interacting with SunSwap via SUN MCP Server. +Once installation is complete, you can start interacting with SunSwap via SUN MCP Server. --- @@ -126,7 +158,6 @@ If you receive a normal response, the connection is working. If you encounter issues, first confirm: 1. Node.js version >= 20.0.0 (run `node --version` to check) 2. Network can reach `sun-mcp-server.bankofai.io` -3. AI client has been fully quit and restarted (not just refreshed) --- diff --git a/docs/McpServer-Skills/MCP/SUNMCPServer/QuickStart.md b/docs/McpServer-Skills/MCP/SUNMCPServer/QuickStart.md index 3bdb6064..6f1a689a 100644 --- a/docs/McpServer-Skills/MCP/SUNMCPServer/QuickStart.md +++ b/docs/McpServer-Skills/MCP/SUNMCPServer/QuickStart.md @@ -17,25 +17,35 @@ Before you get started, make sure you have: ## Install -Simply tell your AI Agent to execute the following command: +The easiest way to install is by **simply chatting with your AI Agent** — no need to open a terminal yourself, no manual file copying. If you're already using an AI Agent that can run shell commands (OpenClaw, a Telegram bot, web chat, Claude Code, Cursor, etc.), you're set. -```bash -npx add-mcp https://sun-mcp-server.bankofai.io/mcp -y -``` +**How it works:** + +1. Open your AI Agent chat +2. Copy and paste the following prompt: + + ``` + Run npx add-mcp https://sun-mcp-server.bankofai.io/mcp -y to install the SUN MCP Server. + Note: Please install to the MCP config of the current Agent. + ``` -The `-y` flag skips all interactive prompts and automatically installs to every AI tool detected on your computer. Once complete, it will show ✅ Installation complete! along with the list of agents it was installed to. +3. The AI handles the entire flow automatically: + - Detects the remote MCP service URL + - Auto-detects which AI client is currently running + - Writes the `sun-mcp-server` entry into the right MCP config file (no manual JSON editing) + - Reports back with a ✅ confirmation when done -After the command completes, restart your MCP client. +Once the AI confirms the install, the SUN MCP Server is ready — you can start asking questions right away. -:::tip Want to choose which AI tools to install to? -Remove the `-y` flag to enter interactive installation mode. See [Official Cloud Service Access](./OfficialServerAccess.md) for details. +:::tip Prefer the command line? +If you'd rather run the install yourself or need finer control (e.g. selecting which AI tools to install to), see [Official Cloud Service Access](./OfficialServerAccess.md) for the command-line and interactive options. ::: --- -## Restart and Test +## Test It Out -After completing the configuration, restart your MCP client. Then try the following query in a conversation: +Try the following query in a conversation: ``` Check the current prices of USDT and TRX on SunSwap diff --git a/docs/McpServer-Skills/MCP/TRONMCPServer/OfficialServerAccess.md b/docs/McpServer-Skills/MCP/TRONMCPServer/OfficialServerAccess.md index 18f0a6d4..de9f4449 100644 --- a/docs/McpServer-Skills/MCP/TRONMCPServer/OfficialServerAccess.md +++ b/docs/McpServer-Skills/MCP/TRONMCPServer/OfficialServerAccess.md @@ -45,9 +45,41 @@ The official cloud service only provides **read-only access**. It does **not sup ## How to Connect -### Quick Auto-Install +We provide three installation methods. **Pick the one that matches your level of comfort** — the conversational install is the easiest; the interactive install gives you the most control. -Simply tell your AI Agent to execute the following command: +### Method 1: Conversational Install (Easiest) + +If you're already using an AI Agent that can run shell commands (OpenClaw, a Telegram bot, web chat, Claude Code, Cursor, etc.), you can install everything by **simply chatting with the AI** — no need to open a terminal yourself, no manual file copying. + +:::tip Prerequisite +**Node.js is required** on the machine where the AI Agent runs (the Agent uses `npx` under the hood). If Node.js isn't installed yet, grab the LTS installer from [nodejs.org](https://nodejs.org) — install once, double-click and follow the prompts. +::: + +**How it works:** + +1. Open your AI Agent chat +2. Copy and paste the following prompt: + + ``` + Run npx add-mcp https://tron-mcp-server.bankofai.io/mcp -y to install the TRON MCP Server. + Note: Please install to the MCP config of the current Agent. + ``` + +3. The AI handles the entire flow automatically: + - Detects the remote MCP service URL + - Auto-detects which AI client is currently running + - Writes the `tron-mcp-server` entry into the right MCP config file (no manual JSON editing) + - Reports back with a ✅ confirmation when done + +Once the AI confirms the install, the TRON MCP Server is ready — you can start asking questions right away. + +:::tip Why this is the recommended path for beginners +You don't need to know what `npx`, `npm`, or "MCP config file" means. The AI handles every step including selecting the right config path for your client. +::: + +### Method 2: Quick Auto-Install (Command Line) + +If you have Node.js installed and prefer the command line, run the following directly in your terminal: ```bash npx add-mcp https://tron-mcp-server.bankofai.io/mcp -y @@ -55,9 +87,9 @@ npx add-mcp https://tron-mcp-server.bankofai.io/mcp -y The `-y` flag skips all interactive prompts and automatically installs to every AI tool detected on your computer. Once complete, it will show ✅ Installation complete! along with the list of agents it was installed to. -Once installation is complete, restart your AI Agent, and you can start interacting with the TRON blockchain via TRON MCP Server. +Once installation is complete, you can start interacting with the TRON blockchain via TRON MCP Server. -### Interactive Installation +### Method 3: Interactive Install (Most Control) If you want to choose which AI tools to install to, remove the `-y` flag: @@ -128,7 +160,7 @@ When you see output like this, TRON MCP Server has been successfully installed t └ Done! ``` -Once installation is complete, restart your AI Agent, and you can start interacting with the TRON blockchain via TRON MCP Server. +Once installation is complete, you can start interacting with the TRON blockchain via TRON MCP Server. --- diff --git a/docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md b/docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md index b4b3b722..0b5c458a 100644 --- a/docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md +++ b/docs/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md @@ -2,7 +2,7 @@ The goal of this page is simple: **get you connected in 1 minute and make your first blockchain query.** -We'll use the [official cloud service](./OfficialServerAccess.md) for this quick start. The cloud service is read-only — no dependencies to install, no wallet to configure, no API Key required. Just copy a config snippet into your AI client, restart, and start asking questions. +We'll use the [official cloud service](./OfficialServerAccess.md) for this quick start. The cloud service is read-only — no dependencies to install, no wallet to configure, no API Key required. Just copy a config snippet into your AI client and start asking questions. --- @@ -23,27 +23,35 @@ node --version # should output v20.x.x or higher ## Install -Simply tell your AI Agent to execute the following command: +The easiest way to install is by **simply chatting with your AI Agent** — no need to open a terminal yourself, no manual file copying. If you're already using an AI Agent that can run shell commands (OpenClaw, a Telegram bot, web chat, Claude Code, Cursor, etc.), you're set. -```bash -npx add-mcp https://tron-mcp-server.bankofai.io/mcp -y -``` +**How it works:** + +1. Open your AI Agent chat +2. Copy and paste the following prompt: -The `-y` flag skips all interactive prompts and automatically installs to every AI tool detected on your computer. Once complete, it will show ✅ Installation complete! along with the list of agents it was installed to. + ``` + Run npx add-mcp https://tron-mcp-server.bankofai.io/mcp -y to install the TRON MCP Server. + Note: Please install to the MCP config of the current Agent. + ``` -After the command completes, restart your MCP client. +3. The AI handles the entire flow automatically: + - Detects the remote MCP service URL + - Auto-detects which AI client is currently running + - Writes the `tron-mcp-server` entry into the right MCP config file (no manual JSON editing) + - Reports back with a ✅ confirmation when done -:::tip Want to choose which AI tools to install to? -Remove the `-y` flag to enter interactive installation mode. See [Official Cloud Service Access](./OfficialServerAccess.md) for details. +Once the AI confirms the install, the TRON MCP Server is ready — you can start asking questions right away. + +:::tip Prefer the command line? +If you'd rather run the install yourself or need finer control (e.g. selecting which AI tools to install to), see [Official Cloud Service Access](./OfficialServerAccess.md) for the command-line and interactive options. ::: --- -## Restart and Test - -After saving the configuration, **completely quit and restart** your AI client. After restarting, the client will automatically connect to TRON MCP Server. +## Test It Out -Then enter your first query in the chat: +Enter your first query in the chat: ``` Check the TRX balance of TRON address TXyz... diff --git a/docs/McpServer-Skills/SKILLS/BANKOFAISkill.md b/docs/McpServer-Skills/SKILLS/BANKOFAISkill.md index 98a0ab21..1b000d61 100644 --- a/docs/McpServer-Skills/SKILLS/BANKOFAISkill.md +++ b/docs/McpServer-Skills/SKILLS/BANKOFAISkill.md @@ -21,6 +21,8 @@ BANK OF AI SKILLS can operate on **real on-chain assets**. Blockchain transactio | **sunperp-skill** | Market data, open/close positions, withdrawals | Market data: none. Trading: SunPerp API keys | | **tronscan-skill** | Look up accounts, transactions, tokens, blocks, network stats | Recommended: TronScan API key (may throttle without one) | | **trc20-toolkit-skill** | Transfer tokens, check balances, manage approvals for any TRC20 token | Read-only: none. Transfers/approvals: wallet credentials | +| **usdd-skill** | USDD stablecoin — PSM swaps (1:1 USDT ↔ USDD), vault queries, balance checks | Read-only: none. PSM swaps: wallet credentials | +| **trx-staking-skill** | Stake TRX, vote for Super Representatives, claim voting rewards | Wallet credentials | | **multisig-permissions** | Multi-sig permission setup, key management, co-signed proposals | Wallet credentials (owner key for permission changes) | | **x402-payment** | On-chain "pay-first" auto-settlement | Wallet credentials | | **recharge-skill** | Balance, order history, account top-up | BANK OF AI API key | @@ -234,6 +236,87 @@ Need to check balances, transfer tokens, or manage approvals for any TRC20 token --- +## usdd-skill {#usdd-skill} + +Want to work with **USDD**, TRON's over-collateralized stablecoin? This skill handles the JUST Protocol's Peg Stability Module (PSM) for 1:1 USDT ↔ USDD swaps, reads vault (CDP) positions and protocol parameters, and checks USDD/USDT/USDC/TRX/JST balances. + +**Completely safe — looking only, no spending:** + +> Show me PSM state: current fees, USDT reserves, and USDD total supply. + +> Check my USDD, USDT, and JST balances. + +> Show all USDD vault types (TRX-A, TRX-B, sTRX-A, USDT-A, etc.) with their debt ceilings and stability fees. + +> Show me CDP position #42 — collateral locked, debt, and collateralization ratio. + +**Requires your confirmation (AI shows the bill first):** + +> Swap 1000 USDT for 1000 USDD via the PSM (zero fee). + +> Redeem 500 USDD back to 500 USDT via the PSM. + +**Real-world scenarios:** + +> Getting into USDD for the first time? Try: "Sell 1000 USDT for USDD via PSM" — 1:1 swap, currently zero fee, auto-handles TRC20 approval. + +> Checking vault health? Try: "Show me all vault types and their current stability fees." (TRX-A/B/C = 5%, sTRX-A = 1%, USDT-A = 0%) + +> Following a specific CDP? Try: "Check CDP #42's collateralization ratio." + +:::tip PSM vs. vaults +The PSM gives you **instant 1:1 USDT ↔ USDD** swaps — the easiest way to get USDD. Vault/CDP positions (minting USDD against collateral like TRX) are read-only in this skill — you can query them but not open, draw, or repay directly. +::: + +:::caution PSM reserves can be depleted +Before redeeming USDD for USDT, check `psm-info` — if USDT reserves are low, `buyGem` may fail. The skill handles 18-decimal USDD vs. 6-decimal USDT normalization automatically. +::: + +--- + +## trx-staking-skill {#trx-staking-skill} + +Want to earn rewards by participating in TRON's governance? This skill stakes TRX for **TRON Power (TP)**, votes for Super Representatives (SRs), and claims voting rewards. TRON uses Delegated Proof of Stake — the top 27 SRs produce blocks and distribute rewards proportionally to their voters every 6 hours. + +**Completely safe — looking only, no spending:** + +> Show my staking overview: TRON Power, frozen TRX, current votes, and pending rewards. + +> List the top 27 active Super Representatives. + +> Show the top 50 SRs including partners. + +> Check the staking status for address TXX.... + +**Requires your confirmation:** + +> Vote all my TRON Power for SR address TSRAddress. + +> Split my votes 60% to TSR1 and 40% to TSR2. + +> Claim my pending voting rewards. + +**Real-world scenarios:** + +> First time voting? Try: "List the top 10 SRs, then dry-run a vote for TSRAddress before confirming." + +> Want to diversify? Try: "Split my votes 50/50 between TSR1 and TSR2." Each vote transaction replaces all previous votes — the new slate is complete. + +> Collecting rewards? Try: "Check my pending rewards, then claim them." Rewards are separate from unstake withdrawals. + +:::tip Key facts +- 1 frozen TRX = 1 TRON Power (TP) +- Voting rewards are distributed every 6 hours +- Votes **replace** all previous votes — each vote is a full slate +- Stake 2.0 compatible: reads `frozenV2[]` and uses `voteWitnessAccount` +::: + +:::danger 14-day unbonding period +When TRX is unstaked (via the companion staking flow), it enters a **14-day cooldown** during which it is locked and earns no resources or voting power. After 14 days, you must manually call `withdrawExpireUnfreeze` to reclaim the TRX — it does not return automatically. Unstaking also removes the corresponding TRON Power, which invalidates any active votes that depend on it. +::: + +--- + ## multisig-permissions {#multisig-permissions} Want to add multi-signature protection to your TRON account? This skill manages TRON's native three-tier permission model (Owner, Active, Witness) — configure keys, set thresholds, scope operation permissions, and coordinate multi-party co-signing. Perfect for team wallets or restricting your AI agent to DeFi-only operations. diff --git a/docs/McpServer-Skills/SKILLS/Intro.md b/docs/McpServer-Skills/SKILLS/Intro.md index 4df5b376..078af66f 100644 --- a/docs/McpServer-Skills/SKILLS/Intro.md +++ b/docs/McpServer-Skills/SKILLS/Intro.md @@ -57,7 +57,7 @@ No. Skills use an **on-demand, lightweight architecture** — the AI only loads ## What Can Skills Do for You? -Eight core skills covering the most common scenarios in the TRON ecosystem. Each one comes with a ready-to-use sample prompt — copy it into your AI chat and hit enter to try it out. +Ten core skills covering the most common scenarios in the TRON ecosystem. Each one comes with a ready-to-use sample prompt — copy it into your AI chat and hit enter to try it out. ### 🔑 Secure Wallet Management @@ -99,6 +99,22 @@ Check balances, transfer tokens, manage approvals for any TRC20 token — USDT, 💡 For more token operations, see: [**trc20-toolkit-skill**](./BANKOFAISkill.md#trc20-toolkit-skill) +### 💵 USDD Stablecoin & JUST Protocol + +Swap USDT ↔ USDD at 1:1 via the Peg Stability Module (zero fee currently), check USDD/USDT/USDC/TRX/JST balances, and read vault (CDP) positions and protocol parameters. + +> 🗣️ "Sell 1000 USDT for USDD via the PSM" or "Show me all USDD vault types and their stability fees." + +💡 For PSM swaps and vault queries, see: [**usdd-skill**](./BANKOFAISkill.md#usdd-skill) + +### 🗳️ TRX Staking & SR Voting + +Stake TRX for TRON Power, vote for Super Representatives, and claim voting rewards. Stake 2.0 compatible — top 27 SRs distribute block rewards every 6 hours proportionally to their voters. + +> 🗣️ "Show my TRON Power and current votes, then list the top 10 SRs." or "Claim my pending voting rewards." + +💡 For staking, voting, and reward flows, see: [**trx-staking-skill**](./BANKOFAISkill.md#trx-staking-skill) + ### 🔐 Multi-Sig & Account Permissions Set up multi-signature security for your TRON account — configure keys, thresholds, and co-sign transactions. Perfect for teams or for restricting your AI agent to DeFi-only operations. diff --git a/docs/McpServer-Skills/SKILLS/QuickStart.md b/docs/McpServer-Skills/SKILLS/QuickStart.md index 207209f9..594a4fc5 100644 --- a/docs/McpServer-Skills/SKILLS/QuickStart.md +++ b/docs/McpServer-Skills/SKILLS/QuickStart.md @@ -4,11 +4,42 @@ Get your AI up and running with BANK OF AI SKILLS in **2 steps** and less than * --- +:::tip Prerequisite +**Node.js is required** on the machine where the AI Agent runs (the Agent uses `npx` under the hood). If Node.js isn't installed yet, grab the LTS installer from [nodejs.org](https://nodejs.org) — install once, double-click and follow the prompts. +::: + ## Step 1: Install the Skills -### Quick Auto-Install +We provide three installation methods. **Pick the one that matches your level of comfort** — the conversational install is the easiest; the interactive install gives you the most control. + +### Method 1: Conversational Install (Easiest) + +If you're already using a Skills-compatible AI Agent (OpenClaw, a Telegram bot, web chat, or any client that supports running shell commands), you can install everything by **simply chatting with the AI** — no need to open a terminal yourself, no manual file copying. + +**How it works:** + +1. Open your AI Agent chat +2. Copy and paste the following prompt: + + ``` + Run npx skills add BofAI/skills to install all BANK OF AI skills. After installation, use bankofai-guide to guide subsequent operations. + Note: Please install to the skill directory corresponding to the current Agent. + ``` -Simply tell your AI Agent to execute the following command: +3. The AI handles the entire flow automatically: + - Pulls the `BofAI/skills` repository + - Detects your current Agent's skills directory (e.g. `~/.openclaw/workspace/.agents/skills/`) + - Installs all 11 BANK OF AI skills (`agent-wallet`, `sunswap-dex-trading`, `x402-payment`, `bankofai-guide`, etc.) + +:::tip Why this is the recommended path for beginners +You don't need to know what `npx`, `npm`, or "global install" mean. The AI handles every step including selecting the right skills directory for your platform, installing the wallet CLI, and onboarding you to your first wallet. +::: + +--- + +### Method 2: Quick Auto-Install (Command Line) + +If you have Node.js installed and prefer the command line, simply tell your AI Agent to execute the following command: ```bash npx skills add https://github.com/BofAI/skills -y -g @@ -16,7 +47,9 @@ npx skills add https://github.com/BofAI/skills -y -g The `-y` flag skips all interactive prompts and installs all available Skills by default. The `-g` flag enables global installation (available across all projects). Once complete, it will show ✅ Global installation complete! along with the full list of installed Skills. -### Interactive Installation +--- + +### Method 3: Interactive Install (Most Control) If you want to choose which Skills to install and the installation scope, remove the `-y -g` flags: @@ -28,7 +61,7 @@ npx skills add https://github.com/BofAI/skills This guide demonstrates the installation process using terminal commands as an example. ::: -#### Installation Walkthrough +#### Interactive Installation Walkthrough The installer will guide you through a few steps — just follow along: diff --git a/docs/McpServer-Skills/SKILLS/image/conversational-install.png b/docs/McpServer-Skills/SKILLS/image/conversational-install.png new file mode 100644 index 00000000..2d574a7c Binary files /dev/null and b/docs/McpServer-Skills/SKILLS/image/conversational-install.png differ diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current.json b/i18n/zh-Hans/docusaurus-plugin-content-docs/current.json index d8a44366..c06951f4 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current.json +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current.json @@ -3,6 +3,10 @@ "message": "当前", "description": "The label for version current" }, + "sidebar.docsSidebar.category.BANK OF AI": { + "message": "BANK OF AI", + "description": "The label for category BANK OF AI in sidebar docsSidebar" + }, "sidebar.docsSidebar.category.x402 Payment Protocol": { "message": "x402支付协议", "description": "The label for category x402 Payment Protocol in sidebar docsSidebar" diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Agent-Wallet/QuickStart.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Agent-Wallet/QuickStart.md index 638d8d9a..db1e253e 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Agent-Wallet/QuickStart.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Agent-Wallet/QuickStart.md @@ -3,17 +3,58 @@ import TabItem from '@theme/TabItem'; # 快速开始 -三步,从零到在 OpenClaw 聊天框里唤醒你的 Agent-wallet。不用写代码,不花一分钱 Gas 费——复制粘贴就行。 +从零到在 AI 代理对话框里唤醒你的 Agent-wallet。我们提供了两种创建钱包的方式——**对话式创建最简单**,全程在 AI 对话框里完成;**命令行创建**则给你最精细的控制。 -:::tip 想看 CLI 命令细节? -本页只带你跑通最短路径。免密配置、管理多个钱包、签名类型等进阶内容,请看 [CLI 命令行手册](./Developer/CLI-Reference.md)。 +:::tip 前置依赖 & CLI 命令细节 +- 你的 AI Agent 支持 shell 命令执行(OpenClaw、Telegram Bot、Web 聊天页面、Claude Code、Cursor 等) +- 本页只带你跑通最短路径。免密配置、管理多个钱包、签名类型等进阶内容,请看 [CLI 命令行手册](./Developer/CLI-Reference.md)。 ::: --- -## 第一步:安装并初始化钱包 +## 方式一:对话式创建(最简单) -### 1.1 准备环境:安装 Node.js +如果你已经安装了 [BANK OF AI 全部技能](../McpServer-Skills/SKILLS/QuickStart.md)(包含 `agent-wallet` 和 `bankofai-guide`),那么创建钱包只需要在 AI 对话框里发一句话就行——AI 会自动帮你生成密码、创建钱包、保存配置,全程无需手动改文件。 + +**操作步骤:** + +1. 打开你的 AI Agent 对话框 +2. 复制下面这段 prompt 发送给 AI: + + ``` + 创建 AgentWallet 钱包 + ``` + +3. AI 会自动完成以下流程: + - **检查当前钱包状态**——告诉你是否已有配置 + - **询问创建方式**——给出两个选项: + - **A. 快速设置(强烈推荐)**:全自动,约 10 秒完成;自动生成安全密码;钱包加密存储在本地 + - **B. 详细设置**:手动选择钱包类型;自定义密码;更多配置选项 +4. 回复 `A` 即可,AI 会自动跑完三个步骤: + - **步骤 1**:生成安全密码 + - **步骤 2**:创建钱包 + - **步骤 3**:获取钱包地址 + + +:::caution 主密码非常重要,请立即备份 +主密码仅展示一次。虽然会自动保存到本地的 `~/.agent-wallet/runtime_secrets.json`,但强烈建议你同时手动保存到密码管理器(1Password / Bitwarden 等)——一旦本地文件丢失或损坏,且没有外部备份,你的钱包将永久无法解锁(没有备份找回机制,没有客服,没有后门)。 + +⚠️ 切勿把这个密码发到聊天工具、邮件、截图或公开仓库中。 +::: + +:::tip 完成即可用,无需配置环境变量 +对话式创建会自动把密码保存到 `~/.agent-wallet/runtime_secrets.json`,AI Agent 后续调用钱包时会自动读取,**无需手动配置 `AGENT_WALLET_PASSWORD` 环境变量**。如果你想了解环境变量配置方式,请看下面的"方式二"。 +::: + +--- + +## 方式二:命令行手动创建(最精细控制) + +如果你想自己掌控每个步骤,或者你的环境不支持对话式安装,可以按下面的命令行流程手动完成。 + +### 第一步:安装并初始化钱包 + +#### 1.1 准备环境:安装 Node.js Agent-wallet 需要你的电脑里有 Node.js(这是一个运行环境,版本需 >= 20)。 @@ -42,7 +83,7 @@ nvm install 20 && nvm use 20 -### 1.2 安装 Agent-wallet +#### 1.2 安装 Agent-wallet ```bash npm install -g @bankofai/agent-wallet @@ -55,7 +96,7 @@ agent-wallet --help 看到帮助信息就说明安装好了。 -### 1.3 创建你的 Agent-wallet 钱包 +#### 1.3 创建你的 Agent-wallet 钱包 运行: ```bash @@ -95,11 +136,11 @@ Active wallet: default_secure --- -## 第二步:把密码"喂"给 AI 代理(极其重要!) +### 第二步:把密码"喂"给 AI 代理(极其重要!) -为了让 OpenClaw 能自动使用你的钱包,你必须把密码配置到它的运行环境中。请根据你的电脑系统,选择对应的标签页,**无脑复制执行**即可。 +为了让你的 AI 代理能自动使用你的钱包,你必须把密码配置到它的运行环境中。请根据你的电脑系统,选择对应的标签页,**无脑复制执行**即可。 -### 2.1 保存并使密码生效 +#### 2.1 保存并使密码生效 @@ -167,13 +208,13 @@ export AGENT_WALLET_PASSWORD="P@ss$w0rd!" # 实际值变为 "P@ss!" ``` ::: -### 2.2 重启你的 AI 代理后台服务 +#### 2.2 重启你的 AI 代理后台服务 :::danger 这一步很多人忘了,结果 AI 代理死活读不到密码! 因为你刚才新存了密码,而正在后台运行的 AI 助手还没刷新——它还是个"瞎子"!只有关掉它重新启动,它才能"看"到你的新密码。 ::: -不管你现在是否正开着 OpenClaw 的后台服务,请务必将它**关闭**,然后在刚才执行过命令的终端窗口里,**重新启动**它。 +不管你现在是否正开着 AI 代理的后台服务,请务必将它**关闭**,然后在刚才执行过命令的终端窗口里,**重新启动**它。 --- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/BANK-OF-AI/Intro.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/BANK-OF-AI/Intro.md new file mode 100644 index 00000000..ef0e361b --- /dev/null +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/BANK-OF-AI/Intro.md @@ -0,0 +1,249 @@ +# 简介 + +## 一句话理解 BANK OF AI + +**BANK OF AI —— Your Web3 Gateway to AI,你的 Web3 AI 门户。** + +一个入口,让你的 AI 同时拥有 4 项核心能力: + +- 💸 **付款能力**:会用加密货币付款(x402) +- 🪪 **身份能力**:拥有可验证的链上身份与信誉(8004) +- ⚙️ **行动能力**:调用完整的链上原子能力与编排(Skills + MCP Server + Agent Wallet) +- 🧠 **认知能力**:一号通享顶级大模型(LLM Service) + +你不需要懂代码,不需要切钱包,不需要在多个 dApp 之间反复跳转——把任务交给 AI,BANK OF AI 替它接好支付、身份、行动与大脑。 + +--- + +## BANK OF AI 的产品矩阵 + +BANK OF AI 由 **4 层** 组成: + +- **🧠 模型层 | Top AI in One Account** —— LLM Service(BANKOFAI APP + API Gateway),主流大模型的统一入口 +- **🛤️ 协议层 | Payment. Verify. Build.** —— x402 Payment · 8004 Protocol,连接 AI 与 Web3 的两套开放协议 +- **🔧 工具层 | Everything Your Agent Needs** —— Agent Wallet · Skills · MCP Server,让 AI 获得链上签名、操作 SOP 与协议封装的完整工具包 +- **🌐 生态层 | AI Agent Ecosystem** —— 基于同一套协议开放接入的 TRON / Ethereum / BNB Chain 第三方 MCP Server 与 Skills + +每一层都可以独立使用,也可以组合起来——按需取用。 + +--- + +## 🧠 模型层 | Top AI in One Account + +### LLM Service — 主流大模型的统一入口 + +**LLM Service 是 BANK OF AI 的模型接入层**,把 GPT、Claude、Gemini、DeepSeek、Kimi、GLM、MiniMax 等主流大模型聚合到一个账户下,提供两种使用方式: + +- **BANKOFAI APP**(官方应用,对应官网右上角 `BANKOFAI APP →` 按钮):面向终端用户的 AI Chat 应用,打开 [chat.bankofai.io/chat](https://chat.bankofai.io/chat) 直接使用,随需切换模型 +- **API Gateway**(一套 API Key 调所有模型):面向开发者的统一 API,按用量计费,兼容 OpenAI 协议,可接入任意兼容 OpenAI 协议的第三方 AI 客户端 + +**核心特点**:加密货币充值(支持 TRON、BNB Chain、Ethereum、Base、Arbitrum、Optimism、Polygon)、按用量付费(Pay-as-you-go)、不绑卡、不订阅。 + +👉 详见:[LLM Service 简介](../llmservice/introduction.md) + +--- + +## 🛤️ 协议层 | Payment. Verify. Build. + +有了模型层,AI 还只是一个"大脑"——要让 AI 能在链上花钱、被验证,得先约定两套公开协议:**x402 解决钱怎么收**,**8004 解决 Agent 是谁**。 + +### 01 · x402 Payment — 一行代码接入链上支付 + +**基于 HTTP `402 Payment Required` 扩展的开放支付协议**——让 AI 在调用付费服务时自动在链上签一笔小额支付、立刻拿到内容,无需账号、无需信用卡、无需预充值。 + +- **当前支持**:TRON、BNB Chain(更多公链陆续接入) +- **SDK 组件**:Client SDK · Server SDK · Facilitator + +**典型场景**: + +- MCP Server 调用链下付费 API +- Skills 中的 `x402-payment` 显式发起支付 +- AI Agent 自主决定购买付费内容 +- **Agent 对 Agent 自动结算** —— 两个 AI 之间的按次计费 + +> ⚙️ **依赖关系**:x402 SDK 通过 [Agent-Wallet](#03--agent-wallet--ai-的本地签名层) 解析和管理钱包凭证——安装 x402 时会自动把 agent-wallet 作为依赖一起装上。 + +👉 详见:[x402 协议简介](../x402/index.md) + +--- + +### 02 · 8004 Protocol — AI Agent 的链上身份与信誉 + +**Web3 上的「Agent 注册局 + 信誉系统」**——任何 Agent 都可以在链上铸造一个身份 NFT,绑定自己的服务端点(Web / MCP / DID),并公开接受其他 Agent 和用户的反馈。 + +它解决一个核心问题:**AI Agent 越来越多,你怎么知道某个 Agent 可不可信?** + +- **标准元数据**:名称、能力声明、服务端点 +- **可验证凭证**:签名 + 轮换策略 +- **链支持**:TRON · BNB Chain + +**典型用法**: + +- AI Agent 调用陌生服务前,先查对方的链上征信 +- Skills 编排中做前置风控校验 +- MCP Server 之间互相验证身份 +- 付费 / 授权之前查对方的信誉评级 + +8004 是**横向协议**——任何需要"验证身份"或"查信誉"的环节都可以调用,不绑定特定层。 + +👉 详见:[8004 协议简介](../8004/general.md) + +--- + +## 🔧 工具层 | Everything Your Agent Needs + +协议层搭好了,还差一套工具让 AI 真正把协议用起来。AI 完成任意链上操作,需要三件事:**链上签名(Agent Wallet)、链上操作 SOP(Skills)、链上协议封装(MCP Server)**。 + +### 03 · Agent Wallet — AI 的本地签名层 + +**Agent Wallet 是 AI Agent 的本地加密钱包**,为所有 Skills、MCP Server、x402 SDK 提供统一的签名能力。 + +私钥被加密锁在本地隐藏目录中,AI 只持有一个"解锁密码"。**即便密码泄漏,没有加密文件依然无法解密;即便文件被窃取,没有密码也只是一段无法解读的密文。** + +- 🔒 **加密存储**:Keystore 加密 + `local_secure` 模式,100% 本地离线 +- 🔑 **灵活导入**:新建、导入私钥或助记词 +- 🔄 **多钱包切换**:管理多个钱包,随时切换活跃账户 +- ⛓️ **多链签名**:TRON + 全部 EVM 兼容链(Ethereum / BSC / Polygon / Base / Arbitrum…) + +> 💡 **谁在依赖 Agent-Wallet**: +> - **x402 SDK** —— 解析支付凭证、签发 x402 小额支付(安装 x402 时自动带入) +> - **Skills** —— 执行需要签名的链上操作时 +> - **MCP Server** 私有化部署时 —— 写入类工具执行前读取本机钱包签名 + +**用户感知**:首次按 [快速开始](./QuickStart.md) 走一遍时,Agent-Wallet 会自动创建并配置好——大多数用户不需要单独接触它。 + +👉 详见:[Agent-Wallet 简介](../Agent-Wallet/Intro.md) + +--- + +### 04 · Skills — AI 链上操作的 SOP 手册 + +**Skills 是一套预先编写好的 AI 链上操作标准作业流程。** AI Agent 按 Skills 的 SOP 逐步执行——**查余额 → 检查授权 → 报价 → 滑点保护 → 等你确认 → 调用 MCP Server 执行**,一步不漏,规避常见陷阱。 + +举例:用户说"花 50 USDT 买点 TRX"。没装 Skills 的 AI 可能直接生成一段交易代码,因未授权 SunSwap 而报错;装了 `sunswap-dex-trading` Skill 的 AI 会严格按 SOP 自动完成所有前置与确认步骤。 + +**关键特性**:一句话安装全部 Skills;自然语言调用;自动调用下层 MCP Server 完成链上原子操作。BANK OF AI Skills 套件覆盖钱包管理、SunSwap 兑换、SunPerp 永续、TRC20 工具、TronScan 查询、TRX 质押投票、USDD/JUST、多签权限、x402 支付等场景,并随生态持续扩展。 + +👉 详见:[Skills 简介](../McpServer-Skills/SKILLS/Intro.md) · [快速开始](./QuickStart.md) + +--- + +### 05 · MCP Server — 链上原子能力接口层 + +**MCP Server(Model Context Protocol Server)** 基于 Anthropic 的 MCP 标准,把链上与链下能力封装成 AI 可调用的标准化工具。 + +**Skills 与 MCP Server 的关系:** + +| 层 | 角色 | 负责什么 | +| :-- | :-- | :-- | +| **Skills** | 业务编排层(Orchestration) | 把多步操作按 SOP 串起来,处理前置检查和风控 | +| **MCP Server** | 能力提供层(Capability Provider) | 提供原子能力工具给上层调用 | + +BANK OF AI 提供两套 **MCP Server**,默认接入 BANK OF AI 云服务端点,开箱即用: + +- **TRON MCP Server** — TRON 链上原子操作(查询、转账、合约、质押、治理),60+ 工具。支持本地私有化部署 +- **SUN MCP Server** — SunSwap V2/V3/V4 兑换与流动性,20+ 工具。支持本地私有化部署。另提供 **[SUN CLI](../McpServer-Skills/Tools/SUNCli/Intro.md)**——与 SUN MCP Server 能力完全对等的命令行实现,面向脚本 / 自动化 / CI-CD 场景 + +> 💡 **私有化部署**:Skills 默认通过官方云端点调用 MCP Server,无需单独安装;若需本地部署,参考对应 MCP Server 的部署文档。 + +> ⚙️ **依赖关系**:MCP Server 私有化部署时需先配置 Agent-Wallet——钱包决定了 AI 以哪个身份执行链上操作。若未配置钱包,写入类工具执行时会返回错误提示。 + +除了 BANK OF AI 自研的 MCP Server,生态中还有更多第三方 MCP Server 和 Skills,见下方 [🌐 生态层](#-生态层--ai-agent-ecosystem)。 + +👉 详见:[MCP Server 简介](../McpServer-Skills/MCP/Intro.md) + +--- + +## 🌐 生态层 | AI Agent Ecosystem + +除了 BANK OF AI 自研的产品,整个生态已接入跨 3 条链的多个主流 DeFi / 数据协议——每一家都提供**生产级的 MCP Server 或 Skills**,AI 安装后立即能用。 + +### 🔴 TRON + +| 产品 | 提供方 | 覆盖能力 | 安装 | +| :-- | :-- | :-- | :-- | +| **TRON MCP Server** | BANK OF AI | Transfer / Contract / Staking / Governance,60+ 工具 | `npx -y @bankofai/mcp-server-tron` | +| **SUN MCP Server** | BANK OF AI | Swap / Liquidity / Farming,V2/V3/V4,20+ 工具 | `npx -y @bankofai/sun-mcp-server` | +| **JustLend MCP Server** | JustLend DAO | Lend / Borrow / Staking / Governance,50 工具 | `npx -y @justlend/mcp-server-justlend` | +| **TronScan MCP Server** | TronScan | Query / Analytics / Security,119 工具 | `https://mcp.tronscan.org/mcp` | + +### 🔵 Ethereum + +| 产品 | 提供方 | 覆盖能力 | 安装 | +| :-- | :-- | :-- | :-- | +| **Etherscan** | Etherscan Official | Query / Tracking / Analytics,60+ 链 | `npx skills add https://docs.etherscan.io` | +| **Uniswap AI** | Uniswap Labs | Swap / Liquidity / V4 Hooks / 5 Plugins | `npx skills add Uniswap/uniswap-ai` | + +### 🟡 BNB Chain + +| 产品 | 提供方 | 覆盖能力 | 安装 | +| :-- | :-- | :-- | :-- | +| **BNB Chain** | BNB Chain Official | Transfer / Contract / Query / 8004 身份注册 | `npx skills add bnb-chain/bnbchain-skills` | +| **PancakeSwap AI** | PancakeSwap Official | Swap / Liquidity / Farming,3 Skills · 8 链 | `npx skills add pancakeswap/pancakeswap-ai` | +| **ListaDAO** | ListaDAO Official | Lending / Staking / CDP,3 Skills · 9 MCP 工具 | `npx skills add lista-dao/lista-skills` | + +> 💡 生态持续扩张中,以官网 **[AI Agent Ecosystem](https://bankofai.io)** 为准。 + +--- + +## BANK OF AI 的协作流程 + +前面介绍了 4 层各自的分工——下面看它们在一次真实操作中如何协作。用 **TRC20 转账** 这个最常见场景举例。 + +
+ +![AI 智能体通过自然对话完成 TRC20 转账的工作流程](./image/bankofai-architecture.svg) + +
+ +**① 模型层 · 理解意图** + +你在任意 AI 客户端(OpenClaw / Cursor / Claude Code / Codex 等)里发一句话: + +> 向地址 `T....XXXXX` 转 100 TRX + +AI 客户端由 **LLM Service** 驱动,识别出这是一笔 TRC20 / TRX 转账,决定调用 `trc20-token-toolkit` 这个 Skill。 + +**② 工具层 · Skills 编排** + +`trc20-token-toolkit` 按 SOP 逐步推进:**查余额 → 校验收款地址 → 构造交易 → 等你确认**。任何一步不通过(余额不足、地址格式错等)都会立即停下并把原因返回给你。 + +**③ 工具层 · MCP + Wallet · 构造 · 签名 · 上链** + +Skill 调用 **TRON MCP Server** 组装这笔 TRC20 转账交易,然后交给 **Agent-Wallet** 在你本机本地完成签名(**私钥永不出本机**),最后提交到 TRON 主网。 + +**④ 返回 · 结果沿原路径回到 AI 智能体** + +链上执行完成后,交易哈希、状态、事件日志沿原路径反向返回——MCP Server 解析成结构化数据,AI 智能体再生成自然语言摘要: + +> ✅ 已向 `T....XXXXX` 转账 100 TRX。手续费 1.1 TRX。 +> 交易哈希:`0xabc123...def456`([在 TronScan 查看](https://tronscan.org)) + +:::tip 另外两层什么时候登场? +本例只涉及 **模型层** 和 **工具层**。其他两层按场景触发: + +- **🛤️ 协议层**:**涉及付费**时(调用付费 API、订阅 Agent 服务等)走 **x402**;**验证陌生 Agent 身份或查信誉**时走 **8004** +- **🌐 生态层**:当你需要调用第三方协议(如 **Uniswap AI** 在以太坊兑换、**ListaDAO** 在 BNB Chain 质押)时,AI 智能体会调用对应的第三方 MCP Server / Skills——流程与本例一致,只是把 TRON MCP 换成目标链的 MCP Server +::: + +--- + +## 我适合用 BANK OF AI 吗? + +- **Web3 新手:** 完全没问题。把一段安装指令粘贴给 AI 客户端,剩下的全部自动完成;之后用自然语言对话即可,无需了解底层细节。 +- **Web3 老手:** 可以告别「切钱包 + 复制地址 + 算滑点 + 等区块」的繁琐流程,让 AI 接管所有重复性工作,自己专注策略。 +- **AI Agent 开发者:** 完整的 SDK、CLI、API 和 MCP 标准接口——你可以基于 BANK OF AI 构建自己的 AI Agent,让 Agent 拥有链上能力和自动支付能力。 +- **API 服务提供方:** x402 协议让你的付费 API 被 AI 自动调用并按次计费,不需要传统账号注册、信用卡绑定流程,特别适合微支付和 Agent 对 Agent 自动结算场景。 + +--- + +## 准备好了吗? + +想让你的 AI 客户端拥有 BANK OF AI 链上能力,只需**两步**,不到 **1 分钟**: + +1. **粘贴安装指令** → AI 自动完成 Skills 安装 + 检查钱包状态,询问是否创建钱包 +2. **确认创建钱包** → AI 自动创建本地加密钱包 + +如需独立接入 **LLM Service / x402 / 8004** 或对 MCP Server 做**本地私有化部署 / 使用 SUN CLI**,请参考对应产品的文档。 + +👉 **[前往快速开始](./QuickStart.md)** diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/BANK-OF-AI/QuickStart.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/BANK-OF-AI/QuickStart.md new file mode 100644 index 00000000..adcad31e --- /dev/null +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/BANK-OF-AI/QuickStart.md @@ -0,0 +1,231 @@ +# 快速开始 + +想让你的 AI 客户端拥有 BANK OF AI 链上能力,只需**两步**,不到 **1 分钟**: + +1. **粘贴安装指令** → AI 自动完成 Skills 安装 + 检查钱包状态,询问是否创建钱包 +2. **确认创建钱包** → AI 自动创建本地加密钱包 + +--- + +## 第 1 步:粘贴安装指令 + +在你正在用的 AI 客户端(OpenClaw / Claude Code / Cursor / Codex 等)里粘贴这段指令: + +``` +运行 npx skills add BofAI/skills 安装 BANK OF AI 全部技能,安装完成后使用 bankofai-guide 进行引导后续操作。 +注意:请安装到当前 Agent 对应的 skill 目录 +``` + +AI 会自动安装 Skills,随后问你是否创建钱包。 + +
+展开 AI 输出示例 + +> 好的!我来按照你的要求安装。 +> +> 命令进入交互模式,让我选择全部技能:让我使用 `-y` 参数但不使用 `-g`,这样应该能默认选择全部并安装到当前 Agent 目录: +> +> ✅ **11 个 Skills 安装完成!**(安装到当前 Agent skill 目录) +> +> 现在使用 `bankofai-guide` 进行引导... +> +> ─── +> +> **📋 Section A — 安装后引导** +> - 步骤 1:安装 Agent Wallet CLI +> - 步骤 2:检查钱包状态 +> +> ─── +> +> ✅ **Skills 安装完成!** +> 安装位置:`~/.openclaw/workspace/.agents/skills/`(当前 Agent 目录) +> +> | # | Skill 名称 | +> | :-- | :-- | +> | 1 | `agent-wallet` | +> | 2 | `bankofai-guide` | +> | 3 | `multi-sig-account-permissions` | +> | 4 | `recharge-skill` | +> | 5 | `sunperp-perpetual-futures-trading` | +> | 6 | `sunswap-dex-trading` | +> | 7 | `trc20-token-toolkit` | +> | 8 | `tronscan-data-lookup` | +> | 9 | `trx-staking-sr-voting` | +> | 10 | `usdd-just-protocol` | +> | 11 | `x402-payment` | +> +> **📋 当前状态** +> +> | 组件 | 状态 | +> | :-- | :-- | +> | Agent Wallet CLI | ✅ 已安装 | +> | 钱包 | ⚠️ 未配置 | +> +> **💼 钱包设置** +> +> 提示:需要一个钱包来进行转账和交易(如代币兑换、转账、查询余额等)。 +> +> **是否立即设置钱包?** +> +> **A. 立即创建(推荐,约 10 秒)** +> - 快速设置,自动生成安全密码 +> - 创建后即可使用所有 BankOfAI 功能 +> +> **B. 稍后再创建** +> - 可以稍后再次运行 `bankofai-guide` 继续设置 +> - 目前只能使用只读查询功能 +> +> 请回复 **A** 或 **B**。 + +
+ +--- + +## 第 2 步:确认创建钱包 + +根据 AI 的提示确认创建钱包(比如回复「创建」「继续」或 AI 给出的选项),AI 会自动创建本地加密钱包,并展示钱包信息、地址、主密码和后续可做的事情。 + +
+展开 AI 输出示例 + +> 好的!执行快速设置创建钱包。 +> +> - 步骤 1:生成安全密码 +> - 步骤 2:创建钱包 +> - 步骤 3:获取钱包地址 +> +> ─── +> +> **🎉 钱包创建成功!** +> +> **💼 钱包信息** +> +> | 项目 | 详情 | +> | :-- | :-- | +> | 钱包 ID | `default_local_secure` | +> | 类型 | `local_secure`(本地加密) | +> | 状态 | ✅ 已激活 | +> +> **📍 钱包地址** +> +> | 网络 | 地址 | +> | :-- | :-- | +> | EVM | `0x7858...4bCA` | +> | TRON | `TLwYeH...q8usz` | +> +> 💡 **提示**:EVM 地址可用于所有 EVM 兼容链(Ethereum、BSC、Base、Polygon、Arbitrum 等)。 +> +> ─── +> +> **🔐 钱包密码** +> +> ``` +> <此处会显示你的专属主密码> +> ``` +> +> **⚠️ 重要安全提示:** +> - 此密码用于加密本地存储的私钥 +> - 进行任何交易、签名、查询地址等操作都需要此密码 +> - 密码已自动保存到 `~/.agent-wallet/runtime_secrets.json` 方便使用 +> - **请务必备份密码!** 如果 runtime secrets 文件被删除,密码是恢复钱包的唯一方式 +> +> ─── +> +> **🚀 下一步** +> +> 钱包已准备就绪!你现在可以: +> +> 1. **充值 USDT** → 向 TRON 地址 `TLwYeH...q8usz` 充值 USDT (TRC20) +> 2. **查询余额** → 使用 TronScan 查看 TRX 和代币余额 +> 3. **转账/兑换** → 使用 SunSwap 进行代币兑换或转账 +> +> **引导完成!🎉** +> +> 需要我帮你查询余额或进行其他操作吗? + +
+ +--- + +## 验证安装 + +打开 AI 对话框,发送一句: + +``` +查一下刚刚创建钱包地址的 TRX 和 USDT 余额。 +``` + +如果 AI 能返回余额结果——**恭喜,所有组件已经就位,可以开始使用。** + +:::note 新钱包可能出现的情况 +刚创建的 TRON 地址在首次收到转账前处于「未激活」状态,查询结果可能会显示 **余额 0 / 账户未激活**——这都是正常的,不影响你继续使用 BANK OF AI。 +::: + +--- + +## 你还可以做什么? + +直接用自然语言描述需求即可: + +### 🔍 链上数据查询(完全免费) + +> "查看这笔交易 abc123... 的执行结果。" + +> "当前 TRON 全网 TPS 是多少?" + +### 💸 TRC20 代币转账 + +> "帮我转 10 USDT 到 TRecipientAddress... 这个地址。" + +### 🔁 SunSwap 兑换 + +> "在 Nile 测试网上把 100 TRX 换成 USDT,滑点 1%。" + +### 📈 SunPerp 期货交易 + +> "用 5 倍杠杆开一张 BTC-USDT 的多单,亏损 5% 自动止损。" + +### 🗳️ TRX 质押投票 + +> "把我的 1000 TRX 质押给超级代表 SR XXX。" + + + +--- + +## 几条提醒 + +:::warning 新手三条铁律 · 链上交易不可逆 +1. **务必先在测试网验证。** 在 Nile 测试网上先执行 1-2 笔测试交易,确认 AI 行为完全符合预期后,再切换到主网。 +2. **每一笔花费操作前,请仔细核对 AI 给出的账单。** +3. **从小额开始。** 即便是已经测试过的操作,首次在主网执行时也建议使用小额资金验证。 +::: + +:::caution 主密码非常重要,请立即备份 +主密码**仅在第 2 步展示一次**。虽然会自动保存到本地的 `~/.agent-wallet/runtime_secrets.json`,但强烈建议你**同时手动保存到密码管理器**(1Password / Bitwarden 等)——一旦本地文件丢失或损坏,且没有外部备份,你的钱包将**永久无法解锁**(没有备份找回机制,没有客服,没有后门)。 + +⚠️ **切勿**把这个密码发到聊天工具、邮件、截图或公开仓库中。 +::: + +:::info 如果你在第 2 步暂时不想创建钱包 +AI 会跳过钱包创建流程。等你准备好时,随时可以在 AI 对话框里触发**对话式创建**——无需重新运行安装指令。详见 [Agent-Wallet 快速开始 · 方式一:对话式创建](../Agent-Wallet/QuickStart.md)。 +::: + +:::tip 想独立使用其他产品或自行部署? +**BANK OF AI 的完整产品矩阵不止 Skills**——如需独立使用其他产品或对底层做私有化部署,请分别参考: + +- **LLM Service**(模型接入层):直接使用 BANKOFAI APP 或接入统一 API Gateway → [LLM Service 简介](../llmservice/introduction.md) +- **x402 Payment**(支付协议):让 AI 自动在链上完成小额付款 → [x402 协议简介](../x402/index.md) +- **8004 Protocol**(身份与信誉):Agent 链上征信查询 → [8004 协议简介](../8004/general.md) +- **MCP Server 本地私有化部署**:Skills 默认通过 BANK OF AI 官方云端点调用 MCP Server,无需单独安装;若需本地部署,参考 [TRON MCP 本地私有化部署](../McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md) · [SUN MCP 本地私有化部署](../McpServer-Skills/MCP/SUNMCPServer/LocalPrivatizedDeployment.md) · [BSC MCP 安装](../McpServer-Skills/MCP/BSCMCPServer/Installation.md) +- **SUN CLI**:与 SUN MCP Server 能力对等的命令行工具,面向脚本/自动化/CI-CD 场景 → [SUN CLI 快速开始](../McpServer-Skills/Tools/SUNCli/QuickStart.md) +::: + +--- + +## 下一步 + +| 我想… | 去这里 | +| :--- | :--- | +| 了解整体架构 | [BANK OF AI 简介](./Intro.md) | +| 深入了解某个组件 | [Agent-Wallet](../Agent-Wallet/Intro.md) · [MCP Server](../McpServer-Skills/MCP/Intro.md) · [Skills](../McpServer-Skills/SKILLS/Intro.md) · [x402](../x402/index.md) · [8004](../8004/general.md) · [LLM Service](../llmservice/introduction.md) | diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/BANK-OF-AI/image/bankofai-architecture.svg b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/BANK-OF-AI/image/bankofai-architecture.svg new file mode 100644 index 00000000..25bf4688 --- /dev/null +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/BANK-OF-AI/image/bankofai-architecture.svg @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BANK OF AI 的协作流程 + 示例:TRC20 转账 · Transfer 100 TRX + + + + 执行结果 → AI 智能体 + + + + + + 👤 你 · 自然语言指令 + "向地址 T....XXXXX 转 100 TRX" + + + + ↑ AI 回复 + ↓ 你的指令 + + + + 🧠 AI 智能体 + 由 LLM Service 驱动 · GPT / Claude / Gemini / DeepSeek / Kimi ... + 理解意图,调用对应的 Skill + + + + + + + 🌟 Skills · trc20-token-toolkit + 业务编排层 · Business Orchestration Layer + SOP:查余额 → 校验地址 → 构造交易 → 等你确认 + + + + + + + ⚙️ TRON MCP Server + 能力提供层 · 提供链上原子能力工具 + 本例调用:构造 TRC20 转账交易 + + + + + + + 🔐 Agent-Wallet · 本地加密钱包 + 私钥永不出本机 · 交易在本地签名后提交上链 + 本例:对 TRC20 转账交易执行本地签名 + + + + + + + ⛓️ TRON Blockchain + + + 图例 / Legend: + + Skills 编排 + + 签名 / 上链 + + 执行结果反馈 + diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/SUNMCPServer/OfficialServerAccess.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/SUNMCPServer/OfficialServerAccess.md index 1aa5514b..97778db6 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/SUNMCPServer/OfficialServerAccess.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/SUNMCPServer/OfficialServerAccess.md @@ -32,9 +32,41 @@ ## 如何接入官方云服务? -### 一键自动安装 +我们提供了三种安装方式。**根据你的使用习惯选一种即可**——对话式安装最简单;交互式安装控制最精细。 -只需告诉你的 AI Agent 执行以下命令: +### 方式一:对话式安装(最简单) + +如果你已经在使用支持 shell 命令的 AI Agent(OpenClaw、Telegram Bot、Web 聊天页面、Claude Code、Cursor 等),你可以**直接在对话框里让 AI 完成安装**——不用自己打开终端,不用手动复制文件。 + +:::tip 前置依赖 +**需要在 AI Agent 运行的机器上安装 Node.js**(Agent 内部会调用 `npx`)。如果还没装,去 [nodejs.org](https://nodejs.org) 下载 LTS 安装包,双击按提示装一次即可,后续无需再操作。 +::: + +**操作步骤:** + +1. 打开你的 AI Agent 对话框 +2. 复制下面这段 prompt 发送给 AI: + + ``` + 运行 npx add-mcp https://sun-mcp-server.bankofai.io/mcp -y 安装 SUN MCP Server。 + 注意:请安装到当前 Agent 对应的 MCP 配置中。 + ``` + +3. AI 会自动完成以下流程(无需人工干预): + - 识别远程 MCP 服务地址 + - 自动检测当前正在使用的 AI 客户端 + - 把 `sun-mcp-server` 配置写入对应的 MCP 配置文件(无需手动改 JSON) + - 完成后给出 ✅ 确认信息 + +AI 给出 ✅ 确认后,SUN MCP Server 就已就位,可以直接开始提问。 + +:::tip 这是新手最推荐的路径 +你不需要懂 `npx`、`npm` 是什么,也不用关心 MCP 配置文件在哪里。AI 会处理每一步,包括为你的客户端选对配置文件路径。 +::: + +### 方式二:一键自动安装(命令行) + +如果你已经装好 Node.js 并习惯使用命令行,直接在终端运行以下命令: ```bash npx add-mcp https://sun-mcp-server.bankofai.io/mcp -y @@ -42,9 +74,9 @@ npx add-mcp https://sun-mcp-server.bankofai.io/mcp -y `-y` 参数会跳过所有交互选择,自动安装到你电脑上检测到的所有 AI 工具中。安装完成后会显示 ✅ 安装完成!以及安装到了哪些 Agent。 -安装完成后,重启 AI Agent,即可使用 SUN MCP Server 开始与 SunSwap 交互。 +安装完成后,即可使用 SUN MCP Server 开始与 SunSwap 交互。 -### 交互式安装 +### 方式三:交互式安装(最精细控制) 如果你想手动选择安装到哪些 AI 工具,去掉 `-y` 参数即可: @@ -115,7 +147,7 @@ npx add-mcp https://sun-mcp-server.bankofai.io/mcp └ Done! ``` -安装完成后,重启 AI Agent,即可使用 SUN MCP Server 开始与 SunSwap 交互。 +安装完成后,即可使用 SUN MCP Server 开始与 SunSwap 交互。 --- @@ -132,7 +164,6 @@ npx add-mcp https://sun-mcp-server.bankofai.io/mcp 如遇到问题,请先确认: 1. Node.js 版本 >= 20.0.0(运行 `node --version` 检查) 2. 网络能正常访问 `sun-mcp-server.bankofai.io` -3. AI 客户端已完全退出重启(不是刷新) --- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/SUNMCPServer/QuickStart.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/SUNMCPServer/QuickStart.md index f79aed61..b2e13812 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/SUNMCPServer/QuickStart.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/SUNMCPServer/QuickStart.md @@ -17,25 +17,35 @@ ## 安装 -只需告诉你的 AI Agent 执行以下命令: +最简单的安装方式是**直接在 AI Agent 对话框里让 AI 完成**——不用自己打开终端,不用手动复制文件。如果你已经在使用支持 shell 命令的 AI Agent(OpenClaw、Telegram Bot、Web 聊天页面、Claude Code、Cursor 等),这一步即可搞定。 -```bash -npx add-mcp https://sun-mcp-server.bankofai.io/mcp -y -``` +**操作步骤:** + +1. 打开你的 AI Agent 对话框 +2. 复制下面这段 prompt 发送给 AI: + + ``` + 运行 npx add-mcp https://sun-mcp-server.bankofai.io/mcp -y 安装 SUN MCP Server。 + 注意:请安装到当前 Agent 对应的 MCP 配置中。 + ``` -`-y` 参数会跳过所有交互选择,自动安装到你电脑上检测到的所有 AI 工具中。安装完成后会显示 ✅ 安装完成!以及安装到了哪些 Agent。 +3. AI 会自动完成以下流程(无需人工干预): + - 识别远程 MCP 服务地址 + - 自动检测当前正在使用的 AI 客户端 + - 把 `sun-mcp-server` 配置写入对应的 MCP 配置文件(无需手动改 JSON) + - 完成后给出 ✅ 确认信息 -命令完成后,重启你的 MCP 客户端。 +AI 给出 ✅ 确认后,SUN MCP Server 就已就位,可以直接开始提问。 -:::tip 想手动选择安装到哪些 AI 工具? -去掉 `-y` 参数即可进入交互式安装,详见[官方云服务接入](./OfficialServerAccess.md)。 +:::tip 想用命令行? +如果你更习惯自己跑命令或需要更精细的控制(比如手动选择要安装到哪些 AI 工具),请参阅[官方云服务接入](./OfficialServerAccess.md)里的命令行和交互式安装方式。 ::: --- -## 重启并测试 +## 试用一下 -完成配置后,重启你的 MCP 客户端。然后在对话中尝试以下查询: +在对话中尝试以下查询: ``` 查一下 SunSwap 上 USDT 和 TRX 的当前价格 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/TRONMCPServer/OfficialServerAccess.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/TRONMCPServer/OfficialServerAccess.md index 8b3d8a51..335d85ec 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/TRONMCPServer/OfficialServerAccess.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/TRONMCPServer/OfficialServerAccess.md @@ -45,9 +45,41 @@ ## 如何接入官方云服务? -### 一键自动安装 +我们提供了三种安装方式。**根据你的使用习惯选一种即可**——对话式安装最简单;交互式安装控制最精细。 -只需告诉你的 AI Agent 执行以下命令: +### 方式一:对话式安装(最简单) + +如果你已经在使用支持 shell 命令的 AI Agent(OpenClaw、Telegram Bot、Web 聊天页面、Claude Code、Cursor 等),你可以**直接在对话框里让 AI 完成安装**——不用自己打开终端,不用手动复制文件。 + +:::tip 前置依赖 +**需要在 AI Agent 运行的机器上安装 Node.js**(Agent 内部会调用 `npx`)。如果还没装,去 [nodejs.org](https://nodejs.org) 下载 LTS 安装包,双击按提示装一次即可,后续无需再操作。 +::: + +**操作步骤:** + +1. 打开你的 AI Agent 对话框 +2. 复制下面这段 prompt 发送给 AI: + + ``` + 运行 npx add-mcp https://tron-mcp-server.bankofai.io/mcp -y 安装 TRON MCP Server。 + 注意:请安装到当前 Agent 对应的 MCP 配置中。 + ``` + +3. AI 会自动完成以下流程(无需人工干预): + - 识别远程 MCP 服务地址 + - 自动检测当前正在使用的 AI 客户端 + - 把 `tron-mcp-server` 配置写入对应的 MCP 配置文件(无需手动改 JSON) + - 完成后给出 ✅ 确认信息 + +AI 给出 ✅ 确认后,TRON MCP Server 就已就位,可以直接开始提问。 + +:::tip 这是新手最推荐的路径 +你不需要懂 `npx`、`npm` 是什么,也不用关心 MCP 配置文件在哪里。AI 会处理每一步,包括为你的客户端选对配置文件路径。 +::: + +### 方式二:一键自动安装(命令行) + +如果你已经装好 Node.js 并习惯使用命令行,直接在终端运行以下命令: ```bash npx add-mcp https://tron-mcp-server.bankofai.io/mcp -y @@ -55,9 +87,9 @@ npx add-mcp https://tron-mcp-server.bankofai.io/mcp -y `-y` 参数会跳过所有交互选择,自动安装到你电脑上检测到的所有 AI 工具中。安装完成后会显示 ✅ 安装完成!以及安装到了哪些 Agent。 -安装完成后,重启 AI Agent,即可使用 TRON MCP Server 开始与 TRON 区块链交互。 +安装完成后,即可使用 TRON MCP Server 开始与 TRON 区块链交互。 -### 交互式安装 +### 方式三:交互式安装(最精细控制) 如果你想手动选择安装到哪些 AI 工具,去掉 `-y` 参数即可: @@ -128,7 +160,7 @@ npx add-mcp https://tron-mcp-server.bankofai.io/mcp └ Done! ``` -安装完成后,重启 AI Agent,即可使用 TRON MCP Server 开始与 TRON 区块链交互。 +安装完成后,即可使用 TRON MCP Server 开始与 TRON 区块链交互。 --- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md index 88c67c1d..79ef15e0 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/TRONMCPServer/QuickStart.md @@ -2,7 +2,7 @@ 这个页面的目标很简单:**让你在 1 分钟内完成接入,发起第一次区块链查询。** -我们会使用[官方云服务](./OfficialServerAccess.md)来完成这次快速体验。云服务是只读的,不需要安装任何依赖、不需要配置钱包、不需要申请 API Key——你只需要把一段配置复制到 AI 客户端,重启,然后开始提问。 +我们会使用[官方云服务](./OfficialServerAccess.md)来完成这次快速体验。云服务是只读的,不需要安装任何依赖、不需要配置钱包、不需要申请 API Key——你只需要把一段配置复制到 AI 客户端,就能开始提问。 --- @@ -23,27 +23,35 @@ node --version # 应输出 v20.x.x 或更高 ## 安装 -只需告诉你的 AI Agent 执行以下命令: +最简单的安装方式是**直接在 AI Agent 对话框里让 AI 完成**——不用自己打开终端,不用手动复制文件。如果你已经在使用支持 shell 命令的 AI Agent(OpenClaw、Telegram Bot、Web 聊天页面、Claude Code、Cursor 等),这一步即可搞定。 -```bash -npx add-mcp https://tron-mcp-server.bankofai.io/mcp -y -``` +**操作步骤:** + +1. 打开你的 AI Agent 对话框 +2. 复制下面这段 prompt 发送给 AI: -`-y` 参数会跳过所有交互选择,自动安装到你电脑上检测到的所有 AI 工具中。安装完成后会显示 ✅ 安装完成!以及安装到了哪些 Agent。 + ``` + 运行 npx add-mcp https://tron-mcp-server.bankofai.io/mcp -y 安装 TRON MCP Server。 + 注意:请安装到当前 Agent 对应的 MCP 配置中。 + ``` -命令完成后,重启你的 MCP 客户端。 +3. AI 会自动完成以下流程(无需人工干预): + - 识别远程 MCP 服务地址 + - 自动检测当前正在使用的 AI 客户端 + - 把 `tron-mcp-server` 配置写入对应的 MCP 配置文件(无需手动改 JSON) + - 完成后给出 ✅ 确认信息 -:::tip 想手动选择安装到哪些 AI 工具? -去掉 `-y` 参数即可进入交互式安装,详见[官方云服务接入](./OfficialServerAccess.md)。 +AI 给出 ✅ 确认后,TRON MCP Server 就已就位,可以直接开始提问。 + +:::tip 想用命令行? +如果你更习惯自己跑命令或需要更精细的控制(比如手动选择要安装到哪些 AI 工具),请参阅[官方云服务接入](./OfficialServerAccess.md)里的命令行和交互式安装方式。 ::: --- -## 重启并测试 - -保存配置后,**完全退出并重新启动** AI 客户端。重启后客户端会自动连接 TRON MCP Server。 +## 试用一下 -然后在对话框中输入你的第一条查询: +在对话框中输入你的第一条查询: ``` 查一下 TRON 地址 TXyz... 的 TRX 余额 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/SKILLS/BANKOFAISkill.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/SKILLS/BANKOFAISkill.md index 9a0aa29f..d4a650c7 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/SKILLS/BANKOFAISkill.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/SKILLS/BANKOFAISkill.md @@ -21,6 +21,8 @@ BANK OF AI SKILLS 可以操作**真实的链上资产**。区块链交易一旦 | **sunperp-skill** | 看行情、开仓、平仓、提现 | 看行情不需要;交易需要 SunPerp 密钥 | | **tronscan-skill** | 查账户、交易、代币、区块、全网数据 | 建议配置 TronScan API 密钥(不配可能卡顿) | | **trc20-toolkit-skill** | 转代币、查余额、管理授权,支持任意 TRC20 代币 | 查询不需要;转账/授权需要钱包凭证 | +| **usdd-skill** | USDD 稳定币——PSM 1:1 USDT ↔ USDD 兑换、金库查询、余额查看 | 查询不需要;PSM 兑换需要钱包凭证 | +| **trx-staking-skill** | 质押 TRX、投票给超级代表、领取投票奖励 | 需要钱包凭证 | | **multisig-permissions** | 多签权限配置、密钥管理、多方共签提案 | 需要钱包凭证(权限变更需要 Owner 密钥) | | **x402-payment** | 链上"先付后用"自动结算 | 需要钱包凭证 | | **recharge-skill** | 查余额、看订单、充值 | 需要 BANK OF AI 密钥 | @@ -234,6 +236,87 @@ Agent Wallet 会用主密码加密你的私钥。即使别人拿到了你的文 --- +## usdd-skill {#usdd-skill} + +想玩转 TRON 生态的超额抵押稳定币 **USDD**?这个技能基于 JUST Protocol,支持通过 PSM(Peg Stability Module)进行 1:1 USDT ↔ USDD 兑换,查询金库(CDP)仓位和协议参数,查看 USDD/USDT/USDC/TRX/JST 余额。 + +**绝对安全,只看不花钱:** + +> 帮我看看 PSM 当前状态:费率、USDT 储备金、USDD 总供应量。 + +> 查一下我的 USDD、USDT 和 JST 余额。 + +> 列出所有 USDD 金库类型(TRX-A、TRX-B、sTRX-A、USDT-A 等),以及它们的债务上限和稳定费率。 + +> 查一下 CDP 仓位 #42 的抵押品、债务和抵押率。 + +**需要你确认才会执行(AI 会先把账单给你看):** + +> 通过 PSM 用 1000 USDT 兑换 1000 USDD(零手续费)。 + +> 通过 PSM 把 500 USDD 赎回成 500 USDT。 + +**实战场景:** + +> 第一次接触 USDD? "帮我通过 PSM 用 1000 USDT 换成 USDD"——1:1 兑换,目前零手续费,自动处理 TRC20 授权。 + +> 查看金库健康度? "帮我列出所有金库类型和它们的稳定费率。"(TRX-A/B/C = 5%,sTRX-A = 1%,USDT-A = 0%) + +> 关注某个具体 CDP? "查一下 CDP #42 的抵押率。" + +:::tip PSM vs. 金库 +PSM 支持 **USDT ↔ USDD 即时 1:1 兑换**——是获取 USDD 最简单的方式。金库/CDP 仓位(通过抵押 TRX 等资产铸造 USDD)在本技能中为只读——你可以查询,但不能直接开仓、抵押、还款。 +::: + +:::caution PSM 储备可能枯竭 +用 USDD 赎回 USDT 前,先用 `psm-info` 查一下——如果 USDT 储备不足,`buyGem` 会失败。USDD(18 位精度)和 USDT(6 位精度)的差异,技能会自动处理。 +::: + +--- + +## trx-staking-skill {#trx-staking-skill} + +想通过参与 TRON 治理赚取收益?这个技能帮你质押 TRX 换取 **TRON Power(TP)**、投票给超级代表(SR),以及领取投票奖励。TRON 采用 DPoS(委托权益证明)——得票前 27 名的超级代表负责出块,并按得票比例每 6 小时分配一次奖励给投票人。 + +**绝对安全,只看不花钱:** + +> 帮我查看我的质押概况:TRON Power、冻结的 TRX、当前投票情况和待领取奖励。 + +> 列出排名前 27 的活跃超级代表。 + +> 列出排名前 50 的超级代表(包括合作伙伴节点)。 + +> 查询地址 TXX... 的质押状态。 + +**需要你确认才会执行:** + +> 把我的 TRON Power 全部投票给 SR 地址 TSRAddress。 + +> 把我的票拆分:60% 给 TSR1,40% 给 TSR2。 + +> 帮我领取待结算的投票奖励。 + +**实战场景:** + +> 第一次投票? "帮我列出前 10 名超级代表,然后 dry-run 一次投票 TSRAddress 再确认。" + +> 想分散投票? "帮我把票 50/50 分给 TSR1 和 TSR2。"每次投票都会**完整替换**之前的投票——每次提交的都是新的全量投票清单。 + +> 领取奖励? "查一下我的待领取奖励,然后领取。"(奖励和解锁提取是两回事) + +:::tip 关键知识点 +- 1 个冻结的 TRX = 1 TRON Power(TP) +- 投票奖励每 6 小时分配一次 +- 投票会**完全替换**之前的投票——每次都是新的全量清单 +- 兼容 Stake 2.0:读取 `frozenV2[]`,使用 `voteWitnessAccount` +::: + +:::danger 14 天解锁期 +当 TRX 被解除质押后(通过配套的质押流程),会进入 **14 天冷冻期**——期间既不产生任何资源,也不贡献任何投票权。14 天后,你必须手动调用 `withdrawExpireUnfreeze` 才能把 TRX 取回——不会自动到账。同时,解除质押会移除对应的 TRON Power,导致依赖这部分票数的投票失效。 +::: + +--- + ## multisig-permissions {#multisig-permissions} 想给你的 TRON 账户加上多重签名保护?这个技能帮你管理 TRON 原生的三级权限模型(Owner、Active、Witness)——配置密钥、设定签名阈值、限定操作范围,然后通过"发起提案 → 审批签名 → 执行"的流程完成多方共签。非常适合团队钱包,或者限制 AI 只能做 DeFi 操作。 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/SKILLS/Intro.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/SKILLS/Intro.md index f8ae722a..87160ecc 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/SKILLS/Intro.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/SKILLS/Intro.md @@ -57,7 +57,7 @@ ## 目前 Skills 能帮你干什么? -八大核心技能,覆盖 TRON 生态最常用的场景。每个技能都配了一句"参考话术"——复制到 AI 对话框里回车就能体验。 +十大核心技能,覆盖 TRON 生态最常用的场景。每个技能都配了一句"参考话术"——复制到 AI 对话框里回车就能体验。 ### 🔑 安全钱包管理 @@ -99,6 +99,22 @@ 💡 如需了解更多代币操作,请查看:[**trc20-toolkit-skill**](./BANKOFAISkill.md#trc20-toolkit-skill) +### 💵 USDD 稳定币与 JUST 协议 + +通过 PSM(Peg Stability Module)进行 1:1 的 USDT ↔ USDD 兑换(目前零手续费),查看 USDD/USDT/USDC/TRX/JST 余额,以及查询金库(CDP)仓位和协议参数。 + +> 🗣️ "帮我通过 PSM 用 1000 USDT 换成 USDD" 或 "帮我列出所有 USDD 金库类型和它们的稳定费率。" + +💡 如需了解 PSM 兑换和金库查询,请查看:[**usdd-skill**](./BANKOFAISkill.md#usdd-skill) + +### 🗳️ TRX 质押与超级代表投票 + +质押 TRX 换取 TRON Power,给超级代表投票,领取投票奖励。兼容 Stake 2.0——得票前 27 名的超级代表每 6 小时按得票比例分配区块奖励给投票人。 + +> 🗣️ "查一下我的 TRON Power 和当前投票情况,然后列出前 10 名超级代表。" 或 "帮我领取待结算的投票奖励。" + +💡 如需了解质押、投票与奖励流程,请查看:[**trx-staking-skill**](./BANKOFAISkill.md#trx-staking-skill) + ### 🔐 多签与账户权限管理 给你的 TRON 账户加上多重签名保护——配置密钥、设定阈值、协调多方共签。非常适合团队钱包,或者限制 AI 只能执行 DeFi 操作。 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/SKILLS/QuickStart.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/SKILLS/QuickStart.md index 5309c762..f86cc27e 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/SKILLS/QuickStart.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/SKILLS/QuickStart.md @@ -4,11 +4,42 @@ --- +:::tip 前置依赖 +**需要在 AI Agent 运行的机器上安装 Node.js**(Agent 内部会调用 `npx`)。如果还没装,去 [nodejs.org](https://nodejs.org) 下载 LTS 安装包,双击按提示装一次即可,后续无需再操作。 +::: + ## 第 1 步:安装技能库 -### 一键自动安装 +我们提供了三种安装方式。**根据你的使用习惯选一种即可**——对话式安装最简单;交互式安装控制最精细。 + +### 方式一:对话式安装(最简单) + +如果你已经在使用支持 Skills 的 AI Agent(OpenClaw、Telegram Bot、Web 聊天页面,或任何能执行 shell 命令的客户端),你可以**直接在对话框里让 AI 完成安装**——不用自己打开终端,不用手动复制文件。 + +**操作步骤:** + +1. 打开你的 AI Agent 对话框 +2. 复制下面这段 prompt 发送给 AI: + + ``` + 运行 npx skills add BofAI/skills 安装 BANK OF AI 全部技能,安装完成后使用 bankofai-guide 进行引导后续操作。 + 注意:请安装到当前 Agent 对应的 skill 目录 + ``` -只需告诉你的 AI Agent 执行以下命令: +3. AI 会自动完成以下流程(无需人工干预): + - 拉取 `BofAI/skills` 仓库 + - 自动检测当前 Agent 对应的 skills 目录(如 `~/.openclaw/workspace/.agents/skills/`) + - 安装全部 11 个 BANK OF AI 技能(`agent-wallet`、`sunswap-dex-trading`、`x402-payment`、`bankofai-guide` 等) + +:::tip 这是新手最推荐的路径 +你不需要懂 `npx`、`npm` 是什么,也不用关心"全局安装"是什么意思。AI 会处理每一步,包括为你的平台选对 skills 目录、安装钱包 CLI、引导你完成首个钱包配置。 +::: + +--- + +### 方式二:一键自动安装(命令行) + +如果你已经装好 Node.js 并习惯使用命令行,告诉你的 AI Agent 执行以下命令: ```bash npx skills add https://github.com/BofAI/skills -y -g @@ -16,7 +47,9 @@ npx skills add https://github.com/BofAI/skills -y -g `-y` 参数会跳过所有交互选择,默认安装所有 Skills;`-g` 参数表示全局安装(所有项目都可使用)。安装完成后会显示 ✅ 全局安装完成!以及安装的所有 Skills 列表。 -### 交互式安装 +--- + +### 方式三:交互式安装(最精细控制) 如果你想手动选择安装哪些 Skills 以及安装范围,去掉 `-y -g` 参数即可: @@ -28,7 +61,7 @@ npx skills add https://github.com/BofAI/skills 本文档以在终端中运行命令为例展示安装过程。 ::: -#### 安装过程详解 +#### 交互式安装步骤详解 安装器会引导你完成以下几步,照着做就行: diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/SKILLS/image/conversational-install.png b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/SKILLS/image/conversational-install.png new file mode 100644 index 00000000..11732377 Binary files /dev/null and b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/SKILLS/image/conversational-install.png differ diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/sidebars.js b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/sidebars.js index f1b49143..1879146e 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/sidebars.js +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/sidebars.js @@ -1,6 +1,15 @@ /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ const sidebars = { docsSidebar: [ + { + type: 'category', + label: 'BANK OF AI', + collapsed: false, + items: [ + 'BANK-OF-AI/Intro', + 'BANK-OF-AI/QuickStart', + ], + }, { type: 'category', label: 'x402 Payment Protocol', diff --git a/package.json b/package.json index 17f3a9ca..8bc3ea10 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@x402-tron/docs", - "version": "1.2.9", + "version": "1.2.10", "description": "x402-tron documentation", "license": "MIT", "scripts": { diff --git a/sidebars.js b/sidebars.js index 59d14f0c..7231a619 100644 --- a/sidebars.js +++ b/sidebars.js @@ -1,6 +1,15 @@ /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ const sidebars = { docsSidebar: [ + { + type: 'category', + label: 'BANK OF AI', + collapsed: false, + items: [ + 'BANK-OF-AI/Intro', + 'BANK-OF-AI/QuickStart', + ], + }, { type: 'category', label: 'x402 Payment Protocol',