Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/sdk-eip3009-payment-flow.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/sdk-facilitator-unknown-outcome.md

This file was deleted.

13 changes: 0 additions & 13 deletions .changeset/sdk-framework-agnostic-server.md

This file was deleted.

9 changes: 9 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# radius-cli

## 0.3.1

### Patch Changes

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

## 0.3.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "radius-cli",
"version": "0.3.0",
"version": "0.3.1",
"description": "CLI wallet for the Radius network \u2014 like cast, with a built-in account",
"type": "module",
"bin": {
Expand Down
19 changes: 19 additions & 0 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# radius-sdk

## 0.4.0

### 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`.

## 0.3.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "radius-sdk",
"version": "0.3.0",
"version": "0.4.0",
"description": "Accept and make Radius payments over x402 v2 \u2014 any web-standard runtime, Hono, or the upstream x402 framework adapters",
"type": "module",
"license": "MIT",
Expand Down