@aifinpay/skill 2.5.1 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@
12
12
  "name": "aifinpay",
13
13
  "source": "./",
14
14
  "description": "Payment rail skills for paying agents and API merchants.",
15
- "version": "2.5.1",
15
+ "version": "2.6.0",
16
16
  "author": {
17
17
  "name": "AiFinPay Support",
18
18
  "email": "contact@aifinpay.io"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aifinpay",
3
3
  "description": "Payment rail for AI agents: pay for x402 APIs or charge agents for yours.",
4
- "version": "2.5.1",
4
+ "version": "2.6.0",
5
5
  "author": { "name": "AiFinPay Support" },
6
6
  "homepage": "https://aifinpay.io",
7
7
  "repository": "https://github.com/AiFinPay/skill",
package/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## 2.6.0 — unreleased
2
+
3
+ - Payer skill: Base. MCP 2.5 pays on the chain the owner sets in
4
+ `AIFINPAY_PAY_CHAIN` (`polygon` default, or `base`), with the gas cap in ETH
5
+ as `AIFINPAY_MAX_GAS`; `AIFINPAY_MAX_GAS_POL` is refused on Base. Fund the
6
+ same EVM address with ETH on Base. Node `v14.chain: "base"` and Python
7
+ `chain="base"` since SDK 2.3.0. Names MCP 2.5.0, SDK 2.3.0 and Python 2.3.0
8
+ as current.
9
+ - Merchant skill: `"settlement_chain": "base"` at registration makes agents
10
+ pay that merchant on Base.
11
+
1
12
  ## 2.5.1 — unreleased
2
13
 
3
14
  - Payer skill: a USDC payment needs POL for the worst-case gas (about 0.21 POL
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: aifinpay
3
- description: Pay for x402-gated APIs and sites as an agent (AIFP-1 on Polygon,
3
+ description: Pay for x402-gated APIs and sites as an agent (AIFP-1 on Polygon or Base,
4
4
  within owner-set limits) — including when the owner just says "buy access for
5
5
  this site" — link the agent to its owner's AiFinPay dashboard, and read
6
6
  wallet, payment history, prepaid quotas and Agent Passport records through
@@ -61,20 +61,20 @@ your language. There is no "install together" scenario.
61
61
 
62
62
  ## Version and release status
63
63
 
64
- Released and current: MCP **2.4.0**, Node SDK **2.2.0**, Python **2.2.1**.
64
+ Released and current: MCP **2.5.0**, Node SDK **2.3.0**, Python **2.3.0**.
65
65
  Payments are released — `payable_fetch` has shipped since MCP 2.2.0. An older
66
66
  copy of this skill that calls MCP "read-only" or payments "release pending" is
67
67
  out of date; follow this one. Install the `latest` release.
68
68
 
69
69
  | Surface | Can it pay? |
70
70
  |---|---|
71
- | MCP `@aifinpay/mcp` 2.4.x | Yes — `payable_fetch`, once the owner enables payments; POL, or USDC with `AIFINPAY_PAY_ASSET=USDC`; `scope: "merchant"` buys a whole site |
72
- | Node `@aifinpay/agent` 2.2.x | Yes — `fetchPaid` with a v14 journal and gas cap; POL (with your own POL/USD rate) or USDC (`v14.asset: "USDC"`) |
73
- | Python `aifinpay-agent` 2.2.x | Yes — `agent.fetch_paid(url, allowed_origins=…, max_amount_usd=…, daily_amount_usd=…)`; POL (priced independently) or USDC (`asset="USDC"`); recover an unconfirmed payment with `agent.recover_paid(journal_path)` |
71
+ | MCP `@aifinpay/mcp` 2.5.x | Yes — `payable_fetch`, once the owner enables payments; on Polygon (POL) or, with `AIFINPAY_PAY_CHAIN=base`, on Base (ETH); USDC on either with `AIFINPAY_PAY_ASSET=USDC`; `scope: "merchant"` buys a whole site |
72
+ | Node `@aifinpay/agent` 2.3.x | Yes — `fetchPaid` with a v14 journal and gas cap; Polygon by default or `v14.chain: "base"`; native POL/ETH (with your own native/USD rate) or USDC (`v14.asset: "USDC"`) |
73
+ | Python `aifinpay-agent` 2.3.x | Yes — `agent.fetch_paid(url, allowed_origins=…, max_amount_usd=…, daily_amount_usd=…)`; Polygon by default or `chain="base"`; native POL/ETH (priced independently) or USDC (`asset="USDC"`); recover an unconfirmed payment with `agent.recover_paid(journal_path)` |
74
74
 
75
75
  # AiFinPay agent workflow
76
76
 
77
- Use the tools actually returned by MCP tools/list. MCP 2.4.0 exposes
77
+ Use the tools actually returned by MCP tools/list. MCP 2.5.0 exposes
78
78
  agent_address, agent_reload, agent_claim_self, agent_history, agent_quota,
79
79
  agent_passport_resolve, settlement_routes, settlement_invoice and
80
80
  deployment_info; `payable_fetch` appears when the owner has enabled payments.
@@ -154,7 +154,17 @@ fund its EVM address on Polygon with POL, or with USDC plus some POL. Funding a
154
154
  unlimited spend authority. Use the owner's actual approved limits and origins,
155
155
  then call `payable_fetch({"url":"https://merchant.example/api/data"})`.
156
156
 
157
- It supports GET resources and Polygon AIFP-1 v1.4 payments in POL or USDC. It verifies
157
+ To pay on **Base**, the owner sets `"AIFINPAY_PAY_CHAIN": "base"` and the gas
158
+ cap in ETH as `"AIFINPAY_MAX_GAS"` (e.g. `"0.0002"`; one settlement's worst
159
+ case including the L1 data fee is typically well under 0.0001 ETH).
160
+ `AIFINPAY_MAX_GAS_POL` is refused on Base rather than read as ETH. The wallet's
161
+ EVM address is the same on every chain: fund it with ETH **on Base**, not on
162
+ Ethereum mainnet. A merchant whose quote names another chain is refused, never
163
+ paid on a different chain; only the owner changes the chain. A payment pending
164
+ on one chain is recovered only with that chain configured.
165
+
166
+ It supports GET resources and AIFP-1 v1.4 payments on Polygon (POL or USDC) and
167
+ Base (ETH or USDC). It verifies
158
168
  the quote, price, deployment, signer and receipt, saves the transaction before
159
169
  broadcasting, and reuses the purchased batch. No custom merchant script is
160
170
  needed. Other protocol/version/asset paths fail closed.
@@ -166,16 +176,18 @@ owner reconciliation. Raw transactions and receipt JWTs remain private.
166
176
 
167
177
  ### Network access
168
178
 
169
- In a sandbox that allowlists outbound hosts, allow `api.aifinpay.io` and a
170
- Polygon RPC. USDC payments need nothing else. For the independent POL/USD check
171
- on POL payments MCP 2.3.0 reads Chainlink on
172
- Polygon over that RPC, then `api.coinbase.com`, then `api.coingecko.com` — one
173
- is enough. (MCP 2.2.3 used only `api.coinbase.com`.) If no rate is available,
179
+ In a sandbox that allowlists outbound hosts, allow `api.aifinpay.io` and an RPC
180
+ for the pay chain (Polygon, or Base: `mainnet.base.org` unless the owner set
181
+ `AIFINPAY_RPC_URL`). USDC payments need nothing else. For the independent
182
+ native/USD check MCP reads Chainlink on the pay chain over that RPC (POL/USD on
183
+ Polygon since 2.3.0, ETH/USD on Base since 2.5.0), then `api.coinbase.com`, then
184
+ `api.coingecko.com` — one is enough. (MCP 2.2.3 used only `api.coinbase.com`.) If no rate is available,
174
185
  `payable_fetch` stops before paying and nothing is spent; tell the owner which
175
186
  hosts to allow rather than inventing a workaround. With the Node SDK, pass your
176
187
  own `nativeUsdPrice`: Chainlink POL/USD on Polygon, Coinbase `POL-USD`, or
177
188
  CoinGecko `polygon-ecosystem-token` (never `matic-network`, frozen since
178
- February 2026).
189
+ February 2026); on Base, ETH/USD from Chainlink on Base, Coinbase `ETH-USD` or
190
+ CoinGecko `ethereum`.
179
191
 
180
192
  ## After creating a wallet: link it to the owner's dashboard
181
193
 
@@ -254,7 +266,7 @@ Use agent_history. Do not guess /v1/history, /v1/payments or /v1/wallet/tx.
254
266
  Canonical AIFP-1 economics are gross-inclusive: the agent pays the quoted
255
267
  price, AiFinPay takes **1 %** (100 bps) from it, and the merchant receives
256
268
  **99 %**. No fixed fee is implied. AIFP-1 settles live
257
- on Polygon (splitter v1.4); Solana settlement is disabled. The smallest batch is
269
+ on Polygon and Base (splitter v1.4); Solana settlement is disabled. The smallest batch is
258
270
  $0.10 plus gas.
259
271
 
260
272
  (The older "98.99 / 1 / 0.01" figure was the v1.2 fee-on-top model.)
@@ -413,7 +425,7 @@ terminal for that request: do not lower units below the server minimum, edit
413
425
  quotes, or construct a manual nonce, receipt or transaction workaround.
414
426
 
415
427
  This dev quote tool never broadcasts. The new low-level SDK executor supports
416
- native Amoy v1.4, while MCP/fetchPaid receipt purchases remain Polygon-only.
428
+ native Amoy v1.4, while MCP/fetchPaid receipt purchases are live on Polygon and Base only.
417
429
  A full paid testnet receipt flow is not yet claimed. A prepaid batch means one settlement funding
418
430
  multiple API calls, not an arbitrary batch of on-chain transfers.
419
431
 
@@ -183,7 +183,9 @@ The gate needs a `merchant_id`. Two ways to get one:
183
183
  `{"name", "pay_to": {"evm": "0x…"}, "settlement_version": "1.4"}` returns the
184
184
  id and a `merchant_secret` shown once. Claim the merchant in the dashboard
185
185
  with that secret, or it belongs to no account. Send ONE `pay_to.evm` — it
186
- receives on every EVM chain; per-chain keys such as `base` are refused. To
186
+ receives on every EVM chain; per-chain keys such as `base` are refused. Agents
187
+ pay on Polygon unless the merchant adds `"settlement_chain": "base"`; then
188
+ quotes, and so payments, are on Base (ETH or USDC) to the same address. To
187
189
  move the payout later, `PATCH /v1/merchants/{id}` with header
188
190
  `AIFP-Merchant-Secret` and `{"pay_to": {"evm": "0x…"}}`.
189
191
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aifinpay/skill",
3
- "version": "2.5.1",
3
+ "version": "2.6.0",
4
4
  "description": "AiFinPay agent skills: pay for x402-gated APIs as an agent (aifinpay) and charge agents for your API as a merchant (aifinpay-merchant).",
5
5
  "type": "module",
6
6
  "files": [