diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5e67525..09ac735 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -6,6 +6,7 @@ on: - main - master - update-mcp-server + - ai-bankofai-patch-1 tags: - 'test' pull_request: @@ -13,6 +14,7 @@ on: - main - master - update-mcp-server + - ai-bankofai-patch-1 workflow_dispatch: # Intentionally unrestricted — allows manual builds from any branch for flexibility env: diff --git a/docs/Agent-Wallet/Developer/CLI-Reference.md b/docs/Agent-Wallet/Developer/CLI-Reference.md index bc7a2ff..661627b 100644 --- a/docs/Agent-Wallet/Developer/CLI-Reference.md +++ b/docs/Agent-Wallet/Developer/CLI-Reference.md @@ -28,7 +28,11 @@ The interactive wizard may offer a `raw_secret` option. This type stores your pr ```bash agent-wallet start -p Abc12345! ``` -Password requirements: at least 8 characters, including uppercase, lowercase, numbers, and special characters. +Password requirements: at least 8 characters, including uppercase, lowercase, numbers, and special characters. If the password doesn't meet these requirements, the CLI will keep prompting you to enter a stronger one until it passes validation. + +When creating a new password interactively, you must enter it twice for confirmation. If the two entries don't match, the CLI will ask you to try again. + +**Default wallet IDs:** If you don't specify a wallet ID, the system defaults to `default_secure` for `local_secure` wallets and `default_raw` for `raw_secret` wallets. :::caution Shell history risk Passing `-p` inline records the password in your terminal's history file. For production wallets, prefer interactive mode (`agent-wallet start` without `-p`) or set `AGENT_WALLET_PASSWORD` as an environment variable — see [Non-Interactive Execution](#non-interactive-execution-for-automation--background-services). @@ -48,6 +52,10 @@ agent-wallet start -p Abc12345! -m "word1 word2 word3 ..." Every `sign` subcommand requires `--network` / `-n` to specify the chain. +:::info Password retry behavior +When signing with a `local_secure` wallet, the CLI will prompt for the master password if it's not provided via `-p` or `AGENT_WALLET_PASSWORD`. If you enter the wrong password, you get **2 retry attempts** (3 total) before the command fails with "Wrong password. 3 attempts failed." +::: + **Sign a message:** ```bash agent-wallet sign msg "Hello" -n tron diff --git a/docs/Agent-Wallet/Developer/SDK-Guide.md b/docs/Agent-Wallet/Developer/SDK-Guide.md index 2423e11..1ccdd99 100644 --- a/docs/Agent-Wallet/Developer/SDK-Guide.md +++ b/docs/Agent-Wallet/Developer/SDK-Guide.md @@ -517,10 +517,14 @@ WalletError ├── DecryptionError # Wrong password or corrupted key file ├── SigningError # Signing operation failed ├── NetworkError # Network identifier mismatch -├── InsufficientBalanceError # Insufficient balance (thrown by caller) +├── InsufficientBalanceError # Insufficient balance └── UnsupportedOperationError # Operation not supported by this wallet type ``` +:::tip About InsufficientBalanceError +`InsufficientBalanceError` is **not** thrown by the SDK itself — Agent-wallet is a sign-only tool and does not check balances. This error type is provided as a convenience for your application code to throw when you detect insufficient funds before initiating a transaction. +::: + --- ## Next Steps diff --git a/docs/Agent-Wallet/QuickStart.md b/docs/Agent-Wallet/QuickStart.md index 8227db3..ee00767 100644 --- a/docs/Agent-Wallet/QuickStart.md +++ b/docs/Agent-Wallet/QuickStart.md @@ -66,22 +66,22 @@ The system will guide you through initializing your **Agent-wallet wallet**. The ``` ? Quick start type: local_secure — Encrypted key stored locally (recommended) -Wallet ID (e.g. my_wallet_1) (default): +Wallet ID (e.g. my_wallet_1) (default_secure): Wallet initialized! ? Import source: generate — Generate a new random private key Wallets: -┌───────────┬──────────────┐ -│ Wallet ID │ Type │ -├───────────┼──────────────┤ -│ default │ local_secure │ -└───────────┴──────────────┘ +┌────────────────┬──────────────┐ +│ Wallet ID │ Type │ +├────────────────┼──────────────┤ +│ default_secure │ local_secure │ +└────────────────┴──────────────┘ Your master password: Save this password! You'll need it for signing and other operations. -Active wallet: default +Active wallet: default_secure ``` :::caution Master password = the only key to all your assets diff --git a/docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md b/docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md index 215e0a5..7537532 100644 --- a/docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md +++ b/docs/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md @@ -189,7 +189,7 @@ If everything is working, the AI will call the `get_wallet_address` tool and ret You can also try a testnet transfer (make sure you have test TRX on Nile): ``` -Transfer 1 TRX to address TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL on the Nile testnet +Transfer 1 TRX to address TNPee...xxxxx on the Nile testnet ``` :::info Getting Test TRX diff --git a/docs/McpServer-Skills/SKILLS/BANKOFAISkill.md b/docs/McpServer-Skills/SKILLS/BANKOFAISkill.md index f23b962..5ddbd38 100644 --- a/docs/McpServer-Skills/SKILLS/BANKOFAISkill.md +++ b/docs/McpServer-Skills/SKILLS/BANKOFAISkill.md @@ -19,6 +19,8 @@ BANK OF AI SKILLS can operate on **real on-chain assets**. Blockchain transactio | **sunswap** | Check prices, get quotes, swap tokens, manage liquidity pools | Read-only: none. Trading: wallet credentials | | **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 | +| **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 | @@ -60,7 +62,7 @@ Head over to **[Quick Start](./QuickStart.md)** — it takes about 1 minute. Com --- -## sunswap — Swap Tokens, Check Prices, Manage Pools {#sunswap} +## sunswap {#sunswap} Want to swap tokens, check rates, or manage liquidity on SunSwap? Just tell the AI. @@ -92,7 +94,7 @@ Want to swap tokens, check rates, or manage liquidity on SunSwap? Just tell the --- -## sunperp-skill — Perpetual Contract Trading {#sunperp-skill} +## sunperp-skill {#sunperp-skill} Want to trade contracts? This skill handles market data, opening/closing positions, stop-loss, and withdrawals. Built-in safety: max 20x leverage, mandatory stop-loss — if losses exceed 5%, the AI automatically closes your position to prevent liquidation. @@ -122,11 +124,11 @@ Want to trade contracts? This skill handles market data, opening/closing positio --- -## tronscan-skill — On-Chain Data Detective {#tronscan-skill} +## tronscan-skill {#tronscan-skill} Want to know what's happening on-chain? This skill looks up accounts, transactions, tokens, blocks, and network stats. **Pure read-only, completely safe, costs nothing, needs no credentials.** The perfect first skill to get started. -> Look up the full account info and holdings for address TDqSquXBgUCLYvYC4XZgrprLK589dkhSCf. +> Look up the full account info and holdings for address TDqSq...xxxxx. > Show me the details of this transaction: abc123... @@ -146,7 +148,71 @@ Want to know what's happening on-chain? This skill looks up accounts, transactio --- -## x402-payment — On-Chain "Pay-First" Auto-Settlement {#x402-payment} +## trc20-toolkit-skill {#trc20-toolkit-skill} + +Need to check balances, transfer tokens, or manage approvals for any TRC20 token? This skill handles it all — supports common tokens by symbol (USDT, USDD, SUN, JST, BTT, WIN, etc.) and any TRC20 token by contract address. + +**Completely safe — looking only, no spending:** + +> Show my USDT balance. + +> Check my USDT, USDD, and SUN balances all at once. + +> What's the token info (name, symbol, decimals, total supply) for USDT? + +> Check the current USDT approval allowance for spender address TSpender... + +**Requires your confirmation (AI shows the bill first):** + +> Transfer 10 USDT to TRecipientAddress on the Nile testnet. + +> Approve 100 USDT for spender TSpenderAddress. + +**Real-world scenarios:** + +> Quick portfolio check? Try: "Show my balances for USDT, USDD, SUN, JST, and BTT." + +> Sending tokens to a friend? Try: "Transfer 50 USDT to TXX...." + +> Preparing for a DeFi operation? Try: "Approve 200 USDT for the SunSwap router, then check the allowance." + +--- + +## 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. + +**Completely safe — looking only, no spending:** + +> Check my account's current permission setup. + +> Check the permission configuration for address TXk8r...xxxxx. + +> List all pending multi-sig proposals. + +**Requires your confirmation:** + +> Set up a 2-of-3 multi-sig on my account's owner permission with these three keys. + +> Restrict the active permission so the AI agent can only call smart contracts (no direct TRX transfers). + +> Propose a transfer of 500 USDT to TRecipient and wait for the co-signer to approve. + +**Real-world scenarios:** + +> Want team approval for large transfers? Try: "Set up 2-of-3 multi-sig, then propose a 10,000 TRX transfer to TVendor... with memo 'Q1 budget'." + +> Want to sandbox your AI agent? Try: "Use the agent-restricted template — let the AI only call smart contracts, but require 2 human keys for permission changes." + +> Co-signing a pending proposal? Try: "Review all pending proposals and co-sign proposal prop_xxx." + +:::tip Templates make it easy +You don't need to configure every key and threshold manually. Built-in templates like `basic-2of3`, `agent-restricted`, `team-tiered`, and `weighted-authority` handle the common setups — just provide the key addresses. +::: + +--- + +## x402-payment {#x402-payment} Some APIs and AI agents require on-chain payment before use. This skill uses the x402 protocol to automatically complete "pay first, then receive" on-chain settlement — the AI detects the charge, completes the on-chain payment, gets the result, and reports back. It always asks for your confirmation before paying. @@ -156,7 +222,7 @@ Some APIs and AI agents require on-chain payment before use. This skill uses the --- -## recharge-skill — BANK OF AI Account Management {#recharge-skill} +## recharge-skill {#recharge-skill} Check your balance, view order history, or top up your account. diff --git a/docs/McpServer-Skills/SKILLS/Faq.md b/docs/McpServer-Skills/SKILLS/Faq.md index d6e933c..50550bc 100644 --- a/docs/McpServer-Skills/SKILLS/Faq.md +++ b/docs/McpServer-Skills/SKILLS/Faq.md @@ -40,7 +40,7 @@ Run this in your terminal: ls ~/.openclaw/skills ``` -You should see directory names like `sunswap`, `sunperp-skill`, `tronscan-skill`, `x402-payment`, `recharge-skill`. +You should see directory names like `sunswap`, `sunperp-skill`, `tronscan-skill`, `trc20-toolkit-skill`, `multisig-permissions`, `x402-payment`, `recharge-skill`. Then verify in your AI chat: diff --git a/docs/McpServer-Skills/SKILLS/Intro.md b/docs/McpServer-Skills/SKILLS/Intro.md index eef6b17..ed09027 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? -Five 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. +Seven 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. ### 💱 Execute DEX Trades @@ -65,7 +65,7 @@ Check prices, compare rates, even swap tokens in one go. > 🗣️ "How much TRX can I get for 100 USDT on SunSwap right now?" -💡 For more advanced features, see: [**sunswap** (DEX Trading Guide)](./BANKOFAISkill.md#sunswap) +💡 For more advanced features, see: [**sunswap**](./BANKOFAISkill.md#sunswap) ### 📈 Trade Perpetual Contracts @@ -73,7 +73,7 @@ View market data, open and close positions on SunPerp. Built-in safety lock: max > 🗣️ "What's BTC's funding rate right now? Open a 5x long position with a 5% stop-loss." -💡 For more parameter settings, see: [**sunperp-skill** (Perpetual Contract Safety Officer)](./BANKOFAISkill.md#sunperp-skill) +💡 For more parameter settings, see: [**sunperp-skill**](./BANKOFAISkill.md#sunperp-skill) ### 🕵️ Query On-Chain Data @@ -81,7 +81,23 @@ Look up accounts, transactions, and check if a new token is legit. Pure read-onl > 🗣️ "Check the holder distribution for that new token — is it controlled by a whale?" -💡 For more query dimensions, see: [**tronscan-skill** (On-Chain Data Detective)](./BANKOFAISkill.md#tronscan-skill) +💡 For more query dimensions, see: [**tronscan-skill**](./BANKOFAISkill.md#tronscan-skill) + +### 💸 Transfer & Manage TRC20 Tokens + +Check balances, transfer tokens, manage approvals for any TRC20 token — USDT, USDD, SUN, and more. Supports batch balance checks and symbol-based lookups. + +> 🗣️ "Check my USDT, USDD, and SUN balances. Then transfer 10 USDT to TRecipientAddress." + +💡 For more token operations, see: [**trc20-toolkit-skill**](./BANKOFAISkill.md#trc20-toolkit-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. + +> 🗣️ "Check my account's current permission setup. Then set up a 2-of-3 multi-sig on owner permission." + +💡 For permission templates and multi-sig workflows, see: [**multisig-permissions**](./BANKOFAISkill.md#multisig-permissions) ### ☕ Auto-Settle On-Chain Paid Services @@ -89,7 +105,7 @@ When the AI needs to call a paid on-chain service or data API, it uses the x402 > 🗣️ "Use the x402 protocol to call this paid agent endpoint: https://api.example.com" (replace with the actual paid endpoint URL you want to call) -💡 For payment and authorization details, see: [**x402-payment** (On-Chain Auto-Settlement)](./BANKOFAISkill.md#x402-payment) +💡 For payment and authorization details, see: [**x402-payment**](./BANKOFAISkill.md#x402-payment) ### 🏦 Manage BANK OF AI Account @@ -97,7 +113,7 @@ Check your BANK OF AI balance and top up with a single sentence. > 🗣️ "How much balance do I have? Go ahead and recharge 5 USDT." -💡 For top-up and withdrawal rules, see: [**recharge-skill** (Account Manager)](./BANKOFAISkill.md#recharge-skill) +💡 For top-up and withdrawal rules, see: [**recharge-skill**](./BANKOFAISkill.md#recharge-skill) --- diff --git a/docs/McpServer-Skills/SKILLS/QuickStart.md b/docs/McpServer-Skills/SKILLS/QuickStart.md index 9163ca3..1b746ef 100644 --- a/docs/McpServer-Skills/SKILLS/QuickStart.md +++ b/docs/McpServer-Skills/SKILLS/QuickStart.md @@ -47,12 +47,12 @@ Ok to proceed? (y) y The installer automatically fetches all available Skills from the repo and lists them for selection. Press **Space** to toggle each one — we recommend selecting all: ``` -◇ Found 6 skills +◇ Found 7 skills │ ◇ Select skills to install (space to toggle) │ Multi-Sig & Account Permissions, recharge-skill, │ SunPerp Perpetual Futures Trading, SunSwap DEX Trading, -│ TronScan Data Lookup, x402-payment +│ TRC20 Token Toolkit, TronScan Data Lookup, x402-payment ``` :::tip Select all @@ -91,6 +91,7 @@ The installer runs a security scan on each Skill and shows the results. Review t │ recharge-skill -- -- -- │ │ SunPerp Perpetual Futures Trading -- -- -- │ │ SunSwap DEX Trading -- -- -- │ +│ TRC20 Token Toolkit -- -- -- │ │ TronScan Data Lookup -- -- -- │ │ x402-payment Med 1 alert Med │ │ │ @@ -105,12 +106,13 @@ The installer runs a security scan on each Skill and shows the results. Review t When you see output like this, all Skills have been successfully installed to your selected AI tools: ``` -◇ Installed 6 skills ────────────────────────╮ +◇ Installed 7 skills ────────────────────────╮ │ │ │ ✓ Multi-Sig & Account Permissions (copied) │ │ ✓ recharge-skill (copied) │ │ ✓ SunPerp Perpetual Futures Trading (copied)│ │ ✓ SunSwap DEX Trading (copied) │ +│ ✓ TRC20 Token Toolkit (copied) │ │ ✓ TronScan Data Lookup (copied) │ │ ✓ x402-payment (copied) │ │ │ diff --git a/docs/Openclaw-extension/FAQ.md b/docs/Openclaw-extension/FAQ.md index b1a5ea6..8d7a75f 100644 --- a/docs/Openclaw-extension/FAQ.md +++ b/docs/Openclaw-extension/FAQ.md @@ -8,23 +8,41 @@ Don't panic when you see an error — it's usually just a small setting that's n ### Error Says "command not found: node" or "npm install Failed" -**Plain English**: Your computer doesn't have Node.js installed, or the version is too old. +**In short**: Your computer doesn't have Node.js installed, or the version is too old. -**How to fix**: Go to the [Node.js official website](https://nodejs.org/) and download the latest stable version (LTS, v20 or higher recommended). Install it like any regular software by clicking "Next" all the way through. Then close the terminal window and run the installation command again. +**How to fix**: Go to the [Node.js official website](https://nodejs.org/) and download the latest stable version (LTS, v18 or higher recommended). Install it like any regular software by clicking "Next" all the way through. Then close the terminal window and run the installation command again. -### Error Says "command not found: python3" +### Error Says "command not found: git" -**Plain English**: Your computer is missing a basic runtime environment called Python. +**In short**: Your computer is missing Git, a tool used to download skill packs. -**How to fix**: Go to the [Python official website](https://www.python.org/downloads/) and download and install it. +**How to fix**: Go to the [Git official website](https://git-scm.com/downloads) and download and install it. -### AgentWallet (AI Vault) Installation Failed +### AgentWallet Installation Failed **How to fix**: 1. Double-check that your Node.js version is new enough. 2. Sometimes it's simply a network timeout — wait a couple of minutes and run the installation command again. -3. If it keeps getting stuck, try manually deleting the `~/.agent-wallet` folder and starting over from scratch. +3. If it keeps getting stuck, try manually deleting the `~/.agent-wallet` (Mac/Linux) or `%USERPROFILE%\.agent-wallet` (Windows) folder and starting over from scratch. + +### Error Says "Running Scripts Is Disabled on This System" (Windows) + +**Reason**: Your PowerShell execution policy is too strict to run scripts. + +**How to fix**: Don't double-click `install.ps1` directly. Use one of these two methods instead: + +1. **Recommended**: Double-click `install.bat` — it automatically bypasses the execution policy. +2. Or manually run in PowerShell: `powershell -ExecutionPolicy Bypass -File install.ps1` + +### Terminal Shows Garbled Characters or Boxes (Windows) + +**Reason**: Your terminal doesn't support ANSI color escape codes. + +**How to fix**: The installer automatically tries to enable virtual terminal processing. If you still see garbled output: + +1. Make sure your system is **Windows 10 build 1511** or later. +2. We recommend using **Windows Terminal** (free from the Microsoft Store) instead of the default cmd.exe or legacy PowerShell window. --- @@ -34,7 +52,7 @@ Don't panic when you see an error — it's usually just a small setting that's n **Most likely cause**: You were too eager after installation and **didn't restart the OpenClaw software**. -**How to fix**: Completely quit OpenClaw (on Mac press `Command+Q`), then reopen it so the AI can reload its new brain. +**How to fix**: Completely quit OpenClaw (on Mac press `Command+Q`, on Windows right-click the taskbar icon and quit or press `Alt+F4`), then reopen it so the AI can reload its new brain. ### AI Can Fetch Data, But Answers Are Messy and Often Wrong? @@ -60,7 +78,7 @@ Don't panic when you see an error — it's usually just a small setting that's n ### AI Reports "Rate Limited" or "429 Error" -**Plain English**: You're making AI query data too fast, and the free network channel thinks you're a bot and temporarily blocked you. +**In short**: You're making AI query data too fast, and the free network channel thinks you're a bot and temporarily blocked you. **How to fix**: @@ -77,7 +95,7 @@ Absolutely! When the installation wizard reaches Level 4, it will list all skill ### I'm Done With It — How Do I Uninstall? -The simplest brute-force method: Open your file manager, find the `~/.openclaw/skills/` directory, delete the skill folder(s) you no longer want, then restart the AI software — they'll be completely gone. +The simplest brute-force method: Open your file manager, find the `~/.openclaw/skills/` (Mac/Linux) or `%USERPROFILE%\.openclaw\skills\` (Windows) directory, delete the skill folder(s) you no longer want, then restart the AI software — they'll be completely gone. ### I Messed Everything Up — Can I Reinstall? @@ -88,6 +106,22 @@ Reinstall anytime! Don't worry about breaking your computer. --- +## Windows-Specific Questions + +### Does the Installer Need Admin Privileges? + +Nope. The installer only writes to config files under your user directory. It doesn't modify system files, the registry, or Program Files. + +### Is the Windows Experience the Same as Mac/Linux? + +Identical. The Windows installer (`install.ps1`) is a full port of the Linux/macOS version (`install.sh`) — same installation flow, same multi-select menus, same config file structure. The only differences are file paths (`~/` becomes `%USERPROFILE%\`) and file permissions (`chmod 600` becomes `icacls` ACL). + +### Can I Use WSL (Windows Subsystem for Linux)? + +Yes, but not recommended. If you install inside WSL, config files are written to the WSL Linux filesystem, not Windows `%USERPROFILE%`. This means a native Windows OpenClaw won't be able to read those configs. If your OpenClaw is the native Windows version, use `install.bat` or the `irm | iex` command instead. + +--- + ## Still Can't Figure It Out? 👉 Go back to **[Quick Start](./QuickStart.md)** and follow along from step one again — that usually solves 99% of the problems. diff --git a/docs/Openclaw-extension/Intro.md b/docs/Openclaw-extension/Intro.md index b0756b3..9ffcdc9 100644 --- a/docs/Openclaw-extension/Intro.md +++ b/docs/Openclaw-extension/Intro.md @@ -1,40 +1,41 @@ # Introduction -Make your AI understand blockchain with one click. +## 💡 Why OpenClaw Extension? -Have you ever wished that checking on-chain data, swapping tokens, or viewing balances didn't require opening dozens of web pages or staring at complex apps? +In a multi-chain Web3 world, managing assets often means constant "context switching" and repetition: -All you need to do is send a simple message — just like chatting with a friend — and let your AI assistant handle all the heavy lifting. +- **Fragmented workflows**: Want to swap tokens or check balances across different chains? You have to keep switching wallet networks, find the right DEX for each ecosystem, and verify contract addresses. All this jumping between tools drains your energy. +- **Mental pressure of execution**: Every transaction requires you to manually adjust slippage and calculate gas fees. Facing authorization code you can't fully understand, the anxiety of "what if I click wrong" adds unnecessary mental burden to every operation. -**OpenClaw Extension is the "one-click installer" that makes this magic happen.** +OpenClaw Extension exists to shift your Web3 experience from "doing everything manually" to "just say the word." Instead of drowning you in tedious configuration, it uses an automated flow to install AgentWallet, MCP services (execution tools), and pre-built skills (trading brain) — giving your AI assistant the ability to deeply participate in on-chain operations. Whether you're on macOS, Linux, or Windows, just one simple command launches a guided wizard that sets up your entire environment. --- -## How Does the Magic Work? +## 🧩 How Does It Work? -Previously, AI was just a "know-it-all" that could only talk the talk. To make it actually do things for you, our installer equips it with two core weapons: +Previously, AI was just a "know-it-all" that could only talk the talk — ask it how to buy tokens and it'd dump a wall of tutorials on you. To make it actually do things for you, our installer equips it with three core weapons: -### 🛠️ 1. Toolbox (MCP Server) — Giving AI "Hands" +### 🔐 1. AgentWallet — A Dedicated Encrypted Wallet for AI Agents -This is the cable that connects AI to the blockchain. Once installed, AI gains the ability to directly read from and write to the blockchain. +What scares beginners the most? Getting their private keys stolen! This is your AI agent's own encrypted wallet. Your private keys are locked down with encryption on your local machine and never sent to any external server — like giving your AI a safe that stays secure even offline. With it, your AI can sign transactions on your behalf safely, instead of leaving private keys dangerously exposed in plaintext config files. -Currently supported: +### 🛠️ 2. Toolbox (MCP Server) — Giving AI "Hands to Get Things Done" + +Previously, AI was like a brilliant strategist locked in a room — no matter how smart, it couldn't touch the outside world. The Toolbox gives AI a pair of "hands" that can directly reach the blockchain. With it, AI can run errands for you on-chain — checking balances, pressing the transfer button — so you never have to do it yourself. Currently these "hands" can help you with: - **TRON Toolbox**: Check balances, send transfers, and interact with the TRON ecosystem. - **BNB Chain Toolbox**: Supports multi-chain operations on BSC, Ethereum, and more. - **Top-up Assistant**: Helps you remotely top up your BANK OF AI account. -### 🧠 2. Skill Packs (Skills) — Giving AI a "Brain" - -Having hands isn't enough — AI needs to know how to handle tasks step by step. Skill packs are the pre-written "recipes" we've prepared. +### 🧠 3. Skill Packs (Skills) — Giving AI a "Super Brain with Built-in Recipes" -For example, the **"sunswap" skill** teaches AI: "When the user wants to swap tokens, first check the price, then calculate the fees, and finally send the bill to the user for confirmation — never spend money recklessly." +Having hands isn't enough — AI needs to know how to handle tasks step by step. Skill packs are the pre-written "recipes" we've prepared. We've built in signature moves like **SunSwap DEX Trading** (decentralized exchange token swaps), **SunPerp Perpetual Futures** (perpetual contract trading), and **TronScan Data Lookup** (on-chain data queries). When you say you want to swap tokens, this brain instructs the AI: "First check the current price, then calculate whether the energy fees are worth it, and finally send a clear bill to the user for confirmation — never spend the user's money recklessly." --- -## 🌟 How Great Is the Experience After Installation? +## 🌟 Ditch the Hassle — How Great Is "Conversational" Trading? -Once installed, your AI instantly transforms into an incredibly professional personal Web3 assistant. Try giving it commands like these: +Once installed, your AI instantly transforms into an incredibly professional personal Web3 assistant. Your old workflow: open browser → connect wallet → search token contract → calculate slippage → confirm transaction → anxiously wait for block confirmation. Your new workflow — just sit back comfortably and type: > **"Check if TRON energy fees are expensive right now."** > @@ -42,19 +43,20 @@ Once installed, your AI instantly transforms into an incredibly professional per > > **"How much balance is left in my wallet? Also check my holdings of that meme coin from yesterday."** -It will chew through all the boring code and data and serve it up to you in plain language. +It will digest all the boring code and data for you, and report back in the clearest, most understandable language. --- -## Is This for Me? +## 🎯 Is This for Me? -- **I'm a beginner**: Perfect! If you don't want to deal with code and just want to use plain language to have AI help you check data and make trades, this was tailor-made for you. -- **I'm a Web3 veteran**: Tired of opening web pages and connecting wallets every day? Want a personal trading assistant on call 24/7? It can save you tons of time watching charts. +- **I'm a total beginner**: Perfect! Don't want to deal with code, get dizzy looking at charts, and just want to chat with AI to help you check data and make trades? This was tailor-made for you. +- **I'm a Web3 veteran**: Tired of opening web pages and connecting wallets every day? Want a personal trading assistant on call 24/7? It can save you tons of time watching charts and checking contracts. +- **I'm a Windows user**: No problem at all! Since v1.4.5, OpenClaw Extension natively supports Windows 10/11. One PowerShell command and you're set — the experience is identical to Mac/Linux. --- -## Can't Wait? +## 🚀 Can't Wait? -Don't hesitate — the entire installation process is as simple as microwaving a meal, taking just a few minutes. +Forget those complicated configuration tutorials. The entire process is guided by a fully automated smart wizard — just copy one command, follow the on-screen prompts and press Enter a few times, and it will take care of everything for you. 👉 **[Go to Quick Start and upgrade your AI!](./QuickStart.md)** diff --git a/docs/Openclaw-extension/QuickStart.md b/docs/Openclaw-extension/QuickStart.md index 4f2d2a6..ec702fa 100644 --- a/docs/Openclaw-extension/QuickStart.md +++ b/docs/Openclaw-extension/QuickStart.md @@ -9,17 +9,28 @@ Our goal: **Spend a few minutes following the wizard, clicking a few buttons, an Before you begin, make sure the following basic software is installed on your computer (if not, download and install them from their official websites just like any regular software): 1. **OpenClaw**: Your AI assistant software. -2. **Node.js** (must be v20 or above): The runtime environment for skill packs. *(Extremely important — older versions will definitely cause errors!)* +2. **Node.js** (must be v18 or above): The runtime environment for skill packs and configuration. *(Extremely important — older versions will definitely cause errors!)* 3. **Git**: A small tool used to download skill packs. -4. **Python 3**: A helper used by the installation wizard to process configuration files. + +**Windows users, additional requirements:** +- **Windows 10** (build 1511+) or **Windows 11** +- **PowerShell 5.1+** (comes pre-installed with Win10/11, no extra setup needed) +- Run `$PSVersionTable.PSVersion` in PowerShell to confirm your version --- -## 🚀 Step 1: One-Click Installation +## 🚀 Step 1: Run the Smart Installation Wizard Open the "Terminal" on your computer (that black window). -- **Mac:** Press `Command + Space`, type `Terminal` in the search box, and hit Enter. +- **Mac / Linux:** Press `Command + Space` (Mac) or search `Terminal` in the app menu, and hit Enter. +- **Windows:** Press `Win + X` and select **Windows PowerShell** or **Terminal**; or search `PowerShell` in the Start menu. + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + **Copy the entire line below**, paste it into the terminal, and press Enter: @@ -27,46 +38,360 @@ Open the "Terminal" on your computer (that black window). curl -fsSL https://raw.githubusercontent.com/BofAI/openclaw-extension/refs/heads/main/install.sh | bash ``` -🚑 **First Aid: Got an error right after pressing Enter?** If the screen says `command not found: node` or `python3`, it means your computer is missing the prerequisites mentioned above. 👉 [Click here to see how to fix it](./FAQ.md#error-says-command-not-found-node-or-npm-install-failed) +Or install from source: + +```bash +git clone https://github.com/BofAI/openclaw-extension.git +cd openclaw-extension +./install.sh +``` + + + + +**Copy the entire line below**, paste it into PowerShell, and press Enter: + +```powershell +irm https://raw.githubusercontent.com/BofAI/openclaw-extension/refs/heads/main/install.ps1 | iex +``` + +Or install from source: + +```cmd +git clone https://github.com/BofAI/openclaw-extension.git +cd openclaw-extension +install.bat +``` + +> `install.bat` is a tiny 6-line launcher that automatically invokes `install.ps1` with the correct execution policy — no manual PowerShell configuration needed. + + + + +🚑 **First Aid: Got an error right after pressing Enter?** If the screen says `command not found: node` (Mac/Linux) or `node is not recognized` (Windows), it means your computer is missing the prerequisites mentioned above. 👉 [Click here to see how to fix it](./FAQ.md#error-says-command-not-found-node-or-npm-install-failed) If there are no errors, an English wizard will appear on screen. Think of it as a text-based mini-game with 4 levels: +``` +🦞 OpenClaw Extension Installer (by BANK OF AI) +Smart contracts, smarter agent. No more manual ABI guessing. +``` + ### 🟢 Level 1: Choose Installation Mode -The screen will ask you which mode to use. Type `1` (normal installation) on your keyboard, then press Enter. This is the most hassle-free option and preserves your previous settings. +The screen will ask you which mode to use: + +``` +Installation Mode + 1) Normal install [Recommended] + 2) Clean install (full cleanup: MCP/skills/local config files) + +? Enter choice (1-2, default: 1): +``` + +- **Normal install (1)**: Preserves your previous settings. Best for first-time installs or upgrades. +- **Clean install (2)**: Completely starts over — deletes all MCP configs, installed skills, API credentials, and wallet data. + +:::tip First time installing? Which should I pick? +For a first-time install, both `1` and `2` produce the same result. Choose `2` only if you've installed before and want a fresh start. +::: + +If you chose `2` (Clean install), the installer lists everything that will be deleted, then asks you to confirm twice: + +``` +The following data will be permanently deleted: + • ALL MCP entries in: ~/.mcporter/mcporter.json + • ALL installed skills (global and workspace) + + • BANK OF AI local config: ~/.mcporter/bankofai-config.json + • AgentWallet config will be overwritten by: agent-wallet start --override --save-runtime-secrets + +? Continue with CLEAN install? (y/N): y +? Type CLEAN to confirm permanent deletion: CLEAN +``` + +After confirming, the installer automatically removes old skills: + +``` +Running cleanup... + +◇ Found 11 unique installed skill(s) +◇ Removal process complete +◆ Successfully removed 11 skill(s) + +✓ Clean install cleanup completed. + +Clean complete — proceeding with fresh setup... +``` + +Then runs `agent-wallet reset` to completely wipe old wallet data: + +``` +Step 0: AgentWallet Setup + +Launching: agent-wallet reset +This will delete ALL wallet data in: ~/.agent-wallet + +✔ Are you sure you want to reset? This cannot be undone. Yes +✔ Really delete everything? Last chance! Yes + Deleted: master.json + Deleted: wallets_config.json + Deleted: runtime_secrets.json + ... + +Wallet data reset complete. +``` + +Once cleanup is done, the installer proceeds to the next step — wallet initialization. + +If you chose `1` (Normal install), it skips straight to the next step. + +### 🟢 Level 2: Configure AgentWallet (AI's Personal Wallet Vault) + +The wizard will automatically install a tool called AgentWallet, which securely stores your AI's wallet keys — like a local encrypted bank vault that never sends your private keys anywhere. + +``` +Step 0: AgentWallet Setup + +Launching: agent-wallet start --override --save-runtime-secrets +Please complete initialization in the CLI prompts. +``` + +**① Choose wallet type** — Just press Enter to accept the default: + +``` +✔ Quick start type: local_secure — Encrypted key stored locally (recommended) +``` + +**② Set a master password** — You can type your own (must have uppercase + lowercase + digit + special character, 8+ chars), or just press Enter to auto-generate one: + +``` +✔ New Master Password (press Enter to auto-generate a strong password) -### 🟢 Level 2: Configure "AI's Personal Vault" (AgentWallet) +Wallet initialized! +``` + +**③ Name your wallet** — Enter a Wallet ID (e.g. `my_wallet_1`), or just press Enter to use the default name `default_secure`: + +``` +Wallet ID (e.g. my_wallet_1) (default_secure): my_wallet_1 +``` + +**④ Generate a wallet** — Press Enter to create a brand new wallet: + +``` +✔ Import source: generate — Generate a new random private key +``` + +When you see the wallet table — your vault is ready! -The wizard will automatically install a tool called AgentWallet, which securely stores your AI's wallet keys. +``` +Wallets: +┌─────────────┬──────────────┐ +│ Wallet ID │ Type │ +├─────────────┼──────────────┤ +│ my_wallet_1 │ local_secure │ +└─────────────┴──────────────┘ + +🔑 Your master password: 7#KQoc&%m4S7$Dhk +⚠️ Keep this password safe. You'll need it for signing and other operations. + +Active wallet: my_wallet_1 + +✓ AgentWallet setup completed +``` -If you're a beginner, just close your eyes and press Enter all the way through — the default values are perfectly fine. +If you chose auto-generate in step ②, the master password generated for you will be displayed here. -(🚑 Got stuck with an error? 👉 [Click here to see how to fix AgentWallet installation failures](./FAQ.md#agentwallet-ai-vault-installation-failed)) +:::caution Write down this password! +This master password is the key to your AI's wallet. **Lose it and you lose access to the wallet.** Write it down on paper, save it in a password manager — anything but forgetting it. +::: + +:::tip See "Wallet already initialized." during a Normal install upgrade? +If you've previously installed AgentWallet and chose Normal install, the wizard skips the password setup and lets you enter a Wallet ID and generate a wallet directly. Your previous master password and existing wallets are preserved. +::: + +(🚑 Got stuck with an error? 👉 [Click here to see how to fix AgentWallet installation failures](./FAQ.md#agentwallet-installation-failed)) ### 🟢 Level 3: Pick Your Toolbox (Give AI "Hands") -The screen will list options like TRON (mcp-server-tron). Use the `↑` `↓` arrow keys to move, press **Space** to check, and press **Enter** to confirm. +The screen will show a multi-select list of MCP servers. These are the "cables" that connect your AI to different blockchains: + +``` +? Select MCP Servers to install: (Space:toggle, Enter:confirm) +❯ [x] mcp-server-tron + Interact with TRON blockchain (wallets, transactions, smart contracts). + [x] bnbchain-mcp + BNB Chain official MCP (BSC, opBNB, Ethereum, Greenfield). + [x] bankofai-recharge + BANK OF AI recharge MCP (remote recharge tools). +``` -⚠️ **Heads up**: The wizard might suddenly ask you for an API Key! +Use `↑` `↓` arrow keys to move, press **Space** to select (shows X) or deselect, and press **Enter** to confirm. All three are selected by default — we recommend keeping them all. -- **What's that?** It's a VIP pass — having one means data queries won't be throttled. -- **I don't have one right now?** Just press Enter to skip! Leaving it blank is totally fine and won't affect your installation at all. +After confirming, the installer configures each server one by one. Here's what to expect: + +#### mcp-server-tron (TRON Toolbox) + +``` +Configuring mcp-server-tron... +This step configures network access for TRON MCP. +? Enter TRONGRID_API_KEY (optional): +``` + +⚠️ **The installer is asking for your `TRONGRID_API_KEY`.** This is your dedicated TronGrid access key — having one means data queries won't be throttled. **Don't have one? Just press Enter to skip!** It won't affect your installation at all. You can always add it later. + +When it succeeds, you'll see the `add-mcp` banner and: + +``` +✓ Configuration saved for mcp-server-tron. +``` + +#### bnbchain-mcp (BNB Chain Toolbox) + +``` +Configuring bnbchain-mcp... +bnbchain-mcp currently does not support AgentWallet. +This server still uses PRIVATE_KEY configuration. + +⚠ Your PRIVATE_KEY will be stored in plaintext in: ~/.mcporter/mcporter.json + +? Enter BNB Chain PRIVATE_KEY (optional): +? Enter LOG_LEVEL (optional): +``` + +:::caution BNB Chain Private Key +Unlike TRON (which uses the encrypted AgentWallet), BNB Chain currently stores your private key in **plaintext** in the config file. The file permissions are set to 600 (only you can read it), but we strongly recommend using a **dedicated wallet with minimal funds**. + +**Don't have a BNB Chain key? No problem — press Enter to skip both prompts.** You can configure it later if needed. +::: + +``` +✓ Configuration saved for bnbchain-mcp. +``` + +#### bankofai-recharge (Recharge Assistant) + +This one is fully automatic — no input needed! It connects to BANK OF AI's remote recharge service. + +``` +✓ Configuration saved for bankofai-recharge. +``` ### 🟢 Level 4: Pick Your Skill Packs (Give AI a "Brain") -The screen will list skills like sunswap (token swapping), tronscan (data lookup), etc. Use **Space** to check and **Enter** to confirm. +First, choose where to install the skills: + +``` +Select skills installation scope: + 1) User-level (global) [Recommended] + Available to all OpenClaw workspaces + 2) Workspace-level (project) + Only available in current workspace + +? Enter choice (1-2, default: 1): +``` + +Press Enter (or type `1`) to install globally — this way all your OpenClaw workspaces can use these skills. + +Then the skill picker launches: + +``` +◇ Found 7 skills +│ +◇ Select skills to install (space to toggle) +│ Multi-Sig & Account Permissions, recharge-skill, SunPerp Perpetual Futures Trading, +│ SunSwap DEX Trading, TRC20 Token Toolkit, TronScan Data Lookup, x402-payment +``` + +Here's what each skill does: + +| Skill | What It Does | +| :--- | :--- | +| **SunSwap DEX Trading** | Swap tokens on SunSwap (TRON's biggest DEX) | +| **SunPerp Perpetual Futures** | Trade perpetual futures on SunPerp | +| **TronScan Data Lookup** | Query blockchain data via TronScan | +| **Multi-Sig & Account Permissions** | Multi-signature wallet and account permission management | +| **TRC20 Token Toolkit** | Common TRC20 token operations like sending tokens | +| **x402-payment** | x402 protocol payments (agent-to-agent) | +| **recharge-skill** | Check and top up your BANK OF AI balance | + +After selecting, the installer shows a security risk assessment: + +``` +◇ Security Risk Assessments +│ Gen Socket Snyk +│ Multi-Sig & Account Permissions -- -- -- +│ recharge-skill Safe 1 alert Med Risk +│ SunPerp Perpetual Futures Trading -- -- -- +│ SunSwap DEX Trading -- -- -- +│ TRC20 Token Toolkit -- -- -- +│ TronScan Data Lookup -- -- -- +│ x402-payment Safe 0 alerts Med Risk +``` -If you see any prompts asking for keys that you don't understand, just press Enter to skip them all. +Review the report, then confirm to proceed. When installation completes: + +``` +◇ Installed 7 skills +│ +│ ✓ Multi-Sig & Account Permissions → ~/.openclaw/skills/multi-sig-account-permissions +│ ✓ recharge-skill → ~/.openclaw/skills/recharge-skill +│ ✓ SunPerp Perpetual Futures Trading → ~/.openclaw/skills/sunperp-perpetual-futures-trading +│ ✓ SunSwap DEX Trading → ~/.openclaw/skills/sunswap-dex-trading +│ ✓ TRC20 Token Toolkit → ~/.openclaw/skills/trc20-token-toolkit +│ ✓ TronScan Data Lookup → ~/.openclaw/skills/tronscan-data-lookup +│ ✓ x402-payment → ~/.openclaw/skills/x402-payment +``` + +After skills are installed, the installer enters a configuration phase, asking for one API Key: + +#### recharge-skill API Key Configuration + +``` +recharge-skill API Key Configuration +recharge-skill uses your local BANK OF AI API key for balance and order queries. + +? Enter BANKOFAI_API_KEY (optional, hidden): +``` + +**Don't have one? Just press Enter to skip.** You can always create the config file later — see "[How to Add API Keys](#️-how-to-add-api-keys-vip-pass-after-installation)" below. When `Installation Complete!` lights up at the bottom of the screen — congratulations, you've passed all levels! +``` +═══════════════════════════════════════ + Installation Complete! +═══════════════════════════════════════ + +✓ MCP Server configured + Config file: ~/.mcporter/mcporter.json + File permissions: 600 (owner read/write only) + +✓ Installed skills: + • Multi-Sig & Account Permissions + • recharge-skill + • TRC20 Token Toolkit + • x402-payment + Verify with: npx skills list -g + +Next steps: + 1. Restart OpenClaw and start a new session to load new skills + 2. Test the skills: + "Read the recharge-skill and recharge my BANK OF AI account with 1 USDT" + "Read the x402-payment skill and explain how it works" + +Repository: https://github.com/BofAI/openclaw-extension +Skills: https://github.com/BofAI/skills +``` + --- ## 🎉 Step 2: Restart and Witness the Magic After installation, there's one step you absolutely cannot skip: **Completely close your OpenClaw software, then reopen it.** -🚑 **First Aid: AI acting clueless?** If it says "I don't know what SunSwap is," 99% of the time it's because you didn't restart. 👉 [Click here to see how to properly restart](./FAQ.md#ai-says-i-dont-have-blockchain-tools-or-i-dont-know-what-sunswap-is) +🚑 **First Aid: AI acting clueless?** If it says "I don't know what SunSwap is," 99% of the time it's because you didn't restart. On Mac press `Command+Q`, on Windows right-click the taskbar icon and quit or press `Alt+F4`. 👉 [Click here to see how to properly restart](./FAQ.md#ai-says-i-dont-have-blockchain-tools-or-i-dont-know-what-sunswap-is) Open the chat window and send your AI its first command: @@ -100,12 +425,16 @@ Totally get it! You were just browsing during installation and pressed Enter to | `TRONSCAN_API_KEY` | Required for the TronScan data lookup skill | Apply for free at [tronscan.org](https://tronscan.org/#/myaccount/apiKeys) | | `BANKOFAI_API_KEY` | Used for topping up or checking balance on BANK OF AI | Get it after logging in at [chat.bankofai.io/key](https://chat.bankofai.io/key) | + ### Step 2: Enter Your Keys into the System Once you have the corresponding key, choose the simple method below based on its type. **Don't forget to restart OpenClaw after filling it in!** #### 🔧 Type A Keys: Add to "Hidden Notepad" (For TRONGRID and TRONSCAN) + + + 1. Type `open -e ~/.zshrc` in the terminal and press Enter. 2. At the bottom of the text editor that opens, paste these lines (keep the double quotes `""`): ``` @@ -114,20 +443,95 @@ Once you have the corresponding key, choose the simple method below based on its ``` 3. Press `Command + S` to save and close, then reopen the terminal or restart OpenClaw for changes to take effect. + + + +1. Press `Win + R`, type `sysdm.cpl`, and press Enter to open System Properties. +2. Click the **Advanced** tab → **Environment Variables**. +3. Under "User variables", click **New** and add each key: + - Variable name: `TRONGRID_API_KEY`, Variable value: your TronGrid Key + - Variable name: `TRONSCAN_API_KEY`, Variable value: your TronScan Key +4. Click OK to save, then restart OpenClaw for changes to take effect. + +Or run this in PowerShell (permanently sets user environment variables): + +```powershell +[Environment]::SetEnvironmentVariable("TRONGRID_API_KEY", "paste_your_TronGrid_Key_here", "User") +[Environment]::SetEnvironmentVariable("TRONSCAN_API_KEY", "paste_your_TronScan_Key_here", "User") +``` + + + + #### 🔧 Type B Keys: One-Click Config File (For BANK OF AI) If you have this key, simply copy and run the following command in the terminal (remember to replace the placeholder with your actual key): **Configure BANK OF AI:** + + + ```bash -mkdir -p ~/.mcporter && echo '{"api_key": "paste_your_BANKOFAI_API_KEY_here", "base_url": "https://api.bankofai.io/v1/"}' > ~/.mcporter/bankofai-config.json +mkdir -p ~/.mcporter && echo '{"api_key": "paste_your_BANKOFAI_API_KEY_here", "base_url": "https://chat.bankofai.io/"}' > ~/.mcporter/bankofai-config.json +``` + + + + +```powershell +New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.mcporter" | Out-Null +'{"api_key": "paste_your_BANKOFAI_API_KEY_here", "base_url": "https://chat.bankofai.io/"}' | Out-File -Encoding utf8 "$env:USERPROFILE\.mcporter\bankofai-config.json" ``` + + + +--- + +## 📋 Configuration File Reference + +After installation, the following files are created on your machine. All sensitive files are set to `600` permissions (Mac/Linux) or owner-only ACL via `icacls` (Windows): + + + + +| File | What It Stores | +| :--- | :--- | +| `~/.mcporter/mcporter.json` | MCP server configurations (including BNB Chain private key if provided) | +| `~/.mcporter/bankofai-config.json` | BANK OF AI API key | +| `~/.openclaw/skills/` | Globally installed skill packs | +| `.openclaw/skills/` | Workspace-level skill packs (if you chose option 2) | +| `~/.agent-wallet/` | AgentWallet encrypted wallet data | + + + + +| File | What It Stores | +| :--- | :--- | +| `%USERPROFILE%\.mcporter\mcporter.json` | MCP server configurations (including BNB Chain private key if provided) | +| `%USERPROFILE%\.mcporter\bankofai-config.json` | BANK OF AI API key | +| `%USERPROFILE%\.openclaw\skills\` | Globally installed skill packs | +| `.openclaw\skills\` | Workspace-level skill packs (if you chose option 2) | +| `%USERPROFILE%\.agent-wallet\` | AgentWallet encrypted wallet data | + + + + +--- + +## 🔒 Security Tips + +- **Use a dedicated agent wallet** with only small amounts of gas fees — never your personal main wallet. +- **BNB Chain private key is stored in plaintext** in `mcporter.json`. Use a wallet with minimal funds for this. +- **Test on testnets first** (Nile for TRON, BSC Testnet for BNB Chain) before using real money. +- **Your master password is everything** — lose it and you lose access to the wallet. Write it down somewhere safe. +- **Windows users**: The installer automatically sets owner-only ACL on sensitive config files via `icacls` (equivalent to `chmod 600` on Mac/Linux). No admin privileges are needed and no system files are modified. + --- ## Still Stuck Somewhere? That's totally normal! Everyone's computer environment is different. -Check out 👉 **[FAQ (Troubleshooting Guide)](./FAQ.md)** — we've already encountered and documented solutions for 99% of the weird issues out there. +Check out 👉 **[FAQ](./FAQ.md)** — we've already encountered and documented solutions for 99% of the headache-inducing issues out there. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Agent-Wallet/Developer/CLI-Reference.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Agent-Wallet/Developer/CLI-Reference.md index 291f80c..bd4dd69 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Agent-Wallet/Developer/CLI-Reference.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Agent-Wallet/Developer/CLI-Reference.md @@ -28,7 +28,11 @@ agent-wallet start ```bash agent-wallet start -p Abc12345! ``` -密码要求:至少 8 位,包含大写、小写、数字和特殊字符。 +密码要求:至少 8 位,包含大写、小写、数字和特殊字符。如果密码不满足要求,CLI 会持续提示你重新输入更强的密码,直到通过验证。 + +交互式创建新密码时,需要输入两次进行确认。如果两次输入不一致,系统会要求你重新输入。 + +**默认钱包 ID:** 如果不指定钱包 ID,系统默认为 `local_secure` 钱包使用 `default_secure`,为 `raw_secret` 钱包使用 `default_raw`。 :::caution Shell 历史记录风险 使用 `-p` 内联传递密码会将密码记录在终端的历史文件中。生产钱包建议使用交互式模式(不带 `-p` 的 `agent-wallet start`)或通过环境变量设置 `AGENT_WALLET_PASSWORD`——详见[非交互式执行](#非交互式执行专为自动化与后台设计)。 @@ -48,6 +52,10 @@ agent-wallet start -p Abc12345! -m "word1 word2 word3 ..." 每条 `sign` 子命令都需要 `--network` / `-n` 来指定链。 +:::info 密码重试机制 +使用 `local_secure` 钱包签名时,如果未通过 `-p` 或 `AGENT_WALLET_PASSWORD` 提供密码,CLI 会交互式提示输入主密码。如果密码输入错误,你有 **2 次重试机会**(共 3 次),超过后命令将以"Wrong password. 3 attempts failed."失败退出。 +::: + **签名消息:** ```bash agent-wallet sign msg "Hello" -n tron diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Agent-Wallet/Developer/SDK-Guide.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Agent-Wallet/Developer/SDK-Guide.md index 1b1ac48..ac65d69 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Agent-Wallet/Developer/SDK-Guide.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Agent-Wallet/Developer/SDK-Guide.md @@ -517,10 +517,14 @@ WalletError ├── DecryptionError # 密码错误或密钥文件损坏 ├── SigningError # 签名操作失败 ├── NetworkError # 网络标识符不匹配 -├── InsufficientBalanceError # 余额不足(由调用方抛出) +├── InsufficientBalanceError # 余额不足 └── UnsupportedOperationError # 该钱包类型不支持此操作 ``` +:::tip 关于 InsufficientBalanceError +`InsufficientBalanceError` **不会**由 SDK 自动抛出——Agent-wallet 是纯签名工具,不会检查余额。这个错误类型是为你的应用代码准备的便捷类型,当你在发起交易前检测到余额不足时,可以抛出此异常。 +::: + --- ## 下一步 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 5fb74d6..fa56eef 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 @@ -66,22 +66,22 @@ agent-wallet start ``` ? Quick start type: local_secure — Encrypted key stored locally (recommended) -Wallet ID (e.g. my_wallet_1) (default): +Wallet ID (e.g. my_wallet_1) (default_secure): Wallet initialized! ? Import source: generate — Generate a new random private key Wallets: -┌───────────┬──────────────┐ -│ Wallet ID │ Type │ -├───────────┼──────────────┤ -│ default │ local_secure │ -└───────────┴──────────────┘ +┌────────────────┬──────────────┐ +│ Wallet ID │ Type │ +├────────────────┼──────────────┤ +│ default_secure │ local_secure │ +└────────────────┴──────────────┘ Your master password: <此处会显示你的专属密码> Save this password! You'll need it for signing and other operations. -Active wallet: default +Active wallet: default_secure ``` :::caution 主密码 = 你所有资产的唯一钥匙 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md index f07ad8d..e157fe7 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment.md @@ -198,7 +198,7 @@ npm run start:http 你也可以在测试网上尝试转账(确保 Nile 测试网上有测试 TRX): ``` -在 Nile 测试网上向地址 TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL 转 1 TRX +在 Nile 测试网上向地址 TNPee...xxxxx 转 1 TRX ``` :::info 获取测试 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 aec1598..3e1041b 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 @@ -19,6 +19,8 @@ BANK OF AI SKILLS 可以操作**真实的链上资产**。区块链交易一旦 | **sunswap** | 查价、报价、换币、管理流动性池 | 查询不需要;交易需要钱包凭证 | | **sunperp-skill** | 看行情、开仓、平仓、提现 | 看行情不需要;交易需要 SunPerp 密钥 | | **tronscan-skill** | 查账户、交易、代币、区块、全网数据 | 建议配置 TronScan API 密钥(不配可能卡顿) | +| **trc20-toolkit-skill** | 转代币、查余额、管理授权,支持任意 TRC20 代币 | 查询不需要;转账/授权需要钱包凭证 | +| **multisig-permissions** | 多签权限配置、密钥管理、多方共签提案 | 需要钱包凭证(权限变更需要 Owner 密钥) | | **x402-payment** | 链上"先付后用"自动结算 | 需要钱包凭证 | | **recharge-skill** | 查余额、看订单、充值 | 需要 BANK OF AI 密钥 | @@ -60,7 +62,7 @@ BANK OF AI SKILLS 可以操作**真实的链上资产**。区块链交易一旦 --- -## sunswap — 换币、查价、管理池子 {#sunswap} +## sunswap {#sunswap} 想在 SunSwap 上换币、查行情、管理流动性?对 AI 说下面的话就行。 @@ -92,7 +94,7 @@ BANK OF AI SKILLS 可以操作**真实的链上资产**。区块链交易一旦 --- -## sunperp-skill — 永续合约交易 {#sunperp-skill} +## sunperp-skill {#sunperp-skill} 想做合约?这个技能帮你看行情、开仓、平仓、设止损。内置安全锁:最高 20 倍杠杆,开仓必须设止损——默认帮你守住底线,亏损超过 5% AI 会自动帮你跑路,防止爆仓。 @@ -122,11 +124,11 @@ BANK OF AI SKILLS 可以操作**真实的链上资产**。区块链交易一旦 --- -## tronscan-skill — 链上数据侦探 {#tronscan-skill} +## tronscan-skill {#tronscan-skill} 想查链上发生了什么?这个技能帮你查账户、交易、代币、区块和全网统计。**纯查询,绝对安全,不花一分钱,不需要任何密码。** 非常适合作为你的第一个技能来上手。 -> 帮我查询地址 TDqSquXBgUCLYvYC4XZgrprLK589dkhSCf 的完整账户信息和持仓。 +> 帮我查询地址 TDqSq...xxxxx 的完整账户信息和持仓。 > 查询这笔交易的详情:abc123... @@ -146,7 +148,71 @@ BANK OF AI SKILLS 可以操作**真实的链上资产**。区块链交易一旦 --- -## x402-payment — 链上"先付后用"自动结算 {#x402-payment} +## trc20-toolkit-skill {#trc20-toolkit-skill} + +想查余额、转代币、管理授权?这个技能帮你搞定任意 TRC20 代币的常见操作——支持用代币符号直接操作常见代币(USDT、USDD、SUN、JST、BTT、WIN 等),也能通过合约地址操作任何 TRC20 代币。 + +**绝对安全,只看不花钱:** + +> 帮我查一下我的 USDT 余额。 + +> 帮我批量查一下 USDT、USDD 和 SUN 的余额。 + +> 查一下 USDT 的代币信息(名称、符号、精度、总量)。 + +> 帮我查看地址 TSpender... 当前的 USDT 授权额度。 + +**需要你确认才会执行(AI 会先把账单给你看):** + +> 在 Nile 测试网上转 10 USDT 到 TRecipientAddress。 + +> 给地址 TSpenderAddress 授权 100 USDT。 + +**实战场景:** + +> 快速盘点持仓? "帮我查一下 USDT、USDD、SUN、JST 和 BTT 的余额。" + +> 给朋友转账? "帮我转 50 USDT 到 TXX..." + +> 为 DeFi 操作做准备? "帮我给 SunSwap 路由合约授权 200 USDT,然后查一下授权额度。" + +--- + +## multisig-permissions {#multisig-permissions} + +想给你的 TRON 账户加上多重签名保护?这个技能帮你管理 TRON 原生的三级权限模型(Owner、Active、Witness)——配置密钥、设定签名阈值、限定操作范围,然后通过"发起提案 → 审批签名 → 执行"的流程完成多方共签。非常适合团队钱包,或者限制 AI 只能做 DeFi 操作。 + +**绝对安全,只看不花钱:** + +> 帮我查一下我的账户当前的权限配置。 + +> 查一下地址 TXk8r...xxxxx 的权限设置。 + +> 帮我列出所有待处理的多签提案。 + +**需要你确认才会执行:** + +> 用这三个密钥地址,给我的账户 owner 权限设置 2-of-3 多签。 + +> 限制 active 权限,让 AI 只能调用智能合约(不能直接转账 TRX)。 + +> 发起一笔 500 USDT 转到 TRecipient 的提案,等另一个签名人审批。 + +**实战场景:** + +> 大额转账需要团队审批? "设置 2-of-3 多签,然后发起一笔 10,000 TRX 转到 TVendor... 的提案,备注'Q1 预算'。" + +> 想给 AI 加上"安全围栏"? "使用 agent-restricted 模板——让 AI 只能调用智能合约,但权限变更必须两个人类密钥共同签名。" + +> 审批待处理的提案? "帮我查看所有待处理提案,然后共签提案 prop_xxx。" + +:::tip 模板让设置变简单 +你不需要手动配置每一个密钥和阈值。内置模板如 `basic-2of3`(基础 2/3 多签)、`agent-restricted`(限制 AI 权限)、`team-tiered`(团队分级)、`weighted-authority`(加权投票)帮你搞定常见场景——只需要提供密钥地址就行。 +::: + +--- + +## x402-payment {#x402-payment} 有些高级 API 和 AI 智能体是收费的——需要你先完成链上付费才能使用。这个技能通过 x402 协议帮你自动完成"先付费、再获取"的链上结算流程:AI 发现对方要收费,自动帮你完成链上支付,拿到结果后汇报给你。每次付款前同样会先问你确认。 @@ -156,7 +222,7 @@ BANK OF AI SKILLS 可以操作**真实的链上资产**。区块链交易一旦 --- -## recharge-skill — BANK OF AI 账户管理 {#recharge-skill} +## recharge-skill {#recharge-skill} 查余额、看订单、给 BANK OF AI 账户充值。 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/SKILLS/Faq.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/SKILLS/Faq.md index 2874304..134c5ca 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/SKILLS/Faq.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/McpServer-Skills/SKILLS/Faq.md @@ -40,7 +40,7 @@ ls ~/.openclaw/skills ``` -能看到 `sunswap`、`sunperp-skill`、`tronscan-skill`、`x402-payment`、`recharge-skill` 等目录名就说明装好了。 +能看到 `sunswap`、`sunperp-skill`、`tronscan-skill`、`trc20-toolkit-skill`、`multisig-permissions`、`x402-payment`、`recharge-skill` 等目录名就说明装好了。 然后在 AI 对话中验证: 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 4c46a96..f9ff7d1 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 对话框里回车就能体验。 ### 💱 执行 DEX 交易 @@ -65,7 +65,7 @@ > 🗣️ "帮我算算现在 100 USDT 在 SunSwap 上能换多少 TRX?" -💡 如需了解更多进阶玩法,请查看:[**sunswap**(DEX 交易向导)](./BANKOFAISkill.md#sunswap) +💡 如需了解更多进阶玩法,请查看:[**sunswap**](./BANKOFAISkill.md#sunswap) ### 📈 进行永续合约交易 @@ -73,7 +73,7 @@ > 🗣️ "现在 BTC 资金费率是多少?帮我开一张 5 倍杠杆的多单,亏损 5% 自动止损。" -💡 如需了解更多参数设置,请查看:[**sunperp-skill**(永续合约安全员)](./BANKOFAISkill.md#sunperp-skill) +💡 如需了解更多参数设置,请查看:[**sunperp-skill**](./BANKOFAISkill.md#sunperp-skill) ### 🕵️ 查询链上数据 @@ -81,7 +81,23 @@ > 🗣️ "帮我查一下昨天那个土狗币现在的持仓分布,有没有被庄家控盘?" -💡 如需了解更多查询维度,请查看:[**tronscan-skill**(链上数据侦探)](./BANKOFAISkill.md#tronscan-skill) +💡 如需了解更多查询维度,请查看:[**tronscan-skill**](./BANKOFAISkill.md#tronscan-skill) + +### 💸 转账与管理 TRC20 代币 + +查余额、转代币、管理授权——支持 USDT、USDD、SUN 等常见代币,也能通过合约地址操作任意 TRC20 代币。支持批量查余额。 + +> 🗣️ "帮我查一下 USDT、USDD 和 SUN 的余额,然后转 10 USDT 到 TRecipientAddress。" + +💡 如需了解更多代币操作,请查看:[**trc20-toolkit-skill**](./BANKOFAISkill.md#trc20-toolkit-skill) + +### 🔐 多签与账户权限管理 + +给你的 TRON 账户加上多重签名保护——配置密钥、设定阈值、协调多方共签。非常适合团队钱包,或者限制 AI 只能执行 DeFi 操作。 + +> 🗣️ "帮我查一下账户当前的权限配置,然后给 owner 权限设置 2-of-3 多签。" + +💡 如需了解权限模板和多签流程,请查看:[**multisig-permissions**](./BANKOFAISkill.md#multisig-permissions) ### ☕ 自动结算链上付费服务 @@ -89,7 +105,7 @@ > 🗣️ "使用 x402 协议调用这个付费智能体端点:https://api.example.com"(请替换为你实际要调用的付费端点地址) -💡 如需了解支付与授权细节,请查看:[**x402-payment**(链上自动结算)](./BANKOFAISkill.md#x402-payment) +💡 如需了解支付与授权细节,请查看:[**x402-payment**](./BANKOFAISkill.md#x402-payment) ### 🏦 管理 BANK OF AI 账户 @@ -97,7 +113,7 @@ > 🗣️ "帮我看看我的账户还有多少余额,顺便再充 5 个 U 进去。" -💡 如需了解充值与提现规则,请查看:[**recharge-skill**(账户大管家)](./BANKOFAISkill.md#recharge-skill) +💡 如需了解充值与提现规则,请查看:[**recharge-skill**](./BANKOFAISkill.md#recharge-skill) --- 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 1f4f769..6e9c21d 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 @@ -47,12 +47,12 @@ Ok to proceed? (y) y 安装器会自动从仓库拉取所有可用的 Skills,然后列出清单让你勾选。按**空格键**切换选中/取消,默认全选即可: ``` -◇ Found 6 skills +◇ Found 7 skills │ ◇ Select skills to install (space to toggle) │ Multi-Sig & Account Permissions, recharge-skill, │ SunPerp Perpetual Futures Trading, SunSwap DEX Trading, -│ TronScan Data Lookup, x402-payment +│ TRC20 Token Toolkit, TronScan Data Lookup, x402-payment ``` :::tip 建议全选 @@ -91,6 +91,7 @@ Ok to proceed? (y) y │ recharge-skill -- -- -- │ │ SunPerp Perpetual Futures Trading -- -- -- │ │ SunSwap DEX Trading -- -- -- │ +│ TRC20 Token Toolkit -- -- -- │ │ TronScan Data Lookup -- -- -- │ │ x402-payment Med 1 alert Med │ │ │ @@ -105,12 +106,13 @@ Ok to proceed? (y) y 看到类似以下输出,说明所有 Skills 已经成功安装到你选择的 AI 工具中: ``` -◇ Installed 6 skills ────────────────────────╮ +◇ Installed 7 skills ────────────────────────╮ │ │ │ ✓ Multi-Sig & Account Permissions (copied) │ │ ✓ recharge-skill (copied) │ │ ✓ SunPerp Perpetual Futures Trading (copied)│ │ ✓ SunSwap DEX Trading (copied) │ +│ ✓ TRC20 Token Toolkit (copied) │ │ ✓ TronScan Data Lookup (copied) │ │ ✓ x402-payment (copied) │ │ │ diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Openclaw-extension/FAQ.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Openclaw-extension/FAQ.md index d0646bc..da84b1f 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Openclaw-extension/FAQ.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Openclaw-extension/FAQ.md @@ -8,23 +8,41 @@ ### 报错里写着 "command not found: node" 或 "npm install 失败" -**人话翻译**:你的电脑上没装 Node.js,或者版本太老了。 +**简单来说**:你的电脑上没装 Node.js,或者版本太老了。 -**怎么解决**:去 [Node.js 官网](https://nodejs.org/) 下载最新的稳定版(LTS,建议 v20 或更高版本),像装普通软件一样一路点"下一步"装好。然后关掉终端里的黑框框,重新运行一次安装口令。 +**怎么解决**:去 [Node.js 官网](https://nodejs.org/) 下载最新的稳定版(LTS,建议 v18 或更高版本),像装普通软件一样一路点"下一步"装好。然后关掉终端里的黑框框,重新运行一次安装口令。 -### 报错里写着 "command not found: python3" +### 报错里写着 "command not found: git" -**人话翻译**:你的电脑缺少一个叫 Python 的基础运行环境。 +**简单来说**:你的电脑缺少一个叫 Git 的小工具,安装技能包时需要用它来下载。 -**怎么解决**:去 [Python 官网](https://www.python.org/downloads/) 下载安装。 +**怎么解决**:去 [Git 官网](https://git-scm.com/downloads) 下载安装即可。 -### AgentWallet(AI 保险柜)安装失败了 +### AgentWallet 安装失败了 **怎么解决**: 1. 再次确认你的 Node.js 版本是否足够新。 2. 有时候纯粹是网络太卡下载超时了,喝口水等两分钟重新运行一次安装代码即可。 -3. 如果一直卡住,可以试着手动把旧的 `~/.agent-wallet` 文件夹删掉,从头再来。 +3. 如果一直卡住,可以试着手动把旧的 `~/.agent-wallet`(Mac/Linux)或 `%USERPROFILE%\.agent-wallet`(Windows)文件夹删掉,从头再来。 + +### Windows 上报错 "无法加载文件,因为在此系统上禁止运行脚本" + +**原因**:你的 PowerShell 执行策略比较严格,不允许运行脚本。 + +**怎么解决**:不要直接双击 `install.ps1`,请用以下两种方式之一: + +1. **推荐**:双击 `install.bat`——它会自动绕过执行策略。 +2. 或者在 PowerShell 中手动运行:`powershell -ExecutionPolicy Bypass -File install.ps1` + +### Windows 上终端显示乱码(奇怪的方块或问号) + +**原因**:你的终端不支持 ANSI 颜色转义码。 + +**怎么解决**:安装器会自动尝试启用虚拟终端处理。如果仍有问题: + +1. 确认你的系统是 **Windows 10 build 1511** 以上版本。 +2. 推荐使用 **Windows Terminal**(在 Microsoft Store 免费下载)替代默认的 cmd.exe 或旧版 PowerShell 窗口。 --- @@ -34,7 +52,7 @@ **最可能的原因**:你装完之后太心急,**没有重启 OpenClaw 软件**。 -**怎么解决**:把 OpenClaw 彻底退出(苹果电脑按 `Command+Q`),重新打开,让 AI 重新读取一下它的新脑子。 +**怎么解决**:把 OpenClaw 彻底退出(苹果电脑按 `Command+Q`,Windows 在任务栏右键退出或按 `Alt+F4`),重新打开,让 AI 重新读取一下它的新脑子。 ### AI 能查到数据,但回答乱七八糟、经常出错? @@ -60,7 +78,7 @@ ### AI 报错 "请求限速" 或 "429 错误" -**人话翻译**:你让 AI 查数据的速度太快了,免费的网络通道觉得你像个机器人,把你拉黑了一小会儿。 +**简单来说**:你让 AI 查数据的速度太快了,免费的网络通道觉得你像个机器人,把你拉黑了一小会儿。 **怎么解决**: @@ -77,7 +95,7 @@ ### 玩腻了,怎么卸载它们? -最简单粗暴的方法:打开电脑的文件夹,找到 `~/.openclaw/skills/` 目录,把你不想用的技能文件夹直接删掉,然后重启 AI 软件,它就彻底消失了。 +最简单粗暴的方法:打开电脑的文件夹,找到 `~/.openclaw/skills/`(Mac/Linux)或 `%USERPROFILE%\.openclaw\skills\`(Windows)目录,把你不想用的技能文件夹直接删掉,然后重启 AI 软件,它就彻底消失了。 ### 我瞎填了一通装坏了,能重新装吗? @@ -88,6 +106,22 @@ --- +## Windows 专区 + +### 安装需要管理员权限吗? + +不需要。安装器只写入当前用户目录下的配置文件,不会修改系统文件、注册表或 Program Files 目录。 + +### Windows 和 Mac/Linux 的安装体验一样吗? + +一模一样。Windows 安装器 (`install.ps1`) 是 Linux/macOS 版本 (`install.sh`) 的完整移植——相同的安装流程、相同的多选菜单、相同的配置文件结构。唯一的区别是文件路径从 `~/` 变成了 `%USERPROFILE%\`,文件权限从 `chmod 600` 变成了 `icacls` ACL。 + +### 可以用 WSL (Windows Subsystem for Linux) 安装吗? + +可以,但不推荐。如果你在 WSL 中安装,配置文件会写入 WSL 的 Linux 文件系统,而不是 Windows 的 `%USERPROFILE%`。这意味着 Windows 原生的 OpenClaw 可能读不到这些配置。如果你的 OpenClaw 是 Windows 原生版本,请直接用 `install.bat` 或 `irm | iex` 安装。 + +--- + ## 还是搞不定? 👉 回到 **[快速开始](./QuickStart.md)** 从第一步跟着再走一遍,通常 99% 的问题都能迎刃而解。 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Openclaw-extension/Intro.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Openclaw-extension/Intro.md index 3ae6f75..1328d58 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Openclaw-extension/Intro.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Openclaw-extension/Intro.md @@ -1,60 +1,62 @@ # 简介 -一键让你的 AI 懂区块链。 +## 💡 为什么需要 OpenClaw Extension? -你有没有想过,有一天查链上数据、换币、看余额,再也不用打开十几个网页,也不用盯着复杂的各种 App? +在多链并行的 Web3 世界里,管理资产往往意味着不断的"打断"与"重复": -你只需要像跟朋友微信聊天一样,发一句大白话,剩下的脏活累活,全由你的 AI 助理搞定。 +- **操作割裂感**:想在不同链上换个币或查个账,你得频繁切换钱包网络、找对应生态的 DEX 网页、核对合约地址。这种在不同工具间的"反复跳转",耗费了大量的精力。 +- **执行的心理压力**:每一笔交易都要自己手动调滑点、算 Gas 费。面对看不懂的授权代码,那种"怕点错"的焦虑感,给每次操作都增加了不必要的心理负担。 -**OpenClaw Extension,就是帮你实现这个魔法的"一键安装包"。** +OpenClaw Extension 的出现,是为了让你的 Web3 体验从"每步都要亲力亲为"进化到"只需开口说句指令"。它不再让你陷于繁琐的配置,而是通过自动化流程安装 AgentWallet、MCP 服务(执行工具)以及预置技能(交易大脑),赋予你的 AI 助手深度参与链上操作的能力。无论你使用的是 macOS、Linux 还是 Windows,只需一行简单的命令,即可在智能向导的指引下完成全套环境部署。 --- -## 它是怎么施展魔法的? +## 🧩 它是怎么工作的? -以前的 AI 只是个懂理论的"嘴强王者"。为了让它能帮你干实事,我们的安装包会给它装上两样核心武器: +以前的 AI 只是个懂理论的"王者",你问它怎么买币,它会给你甩一堆长篇大论的教程。 为了让它能帮你干实事,我们的安装包会给它装上三样核心武器: -### 🛠️ 1. 工具箱 (MCP Server) —— 给 AI 装上"手" +### 🔐 1. AgentWallet —— 给 AI 代理打造的专属加密钱包 -这就是 AI 接入区块链的网线。装上它,AI 就拥有了直接读写区块链的能力。 +用户最怕什么?怕私钥被盗!这是 AI 代理的专属加密钱包。 你的私钥会在本地被死死加密存储,永远不会发送到任何外部的服务器上——相当于给你的 AI 配了一个断网也依然安全的保险箱。 有了它,AI 才能替你安全地签署交易,而不是把私钥像便利贴一样危险地裸露在配置文件里。 -目前我们支持: +### 🛠️ 2. MCP Server —— 给 AI 装上"干活的手" + +以前的 AI 就像个被关在小黑屋里的军师,再聪明也碰不到外面的世界。 工具箱就是给 AI 装上了一双能直接摸到区块链的"手"。有了它,AI 就能亲自替你"跑腿",去链上查余额、按转账按钮,再也不用你亲自动手。 目前这双"手"能帮你干这些活: - **波场 (TRON) 工具箱**:能查余额、发转账、玩转波场生态。 - **币安 (BNB Chain) 工具箱**:支持 BSC、以太坊等多链操作。 - **充值小助手**:帮你远程给 BANK OF AI 账户充值。 -### 🧠 2. 技能包 (Skills) —— 给 AI 装上"脑子" - -光有手还不行,AI 得知道遇到事情该怎么按步骤处理。技能包就是我们提前写好的"菜谱"。 +### 🧠 3. Skills —— 给 AI 注入"自带菜谱的超级大脑" -比如 **"sunswap" 技能**,就是教 AI:"当主人说想换币时,你要先去查价格,再算好手续费,最后把账单发给主人确认,绝对不能乱花钱。" +光有手还不行,AI 得知道遇到事情该怎么按步骤处理。Skills 技能包就是我们提前写好的"菜谱"。 比如我们内置了 **SunSwap DEX Trading**(去中心化交易所换币)、**SunPerp Perpetual Futures**(永续合约交易)和 **TronScan Data Lookup**(查链上数据)等拿手技能。 当你说想换币时,这个大脑会指挥 AI:"先去查现在的价格,再算好能量手续费贵不贵,最后把清晰的账单发给你确认,绝对不能乱花你的钱。" --- -## 🌟 装上之后,体验有多爽? +## 🌟 告别繁琐,体验"对话式"交易有多爽? -安装完成后,你的 AI 会立刻化身为极其专业的私人 Web3 助理。试试像这样使唤它: +安装完成后,你的 AI 会立刻化身为极其专业的私人 Web3 助理。 以前你的操作:打开网页 → 连接钱包 → 搜索代币合约 → 算滑点 → 确认交易 → 提心吊胆等出块。 现在的操作,你只需要舒舒服服地靠在椅背上打字: > **"帮我查一下现在 TRON 链上能量费贵不贵?"** > -> **"100 USDT 在 SunSwap 上能换多少 TRX?算上手续费划算吗?"** +> **"100 USDT 在 SunSwap 上现在能换多少 TRX?算上手续费划算吗?"** > > **"我的钱包里还有多少余额?顺便帮我查一下昨天那个土狗币的持仓情况。"** -它会把枯燥的代码和数据嚼碎了,变成大白话喂给你。 +它会帮你把枯燥的代码和数据全部消化掉,直接用最清晰易懂的文字向你汇报。 --- -## 这适合我吗? +## 🎯 这适合我吗? -- **我是小白玩家**:太棒了!不想折腾代码,只想用大白话让 AI 帮忙查数据、做交易,这就是为你量身定制的。 -- **我是 Web3 老手**:懒得天天开网页连钱包,想拥有一个随叫随到的私人交易助理,它能帮你省下大把盯盘时间。 +- **我是纯小白玩家**:太棒了!不想折腾代码,看图表就头晕,只想用平时聊天的方式让 AI 帮忙查数据、做交易,这就是为你量身定制的。 +- **我是 Web3 老手**:懒得天天开网页连钱包,想拥有一个随叫随到的私人交易助理,它能帮你省下大把盯盘和查合约的时间。 +- **我是 Windows 用户**:完全没问题!v1.4.5 起原生支持 Windows 10/11,PowerShell 搞定安装,体验和 Mac/Linux 一模一样。 --- -## 迫不及待了? +## 🚀 迫不及待了? -别犹豫了,整个安装过程就像用微波炉热个便当一样简单,只需要几分钟。 +忘掉那些复杂的配置教程吧。整个过程都有全自动的智能向导手把手带你,只需复制一行口令,跟着屏幕提示按几下回车,它就会自动把一切都帮你打理好。 👉 **[去快速开始,给你的 AI 升级吧!](./QuickStart.md)** diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Openclaw-extension/QuickStart.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Openclaw-extension/QuickStart.md index 73590b1..8cf6d2c 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Openclaw-extension/QuickStart.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/Openclaw-extension/QuickStart.md @@ -6,67 +6,392 @@ ## 🕹️ 准备工作 -在开始之前,请确保你的电脑上已经装好了这几样基础软件(如果没有,请像装普通软件一样去官网下载安装): +在开始之前,请确保你的电脑上已经装好了以下几种基础软件(如果没有,请像装普通软件一样去官网下载安装): 1. **OpenClaw**:你的 AI 助手软件。 -2. **Node.js**(请务必安装 v20 或以上版本):这是技能包运行的基础环境。*(极其重要,版本太低一定会报错!)* +2. **Node.js**(请务必安装 v18 或以上版本):这是技能包和配置工具运行的基础环境。*(极其重要,版本太低一定会报错!)* 3. **Git**:用来下载技能包的小工具。 -4. **Python 3**:安装向导用来处理配置文件的小帮手。 + +**Windows 用户额外注意:** +- 需要 **Windows 10**(1511 以上版本)或 **Windows 11** +- **PowerShell 5.1+**(Win10/11 自带,无需额外安装) +- 在 PowerShell 中输入 `$PSVersionTable.PSVersion` 可确认版本 --- -## 🚀 第一步:一键通关安装 +## 🚀 第一步:运行智能安装向导 打开你电脑上的"终端"(也就是那个黑框框)。 -- **苹果电脑:** 按 `Command + 空格`,在弹出的搜索框里输入 `Terminal`,按回车。 +- **苹果电脑 / Linux:** 按 `Command + 空格`(Mac)或在应用菜单中搜索 `Terminal`,按回车打开。 +- **Windows:** 按 `Win + X`,选择 **Windows PowerShell** 或 **终端**;或者在开始菜单搜索 `PowerShell`。 + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + -把下面这行神奇的代码**完整复制**,粘贴进去,按回车: +把下面这行代码**完整复制**,粘贴进终端,按回车: ```bash curl -fsSL https://raw.githubusercontent.com/BofAI/openclaw-extension/refs/heads/main/install.sh | bash ``` -🚑 **急救包:敲完回车就报错了?** 如果屏幕提示 `command not found: node` 或 `python3`,说明你的电脑缺少上面说的基础环境。👉 [点这里看怎么解决](./FAQ.md#报错里写着-command-not-found-node-或-npm-install-失败) +或者从源码安装: + +```bash +git clone https://github.com/BofAI/openclaw-extension.git +cd openclaw-extension +./install.sh +``` + + + + +把下面这行代码**完整复制**,粘贴进 PowerShell,按回车: + +```powershell +irm https://raw.githubusercontent.com/BofAI/openclaw-extension/refs/heads/main/install.ps1 | iex +``` + +或者从源码安装: + +```cmd +git clone https://github.com/BofAI/openclaw-extension.git +cd openclaw-extension +install.bat +``` + +> `install.bat` 是一个 6 行的启动器,会自动以正确的执行策略调用 `install.ps1`——你不需要手动配置任何 PowerShell 策略。 + + + -如果没有报错,屏幕上会跳出英文向导。请把它当成一个文字小游戏,整个流程分 4 关: +🚑 **急救包:敲完回车就报错了?** 如果屏幕提示 `command not found: node`(Mac/Linux)或 `node 不是内部命令`(Windows),说明你的电脑缺少上面说的基础环境。👉 [点这里看怎么解决](./FAQ.md#报错里写着-command-not-found-node-或-npm-install-失败) + +如果没有报错,屏幕上会跳出安装向导。请把它当成一个文字小游戏,整个流程分 4 关: + +``` +🦞 OpenClaw Extension Installer (by BANK OF AI) +Smart contracts, smarter agent. No more manual ABI guessing. +``` ### 🟢 第 1 关:选安装模式 -屏幕会问你选哪种方式。键盘输入 `1`(普通安装),然后按回车。 这种方式最省心,能保留你以前的设置。 +屏幕会问你选哪种方式: + +``` +Installation Mode + 1) Normal install [Recommended] + 2) Clean install (full cleanup: MCP/skills/local config files) + +? Enter choice (1-2, default: 1): +``` + +- **普通安装(1)**:保留你以前的设置,适合首次安装或升级。 +- **全新安装(2)**:彻底推倒重来,删除所有 MCP 配置、已装技能、API 凭证和钱包数据。 + +:::tip 第一次安装选哪个? +第一次安装选 `1` 或 `2` 效果一样。如果你之前装过想重新来过,选 `2`。 +::: + +如果你选了 `2`(全新安装),安装器会先列出将被删除的内容,然后要求你两次确认: + +``` +The following data will be permanently deleted: + • ALL MCP entries in: ~/.mcporter/mcporter.json + • ALL installed skills (global and workspace) + + • BANK OF AI local config: ~/.mcporter/bankofai-config.json + • AgentWallet config will be overwritten by: agent-wallet start --override --save-runtime-secrets + +? Continue with CLEAN install? (y/N): y +? Type CLEAN to confirm permanent deletion: CLEAN +``` + +确认后,安装器会自动清理旧技能: + +``` +Running cleanup... + +◇ Found 11 unique installed skill(s) +◇ Removal process complete +◆ Successfully removed 11 skill(s) + +✓ Clean install cleanup completed. + +Clean complete — proceeding with fresh setup... +``` + +然后运行 `agent-wallet reset` 彻底删除旧的钱包数据: + +``` +Step 0: AgentWallet Setup + +Launching: agent-wallet reset +This will delete ALL wallet data in: ~/.agent-wallet + +✔ Are you sure you want to reset? This cannot be undone. Yes +✔ Really delete everything? Last chance! Yes + Deleted: master.json + Deleted: wallets_config.json + Deleted: runtime_secrets.json + ... + +Wallet data reset complete. +``` + +清理完成后,自动进入下一步——钱包初始化。 + +如果你选了 `1`(普通安装),则直接跳到下一步。 + +### 🟢 第 2 关:配置 AgentWallet(AI 的专属钱包保险柜) + +向导会自动给你装一个叫 AgentWallet 的工具,用来安全存放 AI 的钱包钥匙——相当于一个本地加密的保险箱,私钥永远不会发送到任何服务器。 + +``` +Step 0: AgentWallet Setup + +Launching: agent-wallet start --override --save-runtime-secrets +Please complete initialization in the CLI prompts. +``` + +**① 选钱包类型** —— 直接按回车用默认值就好: + +``` +✔ Quick start type: local_secure — Encrypted key stored locally (recommended) +``` + +**② 设置主密码** —— 你可以自己输一个(需要大写+小写+数字+特殊字符,至少 8 位),也可以直接按回车自动生成: + +``` +✔ New Master Password (press Enter to auto-generate a strong password) -### 🟢 第 2 关:配置"AI 的专属保险柜"(AgentWallet) +Wallet initialized! +``` + +**③ 给钱包起个名字** —— 输入一个 Wallet ID(比如 `my_wallet_1`),或者直接按回车使用默认名称 `default_secure`: + +``` +Wallet ID (e.g. my_wallet_1) (default_secure): my_wallet_1 +``` + +**④ 生成钱包** —— 按回车创建一个全新钱包: + +``` +✔ Import source: generate — Generate a new random private key +``` + +当你看到钱包列表——保险柜就配好了! -向导会自动给你装一个叫 AgentWallet 的工具,用来安全存放 AI 的钱包钥匙。 +``` +Wallets: +┌─────────────┬──────────────┐ +│ Wallet ID │ Type │ +├─────────────┼──────────────┤ +│ my_wallet_1 │ local_secure │ +└─────────────┴──────────────┘ + +🔑 Your master password: 7#KQoc&%m4S7$Dhk +⚠️ Keep this password safe. You'll need it for signing and other operations. + +Active wallet: my_wallet_1 + +✓ AgentWallet setup completed +``` -如果你是新手,面对屏幕上的问题,闭着眼睛一路按回车,用默认值就足够了。 +如果你在第 ② 步选了自动生成密码,这里会显示系统为你生成的主密码。 -(🚑 报错卡住了?👉 [点这里看 AgentWallet 安装失败怎么救](./FAQ.md#agentwallet-ai-保险柜安装失败了)) +:::caution 务必记下这个密码! +主密码是打开你 AI 钱包的唯一钥匙。**丢了密码 = 丢了钱包的访问权限。** 拿笔写下来、存到密码管理器里——随便什么方式,千万别忘了。 +::: + +:::tip 升级安装时看到 "Wallet already initialized."? +如果你之前已经装过 AgentWallet,选普通安装后向导会跳过密码设置,直接让你输入 Wallet ID 并生成钱包。之前的主密码和已有钱包都会保留。 +::: + +(🚑 报错卡住了?👉 [点这里看 AgentWallet 安装失败怎么解决](./FAQ.md#agentwallet-安装失败了)) ### 🟢 第 3 关:挑选工具箱(给 AI 装"手") -屏幕会列出波场 (mcp-server-tron) 等选项。按键盘 `↑` `↓` 方向键移动,按**空格键**打勾,选完后按**回车**确认。 +屏幕会显示一个多选列表,列出可安装的 MCP 服务器。它们是连接 AI 和区块链的"数据线": + +``` +? Select MCP Servers to install: (Space:toggle, Enter:confirm) +❯ [x] mcp-server-tron + Interact with TRON blockchain (wallets, transactions, smart contracts). + [x] bnbchain-mcp + BNB Chain official MCP (BSC, opBNB, Ethereum, Greenfield). + [x] bankofai-recharge + BANK OF AI recharge MCP (remote recharge tools). +``` -⚠️ **前方高能**:向导可能会突然问你要 API Key! +按键盘 `↑` `↓` 方向键移动,按**空格键**选中(显示 X)或取消,选完后按**回车**确认。三个默认全选——建议保持全选。 -- **这是啥?** 它是 VIP 通行证,有了它查数据就不卡。 -- **我现在没有怎么办?** 直接按回车跳过!留空完全没关系! 绝不影响你现在的安装。 +确认后,安装器会逐个配置每台服务器。下面是你会看到的具体画面: + +#### mcp-server-tron(波场工具箱) + +``` +Configuring mcp-server-tron... +This step configures network access for TRON MCP. +? Enter TRONGRID_API_KEY (optional): +``` + +⚠️ **这里安装器会问你要 `TRONGRID_API_KEY`。** 这是 TronGrid 的专属访问密钥,有了它查数据就不会被限速。**现在没有?直接按回车跳过!** 完全不影响安装,以后随时补填。 + +配置成功后你会看到 `add-mcp` 的安装横幅和: + +``` +✓ Configuration saved for mcp-server-tron. +``` + +#### bnbchain-mcp(BNB Chain 工具箱) + +``` +Configuring bnbchain-mcp... +bnbchain-mcp currently does not support AgentWallet. +This server still uses PRIVATE_KEY configuration. + +⚠ Your PRIVATE_KEY will be stored in plaintext in: ~/.mcporter/mcporter.json + +? Enter BNB Chain PRIVATE_KEY (optional): +? Enter LOG_LEVEL (optional): +``` + +:::caution BNB Chain 私钥说明 +跟 TRON 不同(TRON 通过 AgentWallet 加密保护),BNB Chain 目前需要把私钥以**明文**存在配置文件里。虽然文件权限已设为 600(只有你自己能读),但我们强烈建议使用一个**专用钱包,只放小额资金**。 + +**没有 BNB Chain 私钥?没事——两个问题都直接按回车跳过。** 以后需要时再配。 +::: + +``` +✓ Configuration saved for bnbchain-mcp. +``` + +#### bankofai-recharge(充值助手) + +这个全自动,不用输入任何东西!它会自动连接 BANK OF AI 的远程充值服务。 + +``` +✓ Configuration saved for bankofai-recharge. +``` ### 🟢 第 4 关:挑选技能包(给 AI 装"脑子") -屏幕会列出 sunswap(换币)、tronscan(查数据)等技能。同样按**空格键**打勾,按**回车**确认。 +先选安装范围: + +``` +Select skills installation scope: + 1) User-level (global) [Recommended] + Available to all OpenClaw workspaces + 2) Workspace-level (project) + Only available in current workspace + +? Enter choice (1-2, default: 1): +``` + +直接按回车(或输入 `1`)选全局安装——这样你所有 OpenClaw 工作区都能用这些技能。 + +然后技能选择器启动: + +``` +◇ Found 7 skills +│ +◇ Select skills to install (space to toggle) +│ Multi-Sig & Account Permissions, recharge-skill, SunPerp Perpetual Futures Trading, +│ SunSwap DEX Trading, TRC20 Token Toolkit, TronScan Data Lookup, x402-payment +``` + +每个技能是干啥的: + +| 技能 | 功能 | +| :--- | :--- | +| **SunSwap DEX Trading** | 在 SunSwap(波场最大的去中心化交易所)上换币 | +| **SunPerp Perpetual Futures** | 在 SunPerp 上做永续合约交易 | +| **TronScan Data Lookup** | 通过 TronScan 查链上数据 | +| **Multi-Sig & Account Permissions** | 多签钱包与账户权限管理 | +| **TRC20 Token Toolkit** | TRC20 代币发送等常用操作 | +| **x402-payment** | x402 协议支付(Agent 间付款) | +| **recharge-skill** | 查询和充值 BANK OF AI 余额 | + +选完后,安装器会显示安全风险评估: + +``` +◇ Security Risk Assessments +│ Gen Socket Snyk +│ Multi-Sig & Account Permissions -- -- -- +│ recharge-skill Safe 1 alert Med Risk +│ SunPerp Perpetual Futures Trading -- -- -- +│ SunSwap DEX Trading -- -- -- +│ TRC20 Token Toolkit -- -- -- +│ TronScan Data Lookup -- -- -- +│ x402-payment Safe 0 alerts Med Risk +``` -遇到看不懂的密钥索要提示,统统直接按回车跳过。 +查看报告后确认继续。安装完成时: + +``` +◇ Installed 7 skills +│ +│ ✓ Multi-Sig & Account Permissions → ~/.openclaw/skills/multi-sig-account-permissions +│ ✓ recharge-skill → ~/.openclaw/skills/recharge-skill +│ ✓ SunPerp Perpetual Futures Trading → ~/.openclaw/skills/sunperp-perpetual-futures-trading +│ ✓ SunSwap DEX Trading → ~/.openclaw/skills/sunswap-dex-trading +│ ✓ TRC20 Token Toolkit → ~/.openclaw/skills/trc20-token-toolkit +│ ✓ TronScan Data Lookup → ~/.openclaw/skills/tronscan-data-lookup +│ ✓ x402-payment → ~/.openclaw/skills/x402-payment +``` + +技能装完后,安装器会自动进入配置环节,询问一组 API Key: + +#### recharge-skill API Key 配置 + +``` +recharge-skill API Key Configuration +recharge-skill uses your local BANK OF AI API key for balance and order queries. + +? Enter BANKOFAI_API_KEY (optional, hidden): +``` + +**现在没有?直接按回车跳过。** 以后拿到了 Key 可以手动创建配置文件,详见下方「[事后怎么补填 API Key](#-事后怎么补填-api-keyvip-通行证)」。 当屏幕底部亮起 `Installation Complete!` 时——恭喜,通关成功! +``` +═══════════════════════════════════════ + Installation Complete! +═══════════════════════════════════════ + +✓ MCP Server configured + Config file: ~/.mcporter/mcporter.json + File permissions: 600 (owner read/write only) + +✓ Installed skills: + • Multi-Sig & Account Permissions + • recharge-skill + • TRC20 Token Toolkit + • x402-payment + Verify with: npx skills list -g + +Next steps: + 1. Restart OpenClaw and start a new session to load new skills + 2. Test the skills: + "Read the recharge-skill and recharge my BANK OF AI account with 1 USDT" + "Read the x402-payment skill and explain how it works" + +Repository: https://github.com/BofAI/openclaw-extension +Skills: https://github.com/BofAI/skills +``` + --- ## 🎉 第二步:重启并见证奇迹 安装完成后,有一步绝对不能漏:**彻底关掉你的 OpenClaw 软件,然后重新打开它。** -🚑 **急救包:AI 像个傻子?** 如果它回答"我不知道什么是 SunSwap",99% 是因为你刚才没重启。👉 [点这里看怎么彻底重启](./FAQ.md#ai-委屈地说我没有查区块链的工具-或-我不知道什么是-sunswap) +🚑 **急救包:AI 像个傻子?** 如果它回答"我不知道什么是 SunSwap",99% 是因为你刚才没重启。Mac 按 `Command+Q`,Windows 在任务栏右键退出或按 `Alt+F4`。👉 [点这里看怎么彻底重启](./FAQ.md#ai-委屈地说我没有查区块链的工具-或-我不知道什么是-sunswap) 打开对话框,对你的 AI 发出第一个指令: @@ -100,12 +425,16 @@ curl -fsSL https://raw.githubusercontent.com/BofAI/openclaw-extension/refs/heads | `TRONSCAN_API_KEY` | TronScan 查数据技能必须用到 | [tronscan.org](https://tronscan.org/#/myaccount/apiKeys) 免费申请 | | `BANKOFAI_API_KEY` | 给 BANK OF AI 充值或查余额用 | [chat.bankofai.io/key](https://chat.bankofai.io/key) 登录后获取 | + ### 第二步:把钥匙填进系统里 拿到对应的 Key 后,根据它的类型,选择下面简单的方法填进去。**填完后千万记得重启 OpenClaw!** #### 🔧 A 类钥匙:填入"隐形便签"(适用于 TRONGRID 和 TRONSCAN) + + + 1. 在终端输入 `open -e ~/.zshrc` 并回车。 2. 在弹出的记事本最下方,粘贴这行代码(注意保留双引号 `""`): ``` @@ -114,20 +443,95 @@ curl -fsSL https://raw.githubusercontent.com/BofAI/openclaw-extension/refs/heads ``` 3. 按 `Command + S` 保存关闭,然后重新打开终端或重启 OpenClaw 即可生效。 + + + +1. 按 `Win + R`,输入 `sysdm.cpl`,回车打开系统属性。 +2. 点 **高级** 选项卡 → **环境变量**。 +3. 在"用户变量"中点 **新建**,分别添加: + - 变量名:`TRONGRID_API_KEY`,变量值:你的 TronGrid Key + - 变量名:`TRONSCAN_API_KEY`,变量值:你的 TronScan Key +4. 确定保存,然后重启 OpenClaw 即可生效。 + +或者直接在 PowerShell 中运行(永久写入用户环境变量): + +```powershell +[Environment]::SetEnvironmentVariable("TRONGRID_API_KEY", "你的TronGrid_Key填在这里", "User") +[Environment]::SetEnvironmentVariable("TRONSCAN_API_KEY", "你的TronScan_Key填在这里", "User") +``` + + + + #### 🔧 B 类钥匙:一键生成配置文件(适用于 BANK OF AI) -如果你拿到了这把钥匙,直接在终端(黑框框)里复制并运行下面的整段代码即可(记得把中文部分替换成你的真实 Key): +如果你拿到了这把钥匙,直接在终端里复制并运行下面的代码即可(记得把中文部分替换成你的真实 Key): **配置 BANK OF AI:** + + + ```bash -mkdir -p ~/.mcporter && echo '{"api_key": "你的BANKOFAI_API_KEY填在这里", "base_url": "https://api.bankofai.io/v1/"}' > ~/.mcporter/bankofai-config.json +mkdir -p ~/.mcporter && echo '{"api_key": "你的BANKOFAI_API_KEY填在这里", "base_url": "https://chat.bankofai.io/"}' > ~/.mcporter/bankofai-config.json +``` + + + + +```powershell +New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.mcporter" | Out-Null +'{"api_key": "你的BANKOFAI_API_KEY填在这里", "base_url": "https://chat.bankofai.io/"}' | Out-File -Encoding utf8 "$env:USERPROFILE\.mcporter\bankofai-config.json" ``` + + + +--- + +## 📋 配置文件速查表 + +安装完成后,以下文件会被写入你的电脑。所有敏感文件的权限都设为 `600`(Mac/Linux)或仅限当前用户访问的 ACL(Windows): + + + + +| 文件 | 存了什么 | +| :--- | :--- | +| `~/.mcporter/mcporter.json` | MCP 服务器配置(包括 BNB Chain 私钥,如果你填了的话) | +| `~/.mcporter/bankofai-config.json` | BANK OF AI 的 API Key | +| `~/.openclaw/skills/` | 全局安装的技能包 | +| `.openclaw/skills/` | 工作区级别的技能包(选了选项 2 才有) | +| `~/.agent-wallet/` | AgentWallet 加密钱包数据 | + + + + +| 文件 | 存了什么 | +| :--- | :--- | +| `%USERPROFILE%\.mcporter\mcporter.json` | MCP 服务器配置(包括 BNB Chain 私钥,如果你填了的话) | +| `%USERPROFILE%\.mcporter\bankofai-config.json` | BANK OF AI 的 API Key | +| `%USERPROFILE%\.openclaw\skills\` | 全局安装的技能包 | +| `.openclaw\skills\` | 工作区级别的技能包(选了选项 2 才有) | +| `%USERPROFILE%\.agent-wallet\` | AgentWallet 加密钱包数据 | + + + + +--- + +## 🔒 安全小贴士 + +- **使用专用代理钱包**,只放小额 Gas 费——绝对不要用你的个人主钱包。 +- **BNB Chain 私钥是明文存储的**,放在 `mcporter.json` 里。请用只存少量资金的钱包。 +- **先在测试网试跑**(TRON 用 Nile 测试网,BNB Chain 用 BSC Testnet),确认没问题再上真钱。 +- **主密码就是一切**——丢了就等于丢了钱包访问权限。找个安全的地方记下来。 +- **Windows 用户**:安装器会自动通过 `icacls` 将敏感配置文件设为仅当前用户可读写(等同于 Mac/Linux 的 `chmod 600`)。不需要管理员权限,也不会修改系统文件。 + --- ## 还有其他卡壳的地方? 这很正常!每个人的电脑环境都不一样。 -去看看 👉 **[常见问题(救火指南)](./FAQ.md)**,99% 的奇葩坑我们都已经帮你踩过,并写好解法了。 +去看看 👉 **[常见问题](./FAQ.md)**,99% 令人头疼的问题我们都已经遇到过,并写好解法了。 diff --git a/package.json b/package.json index 5f00a0d..a26951a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@x402-tron/docs", - "version": "1.2.4", + "version": "1.2.6", "description": "x402-tron documentation", "license": "MIT", "scripts": {