diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e0253854..3077322a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -27,7 +27,29 @@ env: IMAGE_NAME: bankofai/docs jobs: + lint: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 22.23.4 + cache: yarn + + - name: Install dependencies + run: yarn install --frozen-lockfile --non-interactive + + - name: Lint + run: yarn lint + build-and-push: + needs: lint runs-on: ubuntu-latest permissions: contents: read diff --git a/README.md b/README.md index 30c3fd1f..300d5e10 100644 --- a/README.md +++ b/README.md @@ -30,12 +30,14 @@ Built on the Model Context Protocol (MCP) architecture, providing full on-chain - **Infrastructure Layer (MCP Server)**: The agent’s **“hands and eyes.”** Provides a unified interface to read blocks, manage wallets, execute transfers, and interact with any contract. - **Application Logic Layer (Skills)**: The agent’s **“brain.”** Uses structured instructions (`SKILL.md`) to guide AI in orchestrating underlying tools. - **sunswap**: Enables automated DEX swaps. - - **x402-payment**: Allows agents to detect payment requirements and execute payments automatically. + - **wallet-cli**: Guides agents through wallet-cli for TRON accounts, transfers, signing, and on-chain operations. --- ### 3. 🧩 OpenClaw Extension: Financial Assistant for AI Agents +> For new setups, start with Skills and wallet-cli (see [Quick Start](#-quick-start)). OpenClaw remains documented for existing integrations. + OpenClaw is a financial extension plugin developed by BANK OF AI for AI agents, aiming to become the “central bank” of the agent economy. - **Wallet Ownership**: Enables agents to truly control and manage on-chain assets. @@ -68,9 +70,11 @@ OpenClaw is a financial extension plugin developed by BANK OF AI for AI agents, ### 🤖 For Agents/Buyers *Want your agent to have autonomous payment and on-chain interaction capabilities?* -1. **Install OpenClaw**: Configure your environment and connect to the [mcp-server-tron](https://github.com/BofAI/mcp-server-tron). -2. **Sync Skills**: Load `sunswap` or `x402-payment` from the [skills](https://github.com/BofAI/skills) repository. -3. **Start Transacting**: Your agent can now automatically process payment requests from sellers and execute settlements. +1. **Install Skills**: Add the Skills your agent needs, such as `wallet-cli` or `sunswap`, from the [skills](https://github.com/BofAI/skills) repository. See the [Skills quick start](https://docs.bankofai.io/McpServer-Skills/SKILLS/QuickStart/). +2. **Set up wallet-cli**: Install wallet-cli and configure an account on your own machine. See the [wallet-cli quick start](https://docs.bankofai.io/wallet-cli/quickstart/). Never send a private key, mnemonic, or password to an AI. +3. **Start Transacting**: Your agent can now pay x402 endpoints with `wallet-cli x402 pay` and run on-chain workflows through Skills. + +Already using OpenClaw or the TRON MCP Server? Their docs remain available: [OpenClaw](https://docs.bankofai.io/Openclaw-extension/Intro/) and [TRON MCP Server](https://docs.bankofai.io/McpServer-Skills/MCP/TRONMCPServer/Intro/). --- diff --git a/changelog/8004.md b/changelog/8004.md index 5317a1f6..4bf01d80 100644 --- a/changelog/8004.md +++ b/changelog/8004.md @@ -7,6 +7,44 @@ description: 'Release notes for the 8004 Protocol.' Release notes for the 8004 Protocol. +
+
Oct 27, 2026
+
+ +### Subgraph defaults, aliases and contract errors + +
DocsFix
+ +- **Subgraph** — the Python SDK ships default subgraph URLs for Base Mainnet and Base Sepolia (TypeScript ships none; BSC has none in either), so the pages no longer say a subgraph always has to be deployed by you. +- **Config and aliases** — Python-only `embeddings`; `feeLimit` defaults (120,000,000 SUN in TypeScript, 10,000,000 in Python); TypeScript's `bsc` / `bsc:mainnet` / `evm` aliases, all of which resolve to BSC Testnet unless `chainId: 56` is passed; the TypeScript IPFS prerequisite is an `ipfsUploader` callback, and Python RPC endpoints include Base. +- **New: Common Contract Errors** — the registry revert reasons a reader hits through the documented flows (`Not authorized`, `reserved key`, `expired`, `invalid wallet sig`, `Self-feedback not allowed`, …) with their causes. + +👉 [Configure Agents](/8004/Usage/ConfigureAgents/) · [SDK Feature Matrix](/8004/sdk-features/) + +
+
+ +
+
Oct 23, 2026
+
+ +### Docs aligned with 8004 SDK 1.2.1 + +
DocsFix
+ +- **Release** — the feature matrix names `@bankofai/8004-sdk` 1.2.1 (the Python package is still not on PyPI). The TypeScript SDK needs Node.js 22.23.4+ (22.x), 24.22.1+ (24.x), or 26.12.1+ (26.x). +- **Base networks** — Base Mainnet and Base Sepolia, with their official ERC-8004 registry addresses, are documented (all three registries in TypeScript; Identity and Reputation only in Python, via `eip155:8453` / `eip155:84532`). TRON agent IDs use the network's chain ID as prefix (for example `3448148188:` on Nile). +- **Registration files** — since 1.2.0, `registerIPFS()` publishes the canonical registration-v1 keys (`services`, `x402Support`, `registrations`) and uses the TRC-8004 `type` on TRON. TypeScript `toJSON()` still returns the internal names, so map them before hosting the file yourself. This updates the Sep 9 note. +- **Feature matrix** — adds the TypeScript registry read APIs, the new `register()` overloads, and per-agent approvals; reading an agent's owner is now supported in both languages. The TypeScript `updateRegistration` sample now type-checks under `strict`. +- **On-chain metadata sample** — the TypeScript sample called `agent.register()`, which always mints a new agent; it now uses `updateOnChainMetadata()`. The Python sample now writes staged keys through `registerIPFS()`, since on a registered agent `register(uri)` and `updateRegistration()` only update the URI. +- **BSC network names** — the network table listed BSC as `mainnet` / `testnet`, but a bare `mainnet` resolves to TRON and TypeScript rejects `testnet`. BSC is now given as `eip155:56` / `eip155:97`. +- **Indexing and IPFS** — Python `refreshIndex()` / `refreshAgentIndex()` are marked as not working in 1.2.1 (the SDK builds its indexer without the Identity Registry), so without a subgraph Python `getAgent()` raises `Agent … not found in index` and TypeScript returns `undefined`. TypeScript reads `ipfs://` URIs through the public `ipfs.io` gateway; Python needs an IPFS client for that and for `giveFeedback(feedbackFile=...)`. The TRON chain-ID agent IDs date from 1.1.2, not 1.2.0. + +👉 [SDK Feature Matrix](/8004/sdk-features/) · [Supported Networks](/8004/SupportedNetworks/) · [Contracts](/8004/contract/) + +
+
+
Sep 9, 2026
diff --git a/changelog/agent-wallet.md b/changelog/agent-wallet.md index 111096ee..e97df563 100644 --- a/changelog/agent-wallet.md +++ b/changelog/agent-wallet.md @@ -7,6 +7,61 @@ description: 'Release notes for Agent Wallet.' Release notes for Agent Wallet. +
+
Oct 27, 2026
+
+ +### Error codes, Privy automation and config schema + +
DocsFix
+ +- **SDK Guide** — lists the `code` values of `WalletCliExecutionError` / `WalletCliUsageError` (`capability_missing`, `network_mismatch`, `timeout`, …) and that wallet-cli's own failure codes pass through; a `wallet_cli` chainId mismatch throws `SigningError`; `signAndBroadcast()` returns `{ txId, stage: 'timeout' }` when a broadcast times out or the `wait` deadline passes, and throws `WalletCliSubmittedTransactionError` only when a status query fails after broadcast; the `/advanced` export list is complete. +- **CLI Reference** — `privy` automation needs both `--app-id` and `--app-secret-exec`, otherwise a reuse or secret prompt exits 1; `-g/--generate` is parsed but ignored; the `wallets_config.json` layout is described. + +👉 [SDK Guide](/Agent-Wallet/Developer/SDK-Guide/) · [CLI Reference](/Agent-Wallet/Developer/CLI-Reference/) + +
+
+ +
+
Oct 21, 2026
+
+ +### Docs rewritten for Agent Wallet 3.0 + +
DocsBreaking
+ +- **Rewritten for 3.0.0** — every page now follows `@bankofai/agent-wallet` 3.0.0. The wallet types are `wallet_cli` (recommended), `privy` and `raw_secret`. `local_secure`, the master password, `AGENT_WALLET_PASSWORD`, `runtime_secrets.json`, and the `init`, `change-password` and `sign msg` commands no longer exist. See [Upgrading from 2.x](/Agent-Wallet/FAQ/#upgrade-from-2x). +- **Credentials** — wallet-cli and Privy secrets should come from exec scripts (`--cli-password-exec`, `--app-secret-exec`; a direct `--app-secret` value is also accepted but stored in plaintext); 3.x has no password environment variable. The env fallback reads only `AGENT_WALLET_PRIVATE_KEY` / `AGENT_WALLET_MNEMONIC`; the 2.x aliases such as `TRON_PRIVATE_KEY` are no longer read. +- **Exact network IDs** — `-n` / `network` accept only canonical CAIP-2 strings such as `tron:728126428`, `tron:3448148188` or `eip155:56`. Aliases like `tron:nile` and hex TRON IDs are rejected. +- **Signed transactions** — `signTransaction()` returns a `SignedTransactionArtifact` with a `family` field instead of a string, and the cookbook branches on it. `signMessage` was removed. +- **TypeScript only** — the Python tabs were removed. The PyPI package `bankofai-agent-wallet` stopped at 2.4.0 and follows the 2.x model. +- **Reference fixes** — `reset` removes only `wallets_config.json`; the error list now includes the `ExternalSigner*` and `WalletCli*` classes; the `/advanced` and `/integrations/wallet-cli` entry points and `AGENT_WALLET_WALLET_CLI_PATH` are documented. + +👉 [Quick Start](/Agent-Wallet/QuickStart/) · [CLI Reference](/Agent-Wallet/Developer/CLI-Reference/) · [SDK Guide](/Agent-Wallet/Developer/SDK-Guide/) + +
+
+ +
+
Sep 10, 2026
+
+ +### Agent Wallet v3.0.0 + +
New ReleaseBreaking
+ +- **Wallet types** — new `wallet_cli` type delegates TRON and EVM transaction and typed-data signing to a local wallet-cli account (compatible range `>=4.13.0 <5.0.0`). `local_secure`, the master password, `AGENT_WALLET_PASSWORD` and `runtime_secrets.json` are removed; existing `local_secure` wallets are not converted. +- **Signing API** — `signTransaction()` returns a `SignedTransactionArtifact` with a `family` field (`rawTransaction` for EVM, `transaction` for TRON) instead of a string. `signRaw()`, `signMessage()` and the CLI `sign msg` command are removed; only transaction and typed-data signing remain. +- **Package surface** — low-level adapters, clients and config resolvers move to `@bankofai/agent-wallet/advanced`; wallet-cli helpers are under `@bankofai/agent-wallet/integrations/wallet-cli`. `ConfigWalletProvider` is now `new ConfigWalletProvider(dir, options)`. +- **Credentials and environment** — Privy and wallet-cli secrets accept `{ "exec": "/absolute/script" }` references (`--app-secret-exec`, `--cli-password-exec`). The 2.x aliases `TRON_PRIVATE_KEY`, `TRON_MNEMONIC` and `TRON_ACCOUNT_INDEX` are no longer read; use `AGENT_WALLET_PRIVATE_KEY`, `AGENT_WALLET_MNEMONIC` and `AGENT_WALLET_MNEMONIC_ACCOUNT_INDEX`. +- Published to npm on September 10, 2026. The Python package stays at 2.4.0 on PyPI. Upgrade steps: [Upgrading from 2.x](/Agent-Wallet/FAQ/#upgrade-from-2x). + +👉 [Introduction](/Agent-Wallet/Intro/) · [CLI Reference](/Agent-Wallet/Developer/CLI-Reference/) · [SDK Guide](/Agent-Wallet/Developer/SDK-Guide/) + +
+
+
Sep 9, 2026
diff --git a/changelog/index.md b/changelog/index.md index 4fbd41fe..1db664c8 100644 --- a/changelog/index.md +++ b/changelog/index.md @@ -7,6 +7,110 @@ description: 'Product updates and announcements for BANK OF AI — all products, Product updates and announcements for BANK OF AI. +
+
Oct 27, 2026
+
+ +### Reverse audit: code features the docs had not covered + +
DocsFix
+ +- Facilitator error codes, 8004 subgraph defaults and contract revert reasons, Agent Wallet error codes and config schema, wallet-cli error codes and recharge rules, per-Skill setup steps and credentials, OpenClaw installer details, TRON MCP package and HTTP details. [x402](./x402/) · [8004](./8004/) · [Agent Wallet](./agent-wallet/) · [SKILLS](./skills/) · [OpenClaw](./openclaw-extension/) · [MCP](./mcp-server/) + +
+
+ +
+
Oct 25, 2026
+
+ +### x402 docs aligned with SDK 2.1.0 and facilitator v2.2.2 + +
Docsx402Fix
+ +- The 2.1.0 package set on official `@x402/core` 2.28.0 (with `@bankofai/x402-tron-extensions` for TRON resource sponsoring), decimal TRON IDs, the official facilitator's 10-per-minute anonymous limit on both `/verify` and `/settle`, Nile resource sponsoring, and the remaining API Catalog CI rules. [Details](./x402/) + +
+
+ +
+
Oct 23, 2026
+
+ +### Node.js requirements updated across products + +
DocsFix
+ +- Install pages now state the October 2026 security releases required by each project's source (published packages that still declare an older floor — agent-wallet `3.0.0` with `>=18`, TRON MCP Server `1.1.7` with `>=20` — are noted on their pages): Agent Wallet, wallet-cli, SKILLS, and OpenClaw Extension need Node.js 22.23.4+ (22.x), 24.22.1+ (24.x), or 26.12.1+; the 8004 TypeScript SDK the same but only up to 26.x; TRON MCP Server needs 22.23.4+ or 24.22.1+ (source, `v1.1.8`; Node.js 26 is not supported; npm `1.1.7` declares `>=20`); the x402 SDK needs 24.22.1+. Both OpenClaw installers now check the full version before installing anything. + +
+
+ +
+
Oct 23, 2026
+
+ +### 8004 docs aligned with SDK 1.2.1 + +
Docs8004Fix
+ +- Base Mainnet and Base Sepolia, canonical registration-v1 keys from `registerIPFS()`, the new TypeScript registry read APIs, and the 1.2.1 Node.js requirement. [Details](./8004/) + +
+
+ +
+
Oct 23, 2026
+
+ +### OpenClaw Extension and TRON MCP Server docs matched to the code + +
DocsFix
+ +- OpenClaw: the installer still pins Skills `v1.5.15`, agent-wallet 2.3.1 and `chat.ainft.com` — the Sep 9 installer changes never shipped, and the docs now describe the real installer. [Details](./openclaw-extension/) TRON MCP Server: mainnet RPC fallback without an API key, tool and prompt details, and real wallet error texts. [Details](./mcp-server/) + +
+
+ +
+
Oct 22, 2026
+
+ +### SKILLS 3.0.1 — Node.js security baseline + +
New ReleaseSKILLS
+ +- The bundled Node.js Skills and the wallet-cli installer require Node.js `^22.23.4 || ^24.22.1 || >=26.12.1`. The `wallet-cli` Skill still pins `@tron-walletcli/wallet-cli@4.14.0`. [Details](./skills/) + +
+
+ +
+
Oct 21, 2026
+
+ +### Agent Wallet docs rewritten for 3.0 + +
DocsAgent WalletBreaking
+ +- The Agent Wallet pages now follow 3.0.0: `wallet_cli`, `privy` and `raw_secret` wallets, exec-script credentials and exact CAIP-2 network IDs. `local_secure`, `AGENT_WALLET_PASSWORD` and the Python SDK are no longer covered. [Details](./agent-wallet/) + +
+
+ +
+
Oct 21, 2026
+
+ +### SKILLS install command pinned to main + +
DocsSKILLSFix
+ +- Install with `npx skills add https://github.com/BofAI/skills/tree/main -g` so the Skills match the documented wallet-cli version. [Details](./skills/) + +
+
+
Sep 28, 2026
@@ -33,6 +137,19 @@ Product updates and announcements for BANK OF AI.
+
+
Sep 10, 2026
+
+ +### Agent Wallet v3.0.0 + +
New ReleaseAgent WalletBreaking
+ +- New `wallet_cli` wallet type; `local_secure`, the master password and `AGENT_WALLET_PASSWORD` removed; `signTransaction()` returns a typed artifact; `signRaw` / `signMessage` removed; low-level APIs move to `/advanced`. [Details](./agent-wallet/) + +
+
+
Sep 9, 2026
@@ -41,7 +158,7 @@ Product updates and announcements for BANK OF AI.
DocsFix8004Openclaw
-- The 8004 guides are now internally consistent: one consistent `setWallet` call shape per SDK instead of four different ones, with the rules for how the new wallet's signature is supplied, no legacy TRON `chainId`, the network names the SDK actually accepts, and private keys read from environment variables. The Openclaw installer no longer pins a superseded skills tag and writes the correct BANK OF AI host. [8004 details](./8004/) · [Openclaw details](./openclaw-extension/) +- The 8004 guides are now internally consistent: one consistent `setWallet` call shape per SDK instead of four different ones, with the rules for how the new wallet's signature is supplied, no legacy TRON `chainId`, the network names the SDK actually accepts, and private keys read from environment variables. The Openclaw installer no longer pins a superseded skills tag and writes the correct BANK OF AI host. *(Corrected on Oct 23: these installer changes never shipped.)* [8004 details](./8004/) · [Openclaw details](./openclaw-extension/)
diff --git a/changelog/mcp-server.md b/changelog/mcp-server.md index c561d71b..d5661a92 100644 --- a/changelog/mcp-server.md +++ b/changelog/mcp-server.md @@ -7,6 +7,40 @@ description: 'Release notes for MCP Server.' Release notes for MCP Server. +
+
Oct 27, 2026
+
+ +### Package contents, Docker mode and HTTP details + +
DocsFix
+ +- The npm package ships `build/`, `bin/`, `package.json`, `README.md` and `LICENSE`; the Docker image always runs read-only (`--readonly` is hard-coded); `GET` / `DELETE /mcp` return 405 and SSE is not supported; `GET /` returns server information; `tron` / `trx` / `testnet` are accepted network aliases. + +👉 [Local Deployment](/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment/) · [Tool List](/McpServer-Skills/MCP/TRONMCPServer/ToolList/) + +
+
+ +
+
Oct 23, 2026
+
+ +### TRON MCP Server docs matched to the code + +
DocsFix
+ +- **RPC without an API key** — on `main` (tag `v1.1.8`), Mainnet requests without `TRONGRID_API_KEY` go to `https://hptg.bankofai.io`; with a key they go to `api.trongrid.io`. Nile and Shasta always use the TronGrid testnet nodes. npm `1.1.7` still uses `api.trongrid.io` without a key. +- **Tools and prompts** — `write_contract` takes no `feeLimit` (only `deploy_contract` does); `tron://networks` returns `{"supportedNetworks":[...]}`; read-only mode registers 4 prompts, not 6. +- **Wallet errors** — the FAQ now quotes the real agent-wallet 2.x error texts (`resolve_wallet could not find a wallet source in config or env`, `Password required for local_secure wallets`, `No active wallet set.`, `MAC mismatch — wrong password or corrupted file`). agent-wallet 2.3.x and 2.4.0 also accept the aliases `TRON_PRIVATE_KEY` and `TRON_MNEMONIC`, but read these env vars only when no password resolves and the wallet directory holds no wallets; otherwise they are silently ignored. On that path, with both a private key and a mnemonic set, agent-wallet 2.3.x gives `Wallet not configured.` and 2.4.0 gives `Provide only one of AGENT_WALLET_PRIVATE_KEY or AGENT_WALLET_MNEMONIC`. +- **Node.js** — a source checkout of `v1.1.8` requires 22.23.4+ (22.x) or 24.22.1+ (24.x); npm `1.1.7`, which `npx` runs, declares `>=20`. The pages recommend the October 2026 security releases either way. The cloud-service Quick Start replaced its hard requirement "Node.js v20.0.0 or higher" with "Node.js, needed to run `npx`", recommending 22.23.4+ or 24.22.1+. +- **Agent Wallet install pinned to 2.x** — the server depends on `@bankofai/agent-wallet ^2.3.0`, but an unpinned `npm install -g @bankofai/agent-wallet` now installs 3.0.0, which has no `local_secure` wallets, master password, or `--save-runtime-secrets`. The pages now use `npm install -g @bankofai/agent-wallet@2` and note that the Agent-Wallet docs describe 3.x. + +👉 [Quick Start](/McpServer-Skills/MCP/TRONMCPServer/QuickStart/) · [FAQ](/McpServer-Skills/MCP/TRONMCPServer/FAQ/) · [Local Private Deployment](/McpServer-Skills/MCP/TRONMCPServer/LocalPrivatizedDeployment/) + +
+
+
Sep 9, 2026
diff --git a/changelog/openclaw-extension.md b/changelog/openclaw-extension.md index bacfb5e7..4283ddce 100644 --- a/changelog/openclaw-extension.md +++ b/changelog/openclaw-extension.md @@ -7,6 +7,39 @@ description: 'Release notes for the Openclaw Extension.' Release notes for the Openclaw Extension. +
+
Oct 27, 2026
+
+ +### Installer details corrected + +
DocsFix
+ +- The skill configuration phase (API key prompt, `Next steps`) runs only for skills that were not already in the skill list before the run (on the default global install it covers `~/.openclaw/skills/`, `~/.agents/skills/` and other agents' skill folders), so re-installs print `No new skills were installed.` and skip it; the Quick Start now says so and points to the manual API key steps. The `Proceed with installation?` prompt and the `bankofai-recharge` remote URL are documented. +- The Node.js error text matches what the installer prints (on Windows without the `Error: ` prefix); the manual `bankofai-config.json` steps set `chmod 600` like the installer does; Windows is described as almost identical with the differences in the FAQ; deleting `~/.openclaw/skills/` removes skills only — MCP entries, the API key file, global npm packages and `~/.agent-wallet` stay; Clean mode clears the MCP entries, skills and config files and re-initialises agent-wallet, but never uninstalls the npm packages. + +👉 [Quick Start](/Openclaw-extension/QuickStart/) · [FAQ](/Openclaw-extension/FAQ/) + +
+
+ +
+
Oct 23, 2026
+
+ +### Docs matched to the current installer + +
DocsFix
+ +- **Correction to the Sep 9 entry** — those installer changes never shipped. The installer on `main` still pins Skills `v1.5.15` (14 skills, no `wallet-cli`), `@bankofai/agent-wallet` 2.3.1 and `@bankofai/mcp-server-tron` 1.1.7, and writes `base_url: https://chat.ainft.com`. The Quick Start and FAQ now describe that installer, and a note at the top explains that its wallet steps follow agent-wallet 2.x. +- **What else the docs now say** — selecting `x402-payment` also runs `npm install --global @bankofai/x402-cli@1.0.1`; the TronScan API key is optional (without one the skill uses `ts.bankofai.io`); a project-level install goes to `/skills/`; there is no TronGrid prompt; with an existing wallet, agent-wallet 2.3.1 first asks whether to add one or exit; and on Windows the installer exits if `~/.openclaw` is missing. +- **Node.js** — both installers check the full version against `^22.23.4 || ^24.22.1 || >=26.12.1` before installing anything. + +👉 [Quick Start](/Openclaw-extension/QuickStart/) · [FAQ](/Openclaw-extension/FAQ/) + +
+
+
Sep 9, 2026
diff --git a/changelog/skills.md b/changelog/skills.md index b183061a..48548fb0 100644 --- a/changelog/skills.md +++ b/changelog/skills.md @@ -7,6 +7,54 @@ description: 'Release notes for SKILLS.' Release notes for SKILLS. +
+
Oct 27, 2026
+
+ +### Setup steps and credentials per Skill + +
DocsFix
+ +- **Quick Start** — the two steps `npx skills add` does not do: `npm install -g @sun-protocol/sun-cli@1.2.2` for SunSwap / SunPump, and `npm install` inside the SunPerp, TronScan and USDD Skill folders. `x402`, `bai` and `8004` are wallet-cli command families outside the wallet-cli Skill's scope. +- **Skill catalog** — the credentials column names the environment variables each Skill reads (`TRON_PRIVATE_KEY`, `SUNPERP_ACCESS_KEY` / `SUNPERP_SECRET_KEY`, `TRONSCAN_API_KEY`, …); the SunPump Skill asks for a logo image before a launch; the SunPerp example no longer suggests changing an existing position's stop-loss. + +👉 [Quick Start](/McpServer-Skills/SKILLS/QuickStart/) · [Skill Catalog](/McpServer-Skills/SKILLS/BANKOFAISkill/) + +
+
+ +
+
Oct 22, 2026
+
+ +### Skills 3.0.1 — Node.js security baseline + +
New Release
+ +- **Node.js** — the bundled Node.js Skills and the wallet-cli installer require Node.js `^22.23.4 || ^24.22.1 || >=26.12.1`, the October 2026 security releases. The installer validates the full version, including when the pinned CLI is already installed. +- **wallet-cli pin unchanged** — the `wallet-cli` Skill still pins `@tron-walletcli/wallet-cli@4.14.0`. +- **Docs** — the Skills and BANK OF AI quick starts state the new Node.js requirement. + +👉 [Quick Start](/McpServer-Skills/SKILLS/QuickStart/) + +
+
+ +
+
Oct 21, 2026
+
+ +### Install Skills from the stable main branch + +
DocsFix
+ +- **Install command** — now `npx skills add https://github.com/BofAI/skills/tree/main -g`. Without `/tree/main` the installer uses the repository's default branch, `develop`, whose unreleased `wallet-cli` Skill pins a different CLI version from the `@tron-walletcli/wallet-cli@4.14.0` the docs install. The FAQ's update instructions follow the same rule, and no longer pass `-y`, which made the skills CLI install into every agent detected on the machine (all 79 known agents when none is detected) and overwrite their copies. + +👉 [Quick Start](/McpServer-Skills/SKILLS/QuickStart/) · [FAQ](/McpServer-Skills/SKILLS/Faq/) + +
+
+
Sep 28, 2026
diff --git a/changelog/x402.md b/changelog/x402.md index 1fc8792f..de867bdc 100644 --- a/changelog/x402.md +++ b/changelog/x402.md @@ -7,6 +7,46 @@ description: 'Release notes for the x402 payment protocol, SDK, and CLI.' Release notes for the x402 protocol, SDK, and [Wallet CLI guide](/wallet-cli/). +
+
Oct 27, 2026
+
+ +### Facilitator error codes completed + +
DocsFix
+ +- The facilitator error list now includes the protocol-level sponsoring reasons (`approval_transaction_reused`, `sponsor_approval_lifetime_exceeded`, `sponsor_existing_delegation`), `400 permit2_invalid_authorization` on `/settle`, `500 internal_error`, and the GasFree proxy's `502 bad_gateway`. +- **Wallet CLI reference** — a table of the error codes a reader will hit (`missing_wallet_address`, `auth_required`, `invalid_option`, `no_matching_requirement`, `permit2_allowance_required`, …) with exit codes, and the `bai recharge` rules: `--to`, the token default (USDC on Base, USDT elsewhere) and the minimum amounts behind `invalid_amount`. + +👉 [Facilitator](/x402/core-concepts/facilitator/) · [Wallet CLI reference](/wallet-cli/command-reference/) + +
+
+ +
+
Oct 25, 2026
+
+ +### Docs aligned with SDK 2.1.0 and facilitator v2.2.2 + +
DocsFix
+ +- **SDK 2.1.0** — the SDK pages follow the 2.1.0 package set: `@bankofai/x402-tron` 2.1.0 and the new `@bankofai/x402-tron-extensions` 2.1.0 (upgrade the two together) on official `@x402/core` 2.28.0, with the official `@x402/*` HTTP/MCP integrations, `@x402/evm` and `@x402/extensions` 2.28.0. The quickstarts import from `@x402/core`, `@x402/fetch` and `@x402/express`, and construct `new x402ResourceServer(...)` in place of `createResourceServer` from `@bankofai/x402-core`, which is not used with the 2.1 mechanism. The local EVM package, `@bankofai/x402-extensions` and the `typescript/packages/legacy/` compatibility packages were removed in 2.1.0 (the root `legacy/` archive, including the retired Python SDK, already in 2.0.0). TRON resource sponsoring now needs an explicitly registered client extension, and the SDK requires Node.js 24.22.1+. The official `@x402/evm` ships no BSC default assets, so BSC routes must be priced with an explicit `{ asset, amount, extra }` object and BSC assets must be allowlisted on the client; among the networks these docs cover, the default assets are now USDT on TRON and USDC on Base / Base Sepolia. +- **Pending settlement** — `settlement_pending` is documented as a non-terminal result to reconcile rather than resubmit. 2.1.0 adds the injectable `pendingSettlementStore` (the default `InMemoryTronPendingSettlementStore` covers one process only) and the `settlement_store_unavailable` and `settlement_execution_failed` codes, and extends `chain_read_failed` (already used by `exact` Permit2 reads) to `upto` preflight reads. `HTTPFacilitatorClient` now comes from official Core with a 90 s default timeout; the examples set 120 s. +- **TRON-only examples** — the repository examples now cover TRON only, so the seller quickstart points BSC and Base sellers to the official facilitator or the upstream `@x402/evm` examples. The official facilitator v2.2.1 and v2.2.2 are security releases (Node.js and dependency updates; v2.2.2 also installs the patched system Brotli for CVE-2026-111497); its documented behavior is unchanged. +- **Decimal TRON IDs** — examples and tables use `tron:728126428` (mainnet), `tron:3448148188` (Nile) and `tron:2494104990` (Shasta). The x402 SDK still accepts the hex forms as input; wallet-cli's `--network` does not. The API Catalog is the exception: its schema still accepts only the hex form. +- **Official facilitator limits** — anonymous callers get 10 requests per IP per minute and API Keys 1,000 per minute, counted separately for `/verify` and `/settle` (both are limited). Over the limit returns `429` with `Retry-After`. The docs previously said one `/settle` per minute. +- **Resource sponsoring on Nile** — the official facilitator lists `trc20ApprovalResourceSponsoring` in `/supported` but enables it on Nile only, for Nile USDT, and requires an API Key (`sponsor_auth_required` / `sponsor_network_disabled` otherwise). `GET /sponsoring/ready` and the `/verify` / `/settle` error codes are now documented. +- **Settlement records** — successful settlements are unique per (network, asset, payer, nonce) through a partial unique index. This corrects the Sep 9 note that the table had no unique constraint. +- **API Catalog** — local checks need Python 3.11+; the checklist adds the remaining CI rules (required `pay.md` strings, a TRON `exact` + `permit2` first route, no `--scheme exact_gasfree`, all four `status` keys) and notes that fixed-count tests must be updated in the same PR. The list commands read the local cache and download only when it is missing or lacks what was asked for, so run `update-catalog` to refresh a cache that may be stale. +- **Wallet CLI reference** — now targets `@tron-walletcli/wallet-cli@4.15.1` and documents the default $1 per-payment cap for known stablecoins (`amount_exceeds_limit`), `--out` (required for binary responses), `--max-gasfree-fee-raw`, and that `--max-raw-amount` requires `--token` or `--asset`. The quick start warns that a first TRON `exact` payment in a token may broadcast a one-time `approve(Permit2, MaxUint256)`, and the result reference covers a response format error after settlement (`retryPayment: false`). It also notes that the wallet-cli Skill pins 4.14.0, so Skill users install that version instead. +- **Protocol details** — a `402` carries its requirements in the Base64 `PAYMENT-REQUIRED` header with a `{}` body, and verification failures put the reason in that header's `error`; an insufficient Permit2 allowance on `exact` / `upto` returns `412 permit2_allowance_required`. EVM `exact` also supports the `upfront` payment flow. Permit2 payloads use `payload.permit2Authorization`. DHLU was removed from the token tables (no current code references it), BSC mainnet USDC is marked as explicit-asset only, the official facilitator's rate-limit counters are per instance, and the npm packages are Apache-2.0 (the repository LICENSE is MIT). + +👉 [SDK Features](/x402/sdk-features/) · [Official Facilitator](/x402/core-concepts/OfficialFacilitator/) · [List Your Service](/x402/api-catalog/list-your-service/) + +
+
+
Sep 28, 2026
diff --git a/default.conf b/default.conf index 72191769..4c5ad0c5 100644 --- a/default.conf +++ b/default.conf @@ -7,13 +7,16 @@ server { root /usr/share/nginx/html; index index.html; - # 中文等非默认语言:未命中时回退到该语言的 index + # 站点是全静态构建,每个页面都有对应的 index.html;未命中的路径返回真实 404, + # 并显示对应语言的 Docusaurus 404 页。已迁移的旧地址由 plugin-client-redirects 生成跳转页。 location /zh-Hans/ { - try_files $uri $uri/ /zh-Hans/index.html; + try_files $uri $uri/ =404; + error_page 404 /zh-Hans/404.html; } location / { - try_files $uri $uri/ /index.html; + try_files $uri $uri/ =404; + error_page 404 /404.html; } # Disable caching for index.html diff --git a/docs/8004/QuickStart.md b/docs/8004/QuickStart.md index c2ab8495..70aca13e 100644 --- a/docs/8004/QuickStart.md +++ b/docs/8004/QuickStart.md @@ -117,6 +117,8 @@ agent.setActive(True) agent.setX402Support(False) # Register on-chain +# Replace with the URL where you host this agent's registration JSON; +# loadAgent() below fetches it, and a URL that does not serve it raises an HTTP error. reg_tx = agent.register("https://example.com/agent-card.json") reg = reg_tx.wait_confirmed(timeout=180).result @@ -185,6 +187,7 @@ async function main() { agent.setX402Support(false); // Register on-chain + // Replace with the URL where you host this agent's registration JSON. const tx = await agent.register("https://example.com/agent-card.json"); const { result: registrationFile } = await tx.waitConfirmed(); diff --git a/docs/8004/SupportedNetworks.md b/docs/8004/SupportedNetworks.md index 12770400..7cda8527 100644 --- a/docs/8004/SupportedNetworks.md +++ b/docs/8004/SupportedNetworks.md @@ -8,10 +8,14 @@ The SDK currently supports the following networks and default RPC/node endpoints | :--- | :--- | :--- | :--- | | **EVM** | BSC Mainnet | `eip155:56` (`chainId=56`) | `https://bsc-dataseed.binance.org` | | **EVM** | BSC Testnet | `eip155:97` (`chainId=97`) | `https://data-seed-prebsc-1-s1.binance.org:8545` | +| **EVM** | Base Mainnet | `eip155:8453` (`chainId=8453`) | `https://mainnet.base.org` | +| **EVM** | Base Sepolia | `eip155:84532` (`chainId=84532`) | `https://sepolia.base.org` | | **TRON** | TRON Mainnet | `mainnet` | `https://api.trongrid.io` | | **TRON** | Nile Testnet | `nile` | `https://nile.trongrid.io` | | **TRON** | Shasta Testnet | `shasta` | `https://api.shasta.trongrid.io` | Notes: -- Explorer defaults are `bscscan.com` / `testnet.bscscan.com` for BSC and `tronscan.org` variants for TRON. -- Subgraph URL is currently optional and may be unavailable depending on deployment. +- Explorer defaults are `bscscan.com` / `testnet.bscscan.com` for BSC, `basescan.org` / `sepolia.basescan.org` for Base, and `tronscan.org` variants for TRON. +- Base was added to the TypeScript SDK in 1.2.0; it also accepts the aliases `base` and `base:sepolia`. The Python SDK has no Base aliases and no Base Validation Registry entry; it only knows the Identity and Reputation Registry addresses for `chainId` 8453 / 84532, so pass `network="eip155:8453"` / `"eip155:84532"`. A bare `network="base"` is not rejected in Python: it falls back to chainId 97 (BSC Testnet). +- The default endpoints apply to the TypeScript SDK. The Python SDK has no default endpoint: `rpcUrl` is required, and `SDK(...)` raises `rpcUrl is required` without it. +- Subgraph is optional. The Python SDK has built-in subgraph URLs for Base Mainnet and Base Sepolia; the TypeScript SDK has none, so pass `subgraphUrl`. BSC has no built-in subgraph in either SDK. diff --git a/docs/8004/Usage/ConfigureAgents.md b/docs/8004/Usage/ConfigureAgents.md index 55f44891..9fc7aedd 100644 --- a/docs/8004/Usage/ConfigureAgents.md +++ b/docs/8004/Usage/ConfigureAgents.md @@ -172,9 +172,9 @@ agent.setMCP("https://mcp.example.com/"); -When you set the MCP endpoint, the SDK will automatically: -* Fetch tools, prompts, and resources from the endpoint. -* Populate the agent's capabilities. +What `setMCP()` does beyond recording the endpoint differs by language: +* **Python**: by default (`auto_fetch=True`) it fetches tools, prompts, and resources from the endpoint and stores them on the MCP endpoint entry as `mcpTools`, `mcpPrompts`, and `mcpResources`. A failed fetch is skipped: network and parse errors are logged only at debug level, and a non-HTTP(S) endpoint logs a warning. Pass `auto_fetch=False` to turn this off. +* **TypeScript**: it only records the endpoint URL and version (default `2025-06-18`). It does not contact the endpoint. ### A2A (Agent-to-Agent) Endpoint @@ -200,9 +200,9 @@ agent.setA2A("https://a2a.example.com/agent-card.json"); -The SDK will automatically: -* Fetch skills from the A2A agent card. -* Index these capabilities for search. +What `setA2A()` does beyond recording the endpoint differs by language: +* **Python**: by default (`auto_fetch=True`) it fetches the skill tags (`skills[].tags`) from the A2A agent card and stores them on the A2A endpoint entry as `a2aSkills`. A failed fetch is skipped: network and parse errors are logged only at debug level, and a non-HTTP(S) endpoint logs a warning. Pass `auto_fetch=False` to turn this off. +* **TypeScript**: it only records the agent card URL and version (default `0.3.0`). It does not fetch the card. ### ENS @@ -227,9 +227,9 @@ agent.setENS("myagent.eth"); -This stores the ENS name in: -* The registration file. -* As on-chain metadata. +Both SDKs store the ENS name as an `ENS` endpoint in the registration file. Writing it on-chain as the `agentName` metadata key differs: +* **Python**: the first `register()` (minting) writes `agentName` on-chain for you; on an already registered agent, `register(uri)` only updates the URI, so use `registerIPFS()`, which writes changed metadata including `agentName`. +* **TypeScript**: `setENS()` only changes the local registration file, and `register()` / `registerIPFS()` do not send `agentName`. Call `await agent.updateOnChainMetadata()` on a registered agent to write it. ### Remove Endpoints @@ -369,7 +369,7 @@ The SDK builds the typed data for you, but it cannot invent the new wallet's sig | :--- | :--- | | `signature` (Python) / `signature` (TS) | Uses your bytes as-is. This is the path for smart contract wallets and any external/offline signer. | | `new_wallet_signer` (Python) / `newWalletSigner` (TS) | Signs with that key. The SDK checks the key's address against `newWallet` first and raises if they differ. | -| neither | Falls back to the SDK signer — **and this only succeeds if the SDK signer's address is the new wallet**. Otherwise it raises `New wallet must sign. Provide new_wallet_signer (EOA) or signature (ERC-1271/external).` | +| neither | Falls back to the SDK signer — **and this only succeeds if the SDK signer's address is the new wallet**. Otherwise Python raises `New wallet must sign. Provide new_wallet_signer (EOA) or signature (ERC-1271/external).` and TypeScript throws `newWalletSigner address (…) does not match newWallet (…).` If the TypeScript SDK has no signer at all, it throws `New wallet signature is required. Provide options.newWalletSigner or options.signature.` | :::caution The bare one-argument call is not the general case `setWallet(address)` with no signing option works **only** when the SDK signer already is that address. Since the transaction sender must also be the owner or an approved operator, the bare call is effectively for "point the agent at the wallet I am already signing with". To attach a wallet that is *different* from the SDK signer, you must supply `new_wallet_signer` / `newWalletSigner` or a ready-made `signature`. @@ -400,10 +400,9 @@ agent.addSkill("advanced_reasoning_planning/strategic_planning", validate_oasf=T ```typescript -// Add a skill without validation +// The TypeScript SDK does not validate against the OASF taxonomy: +// addSkill() accepts any string agent.addSkill("custom_skill/my_skill"); - -// Add a skill with validation agent.addSkill("advanced_reasoning_planning/strategic_planning"); ``` @@ -430,10 +429,9 @@ agent.addDomain("finance_and_business/investment_services", validate_oasf=True) ```typescript -// Add a domain without validation +// The TypeScript SDK does not validate against the OASF taxonomy: +// addDomain() accepts any string agent.addDomain("custom_domain/my_domain"); - -// Add a domain with validation agent.addDomain("finance_and_business/investment_services"); ``` @@ -568,21 +566,26 @@ Certain properties can be managed directly as on-chain metadata. ```python -# Update on-chain metadata +# Update on-chain metadata (the agent must already be registered) agent.setMetadata({"version": "1.1.0", "tier": "pro"}) -# If already registered and updating URI, you can call: -# tx = agent.updateRegistration(agentURI="https://example.com/agent-card-updated.json") -# tx.wait_confirmed(timeout=180) +# setMetadata() only stages the keys. On a registered agent, the next registerIPFS() +# (requires an IPFS client) uploads the file, replaces the URI with ipfs://..., and then +# writes each changed key on chain (best-effort) inside wait_confirmed(). +# register(uri) and updateRegistration() update only the URI of a registered agent. +tx = agent.registerIPFS() +tx.wait_confirmed(timeout=180) ``` ```typescript -// Update on-chain metadata +// Update on-chain metadata (the agent must already be registered) agent.setMetadata({ version: "1.1.0", tier: "pro" }); -const tx = await agent.register("https://example.com/agent-card-updated.json"); -await tx.waitConfirmed(); +// Sends one setMetadata transaction per key in the local metadata (plus agentName +// when an ENS name is set) and returns their hashes. +// Do not call register() here: it always mints a new agent. +const txHashes = await agent.updateOnChainMetadata(); ``` @@ -608,8 +611,8 @@ agent = sdk.loadAgent("97:123") ```typescript -// Query agent summary by ID -const agentSummary = await sdk.getAgent("97:123"); +// Load agent by ID +const agent = await sdk.loadAgent("97:123"); ``` @@ -634,9 +637,11 @@ print(agent.active) ```typescript -console.log(agentSummary?.name); -console.log(agentSummary?.description); -console.log(agentSummary?.active); +// The TypeScript Agent has no name/description/active getters; read them from toJSON() +const file = agent.toJSON(); +console.log(file.name); +console.log(file.description); +console.log(file.active); ``` @@ -680,7 +685,7 @@ const agent = sdk.createAgent({ }); agent.setMCP("https://mcp.example.com/") - .setMetadata({ ens: "advanced-agent.eth" }) + .setENS("advanced-agent.eth") .addSkill("advanced_reasoning_planning/strategic_planning") .addDomain("technology/data_science/data_science") .setActive(true) @@ -693,4 +698,23 @@ await tx.waitConfirmed(); - \ No newline at end of file + + +## Common Contract Errors + +These revert reasons come from the TRC-8004 / ERC-8004 registry contracts; the "Where" column names the contract function and the SDK calls that send it. On EVM networks a string reason such as `Not authorized` appears in the SDK's transaction error (usually from gas estimation). A custom ERC-721 error raised inside a Reputation or Validation call, such as `giveFeedback()` on an unregistered agent, may show only as its selector (`0x7e273289` is `ERC721NonexistentToken`). On TRON both SDKs report only `TRON transaction reverted: (REVERT)`, so look the transaction up on TronScan to see the reason. + +| Revert reason | Where | Cause and fix | +| --- | --- | --- | +| `Not authorized` | Identity Registry `setMetadata` / `setAgentURI` / `setAgentWallet`, sent by `updateOnChainMetadata()`, `updateRegistration()`, `registerIPFS()` and `setWallet()`; Validation Registry `validationRequest` | The sender is not the agent's owner, approved address or operator. Sign with the owner, or `addOperator()` (TypeScript also `agent.approve()`) first | +| `ERC721InsufficientApproval` | `transferFrom`, sent by TypeScript `transfer()` | The sender is not the owner, approved address or operator. Python `transfer()` checks the owner before sending and raises `ValueError: Only the current owner (…) can transfer the agent` instead | +| `reserved key` | `register()` metadata, `setMetadata` | `agentWallet` is reserved; use `setWallet()` | +| `bad wallet` / `expired` / `deadline too far` | `setWallet` | Zero address; `deadline` already passed; `deadline` more than 5 minutes ahead | +| `invalid wallet sig` | `setWallet` | The signature was not produced by the new wallet (ECDSA, or ERC-1271 for contract wallets) | +| `Self-feedback not allowed` | `giveFeedback` | The agent's owner, an operator or the approved address rated the agent | +| `index must be > 0` / `index out of bounds` | `revokeFeedback`, `appendResponse`, `readFeedback` (SDK `getFeedback()`) | `feedbackIndex` is 0, or higher than the last feedback that client gave the agent (including when it gave none) | +| `Already revoked` | `revokeFeedback` | The feedback was already revoked | +| `Empty URI` | `appendResponse` | `responseURI` is empty. Python `appendResponse()` builds the URI only when an IPFS client is configured and the response has `text` or `attachments`; otherwise, or when the IPFS upload fails, it sends an empty URI and hits this error | +| `clientAddresses required` | `getSummary`, called by Python `getReputationSummary()` without a subgraph | The agent has no feedback yet, so the client list read from the chain is empty. `sdk.getReputationSummary()` takes no client list, so treat this as "no reputation yet" (TypeScript returns zeros instead) | +| `exists` / `not validator` / `resp>100` / `unknown` | Validation request / response | Duplicate request hash; responder is not the named validator; score above 100; unknown request hash | +| `ERC721NonexistentToken` | Identity Registry writes and `ownerOf` / `tokenURI` reads, `giveFeedback`, `validationRequest` | The agent ID is not registered on the configured network. Python `loadAgent()` raises `Failed to load agent …`; TypeScript `loadAgent()` does not throw and returns an agent with an empty URI | diff --git a/docs/8004/Usage/Install.md b/docs/8004/Usage/Install.md index 7335ef8d..6e6d3d21 100644 --- a/docs/8004/Usage/Install.md +++ b/docs/8004/Usage/Install.md @@ -7,7 +7,7 @@ * **Python**: 3.11 or higher * **pip**: Package manager * **Private Key**: For signing transactions (not required for read-only mode) -* **RPC Node**: An RPC endpoint for a [supported network](/8004/SupportedNetworks/) — an EVM endpoint for BSC, or a TRON node endpoint +* **RPC Node**: An RPC endpoint for a [supported network](/8004/SupportedNetworks/) — an EVM endpoint for BSC or Base, or a TRON node endpoint * **IPFS Provider (Optional)**: Pinata, Filecoin account, or local IPFS node * **Subgraph (Optional)**: Use this when your deployment provides a subgraph endpoint @@ -42,11 +42,11 @@ pip install -e . ## Install with TypeScript ### Prerequisites -* **Node.js**: 20 or higher +* **Node.js**: 22.23.4+ (22.x), 24.22.1+ (24.x), or 26.12.1+ (26.x) * **npm or yarn**: Package manager * **Write Operation Configuration**: Write operations require configuring a `signer` (private key string) -* **RPC Node**: An RPC endpoint for a [supported network](/8004/SupportedNetworks/) — an EVM endpoint for BSC, or a TRON node endpoint -* **IPFS Provider (Optional)**: Pinata, Filecoin account, or local IPFS node +* **RPC Node**: An RPC endpoint for a [supported network](/8004/SupportedNetworks/) — an EVM endpoint for BSC or Base, or a TRON node endpoint +* **IPFS (Optional)**: the TypeScript SDK has no built-in provider; pass an `ipfsUploader` callback for `registerIPFS()` * **Subgraph (Optional)**: You may provide `subgraphUrl` or `subgraphOverrides` as needed. diff --git a/docs/8004/Usage/RegistrationHTTP.md b/docs/8004/Usage/RegistrationHTTP.md index 82febd72..fdc2c84b 100644 --- a/docs/8004/Usage/RegistrationHTTP.md +++ b/docs/8004/Usage/RegistrationHTTP.md @@ -347,7 +347,7 @@ const jsonContent = JSON.stringify(registrationData, null, 2); // 5. Update the URI on-chain (only if the URI has changed) const tx = await agent.updateRegistration("https://yourdomain.com/agents/my-agent-updated.json"); -await tx.waitConfirmed(); +if ("waitConfirmed" in tx) await tx.waitConfirmed(); // returns the Agent itself when no URI is passed ``` @@ -396,7 +396,8 @@ The SDK generates a registration file compliant with the 8004 standard: } ``` -**Note:** two things to watch when you publish this file. +**Note:** three things to watch when you publish this file. -* **TypeScript does not emit these keys.** Python's `registrationFile().to_dict()` (and `str(...)`) produces exactly the shape above. In `@bankofai/8004-sdk` **1.1.2**, `agent.toJSON()` returns the SDK's internal shape — `endpoints` and `x402support` — and `uploadRegistrationFile()` serialises that object as-is, so `registerIPFS()` publishes the internal keys too. Map `endpoints` → `services` and `x402support` → `x402Support` yourself before hosting the file from TypeScript. +* **TypeScript's `toJSON()` is not this shape.** Python's `registrationFile().to_dict()` (and `str(...)`) produces the keys above, but for an agent built with `createAgent()` neither carries chain or registry info, so `registrations` comes out as `[]` and `type` is the EIP-8004 URL even on TRON; `agent.toJson()` passes that info and fills in `registrations` (once the agent has an ID) and the TRON `type`. In `@bankofai/8004-sdk` **1.2.1**, `agent.toJSON()` still returns the SDK's internal shape — `endpoints` and `x402support` — so map `endpoints` → `services` and `x402support` → `x402Support` yourself before hosting the file from TypeScript. `registerIPFS()` does not need this: since 1.2.0 it publishes the canonical keys (`type`, `services`, `registrations` with the minted agent ID, `x402Support`), plus TypeScript's own `tags` and `metadata`, and `loadAgent()` reads both the canonical and the internal key names. +* **TRON uses a different `type`.** On TRON, the file that `registerIPFS()` publishes in either SDK — and Python's `agent.toJson()` — sets `type` to `https://github.com/tronprotocol/tips/blob/master/tip-8004.md#registration-v1` instead of the EIP-8004 URL. * `setA2A()` defaults the endpoint version to `0.30` in Python and `0.3.0` in TypeScript. Pass the version explicitly if you need both languages to agree. diff --git a/docs/8004/contract.md b/docs/8004/contract.md index 7743929d..5e8c07e4 100644 --- a/docs/8004/contract.md +++ b/docs/8004/contract.md @@ -17,3 +17,11 @@ | BSC Testnet | IdentityRegistry | 0x8004A818BFB912233c491871b3d84c89A494BD9e | | BSC Testnet | ReputationRegistry | 0x8004B663056A597Dffe9eCcC1965A193B7388713 | | BSC Testnet | ValidationRegistry | 0x8004Cb1BF31DAf7788923b405b754f57acEB4272 | +| Base Mainnet | IdentityRegistry | 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 | +| Base Mainnet | ReputationRegistry | 0x8004BAa17C55a88189AE136b182e5fdA19dE9b63 | +| Base Mainnet | ValidationRegistry | 0x8004Cc8439f36fd5F9F049D9fF86523Df6dAAB58 | +| Base Sepolia | IdentityRegistry | 0x8004A818BFB912233c491871b3d84c89A494BD9e | +| Base Sepolia | ReputationRegistry | 0x8004B663056A597Dffe9eCcC1965A193B7388713 | +| Base Sepolia | ValidationRegistry | 0x8004Cb1BF31DAf7788923b405b754f57acEB4272 | + +The Base addresses are the official ERC-8004 Registry deployments that the TypeScript SDK (1.2.0 and later) is configured with. The Python SDK ships only the Identity and Reputation Registry addresses for Base. diff --git a/docs/8004/general.md b/docs/8004/general.md index 8a9c9de9..e7abe194 100644 --- a/docs/8004/general.md +++ b/docs/8004/general.md @@ -26,7 +26,7 @@ The 8004 Protocol leverages the blockchain as a shared public registry that anyo This file defines the Agent’s basic information, payment wallet, and multiple communication endpoints (such as Web, MCP, DID, etc.), and supports automatic domain matching or `.well-known` path verification to confirm endpoint ownership. - As an NFT asset, the Agent identity is transferable. Upon ownership transfer, the payment address is automatically reset to ensure secure control of service revenue by the new owner. + As an NFT asset, the Agent identity is transferable. Upon ownership transfer, the payment address (`agentWallet`) is cleared, so the previous owner's wallet stops receiving service revenue; the new owner sets a new one with `setWallet`. - **Reputation System** diff --git a/docs/8004/sdk-features.md b/docs/8004/sdk-features.md index a704a0e1..42a310cb 100644 --- a/docs/8004/sdk-features.md +++ b/docs/8004/sdk-features.md @@ -9,7 +9,7 @@ This page tracks what the 8004 SDK actually implements, and where the TypeScript > **Two implementations, one repository.** `8004-sdk` ships a TypeScript package and a Python package from the same repository (`ts/` and `python/`). They target the same contracts and the same registration file format, but **they are not feature-identical** — the gaps are listed under [Language parity](#language-parity). > -> **Current release:** `@bankofai/8004-sdk` **1.1.2** on npm; the Python package is not on PyPI, so install it from the repository's `main` branch. TypeScript requires **Node.js ≥ 20**; Python requires **Python ≥ 3.11**. +> **Current release:** `@bankofai/8004-sdk` **1.2.1** on npm; the Python package (source version `1.2.1`) is not on PyPI, so install it from the repository's `main` branch. TypeScript requires **Node.js 22.23.4+ (22.x), 24.22.1+ (24.x), or 26.12.1+ (26.x)**; Python requires **Python ≥ 3.11**. --- @@ -40,24 +40,30 @@ The Python package is not yet published to PyPI; install it from the repository. | `SDK` — chain clients, registries, top-level calls | ✅ | ✅ | | | `Agent` — registration file builder + on-chain agent | ✅ | ✅ | | | `TransactionHandle` — await confirmation, map the result | ✅ | ✅ | `waitConfirmed()` / `wait_confirmed()` | -| `SubgraphClient` — indexed queries | ✅ | ✅ | Optional; requires a deployed subgraph | +| `SubgraphClient` — indexed queries | ✅ | ✅ | Optional. Python ships default subgraph URLs for Base Mainnet and Base Sepolia (and Ethereum, Polygon, Sepolia); TypeScript ships none, so pass `subgraphUrl`. Neither has a BSC default | | `AgentIndexer` | ✅ | ✅ | Python also exposes `refreshIndex` / `refreshAgentIndex` | --- ## Networks -Contract addresses ship with the SDK in `resource/chains.json` and are identical in both languages. The full list is on the [Contract Addresses](/8004/contract/) page. +Contract addresses ship with the SDK. The BSC and TRON entries are identical in both languages; for Base, the TypeScript SDK configures all three registries, while the Python SDK knows only the Identity and Reputation Registry addresses. The full list is on the [Contract Addresses](/8004/contract/) page. + +Pass BSC as `eip155:56` / `eip155:97`. A bare `mainnet` resolves to **TRON** mainnet in both SDKs, and a bare `testnet` is rejected by TypeScript (Python falls back to chainId 97). TypeScript additionally accepts `bsc`, `bsc:mainnet` and `evm`, but without `chainId: 56` **all three resolve to BSC Testnet (97)** — including `bsc:mainnet`. Use `eip155:56` for BSC Mainnet. | Ecosystem | Network name | CAIP-2 / chainId | EIP-712 chainId | Default endpoint | |---|---|---|---|---| -| BSC | `mainnet` | `eip155:56` / `56` | `56` | `https://bsc-dataseed.binance.org` | -| BSC | `testnet` | `eip155:97` / `97` | `97` | `https://data-seed-prebsc-1-s1.binance.org:8545` | -| TRON | `mainnet` | — | `728126428` | `https://api.trongrid.io` | -| TRON | `nile` | — | `3448148188` | `https://nile.trongrid.io` | -| TRON | `shasta` | — | `2494104990` | `https://api.shasta.trongrid.io` | +| BSC | `eip155:56` | `eip155:56` / `56` | `56` | `https://bsc-dataseed.binance.org` | +| BSC | `eip155:97` | `eip155:97` / `97` | `97` | `https://data-seed-prebsc-1-s1.binance.org:8545` | +| Base | `base` | `eip155:8453` / `8453` | `8453` | `https://mainnet.base.org` | +| Base | `base:sepolia` | `eip155:84532` / `84532` | `84532` | `https://sepolia.base.org` | +| TRON | `mainnet` | — / `728126428` | `728126428` | `https://api.trongrid.io` | +| TRON | `nile` | — / `3448148188` | `3448148188` | `https://nile.trongrid.io` | +| TRON | `shasta` | — / `2494104990` | `2494104990` | `https://api.shasta.trongrid.io` | + +Use the bare TRON names (`mainnet` / `nile` / `shasta`) — that is what the examples show. Both SDKs also accept a `tron:`-prefixed alias (`tron:nile`, and a bare `tron` resolves to Nile), stripping the prefix internally; these are the SDK's own aliases, not the CAIP-2 identifiers x402 uses. The EIP-712 chainId column is what the SDK puts in the typed-data domain when signing an agent-wallet change on TRON. Since 1.1.2 both SDKs also use that value as the TRON chainId, so agent IDs take the form `3448148188:` on Nile (older releases produced `1:`; persisted IDs are not rewritten). `loadAgent()` and the reputation calls in both SDKs reject an ID whose chain prefix differs from the configured network; indexer and subgraph queries such as `getAgent()` and `searchFeedback()` do not check it. -Use the bare TRON names (`mainnet` / `nile` / `shasta`) — that is what the examples show. Both SDKs also accept a `tron:`-prefixed alias (`tron:nile`, and a bare `tron` resolves to Nile), stripping the prefix internally; these are the SDK's own aliases, not the CAIP-2 identifiers x402 uses. The EIP-712 chainId column is what the SDK puts in the typed-data domain when signing an agent-wallet change on TRON. +Base uses the official ERC-8004 Registry deployments. TypeScript accepts `base` / `base:mainnet` / `eip155:8453` and `base:sepolia` / `eip155:84532`. Python accepts only `eip155:8453` / `eip155:84532` and has no Base Validation Registry; a bare `network="base"` is not rejected but falls back to chainId 97 (BSC Testnet). --- @@ -68,10 +74,12 @@ Use the bare TRON names (`mainnet` / `nile` / `shasta`) — that is what the exa | Create an agent locally | ✅ | ✅ | `sdk.createAgent(...)` | | Edit name / description / image | ✅ | ✅ | `agent.updateInfo({...})` — edits the local registration file; publish it with `updateRegistration()` | | Register with an HTTP(S) URI | ✅ | ✅ | `agent.register(agentURI)` | -| Register via IPFS upload | ✅ | ✅ | `agent.registerIPFS()` | +| Register without a URI, or with on-chain metadata entries | ✅ | ✅ | TS passes them explicitly: `agent.register()` / `agent.register(agentURI, metadata)`. Python's `register(agentURI)` takes only the URI but mints the metadata staged with `setMetadata()` (plus the ENS name as `agentName`); `registerIPFS()` mints without a URI first | +| Register via IPFS upload | ✅ | ✅ | `agent.registerIPFS()` — for a new agent, mints first, then uploads the file with the minted agent ID and sets the URI (two transactions) | | Update the on-chain URI | ✅ | ✅ | `agent.updateRegistration(...)` | | Set the agent URI locally | ✅ | ✅ | `agent.setAgentUri(uri)` — local only, no transaction | | Load an agent from chain by ID | ✅ | ✅ | `sdk.loadAgent(agentId)` — works without a subgraph | +| Read the on-chain agent URI | ✅ | ❌ | `sdk.getAgentURI(agentId)` | | MCP / A2A / ENS endpoints | ✅ | ✅ | `setMCP()`, `setA2A()`, `setENS()` | | Remove endpoints | ✅ | ✅ | `removeEndpoint()`, `removeEndpoints()` | | OASF skills and domains | ✅ | ✅ | `addSkill()`, `addDomain()`, `removeSkill()`, `removeDomain()` — but stored differently: Python builds an `OASF` entry inside `services` (its `version` is `0.8`), TypeScript pushes the slugs into a flat `tags` array | @@ -79,7 +87,8 @@ Use the bare TRON names (`mainnet` / `nile` / `shasta`) — that is what the exa | Trust models | ✅ | ✅ | `setTrust(...)` — an object in TypeScript, keyword arguments in Python; both cover `reputation`, `cryptoEconomic`, `teeAttestation` | | Replace the trust model list wholesale | ✅ | ✅ | TypeScript `agent.setTrustModels([...])` normalises the names; Python `agent.trustModels([...])` assigns them as given | | Arbitrary metadata | ✅ | ✅ | `setMetadata()` | -| Read / delete a single metadata key | ❌ | ✅ | `agent.getMetadata()`, `agent.delMetadata()` | +| Read local metadata / delete one key | ❌ | ✅ | `agent.getMetadata()` returns a copy of all local metadata; `agent.delMetadata(key)` deletes one key — local registration file | +| Read one on-chain metadata value | ✅ | ❌ | `sdk.getMetadata(agentId, key)` — returns the raw bytes as hex | | Push metadata changes on-chain | ✅ | ❌ | `agent.updateOnChainMetadata()` | | Active flag | ✅ | ✅ | `setActive()`; Python also has `activate()` / `deactivate()` | | x402 support flag | ✅ | ✅ | `setX402Support()` | @@ -118,7 +127,9 @@ All reputation calls live on the `SDK` object in both languages. | Aggregate summary | ✅ | ✅ | `sdk.getReputationSummary(...)` | | Revoke your own feedback | ✅ | ✅ | `sdk.revokeFeedback(...)` | | Append a response to feedback | ✅ | ✅ | `sdk.appendResponse(...)` | -| Search feedback | ✅ | ✅ | `sdk.searchFeedback(...)` — subgraph-backed | +| Search feedback | ✅ | ✅ | `sdk.searchFeedback(...)` — subgraph-backed; without a subgraph, TypeScript returns `[]` and Python reads a single agent's feedback from chain | +| Read all feedback from chain | ✅ | ❌ | `sdk.readAllFeedback(...)` | +| Read clients, last index, response count | ✅ | ❌ | `sdk.getClients()`, `sdk.getLastIndex()`, `sdk.getResponseCount()` | | Build a feedback file | ❌ | ✅ | `sdk.prepareFeedbackFile(...)` | :::note Self-feedback is blocked on-chain @@ -134,6 +145,8 @@ The Reputation Registry rejects feedback from the agent's owner and from any app | Request validation | ✅ | ❌ | `sdk.validationRequest(...)` | | Submit a validator response | ✅ | ❌ | `sdk.validationResponse(...)` | | Read validation status | ✅ | ❌ | `sdk.getValidationStatus(...)` | +| Aggregate validation summary | ✅ | ❌ | `sdk.getValidationSummary(...)` | +| List an agent's / a validator's request hashes | ✅ | ❌ | `sdk.getAgentValidations(...)`, `sdk.getValidatorRequests(...)` | :::caution Validation is TypeScript-only today The Python package resolves the Validation Registry contract and ships its ABI, but exposes **no** validation methods. Use the TypeScript SDK, or call the contract directly, if you need the Validation Registry from Python. @@ -150,11 +163,13 @@ The registry itself is deliberately generic: only the validator named in the req | Transfer the agent | ✅ | ✅ | `agent.transfer(...)`; Python also has `sdk.transferAgent(...)` | | Approve the new owner as operator during transfer | ✅ | ❌ | TS `transfer(to, approveOperator)`; the Python `Agent.transfer` takes only the address | | Add / remove an operator | ✅ | ✅ | `agent.addOperator()`, `agent.removeOperator()` | -| Read the owner | ❌ | ✅ | `sdk.getAgentOwner()` | +| Approve an address for this agent only | ✅ | ❌ | `agent.approve(operator)` | +| Read approvals | ✅ | ❌ | `sdk.getApproved(agentId)`, `sdk.isApprovedForAll(owner, operator)` | +| Read the owner | ✅ | ✅ | `sdk.getAgentOwner()` | | Ownership / transfer pre-checks | ❌ | ✅ | `sdk.isAgentOwner()`, `sdk.canTransferAgent()` | :::note Transfer clears the agent wallet -The Identity Registry clears `agentWallet` on every transfer, so `getAgentWallet()` returns the zero address afterwards. The new owner must call `setWallet()` again. +The Identity Registry clears `agentWallet` on every transfer, so it reads back as the zero address afterwards — which the SDKs report as `undefined` (TypeScript `sdk.getAgentWallet()`) / `None` (Python `agent.getWallet()`). The new owner must call `setWallet()` again. ::: --- @@ -164,13 +179,13 @@ The Identity Registry clears `agentWallet` on every transfer, so `getAgentWallet | Feature | TypeScript | Python | Requires subgraph | |---|:--:|:--:|:--:| | `sdk.loadAgent(agentId)` | ✅ | ✅ | No — reads the chain directly | -| `sdk.getAgent(agentId)` | ✅ | ✅ | Yes | +| `sdk.getAgent(agentId)` | ✅ | ✅ | Yes (Python falls back to its local index cache, which `refreshIndex` cannot fill in 1.2.1 — see below) | | `sdk.searchAgents(filters)` | ✅ | ✅ | Yes | -| `sdk.searchFeedback(filters)` | ✅ | ✅ | Yes | +| `sdk.searchFeedback(filters)` | ✅ | ✅ | Yes, except Python's on-chain fallback for a single `agentId` | | `sdk.getSubgraphClient(chainId?)` — Python `sdk.get_subgraph_client()` | ✅ | ✅ | — returns nothing when unconfigured | -| `sdk.refreshIndex()`, `sdk.refreshAgentIndex()` | ❌ | ✅ | Yes — same indexer as `getAgent` | +| `sdk.refreshIndex()`, `sdk.refreshAgentIndex()` | ❌ | ⚠️ | Broken in 1.2.1: the SDK builds its indexer without the Identity Registry, so `refreshAgentIndex()` raises `Failed to get agent data: Identity registry not available` and `refreshIndex()` returns `[]` | -If no subgraph is configured, the index-backed calls are unavailable — `loadAgent()` remains the way to fetch an agent. +Without a subgraph (TypeScript unless you pass `subgraphUrl` or a `subgraphOverrides` entry for the chain; Python on BSC unless you pass `subgraphOverrides`, and always on TRON), `searchAgents()` is unavailable, Python `getAgent()` raises `Agent … not found in index` and TypeScript `getAgent()` returns `undefined`, TypeScript `searchFeedback()` returns `[]`, and Python `searchFeedback()` works only for a single `agentId`. `loadAgent()` remains the way to fetch an agent. On TRON, Python's `getAgent(":")` still queries a subgraph URL given in `subgraphOverrides` or the `SUBGRAPH_URL_` environment variable. --- @@ -186,9 +201,9 @@ The two languages configure storage completely differently. | Filecoin | `ipfs="filecoinPin"` | `filecoinPrivateKey` | | Self-hosted IPFS node | `ipfs="node"` | `ipfsNodeUrl` | -**TypeScript** ships none of these. `SDKConfig` exposes a single `ipfsUploader?: (json: string) => Promise` callback that you implement yourself; `registerIPFS()` throws `No ipfsUploader configured` without it. +**TypeScript** ships none of these. `SDKConfig` exposes a single `ipfsUploader?: (json: string) => Promise` callback that you implement yourself; `registerIPFS()` throws `No ipfsUploader configured` without it. For a new agent that error comes from `waitConfirmed()`, after the registration transaction has already minted the agent with an empty URI, so configure the uploader first. -IPFS is optional in both languages. It is needed only for `registerIPFS()` and for reading an `ipfs://` agent URI; HTTP(S) registration works without it. +IPFS is optional in both languages. It is needed for `registerIPFS()`; in Python also for reading an `ipfs://` agent URI and for `giveFeedback(feedbackFile=...)` (which raises without an IPFS client). TypeScript reads `ipfs://` URIs through the public `https://ipfs.io/ipfs/` gateway with no configuration. HTTP(S) registration works without IPFS. --- @@ -197,9 +212,9 @@ IPFS is optional in both languages. It is needed only for `registerIPFS()` and f The two implementations diverge in four ways worth planning around: 1. **Validation is TypeScript-only.** See above — this is the largest functional gap. -2. **Defaults and config shapes differ.** `setA2A()` defaults to version `0.30` in Python and `0.3.0` in TypeScript; `subgraphUrl` and `ipfsUploader` are TypeScript-only constructor options, while `registryOverrides`, `indexingStore` and the built-in IPFS providers are Python-only. +2. **Defaults and config shapes differ.** `setA2A()` defaults to version `0.30` in Python and `0.3.0` in TypeScript; `subgraphUrl` and `ipfsUploader` are TypeScript-only constructor options, while `registryOverrides`, `indexingStore`, `embeddings` and the built-in IPFS providers are Python-only. `feeLimit` (TRON, in SUN) defaults to 120,000,000 in TypeScript and 10,000,000 in Python. 3. **Reading agent fields.** Python exposes twenty-one read-only properties on `Agent` (`name`, `description`, `endpoints`, `mcpTools`, `owners`, `operators`, `updatedAt`, and so on). TypeScript exposes only `agent.agentId`; everything else is read through `agent.toJSON()`. -4. **Helper coverage.** Python adds ownership pre-checks (`isAgentOwner`, `canTransferAgent`), metadata accessors (`getMetadata`, `delMetadata`), `activate()` / `deactivate()`, and `saveToFile()`. TypeScript adds `updateOnChainMetadata()`, `uploadRegistrationFile()` and `submitRegister()`. +4. **Helper coverage.** TypeScript also exposes `sdk.getTypedDataChainId()`; Python also exposes `sdk.chain_id()`, `sdk.registries()`, `sdk.set_chain()`, `sdk.isReadOnly` and `agent.registrationFile()` / `agent.toJson()`. Python adds ownership pre-checks (`isAgentOwner`, `canTransferAgent`), metadata accessors (`getMetadata`, `delMetadata`), `activate()` / `deactivate()`, and `saveToFile()`. TypeScript adds `updateOnChainMetadata()`, `uploadRegistrationFile()`, `submitRegister()`, `agent.approve()`, and the Registry read calls listed above (`getAgentURI`, `sdk.getMetadata`, `getApproved`, `isApprovedForAll`, `readAllFeedback`, `getClients`, `getLastIndex`, `getResponseCount`, and the validation reads). :::note Two Python names are defined twice In the Python `Agent` class, `transfer` and `trustModels` are each defined twice and the later definition wins. The effective `transfer` is `transfer(newOwnerAddress)` — the earlier four-argument form with `approve_operator` is unreachable — and the read-only `trustModels` property is shadowed by the setter of the same name, so `agent.trustModels` returns the bound method rather than the list. Read the trust models from `agent.registrationFile()` instead. @@ -211,3 +226,4 @@ In the Python `Agent` class, `transfer` and `trustModels` are each defined twice - ✅ = Implemented - ❌ = Not implemented in this language +- ⚠️ = Present but not working in the current release diff --git a/docs/Agent-Wallet/Developer/CLI-Reference.md b/docs/Agent-Wallet/Developer/CLI-Reference.md index 7a419d7b..e18112e2 100644 --- a/docs/Agent-Wallet/Developer/CLI-Reference.md +++ b/docs/Agent-Wallet/Developer/CLI-Reference.md @@ -1,115 +1,137 @@ # CLI Reference -A complete reference for every Agent-wallet command. Whether you're reviewing the basics or configuring automation scripts, you'll find the answer here. +A complete reference for every `agent-wallet` 3.x command. Whether you're reviewing the basics or configuring automation scripts, you'll find the answer here. :::tip Just getting started? -If you haven't created a wallet yet, head to [Quick Start](../QuickStart.md) first — three steps, under a minute. +If you haven't created a wallet yet, head to [Quick Start](../QuickStart.md) first. +::: + +``` +Usage: agent-wallet [options] + +Commands: + start Quick setup: init + configure wallet + add Add a wallet configuration + list List all configured wallets + use [id] Set the active wallet + inspect Show wallet details + resolve-address [id] Resolve wallet addresses + remove [id] Remove a wallet + sign Sign transactions or typed data + reset Delete all wallet data +``` + +Every command accepts `--dir, -d ` (wallet directory, default `~/.agent-wallet`, or `AGENT_WALLET_DIR` when set) and `--help, -h`. Add `-h` after any command or subcommand — for example `agent-wallet start wallet_cli -h` — to see its exact options. + +:::caution Removed in 3.0 +`init`, `change-password`, `sign msg`, the `local_secure` wallet type, and the `-p/--password` and `--save-runtime-secrets` flags no longer exist; `-g/--generate` is still parsed but ignored — 3.x does not generate keys. Agent-wallet 3.x has no master password and does not generate keys. ::: --- ## Basic Commands -The core operations you'll use most often — creating wallets and signing. +### `agent-wallet start` (Create a Wallet and Make It Active) -### `agent-wallet start` (Initialize / Create Wallet) - -**Interactive creation (recommended):** ```bash -agent-wallet start +agent-wallet start # interactive: choose a wallet type +agent-wallet start [options] ``` -The system walks you through choosing a wallet type, generating keys, and setting a master password. Just follow the prompts. -:::danger Avoid the `raw_secret` wallet type for real funds -The interactive wizard may offer a `raw_secret` option. This type stores your private key **unencrypted** on disk — any program with file system access can read it directly. Only use `raw_secret` in fully isolated test environments. For any wallet holding real funds, always choose `local_secure`. -::: +Creates the wallet directory if needed, adds one wallet, and makes it the **active** wallet. If wallets already exist, `start` first asks whether to `add` another or `exit`; pass `--override` to skip that question. -:::tip Privy wallet type -The wizard also offers a `privy` option for Privy-managed server wallets. This type delegates key custody to Privy's infrastructure — no local private key is stored on disk. You'll need a Privy App ID, App Secret, and Wallet ID to configure it: +Naming the wallet type as a subcommand skips the type prompt. For CI or a background service, also pass `-w` and every credential flag — without them the CLI prompts, and prompts fail in a non-interactive environment. If wallets may already exist, pass `--override` too; otherwise the add/exit question can't be asked and `start` exits 1. + +| Option | Applies to | Description | +| :--- | :--- | :--- | +| `-w, --wallet-id ` | all | Wallet ID to create. Prompt defaults: `default_raw`, `default_privy`, `default_cli` | +| `--override` | `start` only | Skip the "already initialized" prompt when wallets already exist | +| `-k, --private-key ` | `raw_secret` | Import a hex private key | +| `-m, --mnemonic ` | `raw_secret` | Import a BIP-39 mnemonic | +| `-mi, --mnemonic-index ` | `raw_secret` | Account index for the mnemonic (default `0`; requires `-m`) | +| `--derive-as ` | `raw_secret` | `eip155` or `tron`; answers the mnemonic derivation prompt (3.0.0 checks the value but does not store it, so it does not change the derived addresses) | +| `--app-id ` | `privy` | Privy app ID | +| `--app-secret ` | `privy` | Privy app secret (plaintext; prefer `--app-secret-exec`) | +| `--app-secret-exec ` | `privy` | Executable that prints the Privy app secret | +| `--privy-wallet-id ` | `privy` | Existing Privy wallet ID | +| `--account