Skip to content

Releases: radiustechsystems/tools

radius-sdk@0.7.0

Choose a tag to compare

@github-actions github-actions released this 27 Oct 13:45
c54f1e2

Minor 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.

  • 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.

  • 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.

Patch Changes

  • 4ed2dfd: Await durable transfer checkpoint callbacks before advancing, retry failed checkpoints, and lag Radius transfer polling by five seconds by default. Document replay, chain-scoped deduplication, and archive receipt reconciliation limits.

radius-cli@0.6.0

Choose a tag to compare

@github-actions github-actions released this 27 Oct 13:46
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

radius-sdk@0.6.0

Choose a tag to compare

@github-actions github-actions released this 15 Oct 19:15
520bbc6

Minor Changes

  • 726a7a8: proxyTo(origin) (from radius-sdk/server and radius-sdk/hono) forwards a request to an origin you do not change, for a seller in front of it: pay.wrap(proxyTo(origin)), or app.all('/*', (c) => toOrigin(c.req.raw)) after the Hono middleware. It keeps the method, path and query, buffers the body (a stream body needs duplex on Node), drops Host, hop-by-hop headers (Node's fetch throws on Keep-Alive, Expect and others) and payment credentials, asks for Accept-Encoding: identity and drops Content-Encoding/Content-Length when fetch decoded a compressed body anyway, passes the request's signal so a disconnect aborts the origin request, returns redirects unfollowed, and copies the response headers so the receipt can be added.

Patch Changes

  • 8175dda: Package metadata points at the renamed repository, github.com/radiustechsystems/tools.
  • 67ea7ce: A paid route whose handler returns a fetch() response no longer fails after settlement under @hono/node-server. The server's global Response kept the origin's immutable headers, so adding the receipt threw TypeError: immutable: with settle: 'before' the payer was charged and got a 500, and with 'after' a 402. The SDK now copies the headers before it adds the receipt.

radius-cli@0.5.0

Choose a tag to compare

@github-actions github-actions released this 15 Oct 19:15
520bbc6

Minor Changes

  • cc68f37: Add network: print the resolved network config (chain id, RPC, explorer, faucet, facilitator, SBC) as text or --json, without touching the network.
  • 98450dd: Add wallet sign-typed-data (EIP-712) and wallet sign-jwt (ES256K), so agents can sign with the local account without exporting the private key.
  • ef5d91d: Add wallet faucet: request a faucet drip for the local account (testnet ~0.5 SBC, mainnet ~0.01 SBC/day), with --json output.
  • 3fb56ac: sell check <url> checks a seller's 402 without paying: it decodes the x402 PAYMENT-REQUIRED offers and any MPP WWW-Authenticate: Payment challenge, checks each offer's network, asset and EIP-712 domain, amount (against --price, at the asset's decimals), payTo, resource.url and maxTimeoutSeconds, reads the facilitator's /supported (--facilitator, default the network's) for each offer's scheme, network and transfer method, and asks the SDK buyer whether it would pay. --probe-head warns when an unpaid HEAD is served, and --pay --threshold makes one paid request (testnet unless --network mainnet) and checks the receipt. Like the SDK buyer it also reads an x402 challenge from the JSON body, and a malformed offer is a failed check, not a crash. Prints a checklist or, with --json, a report; exits 1 when a check fails and 2 on invalid flags.

Patch Changes

  • 8175dda: Package metadata points at the renamed repository, github.com/radiustechsystems/tools.
  • Updated dependencies [8175dda]
  • Updated dependencies [67ea7ce]
  • Updated dependencies [726a7a8]
    • radius-sdk@0.6.0

radius-sdk@0.5.0

Choose a tag to compare

@github-actions github-actions released this 13 Oct 14:50
4516ee9

Minor Changes

  • 8c8c671: Require Node 22 or later. Node 20 reached end of life on 30 April 2026.

  • 25eb09d: MPP (the HTTP Payment auth scheme, evm charge method) alongside x402.

    Buyers: createRadiusFetch pays WWW-Authenticate: Payment challenges with an EIP-3009 authorization bound to the challenge, in the Authorization: Payment credential mppx and other MPP servers expect, and reads Payment-Receipt. protocols (default ['x402', 'mpp']) sets the preference when a 402 offers both (a funded network still beats an unfunded one across protocols). PaymentOffer is now X402Offer | MppOffer, told apart by offer.protocol; requirements and x402Version exist on x402 offers only. PaymentReceipt gains protocol, and getPaymentReceipt also reads Payment-Receipt.

    Sellers: radiusPayments({ mpp: { secretKey } }) adds an MPP challenge per network to every 402, mirroring the x402 offers, and accepts MPP credentials: checked statelessly (HMAC challenge id, realm, expiry, route price, nonce binding), then verified and settled by the network's x402 facilitator, before or after the handler per settle. Responses carry Payment-Receipt; the handler and onSettled get receipts with protocol: 'mpp'. Not available through the upstream x402 framework adapters.

  • 8f4900a: Pay and charge on more than one network. Networks are now PaymentNetworks (was RadiusNetwork), built with definePaymentNetwork({ chain, asset }) (was defineRadiusNetwork), with presets for Radius ('radius' / 'mainnet', 'radius-testnet' / 'testnet'), Base ('base') and Base Sepolia ('base-sepolia'), both paying in USDC. Preset names are now the preset ids ('radius', 'radius-testnet'), and radiusNetworkForChainId is presetForChainId.

    createRadiusFetch({ networks: [...] }) pays on any of the listed networks, preferring them in order among those the payer's balance covers (preferFunded: false skips the balance reads; none funded throws insufficient_balance); offer.network and ApprovalRequest.network are the PaymentNetwork paid on, a USD maxPerRequest is converted per asset, and payFetch.on(network) gives the wallet helpers for each network. x402 v1 challenges that name a network (base, base-sepolia) are matched too.

    radiusPayments({ networks: [...] }) / createRadiusServer offer one payment option per network on every route, each settled by its own facilitator ({ network, facilitator }); Base mainnet has no default facilitator, so sellers name one, and Base Sepolia defaults to x402.org. Receipts and onSettled report the network a payment settled on. When a facilitator's /supported names no transfer method, exact offers now default to EIP-3009 (x402's default) instead of Permit2.

radius-cli@0.4.0

Choose a tag to compare

@github-actions github-actions released this 13 Oct 14:50
4516ee9

Minor Changes

  • 25eb09d: wallet pay also pays MPP (WWW-Authenticate: Payment, evm charges). --protocol auto|x402|mpp (default auto: x402 when a server offers both) chooses, and the JSON payment object gains protocol. Messages are now prefixed pay: instead of x402:.
  • 8f4900a: wallet x402 is renamed wallet pay and can pay in USDC on Base: --networks radius,base (or RADIUS_PAY_NETWORKS / payNetworks in the config file) lists the networks to pay on, in preference order (the first one the wallet can cover wins), and --network testnet pairs Radius testnet with Base Sepolia. Base RPCs are set with RADIUS_BASE_RPC_URL / RADIUS_BASE_SEPOLIA_RPC_URL or rpcUrls.base / rpcUrls["base-sepolia"]. --x402-threshold and --x402-approve-permit2 are renamed --threshold and --approve-permit2, prompts and messages name the network and its token, and the JSON payment object gains network.
  • 8c8c671: Require Node 22 or later. Node 20 reached end of life on 30 April 2026.

Patch Changes

  • Updated dependencies [8c8c671]
  • Updated dependencies [25eb09d]
  • Updated dependencies [8f4900a]
    • radius-sdk@0.5.0

radius-sdk@0.4.0

Choose a tag to compare

@github-actions github-actions released this 08 Oct 14:13
7097782

Minor Changes

  • bdd6d76: Accept payments from any HTTP stack, not just Hono. New radius-sdk/server entry point:

    • radiusPayments() is a web-standard handler (Request in, Response out) for Cloudflare Workers without a framework, Bun, Deno, Node 18+, and Next.js / SvelteKit / Remix route handlers. Paid handlers receive the settled receipt as a second argument.
    • createRadiusServer() exposes the Radius x402 resource server and a routes() builder that plug straight into the upstream adapters: paymentMiddleware(radius.routes({ … }), radius.server) with @x402/express, @x402/next or @x402/hono.
    • onSettled is registered on the resource server, so it fires whichever adapter served the request (it receives the x402 request context; requestOf(context) returns the Request for the SDK's own adapters). Errors thrown by onSettled are logged by x402 core instead of failing the request.
    • Paid responses stream through in the default settle: 'before' flow instead of being buffered (the previous Hono middleware buffered every paid response, stalling SSE and token streams).
    • Breaking: radius-sdk/hono is now a thin wrapper over the web-standard handler with the same options. RadiusHonoAdapter is removed; RequestAdapter from radius-sdk/server (an x402 HTTPAdapter over a web-standard Request) replaces it.
    • @x402/core / @x402/evm bumped to 2.27.0 (the version line the upstream adapters require).
    • New examples: examples/worker-plain (no framework), examples/express-seller (@x402/express) and examples/astro-seller (validate before charging in an Astro API route).

Patch Changes

  • 23f73d6: radiusPayments accepts facilitators that list the eip3009 transfer method for exact. Previously every paid route answered 500 once the facilitator's /supported named eip3009 before permit2.
  • 5a915b2: radiusPayments answers 502 (facilitator_error) when a facilitator call fails without the facilitator's own answer, such as a dropped connection or an error page from a gateway. These were reported as 402, which a buyer reads as "rejected, nothing moved", although a settle may have reached the chain. The facilitator's own rejections are still 402.

radius-cli@0.3.1

Choose a tag to compare

@github-actions github-actions released this 08 Oct 14:13
7097782

Patch Changes

  • Updated dependencies [23f73d6]
  • Updated dependencies [5a915b2]
  • Updated dependencies [bdd6d76]
    • radius-sdk@0.4.0

radius-sdk@0.3.0

Choose a tag to compare

@github-actions github-actions released this 01 Oct 01:23
ec5b21b

Minor Changes

  • c504f65: Add Permit2 interactions covering both SignatureTransfer (with optional witness) and AllowanceTransfer: approvePermit2, signPermit2Transfer, permit2TransferFrom, signPermit2Allowance, permit2Permit, permit2AllowanceTransferFrom, the permit2Actions() client extension and the EIP-712 helpers, exported from radius-sdk/client.

radius-cli@0.3.0

Choose a tag to compare

@github-actions github-actions released this 01 Oct 01:23
ec5b21b

Minor Changes

  • ba3f6c1: wallet runs its ERC-20 interactions on radius-sdk/client's erc20Actions and balance actions. wallet send <to> <amount> 0xToken transfers any ERC-20 (decimals read on-chain), next to SBC and RUSD. wallet balance now reports native RUSD and SBC separately instead of adding SBC to the aggregate eth_getBalance (which already includes it), so totalUsd no longer double counts; the JSON gains aggregateWei and rusdSource.

Patch Changes

  • Updated dependencies [c504f65]
    • radius-sdk@0.3.0