Repository navigation
Minor Changes
- 118203d:
createRadiusFetchandwallet payhandle redirects around a payment. A request whose 402 follows a redirect (fetch follows it, up to its limit of 20) is paid at the final URL, repeating the original method and body, as@x402/fetchand@x402/axiosdo. A redirect after payment is followed without the payment header, and the receipt is taken from itsPAYMENT-RESPONSE.redirect_refusedis no longer raised.
Patch Changes
-
c528b33: Add Radius to an x402 server you already run.
radiusFacilitators(),registerRadius()andassertRadiusSupported()(fromradius-sdk/server) put the Radius facilitators and theexactscheme on your ownx402ResourceServer, for a pipeline that does its own verify, work and settle.settleis required there.Breaking for installs:
@x402/coreand@x402/evmmove from exact-pinned dependencies (2.27.0) to peer dependencies (^2.27.0), so your app and the SDK share one copy, and you can use a newer2.x(the tests also pass on 2.28.0). Install@x402/coreyourself;@x402/evmis an optional peer needed only forradius-sdk/client. A project that relied on the SDK installing them must add them to its ownpackage.json.settle: 'before'(the default) never calls the facilitator's/verify: x402 core'sverifyPayment()answersisValid: truewithout checking, and/settlevalidates. The docs and JSDoc now say so, andRadiusExactSchemeexposessettleand logs a one-time warning when built without it. The default forradiusPayments()andcreateRadiusServer()does not change.The README no longer says offers use Permit2: they use EIP-3009 unless a facilitator lists Permit2 first. The SDK's MPP covers the
evmcharge method only, not the Tempo method ofmppx; the docs say so.radius-clideclares@x402/evmitself, which it used to get throughradius-sdk. -
8388099:
createRadiusFetchno longer signs a facilitator-sponsored rawapprove(erc20ApprovalGasSponsoring: an unlimited Permit2 allowance) without asking. It now passes the same gate as the automatic Permit2 approval:permit2Approval: 'never'throwsapproval_required, andonApprovalRequiredis called withsponsored: 'erc20Approval'and may decline. The raw approve is withheld from the signing scheme unless approved, so it cannot be signed on its own, including when the allowance read fails.eip2612GasSponsoringpermits are signed per payment for the payment amount, so they are part of the payment and are not gated.wallet paywords its prompt and non-interactive refusal for the sponsored case;-yand--approve-permit2still allow it. -
Updated dependencies [c528b33]
-
Updated dependencies [118203d]
-
Updated dependencies [8388099]
-
Updated dependencies [4ed2dfd]
- radius-sdk@0.7.0