From 33d223bb3cf1ea9052b5acabb83ea7c609d3a0a4 Mon Sep 17 00:00:00 2001 From: jerryji-prog Date: Wed, 22 Apr 2026 18:47:14 +0800 Subject: [PATCH 1/2] update x402 --- .../core-concepts/network-and-token-support.md | 15 ++++++++++++++- docs/x402/faq.md | 16 +++++++++++++++- .../x402/getting-started/quickstart-for-human.md | 2 +- docs/x402/index.md | 2 ++ docs/x402/sdk-features.md | 4 ++++ .../core-concepts/network-and-token-support.md | 15 ++++++++++++++- .../current/x402/faq.md | 16 +++++++++++++++- .../x402/getting-started/quickstart-for-human.md | 2 +- .../current/x402/index.md | 2 ++ .../current/x402/sdk-features.md | 4 ++++ 10 files changed, 72 insertions(+), 6 deletions(-) diff --git a/docs/x402/core-concepts/network-and-token-support.md b/docs/x402/core-concepts/network-and-token-support.md index fa2ea6d..9d2ece0 100644 --- a/docs/x402/core-concepts/network-and-token-support.md +++ b/docs/x402/core-concepts/network-and-token-support.md @@ -62,10 +62,16 @@ By default, **USDT** and **USDD** are used as primary settlement currencies. | **USDD** | `tron:mainnet` | `TXDk8mbtRbXeYuMNS83CfKPaYYT8XWv9Hz` | | **USDD** | `tron:nile` | `TGjgvdTWWrybVLaVeFqSyVqJQWjxqRYbaK` | | **USDT** | `eip155:56` | `0x55d398326f99059fF775485246999027B3197955` | +| **USDC** | `eip155:56` | `0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d` | +| **EPS** | `eip155:56` | `0xA7f552078dcC247C2684336020c03648500C6d9F` | | **USDT** | `eip155:97` | `0x337610d27c682E347C9cD60BD4b3b107C9d34dDd` | +| **USDC** | `eip155:97` | `0x64544969ed7EBf5f083679233325356EbE738930` | +| **DHLU** | `eip155:97` | `0x375cADdd2cB68cE82e3D9B075D551067a7b4B816` | > **Extensibility**: The protocol is highly extensible. By registering tokens in the `TokenRegistry`, you can easily support any custom TRC-20 or BEP-20 token. +> **Token selection for the `exact` scheme**: The `exact` scheme requires a token that natively implements ERC-3009 `transferWithAuthorization`. For BSC testnet `exact` interoperability testing, the recommended asset is **DHLU** (Da Hulu). `USDT (BEP-20)` does not natively support ERC-3009 — do NOT advertise `exact` payment requirements with the BSC USDT contract. If you need USDT on BSC, use the `exact_permit` scheme instead. + --- ## Secure Signing @@ -114,7 +120,14 @@ The `exact_permit` scheme transfers tokens via the `PaymentPermit` contract, sui ### `exact` Scheme -The `exact` scheme is for tokens that natively support `transferWithAuthorization`. It does not require the `PaymentPermit` contract. +The `exact` scheme is for tokens that natively support ERC-3009 `transferWithAuthorization`. It does not require the `PaymentPermit` contract. + +Since **v0.5.9**, the `exact` scheme on both EVM and TRON conforms to the v2 specification published by the **x402 Foundation (formerly Coinbase)**: + +- **V2 wire format**: The `payload` of `exact` conforms to the v2 spec field layout and semantics. A stock v2 client can pay a protected endpoint on this SDK's server directly, and this SDK's client can pay any v2-compliant server — no project-specific translation required. +- **Structured authorization**: The `nativeExact` / `nativeExactEvm` / `nativeExactTron` mechanisms have been updated to emit a V2-compatible `payload` — using a typed-field authorization structure instead of the previous flat hex blob. Transfer authorization data is carried in `payload.authorization`. +- **Migration fallback**: To reduce disruption during rollout, the client dual-writes both `payload.authorization` (V2) and `extensions.transferAuthorization` (V1); the server prefers `payload.authorization` and keeps a temporary fallback for the legacy field. +- **BSC interop smoke tests**: The `examples/bsc-testnet-smoke/` directory provides BSC testnet interoperability smoke tests (TypeScript and Python), validating both the "Coinbase official client → BANK OF AI server" and "BANK OF AI client → Coinbase official server" directions. ### `exact_gasfree` Scheme diff --git a/docs/x402/faq.md b/docs/x402/faq.md index 1528728..1bf9dfc 100644 --- a/docs/x402/faq.md +++ b/docs/x402/faq.md @@ -69,9 +69,19 @@ Common pricing models include: x402 supports three payment schemes: -- **`exact_permit`** and **`exact`**: Both allow the client to authorize a **maximum payment amount**, and the server to settle the **actual cost incurred** (up to the authorized limit). This is ideal for **metered billing**, **LLM token usage**, and similar use cases. +- **`exact_permit`** and **`exact`**: Both allow the client to authorize a **maximum payment amount**, and the server to settle the **actual cost incurred** (up to the authorized limit). This is ideal for **metered billing**, **LLM token usage**, and similar use cases. Since v0.5.9, the wire `payload` of the `exact` scheme conforms to the v2 specification published by the **x402 Foundation (formerly Coinbase)**. - **`exact_gasfree`** (TRON only): Allows buyers to pay with USDT/USDD without holding TRX for gas. All GasFree API calls are routed through the BANK OF AI proxy — no API keys required on the client side. +#### Can this SDK interoperate with the x402 Foundation (formerly Coinbase) v2 reference implementation? + +**Yes.** Since v0.5.9, the `exact` payment scheme (EVM and TRON) conforms to the v2 specification published by the **x402 Foundation (formerly Coinbase)**: + +- A stock v2 client can directly access this SDK's `exact` protected endpoints with no project-specific adapter layer. +- This SDK's client can pay v2-compatible servers directly. +- In the V2 structure, transfer authorization data is carried in the `payload.authorization` field (a structured object). As a migration fallback, the client also populates `extensions.transferAuthorization` so that servers still running older versions can parse the payload. +- When using the `exact` scheme on BSC, the advertised asset **must** natively implement ERC-3009 `transferWithAuthorization` — for example, **DHLU** on BSC testnet. BSC USDT is a plain ERC-20 and natively supports neither ERC-3009 nor EIP-2612 permit — if you need to accept USDT, use the `exact_permit` scheme instead (which is backed by this project's `PaymentPermit` proxy contract and works with any ERC-20). +- The `examples/bsc-testnet-smoke/` directory contains smoke tests for bidirectional interoperability (Coinbase official client → BANK OF AI server, BANK OF AI client → Coinbase official server) that you can use as a debugging and integration reference. + --- ### Assets, Networks & Fees @@ -86,7 +96,11 @@ x402 supports three payment schemes: | TRON Mainnet (`tron:mainnet`) | USDD (TRC-20) | **Mainnet** | | TRON Nile (`tron:nile`) | USDD (TRC-20) | **Testnet** | | BSC Mainnet (`eip155:56`) | USDT (BEP-20) | **Mainnet** | +| BSC Mainnet (`eip155:56`) | USDC (BEP-20) | **Mainnet** | +| BSC Mainnet (`eip155:56`) | EPS (BEP-20) | **Mainnet** | | BSC Testnet (`eip155:97`) | USDT (BEP-20) | **Testnet** | +| BSC Testnet (`eip155:97`) | USDC (BEP-20) | **Testnet** | +| BSC Testnet (`eip155:97`) | DHLU (BEP-20, for `exact` interop tests) | **Testnet** | Custom TRC-20 and BEP-20 tokens can also be added via the TokenRegistry. diff --git a/docs/x402/getting-started/quickstart-for-human.md b/docs/x402/getting-started/quickstart-for-human.md index fa78522..f8d074a 100644 --- a/docs/x402/getting-started/quickstart-for-human.md +++ b/docs/x402/getting-started/quickstart-for-human.md @@ -27,7 +27,7 @@ This guide is for developers who want to **call an x402-protected API from code* ### Checklist Before You Start -- [ ] **Python 3.11+** or **Node.js 18+** installed (depending on your chosen language) +- [ ] **Python 3.11+** or **Node.js 20+** installed (depending on your chosen language) - [ ] A dedicated **test wallet** created (see below) - [ ] Test tokens claimed (free) - [ ] A target x402-protected API URL (or use our demo endpoint) diff --git a/docs/x402/index.md b/docs/x402/index.md index 29ef3cf..2dfa8b8 100644 --- a/docs/x402/index.md +++ b/docs/x402/index.md @@ -81,6 +81,8 @@ x402 currently supports the following networks: - **BSC Mainnet** (`eip155:56`) - **BSC Testnet** (`eip155:97`) +> **Protocol interoperability**: Since v0.5.9, the `exact` payment scheme (EVM and TRON) conforms to the v2 specification published by the **x402 Foundation (formerly Coinbase)**, enabling bidirectional interoperability with the x402 Foundation's v2 reference clients and servers. See [SDK Feature Matrix](./sdk-features) and [Network & Token Support](./core-concepts/network-and-token-support#exact-scheme) for details. + --- ## Quick Start diff --git a/docs/x402/sdk-features.md b/docs/x402/sdk-features.md index 94493b0..e7c8065 100644 --- a/docs/x402/sdk-features.md +++ b/docs/x402/sdk-features.md @@ -48,6 +48,8 @@ This page tracks the implementation progress and feature support status of the x | exact/bsc | ✅ | ✅ | | exact_gasfree/tron | ✅ | ✅ | +> **Coinbase x402 v2 compatibility**: Since v0.5.9, the `payload` emitted by the `exact` mechanism (EVM and TRON) aligns with the x402 Foundation (formerly Coinbase) v2 wire format. Stock v2 clients can interoperate with this SDK's server and vice versa. See [Network & Token Support → `exact` Scheme](./core-concepts/network-and-token-support.md#exact-scheme) for details. + --- ## Signers @@ -107,6 +109,8 @@ This page tracks the implementation progress and feature support status of the x | USDD (TRC-20) | ✅ | ✅ | | Custom TRC-20 | ✅ | ✅ | | USDT (BEP-20) | ✅ | ✅ | +| USDC (BEP-20, mainnet & testnet) | ✅ | ✅ | +| DHLU (BSC testnet, for `exact` interop tests) | ✅ | ✅ | | Custom BEP-20 | ✅ | ✅ | --- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/core-concepts/network-and-token-support.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/core-concepts/network-and-token-support.md index c7b829b..4184bb2 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/core-concepts/network-and-token-support.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/core-concepts/network-and-token-support.md @@ -56,10 +56,16 @@ x402 协议全面支持 **TRC-20/BEP-20** 标准代币,并默认将 **USDT** | **USDD** | `tron:mainnet` | `TXDk8mbtRbXeYuMNS83CfKPaYYT8XWv9Hz` | | **USDD** | `tron:nile` | `TGjgvdTWWrybVLaVeFqSyVqJQWjxqRYbaK` | | **USDT** | `eip155:56` | `0x55d398326f99059fF775485246999027B3197955` | +| **USDC** | `eip155:56` | `0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d` | +| **EPS** | `eip155:56` | `0xA7f552078dcC247C2684336020c03648500C6d9F` | | **USDT** | `eip155:97` | `0x337610d27c682E347C9cD60BD4b3b107C9d34dDd` | +| **USDC** | `eip155:97` | `0x64544969ed7EBf5f083679233325356EbE738930` | +| **DHLU** | `eip155:97` | `0x375cADdd2cB68cE82e3D9B075D551067a7b4B816` | > **扩展支持**:协议具有高度的可扩展性。通过在 `TokenRegistry` 中进行注册,您可以轻松配置并支持任意自定义的 TRC-20/BEP-20 代币。 +> **关于 `exact` 方案的代币选择**:`exact` 方案要求代币原生实现 ERC-3009 `transferWithAuthorization`。在 BSC 测试网进行 `exact` 路径互通测试时推荐使用 **DHLU**(Da Hulu)测试代币;`USDT (BEP-20)` 并不原生支持 ERC-3009,请勿在 `exact` 方案中发布 USDT (BSC) 作为代币要求——若需要使用 USDT,请改走 `exact_permit` 方案。 + #### 安全签名 x402 采用类型化数据签名来处理所有支付相关的签名授权。 @@ -96,7 +102,14 @@ x402 支持三种支付方案:`exact_permit`、`exact` 和 `exact_gasfree`。 #### `exact` 方案 -`exact` 方案适用于原生支持 `transferWithAuthorization` 的代币,无需 `PaymentPermit` 合约。 +`exact` 方案适用于原生支持 ERC-3009 `transferWithAuthorization` 的代币,无需 `PaymentPermit` 合约。 + +自 **v0.5.9** 起,EVM 和 TRON 上的 `exact` 方案已遵循 **x402 Foundation(原 Coinbase)** 公布的 v2 协议规范: + +- **V2 链路传输格式 (Wire Format)**:`exact` 的 `payload` 遵循 v2 规范的字段布局和语义,标准 v2 客户端可直接向本 SDK 的服务端发起付款请求,本 SDK 客户端也可直接访问任何 v2 兼容的服务端,无需进行项目特定的转换。 +- **结构化 Authorization**:`nativeExact` / `nativeExactEvm` / `nativeExactTron` 机制已更新,现可生成 V2 兼容的 `payload`(采用包含类型化字段的授权结构,而非此前扁平的十六进制数据块)。转账授权数据位于 `payload.authorization` 中。 +- **迁移过渡兼容**:为降低升级期间的破坏性影响,客户端会同时写入 `payload.authorization`(V2)与 `extensions.transferAuthorization`(V1)两份;服务端则优先读取 `payload.authorization`,并对旧字段保留临时兼容。 +- **BSC 互通测试**:`examples/bsc-testnet-smoke/` 目录提供了 BSC 测试网互通烟雾测试示例(TypeScript 与 Python),已验证 "Coinbase 官方客户端 → BANK OF AI 服务端" 与 "BANK OF AI 客户端 → Coinbase 官方服务端" 双向路径。 #### `exact_gasfree` 方案 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/faq.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/faq.md index f458e79..19c5207 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/faq.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/faq.md @@ -61,9 +61,19 @@ x402 目前提供以下 SDK: x402 支持三种支付方案: -- **`exact_permit`** 和 **`exact`**:两种方案均允许客户端授权一个**最高支付金额**,服务端结算**实际产生的费用**(不超过授权上限)。此方案非常适用于**按量计费 (Metered Billing)**、**LLM Token 消耗**等场景。 +- **`exact_permit`** 和 **`exact`**:两种方案均允许客户端授权一个**最高支付金额**,服务端结算**实际产生的费用**(不超过授权上限)。此方案非常适用于**按量计费 (Metered Billing)**、**LLM Token 消耗**等场景。自 v0.5.9 起,`exact` 方案的协议 `payload` 已遵循 **x402 Foundation(原 Coinbase)** 公布的 v2 规范。 - **`exact_gasfree`**(仅限 TRON):允许买家使用 USDT/USDD 付款而无需持有 TRX 来支付 gas。所有 GasFree API 调用通过 BANK OF AI 代理路由,客户端无需配置 API 密钥。 +#### 本 SDK 是否可以与 x402 Foundation(原 Coinbase)的 v2 参考实现互通? + +**可以。** 自 v0.5.9 起,`exact` 支付方案(EVM 与 TRON)已与 **x402 Foundation(原 Coinbase)** 公布的 v2 协议规范保持一致: + +- 标准的 v2 客户端可以直接访问本 SDK 的 `exact` 受保护端点,无需任何项目特定的适配层。 +- 本 SDK 的客户端可以直接向 v2 兼容的服务端付款。 +- V2 结构中转账授权数据位于 `payload.authorization` 字段(结构化对象);作为迁移过渡,客户端还会同时填充 `extensions.transferAuthorization`,以便仍在运行旧版本的服务端也能解析。 +- 在 BSC 上使用 `exact` 方案时,**必须**选择代币自身原生实现 ERC-3009 `transferWithAuthorization` 的资产,例如 BSC 测试网上的 **DHLU**。BSC USDT 是普通 ERC-20,既不原生支持 ERC-3009 也不原生支持 EIP-2612 permit——如果需要用 USDT 收款,请改用 `exact_permit` 方案(由自研 `PaymentPermit` 代理合约封装,兼容任意 ERC-20)。 +- 仓库中的 `examples/bsc-testnet-smoke/` 目录提供了双向互通的烟雾测试示例(Coinbase 官方客户端 → BANK OF AI 服务端、BANK OF AI 客户端 → Coinbase 官方服务端),可作为调试与集成参考。 + ### 资产、网络及费用 #### 支持哪些资产与网络? @@ -76,7 +86,11 @@ x402 支持三种支付方案: | TRON Mainnet (`tron:mainnet`) | USDD (TRC-20) | **Mainnet** | | TRON Nile (`tron:nile`) | USDD (TRC-20) | **Testnet** | | BSC 主网 (`eip155:56`) | USDT (BEP-20) | **Mainnet** | +| BSC 主网 (`eip155:56`) | USDC (BEP-20) | **Mainnet** | +| BSC 主网 (`eip155:56`) | EPS (BEP-20) | **Mainnet** | | BSC testnet (`eip155:97`) | USDT (BEP-20) | **Testnet** | +| BSC testnet (`eip155:97`) | USDC (BEP-20) | **Testnet** | +| BSC testnet (`eip155:97`) | DHLU (BEP-20, 用于 `exact` 互通测试) | **Testnet** | 此外,支持通过 TokenRegistry 添加自定义的 TRC-20/BEP-20 代币。 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/getting-started/quickstart-for-human.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/getting-started/quickstart-for-human.md index 5a50992..db877d1 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/getting-started/quickstart-for-human.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/getting-started/quickstart-for-human.md @@ -29,7 +29,7 @@ import TabItem from '@theme/TabItem'; 在开始之前,请确认以下条件: -- [ ] 已安装 **Python 3.11+** 或 **Node.js 18+**(根据您选择的语言) +- [ ] 已安装 **Python 3.11+** 或 **Node.js 20+**(根据您选择的语言) - [ ] 已创建一个专用**测试钱包**(见下方说明) - [ ] 已获取测试代币(免费) - [ ] 知道要访问的 x402 付费 API 地址(或使用我们提供的演示地址) diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/index.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/index.md index f8902d7..0e3df2c 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/index.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/index.md @@ -67,6 +67,8 @@ x402 目前支持以下网络环境: - **BSC 主网** (`eip155:56`) - **BSC 测试网** (`eip155:97`) +> **协议互通**:自 v0.5.9 起,`exact` 支付方案(EVM 与 TRON)已与 **x402 Foundation(原 Coinbase)** 公布的 v2 规范保持一致,支持与 x402 Foundation 的 v2 参考客户端/服务端双向互通。详见 [SDK 功能特性](./sdk-features.md) 与 [网络与代币支持](./core-concepts/network-and-token-support.md#exact-方案)。 + ## 快速开始 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/sdk-features.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/sdk-features.md index fc285b1..99e94c1 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/sdk-features.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/x402/sdk-features.md @@ -38,6 +38,8 @@ | exact/bsc | ✅ | ✅ | | exact_gasfree/tron | ✅ | ✅ | +> **Coinbase x402 v2 兼容**:自 v0.5.9 起,`exact` 机制(EVM 与 TRON)的 `payload` 已对齐 x402 Foundation(原 Coinbase)v2 链路传输格式。标准 v2 客户端可直接与本 SDK 服务端互通,反之亦然。详见 [网络与代币支持 → `exact` 方案](./core-concepts/network-and-token-support.md#exact-方案)。 + ## 签名器 | 签名器 | Python | TypeScript | @@ -87,6 +89,8 @@ | USDD (TRC-20) | ✅ | ✅ | | 自定义 TRC-20 | ✅ | ✅ | | USDT (BEP-20) | ✅ | ✅ | +| USDC (BEP-20,主网/测试网) | ✅ | ✅ | +| DHLU (BSC 测试网,用于 `exact` 互通测试) | ✅ | ✅ | | 自定义 BEP-20 | ✅ | ✅ | ## 图例 From d2aabeefc944ec5115f25e2a6ffe089f0c1d9ac2 Mon Sep 17 00:00:00 2001 From: jerryji-prog Date: Wed, 22 Apr 2026 19:30:40 +0800 Subject: [PATCH 2/2] update skills --- docs/BANK-OF-AI/QuickStart.md | 2 +- docs/McpServer-Skills/SKILLS/BANKOFAISkill.md | 74 ++++++-- docs/McpServer-Skills/SKILLS/Faq.md | 28 +-- docs/McpServer-Skills/SKILLS/Intro.md | 16 +- docs/McpServer-Skills/SKILLS/QuickStart.md | 165 ++++++++++++++---- .../current/BANK-OF-AI/QuickStart.md | 2 +- .../McpServer-Skills/SKILLS/BANKOFAISkill.md | 73 ++++++-- .../current/McpServer-Skills/SKILLS/Faq.md | 28 +-- .../current/McpServer-Skills/SKILLS/Intro.md | 14 +- .../McpServer-Skills/SKILLS/QuickStart.md | 165 ++++++++++++++---- 10 files changed, 445 insertions(+), 122 deletions(-) diff --git a/docs/BANK-OF-AI/QuickStart.md b/docs/BANK-OF-AI/QuickStart.md index 90821a4..63a1c66 100644 --- a/docs/BANK-OF-AI/QuickStart.md +++ b/docs/BANK-OF-AI/QuickStart.md @@ -69,7 +69,7 @@ The AI will install the Skills and then ask whether to create a wallet. > > **A. Create now (recommended, ~10 seconds)** > - Quick setup, secure password auto-generated -> - Ready to use every BankOfAI feature right after creation +> - Ready to use every BANK OF AI feature right after creation > > **B. Create later** > - You can run `bankofai-guide` again any time to continue setup diff --git a/docs/McpServer-Skills/SKILLS/BANKOFAISkill.md b/docs/McpServer-Skills/SKILLS/BANKOFAISkill.md index 1b000d6..61da752 100644 --- a/docs/McpServer-Skills/SKILLS/BANKOFAISkill.md +++ b/docs/McpServer-Skills/SKILLS/BANKOFAISkill.md @@ -17,15 +17,16 @@ BANK OF AI SKILLS can operate on **real on-chain assets**. Blockchain transactio | Skill | What It Does | What Key/Credential Do I Need? | | :--- | :--- | :--- | | **agent-wallet** | Create wallets, sign transactions/messages, manage multiple wallets — supports EVM and TRON | `AGENT_WALLET_PASSWORD` (encrypted mode) or none (interactive) | -| **sunswap** | Check prices, get quotes, swap tokens, manage liquidity pools | Read-only: none. Trading: wallet credentials | +| **sunswap** | Check prices, get quotes, swap tokens, manage V2/V3/V4 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 | | **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 | +| **x402-payment** | On-chain "pay-first" auto-settlement on TRON (TRC20) & BSC (ERC20), with GasFree support | Wallet credentials (via agent-wallet) | | **recharge-skill** | Balance, order history, account top-up | BANK OF AI API key | +| **bankofai-guide** | Onboarding helper — post-install setup, first AgentWallet creation, wallet guard for other skills | None (runs automatically when needed) | ### 🔑 Where Do I Get These Keys? How Do I Set Them Up? @@ -67,7 +68,7 @@ Head over to **[Quick Start](./QuickStart.md)** — it takes about 1 minute. Com ## agent-wallet {#agent-wallet} -Your AI's secure signing engine. This skill creates and manages encrypted wallets for your AI agent, letting it sign transactions and messages on both EVM (BSC, Ethereum, Polygon, etc.) and TRON networks — without ever exposing your private key. Think of it as the "keychain" that all other trading and payment skills rely on. +Your AI's secure signing engine. This skill creates and manages encrypted wallets for your AI agent, letting it sign transactions and messages on both EVM (BSC, Ethereum, Polygon, Arbitrum, Base, etc.) and TRON networks — without ever exposing your private key. Think of it as the "keychain" that all other trading and payment skills rely on. Requires Node.js 20+. **Completely safe — looking only, no spending:** @@ -87,18 +88,18 @@ Your AI's secure signing engine. This skill creates and manages encrypted wallet **Real-world scenarios:** -> Setting up for the first time? Try: "Create a new agent wallet" — the AI walks you through choosing a wallet type, generating keys, and saving your master password. +> Setting up for the first time? Try: "Create a new agent wallet" — the AI walks you through choosing a wallet type (`local_secure` for an encrypted local key, or `privy` for a hosted wallet via API credentials), generating keys, and saving your master password. -> Managing multiple chains? Try: "Show me all my wallets and their addresses" — one wallet derives both EVM and TRON addresses from the same key. +> Managing multiple chains? Try: "Show me all my wallets and their addresses" — one wallet derives both EVM and TRON addresses from the same key. Use `eip155:` for EVM networks (e.g. `eip155:1` Ethereum, `eip155:56` BSC, `eip155:137` Polygon, `eip155:42161` Arbitrum, `eip155:8453` Base) and `tron:mainnet` / `tron:nile` for TRON. -> Need to sign something? Try: "Sign this transaction on BSC" — the AI handles the signing locally without broadcasting. +> Need to sign something? Try: "Sign this transaction on BSC" — the AI handles the signing locally without broadcasting. Supports raw transactions, EIP-191 messages, and EIP-712 typed data (EVM only). :::tip Why use Agent Wallet instead of raw private keys? Agent Wallet encrypts your private key with a master password. Even if someone accesses your files, they can't use the key without the master password. This is the recommended way to configure wallet credentials for all other skills (sunswap, x402-payment, etc.). ::: :::caution Dangerous operations are agent-restricted -`remove`, `reset`, and `change-password` cannot be executed by the AI — you must run these commands yourself in the terminal. This protects against accidental or irreversible loss of wallet access. +`remove`, `reset`, and `change-password` cannot be executed by the AI — you must run these commands yourself in the terminal. This protects against accidental or irreversible loss of wallet access. The AI will explain the command and ask you to run it yourself. ::: For detailed setup instructions, see [Agent Wallet Quick Start](../../Agent-Wallet/QuickStart.md). @@ -107,7 +108,7 @@ For detailed setup instructions, see [Agent Wallet Quick Start](../../Agent-Wall ## sunswap {#sunswap} -Want to swap tokens, check rates, or manage liquidity on SunSwap? Just tell the AI. +Want to swap tokens, check rates, or manage liquidity on SunSwap? Just tell the AI. This skill is powered by `@bankofai/sun-cli` and supports swaps plus V2 AMM, V3 concentrated liquidity, and V4 hooks-enabled pools. **Completely safe — looking only, no spending:** @@ -125,6 +126,10 @@ Want to swap tokens, check rates, or manage liquidity on SunSwap? Just tell the > Add 100 TRX and 15 USDT liquidity to the TRX/USDT pool on SunSwap V2. +> Mint a V3 position: TRX/USDT, fee tier 0.3%, full-range. + +> Mint a V4 position with `--create-pool` if the pool doesn't exist yet. + > Collect fee rewards from V3 position #12345. **Real-world scenarios:** @@ -135,11 +140,15 @@ Want to swap tokens, check rates, or manage liquidity on SunSwap? Just tell the > Looking to buy the dip? Try: "What's TRX's price trend over the last 7 days?" +:::tip V3 fee tiers & tick alignment +V3 only accepts fee tiers `100`, `500`, `3000`, or `10000` (0.01% / 0.05% / 0.3% / 1%). `--tick-lower` and `--tick-upper` must be multiples of the fee's tick spacing (1 / 10 / 60 / 200). The AI validates these before minting — misaligned ticks would otherwise fail on-chain. +::: + --- ## 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. +Want to trade contracts? This skill handles market data, opening positions, closing positions, and setting stop-loss on SunPerp. Built-in safety locks enforced at the script level: max 20x leverage (configurable in `resources/sunperp_config.json`) and a **mandatory stop-loss on every position-opening order** — auto-set to 5% from entry if you don't specify one, and rejected outright if wider than 25%. Close-position orders (`reduce_only`) are themselves risk-reducing, so they're exempt from the mandatory stop-loss. **Completely safe — looking only, no spending:** @@ -364,11 +373,29 @@ Changing Owner permissions is **irreversible** without the new keys. The skill v ## 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. +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. Supports payments on multiple chains — **TRON (TRC20: USDT, USDD)** and **BSC (ERC20: USDT, USDC)** (each payment settles on its own chain; this is multi-chain support, not a cross-chain bridge), covering both mainnet and testnet (Nile / BSC testnet). + +**Completely safe — looking only, no spending:** + +> Verify my x402 wallet status (addresses + readiness). + +> Show my GasFree wallet info (address, activation status, balances). + +> Fetch the manifest for this x402 agent: https://api.example.com/.well-known/agent.json **Requires your confirmation:** -> Use x402 protocol to call this paid agent endpoint: https://api.example.com (replace with the actual paid endpoint URL you want to call) +> 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) + +> Activate my GasFree account on nile with USDT. + +:::tip GasFree support (TRON) +The skill prefers the `exact_gasfree` scheme over `exact_permit` when paying on TRON. GasFree requires an activated account with enough token balance in the GasFree wallet — use `--gasfree-info` to check, and `--gasfree-activate` if it's not active yet. +::: + +:::caution Wallet credentials come from agent-wallet +This skill loads signers via `agent-wallet` only — it does **not** read raw private keys from random config files. Set `AGENT_WALLET_PASSWORD` for encrypted local mode, or `AGENT_WALLET_PRIVATE_KEY` / `AGENT_WALLET_MNEMONIC` for static mode. Requires Node.js 20+. +::: --- @@ -386,6 +413,31 @@ Check your balance, view order history, or top up your account. > Recharge 1 USDT to my BANK OF AI account. +--- + +## bankofai-guide {#bankofai-guide} + +The onboarding companion that ties the rest of the skill set together. You don't typically invoke this skill directly — it kicks in automatically in three situations: + +1. **Post-install setup.** Right after you run `npx skills add BofAI/skills`, the installer hands off to `bankofai-guide`. It installs the `@bankofai/agent-wallet` CLI globally, checks whether you already have a wallet, and asks whether you want to set one up now or later. +2. **First-wallet creation.** If you have no wallet yet, it offers two paths: a **quick setup** (strongly recommended — fully automated, takes ~10 seconds, generates an encrypted `local_secure` wallet and a strong random password) and a **detailed setup** (step-by-step walkthrough with custom options). Once your wallet is ready, it shows you both the EVM and TRON addresses and tells you where to deposit USDT. +3. **Wallet guard.** Signing skills (`sunswap`, `sunperp-skill`, `trc20-toolkit-skill`, `multisig-permissions`, `x402-payment`) run `agent-wallet list` first to check wallet state before any on-chain operation. **Only when no wallet is found** do they hand off to `bankofai-guide`, which pauses the current operation, walks you through creating one in a minute or two, and then returns control to the original flow. + +**Sample prompts that will activate it:** + +> Walk me through BANK OF AI onboarding. + +> Run bankofai-guide so I can set up my first wallet. + +> Help me create an AgentWallet with quick setup. + +:::tip Why this skill exists +Most Web3 stumbles happen on day one — no wallet configured, no idea where to deposit funds, no sense of which address belongs to which chain. `bankofai-guide` compresses that whole journey into a handful of confirmations so the rest of your skills can just work. +::: + +:::caution Your password matters +The quick setup auto-generates a strong password and stores it in `~/.agent-wallet/runtime_secrets.json` for convenience. Save or memorize it anyway — if that file is ever deleted, the password is the only way to recover access to the encrypted wallet. +::: --- diff --git a/docs/McpServer-Skills/SKILLS/Faq.md b/docs/McpServer-Skills/SKILLS/Faq.md index 50550bc..9a55fd1 100644 --- a/docs/McpServer-Skills/SKILLS/Faq.md +++ b/docs/McpServer-Skills/SKILLS/Faq.md @@ -11,15 +11,15 @@ Questions are ordered by urgency — the ones you're most likely to hit first ar Tell the AI exactly where to find the skill file: ``` -Please read ~/.openclaw/skills/sunswap/SKILL.md and check the current price of TRX. +Please read ~/.agents/skills/sunswap-dex-trading/SKILL.md and check the current price of TRX. ``` If that works, the issue was just the AI's auto-matching. Add clearer keywords next time, like "use the sunswap skill." If that doesn't work either, check these in order: -1. Does the skill directory exist? Run `ls ~/.openclaw/skills` in your terminal. -2. Are dependencies installed? Go to the skill folder and run `npm install` (e.g., `cd ~/.openclaw/skills/tronscan-skill && npm install`). +1. Does the skill directory exist? Run `ls ~/.agents/skills` in your terminal. +2. Are dependencies installed? Go to the skill folder and run `npm install` (e.g., `cd ~/.agents/skills/tronscan-data-lookup && npm install`). 3. Are credentials configured? See [How do I configure credentials?](#how-do-i-configure-credentials) below. ### Installation failed @@ -37,10 +37,10 @@ Run `node --version` in your terminal. Skills require **v20 or higher**. If your Run this in your terminal: ```bash -ls ~/.openclaw/skills +ls ~/.agents/skills ``` -You should see directory names like `sunswap`, `sunperp-skill`, `tronscan-skill`, `trc20-toolkit-skill`, `multisig-permissions`, `x402-payment`, `recharge-skill`. +You should see 11 directory names: `agent-wallet`, `sunswap-dex-trading`, `sunperp-perpetual-futures-trading`, `tronscan-data-lookup`, `trc20-token-toolkit`, `usdd-just-protocol`, `trx-staking-sr-voting`, `multi-sig-account-permissions`, `x402-payment`, `recharge-skill`, and `bankofai-guide`. Then verify in your AI chat: @@ -126,19 +126,27 @@ If you're comfortable with the command line, you can store credentials in your s Add the variables for the skills you need: ```bash -# SunSwap trading (needed for swap operations) +# SunSwap trading, TRC20 toolkit, USDD PSM, TRX staking, multisig +# (any skill that spends on-chain funds) export TRON_PRIVATE_KEY="your_private_key" export TRONGRID_API_KEY="your_TronGrid_API_key" +export TRON_NETWORK="mainnet" # or "nile" / "shasta" for testnet # SunPerp perpetual contracts export SUNPERP_ACCESS_KEY="your_SunPerp_Access_Key" export SUNPERP_SECRET_KEY="your_SunPerp_Secret_Key" -# TronScan data queries +# TronScan data queries (optional — BANK OF AI proxy works without a key) export TRONSCAN_API_KEY="your_TronScan_API_Key" -# BANK OF AI account +# BANK OF AI account (recharge-skill) export BANKOFAI_API_KEY="your_BANKOFAI_API_Key" + +# agent-wallet (if you use encrypted local mode for x402-payment / signing) +export AGENT_WALLET_PASSWORD="your_master_password" + +# multisig-permissions hybrid flow (review.js --sign) +export TRON_HUMAN_PRIVATE_KEY="your_human_reviewer_key" ``` @@ -155,14 +163,14 @@ Currently: **OpenClaw** (most seamless), and any AI assistant that can read loca Absolutely. Skills are just regular folders on your computer. Edit anything you want. -For example, if you think 20x leverage is still too risky for perpetual trading, open `~/.openclaw/skills/sunperp-skill/resources/sunperp_config.json` and lower the number. Your AI, your rules. +For example, if you think 20x leverage is still too risky for perpetual trading, open `~/.agents/skills/sunperp-perpetual-futures-trading/resources/sunperp_config.json` and lower the number. Your AI, your rules. ### How do I uninstall or update? **Uninstall:** Delete the folder. ```bash -rm -rf ~/.openclaw/skills/sunswap +rm -rf ~/.agents/skills/sunswap-dex-trading ``` **Update:** Re-run the install command. It will update all skills to the latest version. diff --git a/docs/McpServer-Skills/SKILLS/Intro.md b/docs/McpServer-Skills/SKILLS/Intro.md index 078af66..9d978ea 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? -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. +Eleven skills in total — covering the most common scenarios in the TRON ecosystem, plus a dedicated onboarding helper. 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 @@ -77,7 +77,7 @@ Check prices, compare rates, even swap tokens in one go. ### 📈 Trade Perpetual Contracts -View market data, open and close positions on SunPerp. Built-in safety lock: max 20x leverage, mandatory stop-loss on every position — keeps you from blowing up your account. +View market data, open and close positions on SunPerp. Built-in safety locks: max 20x leverage (configurable) and a mandatory stop-loss on every position-opening order — auto-set to 5% from entry if omitted, and rejected if wider than 25%. Keeps you from blowing up your account. > 🗣️ "What's BTC's funding rate right now? Open a 5x long position with a 5% stop-loss." @@ -93,7 +93,7 @@ Look up accounts, transactions, and check if a new token is legit. Pure read-onl ### 💸 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 balances, transfer tokens, manage approvals — supports common tokens like USDT, USDD, SUN, and can also operate any TRC20 token via its contract address. Supports batch balance checks. > 🗣️ "Check my USDT, USDD, and SUN balances. Then transfer 10 USDT to TRecipientAddress." @@ -125,7 +125,7 @@ Set up multi-signature security for your TRON account — configure keys, thresh ### ☕ Auto-Settle On-Chain Paid Services -When the AI needs to call a paid on-chain service or data API, it uses the x402 protocol to automatically complete "pay first, then receive" on-chain settlement — no manual QR scanning or wallet switching needed. +When the AI needs to call a paid on-chain service or data API, it uses the x402 protocol to automatically complete "pay first, then receive" on-chain settlement — no manual QR scanning or wallet switching needed. Multi-chain support — TRON (TRC20: USDT, USDD, with GasFree) and BSC (ERC20: USDT, USDC) both work; just switch the `--network` parameter. > 🗣️ "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) @@ -139,6 +139,14 @@ Check your BANK OF AI balance and top up with a single sentence. 💡 For top-up and withdrawal rules, see: [**recharge-skill**](./BANKOFAISkill.md#recharge-skill) +### 🧭 Onboarding Guide (bankofai-guide) + +A lightweight companion skill that runs the post-install setup flow, helps you create your first AgentWallet, and acts as a "wallet guard" before any on-chain operation — reminding you to set up a wallet if none exists. You don't usually call it directly; it gets invoked automatically by the installer and by other skills when needed. + +> 🗣️ "Walk me through BANK OF AI onboarding." or "Run bankofai-guide so I can set up my first wallet." + +💡 For the full onboarding flow, see: [**bankofai-guide**](./BANKOFAISkill.md#bankofai-guide) + --- ## 🎯 Are These Skills Right for Me? diff --git a/docs/McpServer-Skills/SKILLS/QuickStart.md b/docs/McpServer-Skills/SKILLS/QuickStart.md index 594a4fc..e0a848d 100644 --- a/docs/McpServer-Skills/SKILLS/QuickStart.md +++ b/docs/McpServer-Skills/SKILLS/QuickStart.md @@ -28,8 +28,8 @@ If you're already using a Skills-compatible AI Agent (OpenClaw, a Telegram bot, 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.) + - Detects your current Agent's skills directory (e.g. `~/.agents/skills/`) + - Installs all 11 BANK OF AI skills: the 10 core skills (`agent-wallet`, `sunswap-dex-trading`, `sunperp-perpetual-futures-trading`, `tronscan-data-lookup`, `trc20-token-toolkit`, `usdd-just-protocol`, `trx-staking-sr-voting`, `multi-sig-account-permissions`, `x402-payment`, `recharge-skill`) plus `bankofai-guide` (the onboarding helper) :::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. @@ -80,12 +80,13 @@ 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 8 skills +◇ Found 11 skills │ ◇ Select skills to install (space to toggle) -│ agent-wallet, Multi-Sig & Account Permissions, recharge-skill, -│ SunPerp Perpetual Futures Trading, SunSwap DEX Trading, -│ TRC20 Token Toolkit, TronScan Data Lookup, x402-payment +│ agent-wallet, bankofai-guide, Multi-Sig & Account Permissions, +│ recharge-skill, SunPerp Perpetual Futures Trading, SunSwap DEX Trading, +│ TRC20 Token Toolkit, TronScan Data Lookup, TRX Staking & SR Voting, +│ USDD / JUST Protocol, x402-payment ``` :::tip Select all @@ -97,10 +98,12 @@ Unless you're sure you only need specific skills, install them all. Skills use a The installer auto-detects AI tools on your computer (e.g., Cursor, Claude Code, Cline, etc.). Use Space to select the ones you want: ``` -◇ 43 agents +◇ 45 agents ◇ Which agents do you want to install to? │ Amp, Antigravity, Cline, Codex, Cursor, Deep Agents, │ Gemini CLI, GitHub Copilot, Kimi Code CLI, OpenCode, Warp +│ +● Installing to: Antigravity, Claude Code, Cursor, Gemini CLI, GitHub Copilot ``` **4️⃣ Choose installation scope** @@ -112,48 +115,138 @@ Select `Project` (current project only) or `User` (globally available across all │ Project ``` -**5️⃣ Review security assessment & confirm** +**5️⃣ Review the installation plan** + +The installer shows a summary of where each Skill will land and, for each target tool, whether it'll be a full copy (`universal`) or a symlink: + +``` +◇ Installation Summary ──────────────────────────────────────────────────────╮ +│ │ +│ ~/.agents/skills/agent-wallet │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +│ ~/.agents/skills/bankofai-guide │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +│ ~/.agents/skills/multi-sig-account-permissions │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +│ ~/.agents/skills/recharge-skill │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +│ ~/.agents/skills/sunperp-perpetual-futures-trading │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +│ ~/.agents/skills/sunswap-dex-trading │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +│ ~/.agents/skills/trc20-token-toolkit │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +│ ~/.agents/skills/tronscan-data-lookup │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +│ ~/.agents/skills/trx-staking-sr-voting │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +│ ~/.agents/skills/usdd-just-protocol │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +│ ~/.agents/skills/x402-payment │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +├─────────────────────────────────────────────────────────────────────────────╯ +``` + +:::tip universal vs symlink +Tools that follow the generic skills layout get a **universal** copy under `~/.agents/skills/`. Claude Code uses its own convention, so the installer creates a **symlink** pointing back to the universal copy — one source of truth, both places stay in sync. +::: + +**6️⃣ Review security assessment & confirm** The installer runs a security scan on each Skill and shows the results. Review them and select `Yes` to proceed: ``` -◇ Security Risk Assessments ──────────────────────────────────────╮ -│ │ -│ Gen Socket Snyk │ -│ agent-wallet Med Risk 1 alert High Risk │ -│ 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 1 alert Med Risk │ -│ │ -├──────────────────────────────────────────────────────────────────╯ +◇ Security Risk Assessments ────────────────────────────────────────────────────────╮ +│ │ +│ Gen Socket Snyk │ +│ agent-wallet Safe 0 alerts High Risk │ +│ bankofai-guide Med Risk 1 alert High Risk │ +│ Multi-Sig & Account Permissions -- -- -- │ +│ recharge-skill Safe 1 alert Med Risk │ +│ SunPerp Perpetual Futures Trading -- -- -- │ +│ SunSwap DEX Trading -- -- -- │ +│ TRC20 Token Toolkit -- -- -- │ +│ TronScan Data Lookup -- -- -- │ +│ TRX Staking & SR Voting -- -- -- │ +│ USDD / JUST Protocol -- -- -- │ +│ x402-payment Safe 1 alert Med Risk │ +│ │ +│ Details: https://skills.sh/BofAI/skills │ +│ │ +├────────────────────────────────────────────────────────────────────────────────────╯ ◇ Proceed with installation? │ Yes ``` -**6️⃣ Installation complete!** +**7️⃣ Installation complete!** When you see output like this, all Skills have been successfully installed to your selected AI tools: ``` -◇ Installed 8 skills ────────────────────────╮ -│ │ -│ ✓ agent-wallet (copied) │ -│ ✓ 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) │ -│ │ -├─────────────────────────────────────────────╯ - -└ Done! +◇ Installation complete + +◇ Installed 11 skills ───────────────────────────────────────────────────────╮ +│ │ +│ ✓ ~/.agents/skills/agent-wallet │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ ✓ ~/.agents/skills/bankofai-guide │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ ✓ ~/.agents/skills/multi-sig-account-permissions │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ ✓ ~/.agents/skills/recharge-skill │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ ✓ ~/.agents/skills/sunperp-perpetual-futures-trading │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ ✓ ~/.agents/skills/sunswap-dex-trading │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ ✓ ~/.agents/skills/trc20-token-toolkit │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ ✓ ~/.agents/skills/tronscan-data-lookup │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ ✓ ~/.agents/skills/trx-staking-sr-voting │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ ✓ ~/.agents/skills/usdd-just-protocol │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ ✓ ~/.agents/skills/x402-payment │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ │ +├─────────────────────────────────────────────────────────────────────────────╯ + +└ Done! Review skills before use; they run with full agent permissions. ``` :::tip Optional: Install find-skills 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 index adcad31..b78b76f 100644 --- 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 @@ -69,7 +69,7 @@ AI 会自动安装 Skills,随后问你是否创建钱包。 > > **A. 立即创建(推荐,约 10 秒)** > - 快速设置,自动生成安全密码 -> - 创建后即可使用所有 BankOfAI 功能 +> - 创建后即可使用所有 BANK OF AI 功能 > > **B. 稍后再创建** > - 可以稍后再次运行 `bankofai-guide` 继续设置 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 d4a650c..4e483cf 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 @@ -17,15 +17,16 @@ BANK OF AI SKILLS 可以操作**真实的链上资产**。区块链交易一旦 | 技能 | 能干什么 | 需要什么钥匙/密码? | | :--- | :--- | :--- | | **agent-wallet** | 创建钱包、签名交易/消息、管理多个钱包——支持 EVM 和 TRON | `AGENT_WALLET_PASSWORD`(加密模式)或无需配置(交互模式) | -| **sunswap** | 查价、报价、换币、管理流动性池 | 查询不需要;交易需要钱包凭证 | +| **sunswap** | 查价、报价、换币,管理 V2/V3/V4 流动性池 | 查询不需要;交易需要钱包凭证 | | **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** | 链上"先付后用"自动结算 | 需要钱包凭证 | +| **x402-payment** | 链上"先付后用"自动结算,支持 TRON(TRC20)与 BSC(ERC20),含 GasFree | 通过 agent-wallet 提供钱包凭证 | | **recharge-skill** | 查余额、看订单、充值 | 需要 BANK OF AI 密钥 | +| **bankofai-guide** | 引导辅助技能——安装后首次配置、首个 AgentWallet 创建、其它技能的钱包守门员 | 无需配置(需要时自动触发) | ### 🔑 这些"钥匙"去哪领?怎么配? @@ -67,7 +68,7 @@ BANK OF AI SKILLS 可以操作**真实的链上资产**。区块链交易一旦 ## agent-wallet {#agent-wallet} -AI 的安全签名引擎。这个技能帮你的 AI 创建和管理加密钱包,让它能在 EVM(BSC、Ethereum、Polygon 等)和 TRON 网络上签名交易和消息——全程不暴露你的私钥。你可以把它理解成所有交易和支付技能依赖的"钥匙串"。 +AI 的安全签名引擎。这个技能帮你的 AI 创建和管理加密钱包,让它能在 EVM(BSC、Ethereum、Polygon、Arbitrum、Base 等)和 TRON 网络上签名交易和消息——全程不暴露你的私钥。你可以把它理解成所有交易和支付技能依赖的"钥匙串"。需要 Node.js 20+。 **绝对安全,只看不花钱:** @@ -87,18 +88,18 @@ AI 的安全签名引擎。这个技能帮你的 AI 创建和管理加密钱包 **实战场景:** -> 第一次设置? "帮我创建一个新的 agent 钱包"——AI 会引导你选择钱包类型、生成密钥并保存主密码。 +> 第一次设置? "帮我创建一个新的 agent 钱包"——AI 会引导你选择钱包类型(`local_secure` 是加密的本地私钥,`privy` 则是通过 API 凭证接入的托管钱包)、生成密钥并保存主密码。 -> 管理多条链? "帮我看看所有钱包和它们的地址"——同一个钱包会自动生成 EVM 和 TRON 两个地址。 +> 管理多条链? "帮我看看所有钱包和它们的地址"——同一个钱包会自动生成 EVM 和 TRON 两个地址。EVM 网络使用 `eip155:`(如 `eip155:1` 以太坊、`eip155:56` BSC、`eip155:137` Polygon、`eip155:42161` Arbitrum、`eip155:8453` Base),TRON 使用 `tron:mainnet` / `tron:nile`。 -> 需要签名? "帮我在 BSC 上签名这笔交易"——AI 在本地完成签名,不会广播上链。 +> 需要签名? "帮我在 BSC 上签名这笔交易"——AI 在本地完成签名,不会广播上链。支持原始交易、EIP-191 消息以及 EIP-712 typed data(仅 EVM)。 :::tip 为什么推荐用 Agent Wallet 而不是直接贴私钥? Agent Wallet 会用主密码加密你的私钥。即使别人拿到了你的文件,没有主密码也用不了。这是给所有其他技能(sunswap、x402-payment 等)配置钱包凭证的推荐方式。 ::: :::caution 危险操作受限 -`remove`(删除钱包)、`reset`(重置所有数据)和 `change-password`(修改密码)这三个命令 AI 不能执行——你必须自己在终端里运行。这是为了防止误操作导致不可逆的钱包丢失。 +`remove`(删除钱包)、`reset`(重置所有数据)和 `change-password`(修改密码)这三个命令 AI 不能执行——你必须自己在终端里运行。这是为了防止误操作导致不可逆的钱包丢失。AI 会给你完整解释并让你自己复制命令执行。 ::: 详细设置步骤请参考 [Agent Wallet 快速开始](../../Agent-Wallet/QuickStart.md)。 @@ -107,7 +108,7 @@ Agent Wallet 会用主密码加密你的私钥。即使别人拿到了你的文 ## sunswap {#sunswap} -想在 SunSwap 上换币、查行情、管理流动性?对 AI 说下面的话就行。 +想在 SunSwap 上换币、查行情、管理流动性?对 AI 说下面的话就行。本技能基于 `@bankofai/sun-cli`,同时支持换币、V2 AMM、V3 集中流动性以及带 hooks 的 V4 池子。 **绝对安全,只看不花钱:** @@ -125,6 +126,10 @@ Agent Wallet 会用主密码加密你的私钥。即使别人拿到了你的文 > 在 SunSwap V2 的 TRX/USDT 池中添加 100 TRX 和 15 USDT 的流动性。 +> 铸造一个 V3 仓位:TRX/USDT,0.3% 费率,全价格区间。 + +> 铸造 V4 仓位,如果池子不存在就用 `--create-pool` 一并创建。 + > 帮我收取 V3 仓位 #12345 的手续费奖励。 **实战场景:** @@ -135,11 +140,15 @@ Agent Wallet 会用主密码加密你的私钥。即使别人拿到了你的文 > 想抄底? "TRX 的价格现在处于什么位置?帮我查一下最近 7 天的走势。" +:::tip V3 费率档位与 tick 对齐 +V3 仅支持 `100`、`500`、`3000`、`10000` 四档费率(对应 0.01% / 0.05% / 0.3% / 1%)。`--tick-lower` 与 `--tick-upper` 必须是对应费率的 tick 间距(1 / 10 / 60 / 200)的整数倍。AI 会在铸造前帮你校验,未对齐的 tick 会在链上直接失败。 +::: + --- ## sunperp-skill {#sunperp-skill} -想做合约?这个技能帮你看行情、开仓、平仓、设止损。内置安全锁:最高 20 倍杠杆,开仓必须设止损——默认帮你守住底线,亏损超过 5% AI 会自动帮你跑路,防止爆仓。 +想做合约?这个技能帮你看行情、开仓、平仓、设止损。脚本层硬编码的安全锁:最高 20 倍杠杆(可在 `resources/sunperp_config.json` 里调整)、**每次开仓都必须带止损**——你没指定时默认设在距开仓价 5% 的位置,超过 25% 的止损距离会被直接拒绝。平仓单(`reduce_only`)本身就是在降低风险,所以免除强制止损。 **绝对安全,只看不花钱:** @@ -364,12 +373,30 @@ PSM 支持 **USDT ↔ USDD 即时 1:1 兑换**——是获取 USDD 最简单的 ## x402-payment {#x402-payment} -有些高级 API 和 AI 智能体是收费的——需要你先完成链上付费才能使用。这个技能通过 x402 协议帮你自动完成"先付费、再获取"的链上结算流程:AI 发现对方要收费,自动帮你完成链上支付,拿到结果后汇报给你。每次付款前同样会先问你确认。 +有些高级 API 和 AI 智能体是收费的——需要你先完成链上付费才能使用。这个技能通过 x402 协议帮你自动完成"先付费、再获取"的链上结算流程:AI 发现对方要收费,自动帮你完成链上支付,拿到结果后汇报给你。每次付款前同样会先问你确认。支持多条链付款——**TRON(TRC20:USDT、USDD)**和 **BSC(ERC20:USDT、USDC)** 都可选(付款各自在对应链上结算,不是跨链桥接),主网与测试网(Nile / BSC testnet)均兼容。 + +**绝对安全,只看不花钱:** + +> 验证一下我的 x402 钱包状态(地址和就绪情况)。 + +> 查一下我的 GasFree 钱包信息(地址、激活状态、余额)。 + +> 帮我拉取这个 x402 智能体的 manifest:https://api.example.com/.well-known/agent.json **需要你确认才会执行:** > 使用 x402 协议调用这个付费智能体端点:https://api.example.com (请替换为你实际要调用的付费端点地址) +> 在 nile 上用 USDT 激活我的 GasFree 账户。 + +:::tip GasFree 支持(TRON) +在 TRON 上付款时,技能会优先选择 `exact_gasfree` 方案(比 `exact_permit` 更便宜)。GasFree 需要账户已激活且 GasFree 钱包里有足够余额——用 `--gasfree-info` 检查,没激活就用 `--gasfree-activate` 激活。 +::: + +:::caution 钱包凭证来自 agent-wallet +这个技能只通过 `agent-wallet` 加载签名凭证,**不会**从其他随意的配置文件里读取明文私钥。加密本地模式请设置 `AGENT_WALLET_PASSWORD`,静态模式请设置 `AGENT_WALLET_PRIVATE_KEY` 或 `AGENT_WALLET_MNEMONIC`。需要 Node.js 20+。 +::: + --- ## recharge-skill {#recharge-skill} @@ -388,6 +415,32 @@ PSM 支持 **USDT ↔ USDD 即时 1:1 兑换**——是获取 USDD 最简单的 --- +## bankofai-guide {#bankofai-guide} + +把整套技能串起来的引导助手。你通常不需要主动调用它——它会在下面三种场景里自动登场: + +1. **安装后首次配置。** 你一跑完 `npx skills add BofAI/skills`,安装器就会把控制权交给 `bankofai-guide`。它会全局安装 `@bankofai/agent-wallet` CLI,检查你是否已经有钱包,并询问你是现在就创建一个,还是稍后再说。 +2. **首个钱包创建。** 如果你还没钱包,它会给你两条路:**快速模式**(强烈推荐——全自动,约 10 秒搞定,生成加密的 `local_secure` 钱包和一个强随机密码)和**详细模式**(一步一步走,自定义选项更多)。钱包就绪后,它会把 EVM 地址和 TRON 地址一起展示给你,并告诉你该往哪充 USDT。 +3. **钱包守门员。** 需要签名的技能(`sunswap`、`sunperp-skill`、`trc20-toolkit-skill`、`multisig-permissions`、`x402-payment`)在执行链上操作之前会先跑 `agent-wallet list` 自查钱包状态;**只有在发现没有钱包时**,才会调用 `bankofai-guide` 暂停当前操作,用一两分钟帮你补上,然后回到原来的流程。 + +**可以触发它的参考话术:** + +> 带我走一遍 BANK OF AI 的新手引导。 + +> 运行 bankofai-guide,帮我配第一个钱包。 + +> 用快速模式帮我创建一个 AgentWallet。 + +:::tip 为什么要有这个技能? +大部分 Web3 新手都会卡在第一天——钱包没配、不知道该往哪充钱、也搞不清哪个地址属于哪条链。`bankofai-guide` 把整段路压缩成了几次简单的确认,让你的其他技能能够"开箱即用"。 +::: + +:::caution 密码很重要 +快速模式会自动生成一个强密码,并顺手保存到 `~/.agent-wallet/runtime_secrets.json` 里方便你后续使用。但你最好也自己记下或者安全存一份——如果这个文件不小心被删了,这个密码就是你恢复加密钱包访问权限的唯一凭证。 +::: + +--- + ## 推荐学习路径 **从这里开始——零风险,零配置:** 用 tronscan-skill 查账户、看交易,用 sunswap 查价格和报价。纯查询,不花钱,不需要密码。 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 134c5ca..2b17bde 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 @@ -11,15 +11,15 @@ 直接告诉 AI 去哪里读取技能文件: ``` -请阅读 ~/.openclaw/skills/sunswap/SKILL.md,帮我查一下 TRX 当前的价格。 +请阅读 ~/.agents/skills/sunswap-dex-trading/SKILL.md,帮我查一下 TRX 当前的价格。 ``` 如果这样能正常工作,说明之前只是 AI 自动匹配没命中。下次在指令里加个提示词就行,比如"使用 sunswap 技能"。 如果这样也不管用,按顺序排查: -1. 技能目录存在吗?在终端(黑框框)运行 `ls ~/.openclaw/skills`,看看有没有对应的文件夹。 -2. 依赖装了吗?进到技能目录运行 `npm install`(比如 `cd ~/.openclaw/skills/tronscan-skill && npm install`)。 +1. 技能目录存在吗?在终端(黑框框)运行 `ls ~/.agents/skills`,看看有没有对应的文件夹。 +2. 依赖装了吗?进到技能目录运行 `npm install`(比如 `cd ~/.agents/skills/tronscan-data-lookup && npm install`)。 3. 密码配了吗?参考下方 [怎么配置密码和密钥?](#怎么配置密码和密钥)。 ### 安装失败了 @@ -37,10 +37,10 @@ 在终端运行: ```bash -ls ~/.openclaw/skills +ls ~/.agents/skills ``` -能看到 `sunswap`、`sunperp-skill`、`tronscan-skill`、`trc20-toolkit-skill`、`multisig-permissions`、`x402-payment`、`recharge-skill` 等目录名就说明装好了。 +能看到 11 个目录:`agent-wallet`、`sunswap-dex-trading`、`sunperp-perpetual-futures-trading`、`tronscan-data-lookup`、`trc20-token-toolkit`、`usdd-just-protocol`、`trx-staking-sr-voting`、`multi-sig-account-permissions`、`x402-payment`、`recharge-skill`,以及 `bankofai-guide`,就说明装好了。 然后在 AI 对话中验证: @@ -126,19 +126,27 @@ AI 的应对策略是:先给你看报价,你确认后在实际提交前会 根据你需要的技能,把对应的内容粘贴进去: ```bash -# SunSwap 换币(交易时需要) +# SunSwap 换币、TRC20 工具箱、USDD PSM、TRX 质押、多签 +# (任何需要在链上花钱的技能都会用到) export TRON_PRIVATE_KEY="你的私钥" export TRONGRID_API_KEY="你的 TronGrid API Key" +export TRON_NETWORK="mainnet" # 或 "nile" / "shasta" 使用测试网 # SunPerp 永续合约 export SUNPERP_ACCESS_KEY="你的 SunPerp Access Key" export SUNPERP_SECRET_KEY="你的 SunPerp Secret Key" -# TronScan 数据查询 +# TronScan 数据查询(可选,不填会自动走 BANK OF AI 免费代理) export TRONSCAN_API_KEY="你的 TronScan API Key" -# BANK OF AI 账户 +# BANK OF AI 账户(recharge-skill 使用) export BANKOFAI_API_KEY="你的 BANK OF AI API Key" + +# agent-wallet(用加密本地模式跑 x402-payment / 签名时需要) +export AGENT_WALLET_PASSWORD="你的主密码" + +# multisig-permissions 混合签名流程(review.js --sign 使用) +export TRON_HUMAN_PRIVATE_KEY="人类审批者的私钥" ``` @@ -155,14 +163,14 @@ export BANKOFAI_API_KEY="你的 BANK OF AI API Key" 当然可以。技能就是你电脑上的普通文件夹,随便改。 -比如你觉得 AI 做合约时 20 倍杠杆还是太高了,打开 `~/.openclaw/skills/sunperp-skill/resources/sunperp_config.json`,把数字改小就行——你的 AI,规矩由你定。 +比如你觉得 AI 做合约时 20 倍杠杆还是太高了,打开 `~/.agents/skills/sunperp-perpetual-futures-trading/resources/sunperp_config.json`,把数字改小就行——你的 AI,规矩由你定。 ### 怎么卸载或更新? **卸载:** 删掉文件夹就行。 ```bash -rm -rf ~/.openclaw/skills/sunswap +rm -rf ~/.agents/skills/sunswap-dex-trading ``` **更新:** 重新运行安装命令,会自动更新所有技能到最新版本。 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 87160ec..e825dc4 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 对话框里回车就能体验。 +一共 11 个技能——覆盖 TRON 生态最常用的场景,外加一个专属的引导辅助技能。每个技能都配了一句"参考话术"——复制到 AI 对话框里回车就能体验。 ### 🔑 安全钱包管理 @@ -77,7 +77,7 @@ ### 📈 进行永续合约交易 -在 SunPerp 看行情、开平仓。内置安全锁,最高只允许 20 倍杠杆,且开仓强制设止损——帮你管住手,防爆仓。 +在 SunPerp 看行情、开平仓。内置安全锁:最高只允许 20 倍杠杆(可在配置里调整),且每次开仓都**强制带止损**——没指定时默认设在距开仓价 5% 的位置,超过 25% 会被直接拒绝。帮你管住手,防爆仓。 > 🗣️ "现在 BTC 资金费率是多少?帮我开一张 5 倍杠杆的多单,亏损 5% 自动止损。" @@ -125,7 +125,7 @@ ### ☕ 自动结算链上付费服务 -当 AI 需要调用付费的链上服务或数据接口时,会通过 x402 协议自动完成"先付费、再获取"的链上结算,无需你手动扫码或切换钱包。 +当 AI 需要调用付费的链上服务或数据接口时,会通过 x402 协议自动完成"先付费、再获取"的链上结算,无需你手动扫码或切换钱包。支持多条链付款:TRON(TRC20:USDT、USDD,含 GasFree)和 BSC(ERC20:USDT、USDC)都能用,切 `--network` 参数即可。 > 🗣️ "使用 x402 协议调用这个付费智能体端点:https://api.example.com"(请替换为你实际要调用的付费端点地址) @@ -139,6 +139,14 @@ 💡 如需了解充值与提现规则,请查看:[**recharge-skill**](./BANKOFAISkill.md#recharge-skill) +### 🧭 引导辅助(bankofai-guide) + +一个轻量的辅助技能,负责跑完安装后的首次上手流程、帮你创建第一个 AgentWallet,并在任何链上操作之前充当"钱包守门员"——如果还没配钱包会提醒你先配一个。你通常不需要主动调用它,安装器和其他技能会在需要时自动把它唤醒。 + +> 🗣️ "带我走一遍 BANK OF AI 的新手引导。" 或 "运行 bankofai-guide,帮我配第一个钱包。" + +💡 如需了解完整的引导流程,请查看:[**bankofai-guide**](./BANKOFAISkill.md#bankofai-guide) + --- ## 🎯 这套 Skills 适合我吗? 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 f86cc27..403cb15 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 @@ -28,8 +28,8 @@ 3. AI 会自动完成以下流程(无需人工干预): - 拉取 `BofAI/skills` 仓库 - - 自动检测当前 Agent 对应的 skills 目录(如 `~/.openclaw/workspace/.agents/skills/`) - - 安装全部 11 个 BANK OF AI 技能(`agent-wallet`、`sunswap-dex-trading`、`x402-payment`、`bankofai-guide` 等) + - 自动检测当前 Agent 对应的 skills 目录(如 `~/.agents/skills/`) + - 安装全部 11 个 BANK OF AI 技能:10 个核心技能(`agent-wallet`、`sunswap-dex-trading`、`sunperp-perpetual-futures-trading`、`tronscan-data-lookup`、`trc20-token-toolkit`、`usdd-just-protocol`、`trx-staking-sr-voting`、`multi-sig-account-permissions`、`x402-payment`、`recharge-skill`),以及 `bankofai-guide`(引导辅助技能) :::tip 这是新手最推荐的路径 你不需要懂 `npx`、`npm` 是什么,也不用关心"全局安装"是什么意思。AI 会处理每一步,包括为你的平台选对 skills 目录、安装钱包 CLI、引导你完成首个钱包配置。 @@ -80,12 +80,13 @@ Ok to proceed? (y) y 安装器会自动从仓库拉取所有可用的 Skills,然后列出清单让你勾选。按**空格键**切换选中/取消,默认全选即可: ``` -◇ Found 8 skills +◇ Found 11 skills │ ◇ Select skills to install (space to toggle) -│ agent-wallet, Multi-Sig & Account Permissions, recharge-skill, -│ SunPerp Perpetual Futures Trading, SunSwap DEX Trading, -│ TRC20 Token Toolkit, TronScan Data Lookup, x402-payment +│ agent-wallet, bankofai-guide, Multi-Sig & Account Permissions, +│ recharge-skill, SunPerp Perpetual Futures Trading, SunSwap DEX Trading, +│ TRC20 Token Toolkit, TronScan Data Lookup, TRX Staking & SR Voting, +│ USDD / JUST Protocol, x402-payment ``` :::tip 建议全选 @@ -97,10 +98,12 @@ Ok to proceed? (y) y 安装器会自动检测你电脑上装了哪些 AI 工具(如 Cursor、Claude Code、Cline 等),用空格键勾选你要用的: ``` -◇ 43 agents +◇ 45 agents ◇ Which agents do you want to install to? │ Amp, Antigravity, Cline, Codex, Cursor, Deep Agents, │ Gemini CLI, GitHub Copilot, Kimi Code CLI, OpenCode, Warp +│ +● Installing to: Antigravity, Claude Code, Cursor, Gemini CLI, GitHub Copilot ``` **4️⃣ 选择安装范围** @@ -112,48 +115,138 @@ Ok to proceed? (y) y │ Project ``` -**5️⃣ 查看安全评估 & 确认安装** +**5️⃣ 查看安装计划** + +安装器会先展示一份安装清单:每个 Skill 会落到哪个路径,以及对每个目标工具是"完整拷贝(universal)"还是"软链(symlink)": + +``` +◇ Installation Summary ──────────────────────────────────────────────────────╮ +│ │ +│ ~/.agents/skills/agent-wallet │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +│ ~/.agents/skills/bankofai-guide │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +│ ~/.agents/skills/multi-sig-account-permissions │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +│ ~/.agents/skills/recharge-skill │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +│ ~/.agents/skills/sunperp-perpetual-futures-trading │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +│ ~/.agents/skills/sunswap-dex-trading │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +│ ~/.agents/skills/trc20-token-toolkit │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +│ ~/.agents/skills/tronscan-data-lookup │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +│ ~/.agents/skills/trx-staking-sr-voting │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +│ ~/.agents/skills/usdd-just-protocol │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +│ ~/.agents/skills/x402-payment │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlink → Claude Code │ +│ │ +├─────────────────────────────────────────────────────────────────────────────╯ +``` + +:::tip universal 和 symlink 的区别 +遵循通用 skills 布局的工具会直接拿一份**完整拷贝(universal)**放在 `~/.agents/skills/` 下;而 Claude Code 用的是自己的目录规范,所以安装器会给它建一个**软链(symlink)**指回这份完整拷贝——一份源文件,两边同步。 +::: + +**6️⃣ 查看安全评估 & 确认安装** 安装器会对每个 Skill 进行安全风险扫描,并展示评估结果。确认无误后选择 `Yes` 开始安装: ``` -◇ Security Risk Assessments ──────────────────────────────────────╮ -│ │ -│ Gen Socket Snyk │ -│ agent-wallet Med Risk 1 alert High Risk │ -│ 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 1 alert Med Risk │ -│ │ -├──────────────────────────────────────────────────────────────────╯ +◇ Security Risk Assessments ────────────────────────────────────────────────────────╮ +│ │ +│ Gen Socket Snyk │ +│ agent-wallet Safe 0 alerts High Risk │ +│ bankofai-guide Med Risk 1 alert High Risk │ +│ Multi-Sig & Account Permissions -- -- -- │ +│ recharge-skill Safe 1 alert Med Risk │ +│ SunPerp Perpetual Futures Trading -- -- -- │ +│ SunSwap DEX Trading -- -- -- │ +│ TRC20 Token Toolkit -- -- -- │ +│ TronScan Data Lookup -- -- -- │ +│ TRX Staking & SR Voting -- -- -- │ +│ USDD / JUST Protocol -- -- -- │ +│ x402-payment Safe 1 alert Med Risk │ +│ │ +│ Details: https://skills.sh/BofAI/skills │ +│ │ +├────────────────────────────────────────────────────────────────────────────────────╯ ◇ Proceed with installation? │ Yes ``` -**6️⃣ 安装完成!** +**7️⃣ 安装完成!** 看到类似以下输出,说明所有 Skills 已经成功安装到你选择的 AI 工具中: ``` -◇ Installed 8 skills ────────────────────────╮ -│ │ -│ ✓ agent-wallet (copied) │ -│ ✓ 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) │ -│ │ -├─────────────────────────────────────────────╯ - -└ Done! +◇ Installation complete + +◇ Installed 11 skills ───────────────────────────────────────────────────────╮ +│ │ +│ ✓ ~/.agents/skills/agent-wallet │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ ✓ ~/.agents/skills/bankofai-guide │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ ✓ ~/.agents/skills/multi-sig-account-permissions │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ ✓ ~/.agents/skills/recharge-skill │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ ✓ ~/.agents/skills/sunperp-perpetual-futures-trading │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ ✓ ~/.agents/skills/sunswap-dex-trading │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ ✓ ~/.agents/skills/trc20-token-toolkit │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ ✓ ~/.agents/skills/tronscan-data-lookup │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ ✓ ~/.agents/skills/trx-staking-sr-voting │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ ✓ ~/.agents/skills/usdd-just-protocol │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ ✓ ~/.agents/skills/x402-payment │ +│ universal: Antigravity, Cursor, Gemini CLI, GitHub Copilot, Amp +7 more │ +│ symlinked: Claude Code │ +│ │ +├─────────────────────────────────────────────────────────────────────────────╯ + +└ Done! Review skills before use; they run with full agent permissions. ``` :::tip 可选:安装 find-skills