Repository navigation
Releases: radiustechsystems/tools
Release list
radius-sdk@0.7.0
Minor 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. -
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. -
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.
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
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
radius-sdk@0.6.0
Minor Changes
- 726a7a8:
proxyTo(origin)(fromradius-sdk/serverandradius-sdk/hono) forwards a request to an origin you do not change, for a seller in front of it:pay.wrap(proxyTo(origin)), orapp.all('/*', (c) => toOrigin(c.req.raw))after the Hono middleware. It keeps the method, path and query, buffers the body (a stream body needsduplexon Node), dropsHost, hop-by-hop headers (Node'sfetchthrows onKeep-Alive,Expectand others) and payment credentials, asks forAccept-Encoding: identityand dropsContent-Encoding/Content-Lengthwhenfetchdecoded a compressed body anyway, passes the request'ssignalso 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 globalResponsekept the origin's immutable headers, so adding the receipt threwTypeError: immutable: withsettle: '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
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) andwallet 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--jsonoutput. - 3fb56ac:
sell check <url>checks a seller's402without paying: it decodes the x402PAYMENT-REQUIREDoffers and any MPPWWW-Authenticate: Paymentchallenge, checks each offer's network, asset and EIP-712 domain, amount (against--price, at the asset's decimals),payTo,resource.urlandmaxTimeoutSeconds, 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-headwarns when an unpaidHEADis served, and--pay --thresholdmakes 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
radius-sdk@0.5.0
Minor Changes
-
8c8c671: Require Node 22 or later. Node 20 reached end of life on 30 April 2026.
-
25eb09d: MPP (the HTTP
Paymentauth scheme,evmcharge method) alongside x402.Buyers:
createRadiusFetchpaysWWW-Authenticate: Paymentchallenges with an EIP-3009 authorization bound to the challenge, in theAuthorization: Paymentcredential mppx and other MPP servers expect, and readsPayment-Receipt.protocols(default['x402', 'mpp']) sets the preference when a 402 offers both (a funded network still beats an unfunded one across protocols).PaymentOfferis nowX402Offer | MppOffer, told apart byoffer.protocol;requirementsandx402Versionexist on x402 offers only.PaymentReceiptgainsprotocol, andgetPaymentReceiptalso readsPayment-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 persettle. Responses carryPayment-Receipt; the handler andonSettledget receipts withprotocol: 'mpp'. Not available through the upstream x402 framework adapters. -
8f4900a: Pay and charge on more than one network. Networks are now
PaymentNetworks (wasRadiusNetwork), built withdefinePaymentNetwork({ chain, asset })(wasdefineRadiusNetwork), with presets for Radius ('radius'/'mainnet','radius-testnet'/'testnet'), Base ('base') and Base Sepolia ('base-sepolia'), both paying in USDC. Presetnames are now the preset ids ('radius','radius-testnet'), andradiusNetworkForChainIdispresetForChainId.createRadiusFetch({ networks: [...] })pays on any of the listed networks, preferring them in order among those the payer's balance covers (preferFunded: falseskips the balance reads; none funded throwsinsufficient_balance);offer.networkandApprovalRequest.networkare thePaymentNetworkpaid on, a USDmaxPerRequestis converted per asset, andpayFetch.on(network)gives the wallet helpers for each network. x402 v1 challenges that name a network (base,base-sepolia) are matched too.radiusPayments({ networks: [...] })/createRadiusServeroffer 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 andonSettledreport the network a payment settled on. When a facilitator's/supportednames no transfer method,exactoffers now default to EIP-3009 (x402's default) instead of Permit2.
radius-cli@0.4.0
Minor Changes
- 25eb09d:
wallet payalso pays MPP (WWW-Authenticate: Payment,evmcharges).--protocol auto|x402|mpp(defaultauto: x402 when a server offers both) chooses, and the JSONpaymentobject gainsprotocol. Messages are now prefixedpay:instead ofx402:. - 8f4900a:
wallet x402is renamedwallet payand can pay in USDC on Base:--networks radius,base(orRADIUS_PAY_NETWORKS/payNetworksin the config file) lists the networks to pay on, in preference order (the first one the wallet can cover wins), and--network testnetpairs Radius testnet with Base Sepolia. Base RPCs are set withRADIUS_BASE_RPC_URL/RADIUS_BASE_SEPOLIA_RPC_URLorrpcUrls.base/rpcUrls["base-sepolia"].--x402-thresholdand--x402-approve-permit2are renamed--thresholdand--approve-permit2, prompts and messages name the network and its token, and the JSONpaymentobject gainsnetwork. - 8c8c671: Require Node 22 or later. Node 20 reached end of life on 30 April 2026.
Patch Changes
radius-sdk@0.4.0
Minor Changes
-
bdd6d76: Accept payments from any HTTP stack, not just Hono. New
radius-sdk/serverentry point:radiusPayments()is a web-standard handler (Requestin,Responseout) 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 aroutes()builder that plug straight into the upstream adapters:paymentMiddleware(radius.routes({ … }), radius.server)with@x402/express,@x402/nextor@x402/hono.onSettledis registered on the resource server, so it fires whichever adapter served the request (it receives the x402 request context;requestOf(context)returns theRequestfor the SDK's own adapters). Errors thrown byonSettledare 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/honois now a thin wrapper over the web-standard handler with the same options.RadiusHonoAdapteris removed;RequestAdapterfromradius-sdk/server(an x402HTTPAdapterover a web-standardRequest) replaces it. @x402/core/@x402/evmbumped to 2.27.0 (the version line the upstream adapters require).- New examples:
examples/worker-plain(no framework),examples/express-seller(@x402/express) andexamples/astro-seller(validate before charging in an Astro API route).
Patch Changes
- 23f73d6:
radiusPaymentsaccepts facilitators that list theeip3009transfer method forexact. Previously every paid route answered 500 once the facilitator's/supportednamedeip3009beforepermit2. - 5a915b2:
radiusPaymentsanswers502(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 as402, which a buyer reads as "rejected, nothing moved", although a settle may have reached the chain. The facilitator's own rejections are still402.
radius-cli@0.3.1
radius-sdk@0.3.0
Minor Changes
- c504f65: Add Permit2 interactions covering both SignatureTransfer (with optional witness) and AllowanceTransfer:
approvePermit2,signPermit2Transfer,permit2TransferFrom,signPermit2Allowance,permit2Permit,permit2AllowanceTransferFrom, thepermit2Actions()client extension and the EIP-712 helpers, exported fromradius-sdk/client.
radius-cli@0.3.0
Minor Changes
- ba3f6c1:
walletruns its ERC-20 interactions onradius-sdk/client'serc20Actionsand balance actions.wallet send <to> <amount> 0xTokentransfers any ERC-20 (decimals read on-chain), next toSBCandRUSD.wallet balancenow reports native RUSD and SBC separately instead of adding SBC to the aggregateeth_getBalance(which already includes it), sototalUsdno longer double counts; the JSON gainsaggregateWeiandrusdSource.
Patch Changes
- Updated dependencies [c504f65]
- radius-sdk@0.3.0