Polish @x402r/evm: delete stale examples, cleanup, SDK_NUKE #28/#29/#30#11
Merged
Polish @x402r/evm: delete stale examples, cleanup, SDK_NUKE #28/#29/#30#11
Conversation
All three examples (client, server, facilitator) are stale: - Client imports deleted EscrowScheme stub - Server creates scheme but never registers it with x402ResourceServer - Facilitator has commented-out exact scheme code Remove examples/ directory and workspace entry. See docs.x402r.org for up-to-date usage examples. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Code cleanup and scheme polish (SDK_NUKE Phase 3.B): - Delete deprecated EscrowScheme stub (#30) - Extract duplicated parseChainId() to shared/utils.ts - Replace hand-rolled EIP-6492 unwrapping with viem's parseErc6492Signature (#28) - Rename all registration functions to registerEscrowEvmScheme (#29) - Make EscrowExtra.version required (matches runtime validation) - Extract inline EIP-712 ReceiveWithAuthorization types to constant - Add address checksumming via getAddress() before EIP-712 signing - Use viem's toHex() in generateSalt() - Move shared/ under escrow/ to match x402's scheme directory pattern - Add barrel export (src/escrow/index.ts) and "." package entry - Fix ./escrow/types export path after directory move - Remove redundant type re-exports from each role - Update READMEs with new function names and import paths 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
EscrowSchemestub, server never registers scheme with x402ResourceServer, facilitator has commented-out exact scheme codeparseChainId(), extract EIP-712 types to constant, add address checksumming, use viem'stoHex()/parseErc6492Signature(), makeEscrowExtra.versionrequired, moveshared/underescrow/, add barrel export with.package entryChanges
EscrowSchemestubparseChainId()shared/utils.tsparseErc6492Signature()instead of 30-line hand-rolled impl (#28)registerEscrowEvmSchemeconsistently (#29)EscrowExtra.versionrequiredRECEIVE_AUTHORIZATION_TYPESconstant replaces 2 inline definitionsgetAddress()before EIP-712 signing to prevent case-mismatch failurestoHex()ingenerateSalt()shared/→escrow/shared/src/escrow/index.ts+.entry in package.json./escrow/typespathdist/escrow/shared/types.jsafter moveTest plan
pnpm build— compiles without errorspnpm test— all 72 tests passpnpm typecheck— zero type errors🤖 Generated with Claude Code