Conversation
Contributor
🦋 Changeset detectedLatest commit: 2e45e70 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
A buyer can receive Base USDC, Radius SBC and other EVM offers in one x402 challenge. Add
createEvmFetchinradius-sdk/clientwith explicit chains, tokens, per-asset caps, RPCs and optional per-chain signers.The adapter uses one upstream
@x402/coreclient to register networks and schemes, apply spend controls and policies, select an offer and create its payload. Its publiconBeforePaymentCreationhook applies SDK approval policy before signing.@x402/evmsupplies exact/upto signing, sponsored permits, signer adaptation and Permit2 allowance/approval helpers. Selection follows upstream payment-flow preference, then server order. A strict token policy prevents upstream's implicit default-token allowance from widening the configured assets.The SDK retains configuration, bounded signing deadlines, typed errors, receipt validation, onchain reconciliation and one guarded HTTP retry.
@x402/fetch2.25.0 inherits redirect-following, wraps typed policy errors and permits recovery signing; preserving the SDK's manual paid redirects and one-attempt contract requires the guarded transport. The v1 CAIP-2 compatibility adapter remains, with signatures delegated upstream.createRadiusFetchand its wallet/faucet helpers remain available. The new adapter defaults unsponsored Permit2 approval tonever; explicit auto approval is subject to the policy hook. Includes documentation, a Radius + Base example and a minor changeset.Validation on Node 24.9.0:
pnpm build,pnpm typecheck,pnpm test— 144 SDK tests, 26 CLI tests and 3 runtime import checks passed. The 33 new tests cover recoverable signatures on Radius, Base, Arbitrum, Polygon, Monad and Arc testnet; strict assets/caps; upstream flow selection; policy before signing; concurrent requests; receipts and redirects; and actual approval/transfer execution in the local EVM.No live payments. Operators must verify provider facilitator support and deployed contracts. Caps are per request. Non-EVM networks and named v1 aliases are outside this adapter.