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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/agents/code-reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ General code review for x402 changes. Treat like a normal `code-reviewer`, but b
1. **Wire format**: any touch to `PaymentRequired`, `PaymentPayload`, or `PaymentResponse` serialization must match [specs/protocol.md](../../specs/protocol.md) and not break [specs/001-exact-v2-compat/spec.md](../../specs/001-exact-v2-compat/spec.md).
2. **Scheme payload**: check that `payload.authorization` is used (not legacy `extensions.transferAuthorization`) for `exact`.
3. **Pipeline step ordering**: client payment selection is 5 steps in [specs/roles.md](../../specs/roles.md). Policies go at step 5.
4. **Mechanism registration**: exact-match network keys (`tron:0xcd8690dc`) win over wildcards (`tron:*`). Flag changes to registration logic.
4. **Mechanism registration**: exact-match network keys (`tron:3448148188`) win over wildcards (`tron:*`). Flag changes to registration logic.
5. **Lowercase addresses**: all address/selector/topic strings lowercase. Flag any uppercase leak.
6. **Header encoding**: `Base64(UTF-8(JSON.stringify(...)))`, never raw JSON in the header value.

Expand Down
2 changes: 1 addition & 1 deletion .claude/rules/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ When multiple rule files apply, read all of them before editing. Rules are layer
│ └── exact-gasfree.md # TRON GasFree custodial + TIP-712 relayer
├── networks/
│ ├── evm.md # eip155:<chainId>, contracts, signing
│ └── tron.md # tron:<hexChainId>, TIP-712 hex-address rule, GasFree link
│ └── tron.md # tron:<decimalChainId>, TIP-712 hex-address rule, GasFree link
├── typescript/
│ └── conventions.md # pnpm/turbo, ESM, viem/tronweb, fork+overlay, signer factories
└── testing/
Expand Down
4 changes: 2 additions & 2 deletions .claude/rules/common/conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Repository-wide conventions that apply to every component, every scheme. Break t

- **Lowercase everything**: addresses, selectors, event topics.
- **TRON + EIP/TIP-712**: convert TRON Base58 addresses (`T...`) to **0x-prefixed EVM hex** before passing to any EIP-712 / TIP-712 signer. This applies to `verifyingContract`, `token`, `serviceProvider`, `user`, `receiver`, and any other `address`-typed field, **both in the domain and in the message**. Use `tronAddressToEvm` / `normalizeAddressForSigning` from `mechanisms/tron/src/utils.ts` — do not reimplement. See [docs/solutions.md entry #1](../../../docs/solutions.md).
- **Network identifiers**: CAIP-2 `eip155:<chainId>` for EVM, `tron:<hexChainId>` for TRON (e.g. `tron:0xcd8690dc` for Nile). Detection rule: `tron:` prefix → TRON, `eip155:` prefix → EVM. Prefer the exported constants `TRON_MAINNET` / `TRON_NILE` / `TRON_SHASTA` from `@bankofai/x402-tron` over copying the hex strings.
- **Network identifiers**: CAIP-2 `eip155:<chainId>` for EVM and `tron:<decimalChainId>` for TRON (e.g. `tron:3448148188` for Nile). Detection rule: `tron:` prefix → TRON, `eip155:` prefix → EVM. Prefer the exported constants `TRON_MAINNET` / `TRON_NILE` / `TRON_SHASTA` from `@bankofai/x402-tron` over copying identifiers. Deprecated `tron:0x...` values are input aliases only.

## Amounts & fees

Expand Down Expand Up @@ -36,7 +36,7 @@ Repository-wide conventions that apply to every component, every scheme. Break t

## Mechanism registration

- **Exact match** (e.g. `"tron:0xcd8690dc"`) outranks **wildcard** (e.g. `"tron:*"`). Register more specific first, or accept that exact-match mechanisms win the lookup regardless of insertion order.
- **Exact match** (e.g. `"tron:3448148188"`) outranks **wildcard** (e.g. `"tron:*"`). Register more specific first, or accept that exact-match mechanisms win the lookup regardless of insertion order.
- Each scheme class is registered per `(network, scheme)` with `new + register` (no thin wrapper). Do not conflate schemes across mechanisms; register each scheme-network pair explicitly. See [typescript/CLAUDE.md](../../../typescript/CLAUDE.md) "Scheme API surface".

## Policy pipeline
Expand Down
10 changes: 5 additions & 5 deletions .claude/rules/networks/tron.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

Mechanisms: `typescript/packages/mechanisms/tron` (`@bankofai/x402-tron`). **In-house, no upstream** — edit directly.

Identifier: `tron:<hexChainId>` per CAIP-2 (hex chain id as the reference, not a human-readable name). Canonical constants: `TRON_MAINNET`, `TRON_NILE`, `TRON_SHASTA` exported from `@bankofai/x402-tron`.
Identifier: `tron:<decimalChainId>` per CAIP-2. Canonical constants: `TRON_MAINNET`, `TRON_NILE`, `TRON_SHASTA` exported from `@bankofai/x402-tron`. Deprecated `tron:0x...` identifiers are accepted as input aliases but must not be emitted by new code.

| Constant | Identifier | Chain ID (decimal) | Chain ID (hex) |
| Constant | Canonical identifier | TIP-712 chain ID | Deprecated hex alias |
|---|---|---|---|
| `TRON_MAINNET` | `tron:0x2b6653dc` | 728126428 | 0x2b6653dc |
| `TRON_SHASTA` | `tron:0x94a9059e` | 2494104990 | 0x94a9059e |
| `TRON_NILE` | `tron:0xcd8690dc` | 3448148188 | 0xcd8690dc |
| `TRON_MAINNET` | `tron:728126428` | 728126428 | 0x2b6653dc |
| `TRON_SHASTA` | `tron:2494104990` | 2494104990 | 0x94a9059e |
| `TRON_NILE` | `tron:3448148188` | 3448148188 | 0xcd8690dc |

Chain id helper: `getTronChainId(network)` in `mechanisms/tron/src/utils.ts`.

Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ Each component has its own guidance with build/test commands and conventions whe
- **Addresses, selectors, event topics**: lowercase-normalized everywhere. TRON addresses are converted to **0x-prefixed EVM hex** before any EIP-712/TIP-712 signing — see [docs/solutions.md entry #1](docs/solutions.md).
- **Payment ID**: 16 random bytes, encoded as `0x` + 32 hex chars, signed as `bytes16`.
- **HTTP header encoding**: `Base64(UTF-8(JSON.stringify(object)))` for `PAYMENT-REQUIRED`, `PAYMENT-SIGNATURE`, `PAYMENT-RESPONSE`.
- **Network identifiers**: CAIP-2 `eip155:<chainId>` for EVM; `tron:<hexChainId>` for TRON (e.g. `tron:0xcd8690dc` for Nile).
- **Mechanism registration**: `tron:0xcd8690dc` (exact match, higher priority) beats `tron:*` (wildcard, lower priority).
- **Network identifiers**: CAIP-2 `eip155:<chainId>` for EVM; `tron:<decimalChainId>` for TRON (e.g. `tron:3448148188` for Nile). Deprecated `tron:0x...` values are accepted only as compatibility inputs.
- **Mechanism registration**: `tron:3448148188` (exact match, higher priority) beats `tron:*` (wildcard, lower priority).
- **Commit messages**: `<type>(<scope>): <description>` — e.g. `fix(tron): preserve raw_data_hex in tron approvals`.

## Branch workflow
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const wallet = /* resolve your @bankofai/agent-wallet */;
// Permit2 approve that USDT/USDD need. When TRON_GRID_API_KEY is unset, mainnet
// RPC falls back to a BankofAI-operated endpoint.
const signer = await createClientTronSigner(wallet, {
network: "tron:0xcd8690dc",
network: "tron:3448148188",
apiKey: process.env.TRON_GRID_API_KEY,
});

Expand Down Expand Up @@ -146,9 +146,9 @@ x402 currently supports TRC-20 tokens on the TRON network and BEP-20 tokens on t

| Network | ID | Status | Recommended For |
|---------|----|--------|-----------------|
| **TRON Nile** | `tron:0xcd8690dc` | Testnet | **Development & Testing** |
| **TRON Shasta** | `tron:0x94a9059e` | Testnet | Alternative Testing |
| **TRON Mainnet** | `tron:0x2b6653dc` | Mainnet | Production |
| **TRON Nile** | `tron:3448148188` | Testnet | **Development & Testing** |
| **TRON Shasta** | `tron:2494104990` | Testnet | Alternative Testing |
| **TRON Mainnet** | `tron:728126428` | Mainnet | Production |
| **BSC Testnet** | `eip155:97` | Testnet | **Development & Testing** |
| **BSC Mainnet** | `eip155:56` | Mainnet | Production |

Expand Down
10 changes: 5 additions & 5 deletions examples/typescript/.env-batch.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ TRON_GRID_API_KEY=
# Which chains to exercise, one burst (+refund) per entry, in order. Each entry is
# <network>[@<token>] network: CAIP-2 chain id —
# EVM: "eip155:97" (BSC testnet), "eip155:56" (BSC mainnet)
# TRON: "tron:0xcd8690dc" (Nile testnet), "tron:0x94a9059e" (Shasta testnet), "tron:0x2b6653dc" (mainnet)
# TRON: "tron:3448148188" (Nile testnet), "tron:2494104990" (Shasta testnet), "tron:728126428" (mainnet)
# Shortcuts: "eip155" or "tron" match any network of that family.
# token optional (each chain advertises one: EVM=USDC, TRON=USDT) — symbol or
# asset address. Use `@` (not `#`) — dotenv treats `#` as a comment.
# Unset ⇒ each configured chain once.
PAY_TARGETS=eip155:97,tron:0xcd8690dc
PAY_TARGETS=eip155:97,tron:3448148188

# The resource the client fetches (server route).
RESOURCE_URL=http://localhost:4041/weather
Expand All @@ -48,9 +48,9 @@ REFUND_AFTER_REQUESTS=false # refund the remaining channel balance after the bur
# ── SERVER · the resource provider (servers/batch-settlement) ─────────────
# Payout addresses (set the chain(s) you want to accept).
EVM_ADDRESS=0x... # BSC, eip155:97 (token USDC, permit2)
TRON_ADDRESS=T... # TRON Nile (tron:0xcd8690dc); Shasta: tron:0x94a9059e; mainnet: tron:0x2b6653dc (token USDT, permit2)
# TRON network: tron:0xcd8690dc (Nile, default), tron:0x94a9059e (Shasta), tron:0x2b6653dc (mainnet)
# TRON_NETWORK=tron:0xcd8690dc
TRON_ADDRESS=T... # TRON Nile (tron:3448148188); Shasta: tron:2494104990; mainnet: tron:728126428 (token USDT, permit2)
# TRON network: tron:3448148188 (Nile, default), tron:2494104990 (Shasta), tron:728126428 (mainnet)
# TRON_NETWORK=tron:3448148188

# Where the server binds, and where it reaches the facilitator.
SERVER_PORT=4041
Expand Down
6 changes: 3 additions & 3 deletions examples/typescript/.env-exact.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ TRON_GRID_API_KEY=
# Which chains/tokens to pay, one payment per entry, in order.
# <network>[@<token>] network: CAIP-2 chain id —
# EVM: "eip155:97" (BSC testnet), "eip155:56" (BSC mainnet)
# TRON: "tron:0xcd8690dc" (Nile testnet), "tron:0x94a9059e" (Shasta testnet), "tron:0x2b6653dc" (mainnet)
# TRON: "tron:3448148188" (Nile testnet), "tron:2494104990" (Shasta testnet), "tron:728126428" (mainnet)
# Shortcuts: "eip155" or "tron" match any network of that family.
# token: symbol (DHLU/USDC/USDT on EVM, USDT/USDD on TRON) or an asset address;
# omit the token to use that network's first advertised token.
# Use `@` (not `#`) — dotenv treats `#` as a comment and would truncate the value.
# Unset ⇒ each configured chain once, with its first token.
PAY_TARGETS=eip155:97@DHLU,tron:0xcd8690dc@USDT
PAY_TARGETS=eip155:97@DHLU,tron:3448148188@USDT

# The resource the client fetches (server route).
RESOURCE_URL=http://localhost:4021/weather
Expand All @@ -43,7 +43,7 @@ MCP_SERVER_URL=http://localhost:4023
# ── SERVER · the resource provider (servers/express · servers/mcp) ────────
# Payout addresses (set the chain(s) you want to accept).
EVM_ADDRESS=0x... # BSC, eip155:97
TRON_ADDRESS=T... # TRON Nile (tron:0xcd8690dc); Shasta: tron:0x94a9059e; mainnet: tron:0x2b6653dc
TRON_ADDRESS=T... # TRON Nile (tron:3448148188); Shasta: tron:2494104990; mainnet: tron:728126428

# Where the server binds, and where it reaches the facilitator.
SERVER_PORT=4021
Expand Down
6 changes: 3 additions & 3 deletions examples/typescript/.env-gasfree.example
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ RESOURCE_URL=http://localhost:4031/weather

# ── SERVER · the resource provider (servers/gasfree) ──────────────────────
# Payout address (TRON only).
TRON_ADDRESS=T... # TRON Nile (tron:0xcd8690dc); Shasta: tron:0x94a9059e; mainnet: tron:0x2b6653dc
# TRON network: tron:0xcd8690dc (Nile, default), tron:0x94a9059e (Shasta), tron:0x2b6653dc (mainnet)
# TRON_NETWORK=tron:0xcd8690dc
TRON_ADDRESS=T... # TRON Nile (tron:3448148188); Shasta: tron:2494104990; mainnet: tron:728126428
# TRON network: tron:3448148188 (Nile, default), tron:2494104990 (Shasta), tron:728126428 (mainnet)
# TRON_NETWORK=tron:3448148188

# Where the server binds, and where it reaches the facilitator.
SERVER_PORT=4031
Expand Down
6 changes: 3 additions & 3 deletions examples/typescript/.env-multi-scheme.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

# ── Resource-server payout addresses (set the chain(s) you want to accept) ─
EVM_ADDRESS=0x... # BSC, eip155:97 (omit to disable EVM)
TRON_ADDRESS=T... # TRON Nile (tron:0xcd8690dc); Shasta: tron:0x94a9059e; mainnet: tron:0x2b6653dc (omit to disable TRON)
# TRON network: tron:0xcd8690dc (Nile, default), tron:0x94a9059e (Shasta), tron:0x2b6653dc (mainnet)
# TRON_NETWORK=tron:0xcd8690dc
TRON_ADDRESS=T... # TRON Nile (tron:3448148188); Shasta: tron:2494104990; mainnet: tron:728126428 (omit to disable TRON)
# TRON network: tron:3448148188 (Nile, default), tron:2494104990 (Shasta), tron:728126428 (mainnet)
# TRON_NETWORK=tron:3448148188

# ── Facilitator URLs (comma-separated) ────────────────────────────────────
# basic settles `exact` (EVM + TRON permit2); gasfree settles `exact_gasfree`.
Expand Down
10 changes: 5 additions & 5 deletions examples/typescript/.env-upto.example
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ TRON_GRID_API_KEY=
# Which chains to exercise, one N-request run per entry, in order. Each entry is
# <network>[@<token>] network: CAIP-2 chain id —
# EVM: "eip155:97" (BSC testnet), "eip155:56" (BSC mainnet)
# TRON: "tron:0xcd8690dc" (Nile testnet), "tron:0x94a9059e" (Shasta testnet), "tron:0x2b6653dc" (mainnet)
# TRON: "tron:3448148188" (Nile testnet), "tron:2494104990" (Shasta testnet), "tron:728126428" (mainnet)
# Shortcuts: "eip155" or "tron" match any network of that family.
# token optional (each chain advertises one: EVM=USDC, TRON=USDT) — symbol or
# asset address. Use `@` (not `#`) — dotenv treats `#` as a comment.
# Unset ⇒ each configured chain once.
PAY_TARGETS=eip155:97,tron:0xcd8690dc
PAY_TARGETS=eip155:97,tron:3448148188

# The resource the client fetches (server route).
RESOURCE_URL=http://localhost:4051/generate
Expand All @@ -44,9 +44,9 @@ NUMBER_OF_REQUESTS=3
# ── SERVER · the resource provider (servers/upto) ─────────────────────────
# Payout addresses (set the chain(s) you want to accept).
EVM_ADDRESS=0x... # BSC, eip155:97 (token USDC, permit2)
TRON_ADDRESS=T... # TRON Nile (tron:0xcd8690dc); Shasta: tron:0x94a9059e; mainnet: tron:0x2b6653dc (token USDT, permit2)
# TRON network: tron:0xcd8690dc (Nile, default), tron:0x94a9059e (Shasta), tron:0x2b6653dc (mainnet)
# TRON_NETWORK=tron:0xcd8690dc
TRON_ADDRESS=T... # TRON Nile (tron:3448148188); Shasta: tron:2494104990; mainnet: tron:728126428 (token USDT, permit2)
# TRON network: tron:3448148188 (Nile, default), tron:2494104990 (Shasta), tron:728126428 (mainnet)
# TRON_NETWORK=tron:3448148188

# Where the server binds, and where it reaches the facilitator.
SERVER_PORT=4051
Expand Down
10 changes: 5 additions & 5 deletions examples/typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ not contain private keys. Never reuse one wallet for both roles.

| Chain | Network | Token | Scheme | One-time approve | User pays gas? |
|---|---|---|---|---|---|
| TRON nile | `tron:0xcd8690dc` | USDT (6) | exact **permit2** | yes — client auto-broadcasts | only the approve (TRX) |
| TRON nile | `tron:0xcd8690dc` | USDD (18) | exact **permit2** | yes — client auto-broadcasts | only the approve (TRX) |
| TRON nile | `tron:3448148188` | USDT (6) | exact **permit2** | yes — client auto-broadcasts | only the approve (TRX) |
| TRON nile | `tron:3448148188` | USDD (18) | exact **permit2** | yes — client auto-broadcasts | only the approve (TRX) |
| BSC testnet | `eip155:97` | DHLU (6) | exact **eip3009** | none | **none (fully gasless)** |
| BSC testnet | `eip155:97` | USDC (18) | exact **permit2 + gas-sponsoring** | yes — client signs, facilitator relays | only the approve (BNB) |
| BSC testnet | `eip155:97` | USDT (18) | exact **permit2 + gas-sponsoring** | yes — client signs, facilitator relays | only the approve (BNB) |
Expand Down Expand Up @@ -151,7 +151,7 @@ sponsorship).

### Mainnet (real funds)

Mainnet networks (`eip155:56`, `tron:0x2b6653dc`) are registered alongside their
Mainnet networks (`eip155:56`, `tron:728126428`) are registered alongside their
testnet counterparts in the same tables — no uncommenting needed. The server
advertises both networks, and the client selects which one to pay through
`PAY_TARGETS`. The example uses one `EVM_ADDRESS` / `TRON_ADDRESS` payout address
Expand All @@ -164,8 +164,8 @@ All verified on-chain; sources: the official
|---|---|---|---|---|
| `eip155:56` (BSC) | USDC | `0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d` | 18 | permit2 |
| `eip155:56` (BSC) | USDT | `0x55d398326f99059fF775485246999027B3197955` | 18 | permit2 |
| `tron:0x2b6653dc` | USDT | `TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t` | 6 | permit2 |
| `tron:0x2b6653dc` | USDD | `TXDk8mbtRbXeYuMNS83CfKPaYYT8XWv9Hz` | 18 | permit2 |
| `tron:728126428` | USDT | `TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t` | 6 | permit2 |
| `tron:728126428` | USDD | `TXDk8mbtRbXeYuMNS83CfKPaYYT8XWv9Hz` | 18 | permit2 |

> BSC mainnet has **no ERC-3009 token** (USDC/USDT are plain BEP-20) — so
> mainnet EVM payments all go permit2 + gas-sponsored approve. DHLU (eip3009) is
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript/clients/mcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Connects to an MCP server over SSE and calls its tools. On a 402, the SDK pays
automatically using whichever registered scheme matches the server's offered
network — **BSC testnet** (`eip155:97`) or **TRON Nile** (`tron:0xcd8690dc`).
network — **BSC testnet** (`eip155:97`) or **TRON Nile** (`tron:3448148188`).

Both chains are registered in one `createx402MCPClient({ schemes })` call; the
payment-selection pipeline filters by the offered network and picks a match. Each
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript/facilitator/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ provider matrix.
| Chain | Network | Scheme |
|---|---|---|
| EVM | `eip155:97` (BSC testnet) | `exact` — DHLU via eip3009, USDC via permit2 + gas-sponsored approve |
| TRON | `tron:0xcd8690dc` | `exact` — USDT/USDD via permit2 (auto-approve) |
| TRON | `tron:3448148188` | `exact` — USDT/USDD via permit2 (auto-approve) |

Add another EVM network (e.g. Base Sepolia) by adding one entry to the
`EVM_NETWORKS` table in `src/chains/evm.ts`. The ERC-20 approval gas-sponsoring
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript/facilitator/batch-settlement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ server. Endpoints: `POST /verify`, `POST /settle`, `GET /supported`.
| Chain | CAIP-2 | Contract | Token (advertised by server) |
|---|---|---|---|
| BSC testnet | `eip155:97` | deterministic singleton `0x4020…0003` | USDC (Permit2) |
| TRON Nile | `tron:0xcd8690dc` | `TWBwWHZWwH8TzrZnbxit1J645VGYY1K2fA` | USDT (Permit2) |
| TRON Nile | `tron:3448148188` | `TWBwWHZWwH8TzrZnbxit1J645VGYY1K2fA` | USDT (Permit2) |

Add a chain by extending `EVM_NETWORKS` in [`src/chains/evm.ts`](src/chains/evm.ts)
or adapting [`src/chains/tron.ts`](src/chains/tron.ts).
2 changes: 1 addition & 1 deletion examples/typescript/facilitator/gasfree/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Verifies and settles TRON **GasFree** payments. Unlike the `exact` facilitator i
does **not** broadcast a raw TRON transaction — it forwards the signed TIP-712
permit to the **GasFree relayer API**, which pays the on-chain energy and submits.

- Scheme: `exact_gasfree` on `tron:0xcd8690dc`.
- Scheme: `exact_gasfree` on `tron:3448148188`.
- Port `4032`.
- Key custody in `@bankofai/agent-wallet`; the TronWeb instance holds no key.

Expand Down
4 changes: 2 additions & 2 deletions examples/typescript/facilitator/upto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ server and client.
## Notes

- The upto Permit2 proxy is a deterministic CREATE2 singleton on EVM (same
address on every chain) and is deployed per-network on TRON (`tron:0xcd8690dc` /
`tron:0x2b6653dc`).
address on every chain) and is deployed per-network on TRON (`tron:3448148188` /
`tron:728126428`).
- The settled amount is bounded by the client's Permit2 witness — the facilitator
cannot settle more than the authorized maximum.
2 changes: 1 addition & 1 deletion examples/typescript/servers/batch-settlement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ supplies the `receiverAuthorizer` (fetched via `/supported`).

- Set the payout address(es) you want to accept:
- `EVM_ADDRESS` → BSC (`eip155:97`), token USDC (Permit2)
- `TRON_ADDRESS` → TRON Nile (`tron:0xcd8690dc`), token USDT (Permit2)
- `TRON_ADDRESS` → TRON Nile (`tron:3448148188`), token USDT (Permit2)
- A running batch-settlement facilitator (default `FACILITATOR_URL=http://localhost:4042`).

## Run
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript/servers/express/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Then pay it with the fetch client (`../../clients/fetch`).
| Chain | Network | Tokens advertised | payTo env |
|---|---|---|---|
| EVM | `eip155:97` (BSC testnet) | DHLU (eip3009), USDC (permit2) | `EVM_ADDRESS` |
| TRON | `tron:0xcd8690dc` | USDT, USDD (permit2) | `TRON_ADDRESS` |
| TRON | `tron:3448148188` | USDT, USDD (permit2) | `TRON_ADDRESS` |

Tokens are configured per network in `src/chains/evm.ts` (`EVM_TOKENS`) and
`src/chains/tron.ts`. BSC USDC needs a one-time Permit2 approve, advertised via
Expand Down
Loading
Loading