Skip to content
Open
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
13 changes: 13 additions & 0 deletions changelog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ description: 'Product updates and announcements for BANK OF AI — all products,

Product updates and announcements for BANK OF AI.

<div className="changelog-entry">
<div className="changelog-date">Nov 24, 2026</div>
<div className="changelog-body">

### TRON SDK 2.1.4 and Facilitator 2.3.3

<div className="changelog-tags"><span className="changelog-tag">Docs</span><span className="changelog-tag">x402</span></div>

- Updated TRON SDK installation and Facilitator deployment guidance, including TronWeb 6.5.2 and the new TRON `exact` validation rules. [Details](./x402/)

</div>
</div>

<div className="changelog-entry">
<div className="changelog-date">Nov 12, 2026</div>
<div className="changelog-body">
Expand Down
14 changes: 14 additions & 0 deletions changelog/x402.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ description: 'Release notes for the x402 payment protocol, SDK, and CLI.'

Release notes for the x402 protocol, SDK, and [Wallet CLI guide](/wallet-cli/).

<div className="changelog-entry">
<div className="changelog-date">Nov 24, 2026</div>
<div className="changelog-body">

### TRON SDK 2.1.4 and Facilitator 2.3.3

<div className="changelog-tags"><span className="changelog-tag">Docs</span><span className="changelog-tag">x402</span></div>

- Both TRON SDK packages use TronWeb 6.5.2 and retain the exact `@x402/core@2.29.0` peer. TRON `exact` rejects invalid assets, nonpositive amounts, and mismatched transfer methods. Registered USDT and USDD use Permit2. [SDK feature matrix](/x402/sdk-features/) · [TRON transfer methods](/x402/core-concepts/network-and-token-support/#tron-exact-transfer-method)
- Facilitator 2.3.3 adopts SDK 2.1.4. Required balance or allowance read failures block settlement, and its wallet adapter accepts 20-byte hex asset addresses for contract reads. [Facilitator deployment and API](/x402/core-concepts/facilitator/)

</div>
</div>

<div className="changelog-entry">
<div className="changelog-date">Nov 12, 2026</div>
<div className="changelog-body">
Expand Down
2 changes: 1 addition & 1 deletion docs/x402/core-concepts/OfficialFacilitator.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Therefore, it is **strongly recommended to apply for and configure an API Key**

### Key refreshes and temporary authentication failures

Facilitator v2.3.2 reads active keys from DevCenter into a cache; the built-in production configuration refreshes it every **5 seconds**. Both key creation and deletion affect authentication after the next successful refresh, rather than immediately. Each process refreshes independently; replicas need not apply changes together, and database read time also affects the delay.
The Facilitator reads active keys from DevCenter into a cache; the built-in production configuration refreshes it every **5 seconds**. Both key creation and deletion affect authentication after the next successful refresh, rather than immediately. Each process refreshes independently; replicas need not apply changes together, and database read time also affects the delay.

While the cache is fresh, incorrect keys, keys not yet synced, and revoked keys after syncing are treated as anonymous rather than uniformly rejected with HTTP 401. A successful call does not prove that a key was recognized. In particular, transaction-hash and authorization-identity lookups apply seller filtering only for a **valid, recognized key**.

Expand Down
18 changes: 15 additions & 3 deletions docs/x402/core-concepts/facilitator.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ Quick usage examples can be found in [OfficialFacilitator](./OfficialFacilitator

If you need full control over the settlement wallet, RPC endpoints, energy management, or which networks and schemes are registered — or you have specific privacy or compliance requirements — you can deploy your own Facilitator service.

The current source release is **v2.3.2** (2026-11-13): official `@x402/core`, `@x402/evm`, and `@x402/extensions` **2.29.0**, TRON mechanism and independent resource extension **2.1.2**, and an explicit `@bankofai/agent-wallet` **3.1.0-beta.1** pin. Source installations require Node.js **24.22.1+ (24.x) or 26.12.1+**; Docker and CI pin 24.22.2, and Node.js 22 is no longer supported. Installation overrides pin Zod to **4.6.7**; preserve that override when refreshing dependencies. See the [Facilitator v2.3.2 README](https://github.com/BofAI/x402-facilitator/blob/v2.3.2/README.md) for deployment details.
The current source release is **v2.3.3** (2026-11-24): official `@x402/core`, `@x402/evm`, and `@x402/extensions` **2.29.0**, TRON mechanism and independent resource extension **2.1.4**, and an explicit `@bankofai/agent-wallet` **3.1.0-beta.1** pin. Source installations require Node.js **24.22.1+ (24.x) or 26.12.1+**; Docker and CI pin 24.22.2, and Node.js 22 is no longer supported. Installation overrides pin Zod to **4.6.7**; preserve that override when refreshing dependencies. See the [Facilitator v2.3.3 README](https://github.com/BofAI/x402-facilitator/blob/v2.3.3/README.md) for deployment details.

This release uses a single **TronWeb 6.5.1** installation. The service's installation overrides pin its Axios to **1.21.1** and require follow-redirects **^1.16.3**; the release lockfile resolves follow-redirects to **1.16.3**. Hono Node Server is updated to **2.1.6**. Install from the release lockfile and preserve its overrides when updating dependencies.
This release uses a single **TronWeb 6.5.2** installation. The service's installation overrides pin its Axios to **1.21.1** and require follow-redirects **^1.16.3**; the release lockfile resolves follow-redirects to **1.16.3**. The lockfile resolves Hono Node Server to **2.1.6**. Install from the release lockfile and preserve its overrides when updating dependencies.

This deployment section describes the complete `BofAI/x402-facilitator` service. The minimal SDK example at `examples/typescript/facilitator/basic` exposes only `/verify`, `/settle`, and `/supported` and does not require a database; the database and DevCenter requirements below apply to the complete service.

Expand Down Expand Up @@ -153,7 +153,19 @@ Record-query failures use these codes: `404 not_found` when no record matches, `

> There is **no** `/fee/quote` endpoint, and the schemes carry no facilitator fee at all. Payment records are keyed on the on-chain authorization identity (`network` + `scheme` + `asset` + `payer` + `nonce`), not a client-supplied payment ID.

v2.3.0 also turns missing or non-object TRON `exact` authorizations into protocol verification rejections: `isValid: false` with `invalidReason: "invalid_exact_tron_payload_authorization"`, instead of HTTP 500. This compatibility handling does not suppress genuine RPC failures.
### TRON `exact` errors {#tron-exact-errors}

Facilitator v2.3.3 uses SDK 2.1.4 to validate TRON `exact` payments. The SDK errors below use HTTP `200`. A `/verify` response includes `isValid: false` and `invalidReason`. A `/settle` response includes `success: false` and `errorReason`. If the payment is rejected before broadcast, `transaction` is an empty string.

| Reason | Trigger |
|--------|---------|
| `invalid_exact_tron_asset` | The asset address is malformed or points to a known infrastructure contract. |
| `invalid_exact_tron_amount` | The amount is outside the positive `uint256` range or is formatted differently from a decimal integer string. |
| `invalid_exact_tron_asset_transfer_method` | The transfer method is unsupported for the asset or the authorization uses the other method. |
| `invalid_exact_tron_payload_authorization` | The payload lacks a complete authorization or contains both authorization formats. |
| `chain_read_failed` | A required balance or Permit2 allowance read failed. The SDK rejects the payment before broadcasting a new settlement transaction. |

These codes describe the scheme result. The service's request and Permit2 replay checks can return their own errors before the SDK evaluates the payment. [TRON transfer methods](/x402/core-concepts/network-and-token-support/#tron-exact-transfer-method).

---

Expand Down
2 changes: 1 addition & 1 deletion docs/x402/core-concepts/http-402.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ When the server returns a `402 Payment Required` response, the decoded `PAYMENT-
<Tabs>
<TabItem value="TRON" label="TRON">

> **Note:** On TRON, `accepted.asset` and `accepted.payTo` use Base58 addresses, but the addresses inside `permit2Authorization` (`permitted.token`, `spender`, `witness.to`, `from`) are converted to `0x` hex form for EIP-712/TIP-712 signing.
> The TRON example uses Base58 addresses for the asset and recipient. Addresses inside `permit2Authorization` (`permitted.token`, `spender`, `witness.to`, `from`) use 20-byte `0x` hex for TIP-712 signing. In SDK 2.1.4, the resource server includes the selected `extra.assetTransferMethod` in each TRON `exact` quote. [TRON transfer methods](/x402/core-concepts/network-and-token-support/#tron-exact-transfer-method).

```json
{
Expand Down
14 changes: 13 additions & 1 deletion docs/x402/core-concepts/network-and-token-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ x402 supports **TRC-20, BEP-20, and ERC-20** tokens. TRON/BSC routes use their c

> **Extensibility**: The protocol is highly extensible. By registering tokens through the TRON token registry (`registerToken` from `@bankofai/x402-tron`) or an explicit `{ asset, amount, extra }` price on the server route, you can support any custom TRC-20 or BEP-20 token.

> **Token selection for the `exact` scheme**: EIP-3009 tokens (for example official Base USDC) settle gaslessly via `transferWithAuthorization`. Plain ERC-20 tokens (for example BSC USDC/USDT and TRON USDT/USDD) settle via the Permit2 path and need a one-time `approve(Permit2)` — on TRON the client auto-broadcasts it on first payment (on EVM it never does; see the sponsoring paths below), or, on TRON when the server advertises `trc20ApprovalResourceSponsoring` (SDK 1.2.0+), signs it and lets the facilitator sponsor and broadcast it (since 2.1.0 only with the client extension from `@bankofai/x402-tron-extensions` registered). You set the per-token method on the server under `accepts[].price.extra`; the SDK surfaces it on the wire as `accepts[].extra`: EIP-3009 → `{ name, version }`; plain ERC-20 → `{ assetTransferMethod: "permit2" }`. A permit2 asset that also implements EIP-2612 carries `{ name, version }` alongside `assetTransferMethod`; omitting that pair is precisely how a server tells clients to skip EIP-2612. Both sponsoring paths live inside the permit2 branch, so neither applies to an EIP-3009 asset. On a permit2 asset the client signs a gasless EIP-2612 permit when a `readContract` capability is available (from the signer or a configured RPC), the server advertises the `eip2612GasSponsoring` extension, `extra` carries both `name` and `version`, and the current Permit2 allowance does not already cover the payment. Note the asymmetry: a *missing* read capability skips the permit entirely, whereas a read that *throws* is caught and signing proceeds. Otherwise the client *tries* ERC-20 approval gas sponsoring, which needs `readContract`, the separate `erc20ApprovalGasSponsoring` extension from the server, a signer that can sign raw transactions, and a transaction count (from the signer or a configured RPC), and again an allowance that does not already cover the payment; there the client signs an `approve` for `MaxUint256` — always the max, regardless of the payment amount — that the facilitator broadcasts. When neither path qualifies the payload carries no sponsoring extension at all. Among the shipped default assets the `supportsEip2612` flag is set on MegaETH MegaUSD (mainnet) and on Mezo mUSD and Radius SBC (mainnet and testnet).
> **Token selection for the `exact` scheme**: EIP-3009 tokens (for example official Base USDC) settle gaslessly via `transferWithAuthorization`. Plain ERC-20 tokens (for example BSC USDC/USDT and TRON USDT/USDD) settle via the Permit2 path and need a one-time `approve(Permit2)` — on TRON the client auto-broadcasts it on first payment (on EVM it never does; see the sponsoring paths below), or, on TRON when the server advertises `trc20ApprovalResourceSponsoring` (SDK 1.2.0+), signs it and lets the facilitator sponsor and broadcast it (since 2.1.0 only with the client extension from `@bankofai/x402-tron-extensions` registered). See [TRON transfer methods](#tron-exact-transfer-method) for the TRON selection rules. On EVM, Permit2 assets carry `extra.assetTransferMethod: "permit2"`. An EVM Permit2 asset that also implements EIP-2612 carries `{ name, version }` alongside `assetTransferMethod`; omitting that pair is precisely how a server tells clients to skip EIP-2612. Both sponsoring paths live inside the permit2 branch, so neither applies to an EIP-3009 asset. On a permit2 asset the client signs a gasless EIP-2612 permit when a `readContract` capability is available (from the signer or a configured RPC), the server advertises the `eip2612GasSponsoring` extension, `extra` carries both `name` and `version`, and the current Permit2 allowance does not already cover the payment. Note the asymmetry: a *missing* read capability skips the permit entirely, whereas a read that *throws* is caught and signing proceeds. Otherwise the client *tries* ERC-20 approval gas sponsoring, which needs `readContract`, the separate `erc20ApprovalGasSponsoring` extension from the server, a signer that can sign raw transactions, and a transaction count (from the signer or a configured RPC), and again an allowance that does not already cover the payment; there the client signs an `approve` for `MaxUint256` — always the max, regardless of the payment amount — that the facilitator broadcasts. When neither path qualifies the payload carries no sponsoring extension at all. Among the shipped default assets the `supportsEip2612` flag is set on MegaETH MegaUSD (mainnet) and on Mezo mUSD and Radius SBC (mainnet and testnet).

---

Expand Down Expand Up @@ -145,6 +145,18 @@ The `exact` scheme pays the exact amount advertised. It covers two token transfe

The `exact` scheme conforms to the **v2 wire format** published by the **x402 Foundation**: a stock v2 client can pay a protected endpoint on this SDK's server directly, and this SDK's client can pay any v2-compliant server — no project-specific translation required. Transfer authorization data is carried in `payload.authorization` on the EIP-3009 path and in `payload.permit2Authorization` on the Permit2 path.

#### TRON `exact` transfer methods {#tron-exact-transfer-method}

In SDK 2.1.4, the resource server resolves `extra.assetTransferMethod` in this order.

1. Use the explicit method in `accepts[].price.extra.assetTransferMethod` if it is valid for the token. For `eip3009`, the token must implement `transferWithAuthorization`. Supply the token's TIP-712 domain `name` and `version`.
2. If the method is omitted, use the registered token's method when one is set. The USDT and USDD contracts listed above resolve to `permit2`. Setting `eip3009` for those contracts fails validation.
3. If neither specifies a method, use `permit2` when it is the only method advertised in the facilitator's `/supported` entry at `extra.supportedAssetTransferMethods`. When both are advertised or the list is absent, use `eip3009`. The server rejects any resolved method excluded by the advertised list.

The resource server writes the resolved method into the quote's `extra.assetTransferMethod`. A client or facilitator receiving a quote that still omits it uses the registered method, with `eip3009` as the fallback.

Use a TRC-20 token contract address and a positive decimal integer string in atomic units for `amount`. The SDK rejects malformed addresses and infrastructure contracts such as Permit2, the settlement proxies, and batch contracts and collectors. Use Base58 addresses in route configuration. The wallet-backed facilitator also normalizes 20-byte `0x` asset addresses before its contract reads. [TRON Exact specification](https://github.com/BofAI/x402/blob/v2.1.4/specs/schemes/exact/scheme_exact_tron.md).

### `upto` Scheme

Usage-based billing. The client signs a Permit2 authorization for up to a **maximum** amount; the server decides the **real usage** per request and settles only that (≤ max). One signature shape, a different charge each request — ideal for **metered billing** (LLM token usage, compute time, bandwidth). Available on EVM and TRON (both Permit2).
Expand Down
4 changes: 2 additions & 2 deletions docs/x402/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ The flow mirrors a human user:
Install the published packages in your TypeScript app and build against npm, for example:

```bash
pnpm add @x402/core@2.29.0 @x402/fetch@2.29.0 @bankofai/x402-tron@2.1.2 @x402/evm@2.29.0 @bankofai/agent-wallet
pnpm add @x402/core@2.29.0 @x402/fetch@2.29.0 @bankofai/x402-tron@2.1.4 @x402/evm@2.29.0 @bankofai/agent-wallet
pnpm add @x402/express@2.29.0
```

Use the framework package that matches your server (`@x402/express`, `@x402/hono`, `@x402/fastify`, or `@x402/next`), at the same `2.29.0` as `@x402/core` — `@bankofai/x402-tron` 2.1.2 requires exactly `@x402/core@2.29.0`. Add `@bankofai/x402-tron-extensions@2.1.2` only if you use TRON resource sponsoring. The [`examples/typescript`](https://github.com/BofAI/x402/tree/main/examples/typescript) workspace is a runnable reference for client → server → facilitator flows, not a prerequisite for application development.
Use the framework package that matches your server (`@x402/express`, `@x402/hono`, `@x402/fastify`, or `@x402/next`), at the same `2.29.0` as `@x402/core` — `@bankofai/x402-tron` 2.1.4 requires exactly `@x402/core@2.29.0`. Add `@bankofai/x402-tron-extensions@2.1.4` only if you use TRON resource sponsoring. The [`examples/typescript`](https://github.com/BofAI/x402/tree/main/examples/typescript) workspace is a runnable reference for client → server → facilitator flows, not a prerequisite for application development.

For TronWeb HTTP dependency overrides in your own application, see [Dependency security](/x402/sdk-features/#dependency-security).

Expand Down
6 changes: 3 additions & 3 deletions docs/x402/getting-started/quickstart-for-human.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ x402 is a **TypeScript-only** SDK: the TRON mechanism ships as `@bankofai/x402-t

### Checklist Before You Start

- [ ] **Node.js 24.22.1+** and **pnpm 11.1+** installed
- [ ] **Node.js 24.22.1+ (24.x) or 26.12.1+** and **pnpm 11.1+** installed
- [ ] A dedicated **test wallet** created (see below)
- [ ] Test tokens claimed (free)
- [ ] A target x402-protected API URL, such as the `/credit` endpoint from [Quickstart for Sellers](./quickstart-for-sellers.md)
Expand Down Expand Up @@ -99,11 +99,11 @@ x402 is a **TypeScript-only** SDK: the TRON mechanism ships as `@bankofai/x402-t
Install the published npm packages in your TypeScript application:

```bash
pnpm add @bankofai/agent-wallet @x402/core@2.29.0 @x402/fetch@2.29.0 @bankofai/x402-tron@2.1.2
pnpm add @bankofai/agent-wallet @x402/core@2.29.0 @x402/fetch@2.29.0 @bankofai/x402-tron@2.1.4
pnpm add -D tsx # to run the TypeScript entry point below
```

Use `npm install` or `yarn add` with the same package names if your project does not use pnpm. Keep `@x402/core` and `@x402/fetch` at exactly `2.29.0` — `@bankofai/x402-tron` 2.1.2 declares `@x402/core@2.29.0` as an exact peer dependency.
Use `npm install` or `yarn add` with the same package names if your project does not use pnpm. Keep `@x402/core` and `@x402/fetch` at exactly `2.29.0` — `@bankofai/x402-tron` 2.1.4 declares `@x402/core@2.29.0` as an exact peer dependency.

For TronWeb HTTP dependency overrides in your own application, see [Dependency security](/x402/sdk-features/#dependency-security).

Expand Down
Loading
Loading