Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/BANK-OF-AI/QuickStart.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
74 changes: 63 additions & 11 deletions docs/McpServer-Skills/SKILLS/BANKOFAISkill.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand Down Expand 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:**

Expand All @@ -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:<chainId>` 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).
Expand All @@ -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:**

Expand All @@ -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:**
Expand All @@ -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:**

Expand Down Expand Up @@ -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+.
:::

---

Expand All @@ -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.
:::

---

Expand Down
28 changes: 18 additions & 10 deletions docs/McpServer-Skills/SKILLS/Faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:

Expand Down Expand Up @@ -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"
```

</details>
Expand All @@ -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.
Expand Down
16 changes: 12 additions & 4 deletions docs/McpServer-Skills/SKILLS/Intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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."

Expand All @@ -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."

Expand Down Expand Up @@ -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)

Expand All @@ -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?
Expand Down
Loading
Loading