All three packages, versioned together as usual. The x402 payment checks now
pay on Base Sepolia, Ethereum Sepolia and Solana devnet as well as Stellar
testnet, and three negative payment checks join them (X402-08 to X402-10),
for sixteen checks in all. X402-04 and X402-05 read every payment option, on
any chain, and every FAIL says what to change. MPP-01 now signs only for the
network the run names. New in the CLI: wasit serve, a paywall that misbehaves
on purpose, and wasit wallet --network.
Results can change on upgrade. A service on a chain other than Stellar now
passes X402-05 where it failed. A challenge with a broken second option now
fails X402-04 or X402-05 where it passed. A challenge without scheme,
asset or maxTimeoutSeconds, or with a wrongly typed field, now fails
X402-04. A target that accepts replayed, underpaid or expired payments now fails
X402-08, X402-09 or X402-10; one that refuses even a valid payment now gets
X402-07 skipped instead of passed. A payer whose balance is below the price now
gets no verdict from X402-06, and nothing is sent. A target that asks MPP-01
to pay on a network other than the run's now gets no verdict and is not paid,
an http --rpc-url now stops MPP-01 before anything is sent, and a target
that answers 402 after being paid has that 402 reported instead of being paid
again.
Fixed — MPP-01 signs only for the network the run names, and pays once.
MPP-01 read the amount, currency and recipient from the target's challenge
but not its network, and the SDK's charge client signs for whichever network
the challenge names, through its own default RPC endpoint for it. A target
asking for stellar:pubnet could therefore have a mainnet transfer, for the
amount it chose, signed by the payer key if that account holds mainnet funds.
This is read from the SDK's source (@stellar/mpp 0.7.1), not run: it would
need mainnet funds. A challenge for any network but the run's is now refused before anything
is signed, on the unpaid read and on the request actually paid, with no verdict
(ERROR (configuration)); a network that is not stellar:testnet or
stellar:pubnet fails. The payment now goes through the run's RPC endpoint
(--rpc-url, MCP: rpcUrl) rather than the SDK's default, so an http endpoint,
which the SDK's client refuses, now stops the run before anything is sent. And
it is made once: the SDK's client paid up to three times when a target kept
answering 402 after being paid.
Changed — X402-04 and X402-05 read every payment option, on any chain.
Both read only accepts[0], and X402-05 accepted only stellar:testnet and
stellar:pubnet, so a conformant x402 service on another chain failed it, and
a challenge offering several networks was judged on whichever came first. Both
now check every option and name the one at fault by its index. X402-05
requires CAIP-2, as x402 v2 does, and applies each namespace's own rules where
its CAIP-2 definition fixes them: stellar is testnet or pubnet, eip155
is a base-10 chain id, solana is the first 32 characters of the base58
genesis hash. A well-formed id in another namespace passes, and the result says
only the format was checked. A challenge with no options now fails X402-04
with that reason instead of three missing fields.
Changed — the payment checks pay only on the network the run names. A
challenge offering several options is paid on the option for --network
(MCP: network), instead of the first option the client supports, which could
be the other Stellar network. A challenge with no option on that network, or
only one in a scheme other than exact, gets X402-06 and X402-07 skipped
with the networks it offers; nothing is sent. A --network other than
stellar:testnet or stellar:pubnet, or pubnet without --rpc-url, now stops
the run at preflight, before any payment, rather than after paying with no way
to verify the settlement.
Added — every failure says what to change. A FAIL now carries a Fix
line and a Docs link, in the CLI's text output, in --json and in the MCP
server's structuredContent (fix, docs). Where a check can tell the cause,
the fix is specific to it: eip155:0x14a34 is told to write eip155:84532, a
200 on an unpaid request is told to put the payment middleware in front of the
route, a missing PAYMENT-RESPONSE is told what to return. Otherwise it is the
check's general fix, now part of every catalogue entry (fix). Only a FAIL
carries one; a skip or a no-verdict is not a defect. New in core: fixFor(),
catalogueEntry(), docsUrlFor(), and an optional hint on CheckResult.
The check catalogue gains "Common failures and fixes"
(/docs/checks/common-failures): the failures builders hit most, by check, with
the reasoning, the CAIP-2 ids of common networks, and links to where each was
met in a real implementation.
Changed — X402-04 checks every field the advertised version requires.
It checked three: the price, network and payTo. x402 v2 requires scheme,
network, amount, asset, payTo and maxTimeoutSeconds in every option;
v1 also requires resource and description. A field present with the wrong
type, such as a numeric amount or a maxTimeoutSeconds that is not a positive
number, is reported as such instead of as missing. Challenges built with the
official x402 server SDK carry every field, so they are unaffected.
Added — the x402 payment checks pay on Base Sepolia. --network eip155:84532 (MCP: network) runs X402-06 and X402-07 there, with the payer key
in EVM_PRIVATE_KEY. Payment uses the exact scheme's EIP-3009 method, so the
facilitator pays the gas and a payer needs Base Sepolia USDC and no ETH. X402-06
holds the settlement to the receipt's ERC-20 Transfer log by the Stellar rules;
X402-07 forges only the payer's signature. Both EVM transfer methods are paid:
EIP-3009, and Permit2 with its approval signed as a gas-sponsored EIP-2612 permit
(a Permit2 target without sponsoring, where the payer never approved Permit2, is
ERROR (setup), not a failure). Against Wasit's own Base Sepolia fixtures, both
methods pass with X402-06 settled on-chain and the payer holding no ETH; against wasit serve posing on Base
Sepolia, the lying modes fail both checks
(evidence). Stellar stays
the default; MPP is Stellar only. Under the hood, the payment checks now go through a
per-chain adapter, and the x402 SDK moves from 2.19 to 2.28.
Added — the x402 payment checks pay on Ethereum Sepolia. --network eip155:11155111 runs X402-06 to X402-10 there with the same EVM_PRIVATE_KEY,
paying in Circle's Sepolia USDC through EIP-3009, so the payer needs no ETH. The SDK
ships no default asset for this network, and its client's spend controls refuse other
assets: Wasit allows Circle's Sepolia USDC there, with the SDK's own $1 cap. The wait
for a settled transaction is now per network: 10 blocks on Sepolia, whose blocks are 12
seconds apart. No public facilitator settles Ethereum Sepolia, so Wasit's own fixture
runs the SDK's facilitator itself. Against it, all ten pass with the settlement read back
independently; against wasit serve there, the lying modes fail
(evidence). BNB Smart
Chain testnet stays read-only.
Added — the x402 payment checks pay on Solana devnet. --network solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1 (MCP: network) runs X402-06 to X402-10
there, with the payer key in SVM_PRIVATE_KEY (base58 of the 64-byte keypair, as
wallets export it). The payer signs a transaction with one TransferChecked, and the
facilitator signs as fee payer, so a payer needs devnet USDC and no SOL. X402-06 holds
the settlement to the confirmed transaction's token balances: exactly one transfer, of
the advertised amount and mint, to an account payTo owns, from this run's payer.
X402-07 forges only the payer's signature; X402-10 builds the payment on a blockhash
the RPC confirms has expired, since on Solana the blockhash, not maxTimeoutSeconds,
sets a payment's lifetime. Against Wasit's own Solana fixture, all ten pass with the
settlement read back independently and the payer holding no SOL; against wasit serve
on devnet, the lying modes fail
(evidence). The payee's
token account must exist before the payment. Library users with TypeScript 6 or 7 see
npm peer warnings from @solana/kit 5 at install; the install succeeds and core runs.
Added — three negative payment checks: X402-08 Payment Replay Rejected, X402-09
Underpayment Rejected, X402-10 Expired Authorization Rejected. Each sends a payment the
target must refuse: the exact payment X402-06 was accepted for, sent again; a validly
signed payment for half the price that still claims the full price; and a payment signed
with a one-second lifetime, sent once it has expired (on Solana, one built on an expired
blockhash). They run on Stellar, Base Sepolia and Solana devnet. A refusal now shows the
target's stated reason, when it gives one. Against Wasit's own fixtures all three pass on
all three chains, refused for the reason each is about
(invalid_exact_stellar_payload_wrong_amount, invalid_exact_evm_payload_authorization_value_mismatch,
invalid_exact_evm_payload_authorization_valid_before, invalid_exact_svm_payload_amount_mismatch,
...); against wasit serve --mode no-settle all three fail
(evidence). X402-08 is skipped when the challenge advertises the
payment-identifier extension, whose cached replies are legitimate. The catalogue grows
from 13 to 16 checks. X402-10 waits about 20 seconds on Stellar for the authorization
to expire.
Changed — the negative payment checks need an accepted baseline. When the target
refuses X402-06's valid payment, X402-07 to X402-10 are skipped rather than passed:
a target that refuses everything proves nothing by refusing a bad payment. X402-07 used
to pass in that case.
Changed — a price the official client will not pay gets no verdict. The official x402
client, which Wasit pays through, pays only the SDK's default assets and at most $1 a
payment. A target above that used to get X402-06 ERROR (harness) with the SDK's own
configuration advice; it now gets ERROR (setup) naming the price or the asset, and
nothing is sent. Wasit keeps the cap: it pays automatically, and on stellar:pubnet
with real money.
Fixed — a failed settlement names its reason. A valid payment that verified but did
not settle read got 402.. The official SDK server reports why in a PAYMENT-RESPONSE
with success: false, which Wasit now reads: got 402 (settlement failed: invalid_exact_evm_transaction_failed). The same reason now shows on refused negative
payments, which is how the public facilitator was seen refusing a replay at settlement
rather than at verify.
Changed — a payer that cannot cover the price gets no verdict. X402-06 reads the
payer's balance of the advertised asset before it signs; below the price, it reports
ERROR (setup) naming the key to fund, sends nothing, and skips X402-07–10. An
unfunded payer used to fail X402-06 on Solana devnet, for a reason real defects give
too, and to stop on Stellar with only the token's error code. A balance that cannot be
read pays as before. Measured on all three chains with fresh payers
(evidence).
Changed — a payer key for the wrong chain, or a malformed one, stops the run at
preflight. It used to surface mid-payment as a harness error. The message never
echoes the key.
Added — wasit serve, a paywall that misbehaves on purpose. The checks
test a service that sells; this tests an agent that pays. It runs a local x402
paywall in one of four modes: no-settle serves without settling,
wrong-settlement cites a transaction that is not the payment, wrong-network
asks for mainnet, overprice asks for one million USDC. The server reports
what the agent did. It never settles or forwards anything, so no funds move.
Every mode's challenge is well-formed (wasit test --read-only passes it), and
the two settlement modes reproduce the servers built for the 0.6.0 A/B:
X402-06 and X402-07 fail against them. --network eip155:84532 poses the same
modes on Base Sepolia, and --network solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1 on Solana
devnet. Two more modes are about the challenge: v1-challenge sends only an x402 v1
challenge (Base Sepolia and Solana devnet; v1 names no Stellar network), and
malformed-header a PAYMENT-REQUIRED header that does not decode; both answer a
payment with 402 and log which header it came in. The official SDK client pays the
first as v1 and refuses the second without paying
(evidence).
Added — wasit wallet --network for the Base Sepolia and Solana devnet payers.
wasit wallet create --role x402 --network eip155:84532 (or Solana devnet) generates the
payer key in the form the payment checks read and prints its .env line and the
address to fund at faucet.circle.com; status --network shows that payer's USDC
balance, and fund --network prints the faucet step, since the payer needs nothing
else. Testnets only; the MPP roles stay on Stellar. The dashboard's environment panel
lists EVM_PRIVATE_KEY and SVM_PRIVATE_KEY.
Changed — the CLI's payment warning says when it applies. It said funds
would move before every payment run, including runs where the target offered
no option on the run's network and nothing was paid.