AgentPay MCP treats crypto verifier and signing dependencies as payment-critical infrastructure. A floating semver range is not acceptable when a fresh install can change the code path that parses a 402 challenge, derives an account, signs a payment, verifies a receipt, or maps a chain.
viem: pinned exactly to2.52.2package.jsondependency:"viem": "2.52.2"- root npm override:
"viem": "2.52.2" - reason:
viem2.48.8exposed a broken@noble/curvesimport path in the x402 payment ecosystem, which is why AgentPay previously held2.48.7exactly.2.52.2moves the exact, smoke-tested pin forward past that breakage and ships a newer transitive tree than2.48.7(ws8.20.1vs8.18.3,ox0.14.29vs0.14.20). Pins age: when the security gate flags a transitive advisory against the current pin (for example,wsadvisories fixed only in laterviemreleases), bump the pin through the upgrade process below rather than relaxing it to a range.
Pin exactly, or document an explicit hard override, for any package that touches:
- wallet/account derivation
- signature creation or verification
- x402 payment-required parsing
- receipt, transaction, or payment envelope validation
- chain metadata used to decide whether a payment can be signed
- crypto hash, curve, address, or ABI encoding paths
Today that includes viem and its crypto import surface. If AgentPay adds a direct dependency on @noble/*, @scure/*, ox, an x402 SDK package, or a facilitator client, that dependency must be reviewed under this policy before release.
Before publishing a package that changes x402 payment paths or crypto dependencies, run:
npm run build
npm run smoke:clean-installThe clean-install smoke creates a fresh temporary consumer project, installs the packed AgentPay MCP tarball, imports viem, viem/accounts, viem/chains, AgentPay's packaged x402_pay tool, and AgentPay's wallet client utility, then confirms the resolved viem version is exactly 2.52.2.
A release must fail if:
- the root package uses
^,~,>=,latest, or any non-exact range forviem - the root override does not match the dependency pin
- a clean install resolves the x402 verifier path to a different
viemversion - packaged AgentPay x402 imports fail in a fresh consumer project
- a payment path silently falls back to an unsupported chain or parser
- Open a dependency-pin issue or PR explaining the market or security signal.
- Change the exact dependency and override together.
- Refresh
package-lock.json. - Run typecheck, tests, build, pack dry-run, and clean-install smoke.
- Preserve proof under
ops/proofs/before publishing. - Publish only after the proof shows the same exact dependency version in a clean consumer install.
Do not relax this policy for convenience. Payment libraries can break buyer agents without changing AgentPay source code, so deterministic installs are part of the product contract.