Skip to content

radius-cli@0.6.0

Latest

Choose a tag to compare

@github-actions github-actions released this 27 Oct 13:46
· 12 commits to main since this release
c54f1e2

Minor Changes

  • 118203d: createRadiusFetch and wallet pay handle 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/fetch and @x402/axios do. A redirect after payment is followed without the payment header, and the receipt is taken from its PAYMENT-RESPONSE. redirect_refused is no longer raised.

Patch Changes

  • c528b33: Add Radius to an x402 server you already run. radiusFacilitators(), registerRadius() and assertRadiusSupported() (from radius-sdk/server) put the Radius facilitators and the exact scheme on your own x402ResourceServer, for a pipeline that does its own verify, work and settle. settle is required there.

    Breaking for installs: @x402/core and @x402/evm move 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 newer 2.x (the tests also pass on 2.28.0). Install @x402/core yourself; @x402/evm is an optional peer needed only for radius-sdk/client. A project that relied on the SDK installing them must add them to its own package.json.

    settle: 'before' (the default) never calls the facilitator's /verify: x402 core's verifyPayment() answers isValid: true without checking, and /settle validates. The docs and JSDoc now say so, and RadiusExactScheme exposes settle and logs a one-time warning when built without it. The default for radiusPayments() and createRadiusServer() 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 evm charge method only, not the Tempo method of mppx; the docs say so.

    radius-cli declares @x402/evm itself, which it used to get through radius-sdk.

  • 8388099: createRadiusFetch no longer signs a facilitator-sponsored raw approve (erc20ApprovalGasSponsoring: an unlimited Permit2 allowance) without asking. It now passes the same gate as the automatic Permit2 approval: permit2Approval: 'never' throws approval_required, and onApprovalRequired is called with sponsored: '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. eip2612GasSponsoring permits are signed per payment for the payment amount, so they are part of the payment and are not gated. wallet pay words its prompt and non-interactive refusal for the sponsored case; -y and --approve-permit2 still allow it.

  • Updated dependencies [c528b33]

  • Updated dependencies [118203d]

  • Updated dependencies [8388099]

  • Updated dependencies [4ed2dfd]

    • radius-sdk@0.7.0