Structurally align @x402r/evm with @x402/evm#12
Merged
Conversation
Split each role into scheme.ts + register.ts with barrel index.ts, add typed config interfaces (EvmClientConfig, EvmResourceServerConfig, EvmFacilitatorConfig) with eip155:* defaults, switch build from tsc to tsup (dual ESM/CJS), use PaymentPayloadResult return type, lean root barrel, and restructure tests to test/unit/escrow/. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
A1igator
previously approved these changes
Feb 25, 2026
- Switch tsconfig to ES2020 module + bundler resolution (matches x402) - Align package.json export extensions: .mjs/.d.mts (ESM), .js/.d.ts (CJS) - Remove "type": "module" and top-level main/module/types fields - Drop .js extensions from all relative imports (source + tests) - Remove unused Network import from facilitator/scheme.ts - Remove unnecessary `as const` from tsup target - Add optional context params (PaymentPayloadContext, FacilitatorContext) to match x402 SchemeNetworkClient/SchemeNetworkFacilitator interfaces Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add 4 GitHub Actions workflows: format check, lint check, unit tests (Node 20/22 matrix), lockfile validation - Add .prettierrc (semi: false, singleQuote: true, printWidth: 100) matching x402 - Add eslint.config.js (flat config with @typescript-eslint) - Add format:check and lint:check scripts to root and evm package.json - Bump pnpm from 9.15.0 to 10.7.0 - Fix unused import (PAYMENT_INFO_COMPONENTS) and lint warnings in nonce.ts - Reformat all source and test files with new prettier config Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
A1igator
approved these changes
Feb 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scheme.ts+register.tswith barrelindex.ts, matching x402's file organization patternEvmClientConfig,EvmResourceServerConfig,EvmFacilitatorConfig) witheip155:*wildcard defaults for client/servertsctotsupfor dual ESM/CJS outputPaymentPayloadResultreturn type (from@x402/core@^2.4.0) instead ofPick<PaymentPayload, ...>src/escrow/index.ts) exports onlyEscrowEvmScheme, remove./escrow/typesexport pathtests/totest/unit/escrow/matching x402 patternTest plan
pnpm typecheck— zero errorspnpm build— tsup producesdist/esm/+dist/cjs/with.d.ts/.d.ctspnpm test— all 72 tests pass@x402r/evm,@x402r/evm/escrow/client,@x402r/evm/escrow/server,@x402r/evm/escrow/facilitator🤖 Generated with Claude Code