Repository navigation
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.