Skip to content

A mainnet offer alongside the testnet one, off by default - #81

Merged
holistis merged 1 commit into
mainfrom
mainnet-route
Oct 18, 2026
Merged

holistis merged 1 commit into
mainfrom
mainnet-route

Conversation

@holistis

Copy link
Copy Markdown
Owner

Measured 2026-10-18 against both facilitators' own /supported:

facilitator eip155:8453 eip155:84532
facilitator.payai.network exact v2, batch-settlement v2 exact v2, batch-settlement v2
x402.org/facilitator not listed exact v2, upto v2, batch-settlement v2

So mainnet and the facilitator have to match. readSellerConfig refuses the
combination rather than documenting it: advertising a price nobody can settle is the
same false promise that keeps an unconfigured seller from having a paid route at all.

Off by default, same discipline as the bazaar flag and receipt version 2.
Switching it on changes the bytes of the live 402 and makes a payment cost real money,
so that is a decision on a date, not a side effect of a deploy. A test asserts that
with the flag off there is exactly one accepts entry, on the declared testnet.

Two offers, not a switch. A buyer testing on testnet keeps working; a buyer who
wants to pay for real picks the other line. The network comparison added in #80 reads
context.requirements.network, so it follows whichever line the buyer chose without
further wiring, and still refuses to sign if the facilitator settles on a third thing.

Tests: 144 pass (was 141).

Measured 2026-10-18: facilitator.payai.network lists eip155:8453 with scheme exact on
x402 version 2, and x402.org/facilitator does not list mainnet at all (eleven kinds,
testnet only). So mainnet and the facilitator have to match, and readSellerConfig now
refuses the combination rather than documenting it: advertising a price nobody can
settle is the same false promise that keeps an unconfigured seller from having a paid
route at all.

Off by default, same discipline as the bazaar flag and receipt version 2. Switching it
on changes the bytes of the live 402 and makes a payment cost real money, so that is a
decision on a date, not a side effect of a deploy.

Two offers, not a switch: a buyer testing on testnet keeps working, and a buyer who
wants to pay for real picks the other line. The network comparison in
buildOfferReceiptExtension reads context.requirements.network, so it follows whichever
line the buyer chose without further wiring.

Tests: 144 pass (was 141), including that the flag off leaves exactly one accepts entry
on the declared testnet network.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tokenizen 563a1d2 Commit Preview URL

Branch Preview URL
Oct 18 2026, 09:30 AM

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tokenizen-website 563a1d2 Commit Preview URL

Branch Preview URL
Oct 18 2026, 09:30 AM

@holistis
holistis merged commit efee467 into main Oct 18, 2026
5 checks passed
@holistis
holistis deleted the mainnet-route branch October 18, 2026 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant