Skip to content

docs(router): document the funding path, and correct the stale x402 funded-networks default - #279

Merged
r-marques merged 1 commit into
mainfrom
docs/router-funding-path-2592
Aug 7, 2026
Merged

docs(router): document the funding path, and correct the stale x402 funded-networks default#279
r-marques merged 1 commit into
mainfrom
docs/router-funding-path-2592

Conversation

@r-marques

Copy link
Copy Markdown
Member

Closes the "document the funding path" scope item on nvm-monorepo#2592 (epic #2268).

What was missing

The quickstart told you to fund providerPaymentMethodId but never said with what, and rails-mpp explicitly declined to give the token address — "Read the address off a real challenge from the service you intend to pay." That is a chicken-and-egg for a new user: you cannot read a challenge before you can make a call, and you cannot make a call before you are funded.

So this adds the concrete per-rail asset table to the quickstart, and the two Tempo token addresses to the MPP rail page. Every address was verified on-chain on 2026-08-06 by reading symbol():

Chain Address symbol()
Base mainnet 8453 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 USDC
Tempo mainnet 4217 0x20c000000000000000000000b9537d11c60e8b50 USDC.e
Tempo Moderato 42431 0x20c0000000000000000000000000000000000000 PathUSD

The two Tempo addresses both begin 0x20c0 and differ only in the tail, so the page now flags that explicitly and still tells you to confirm against a real challenge before sending funds.

It also documents the Moderato tempo_fundAddress self-funding call, including the gotcha that the balance needs a block to appear — an immediate balanceOf reads zero and looks like the faucet did nothing.

Funding is manual — say so

Added a note that there is no on-ramp: the wallet cannot be topped up from a card or a credit balance, the agent cannot refill itself, and payments simply stop at 402 BCK.ROUTER.0009 until a human intervenes. That gap is tracked as nvm-monorepo#2767. It belongs in the docs because it changes how much you fund and what you expect when it runs out.

Unrelated bug found while writing this

rails-x402 has been stale since nvm-monorepo#2658. It documented:

  • ROUTER_FUNDED_NETWORKS as defaulting to base,base-sepolia, and
  • "Both are enabled by default, and which one you use is decided entirely by what the service you're calling advertises — not by which Nevermined environment you're pointed at."

Both are now wrong for any deployed instance. resolveRouterFundedNetworks derives the set from ENVIRONMENT (sandbox → testnets, live → mainnet); base,base-sepolia survives only as the local/dev fallback; and on a deployed instance the variable can only narrow the derived set, never widen it. A present-but-empty value means "fund nothing", not "use the default".

That matters beyond tidiness: the old wording told a sandbox user their deployment would pay a Base mainnet service, which is precisely the real-money firewall #2604 closed. Corrected both spots, and described the actual failure (400 BCK.ROUTER.0001, because no entry survives the filter).

Checks

  • All four token addresses re-read from live RPCs, not copied from notes.
  • No generated api-reference/** files touched.

…networks default

The quickstart told you to fund `providerPaymentMethodId` but never said with
what, and rails-mpp explicitly declined to give the token address ('read it off
a real challenge') — which a user cannot do before their first call. Adds the
concrete per-rail asset table, all four addresses verified on-chain 2026-08-06.

Also states plainly that funding is manual: there is no on-ramp, and the agent
stops at 402 BCK.ROUTER.0009 until a human tops it up (nvm-monorepo#2767).

Separately, rails-x402 was stale since nvm-monorepo#2658. It documented
ROUTER_FUNDED_NETWORKS as defaulting to 'base,base-sepolia' and said both were
enabled by default. That is now true only for a local instance: a deployed one
derives its networks from ENVIRONMENT (sandbox -> testnets, live -> mainnet)
and the variable can only narrow that set. The old text told a sandbox user
they could pay Base mainnet, which is exactly the firewall #2604 closed.

Refs nvm-monorepo#2592, nvm-monorepo#2767

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@r-marques
r-marques requested a review from a team as a code owner August 6, 2026 14:31
@mintlify

mintlify Bot commented Aug 6, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Nevermined 🟢 Ready View Preview Aug 6, 2026, 2:32 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@eruizgar91 eruizgar91 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Checked:

  • Cross-links resolve (products/router/rails-x402, products/router/rails-mpp) and the #funding-your-wallet anchor exists.
  • MDX components (<Note>, <Warning>) are properly closed; tables render.
  • Token addresses are consistent across all three files and match the PR description.
  • No auto-generated file touched (codes.mdx untouched).
  • New pages are wired into docs.json navigation.

No blocking findings.

@r-marques
r-marques merged commit 0127cd1 into main Aug 7, 2026
3 checks passed
@r-marques
r-marques deleted the docs/router-funding-path-2592 branch August 7, 2026 09:36
r-marques added a commit that referenced this pull request Aug 7, 2026
Three notes from @eruizgar91, all verified before acting.

MEDIUM — the page never said which deployment $NVM_API_URL must point at, and
sandbox is the natural first pick. Every merchant here is mainnet, so a sandbox
key fails at step 3 with 400 BCK.ROUTER.0001 — a code the page never mentioned,
right after step 6 taught the reader that the EXPECTED refusal is 402
BCK.ROUTER.0003. Adds a Warning stating the live requirement, naming the 400 and
explicitly distinguishing it from the 402, linking the x402 rail for the firewall.

LOW — the settlement Note duplicated the USDC.e vs PathUSD addresses and the
"both begin 0x20c0" warning that #279 added to rails-mpp.mdx earlier the same
day. Two copies of a near-identical address pair is exactly what drifts, so it
now links there and keeps only what is unique to this page: that
settlement.network is a bare "tempo" with no chain id, which is what makes the
asset the sole discriminator.

MEDIUM — "Reproducing it" pointed at .claude/skills/nvm-router-demo/, which is
not on nvm-monorepo main (it ships in #2794, still open) and — the sharper half —
nvm-monorepo is PRIVATE while this site is PUBLIC, so the section was
unactionable for every external reader. Rewritten to lead with what is true for
everyone: the six curl calls on the page ARE the whole run. The preflight's value
is kept as prose (read the wallet back from the live Delegation, fund both
chains, confirm the merchant still 402s, check the catalog is loaded) rather than
as a script only staff can execute. The script is now a clearly-marked internal
aside, so the page no longer depends on #2794 and the merge order is free.

Verified: mintlify broken-links reports no broken links, including the two new
internal links. The rails-mpp anchor is #the-asset-allowlist — I checked the
headings rather than guessing.
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.

2 participants