diff --git a/.changeset/config.json b/.changeset/config.json index fce1c26540..c178a8810d 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -7,5 +7,9 @@ "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", - "ignore": [] + "ignore": [], + "privatePackages": { + "version": false, + "tag": false + } } diff --git a/.github/workflows/publish_npm_coinbase_x402.yml b/.github/workflows/publish_npm_coinbase_x402.yml index 319b7b84a9..54ae17942f 100644 --- a/.github/workflows/publish_npm_coinbase_x402.yml +++ b/.github/workflows/publish_npm_coinbase_x402.yml @@ -11,6 +11,11 @@ jobs: contents: read id-token: write steps: + - name: Refuse to publish a retired package + run: | + echo "::error::@sei-js x402 packages are retired. Sei is supported natively upstream via @x402/*. See MIGRATION.md." + exit 1 + - uses: actions/checkout@v4 - name: Setup pnpm diff --git a/.github/workflows/publish_npm_x402.yml b/.github/workflows/publish_npm_x402.yml index 3bde5dab26..54e86068c0 100644 --- a/.github/workflows/publish_npm_x402.yml +++ b/.github/workflows/publish_npm_x402.yml @@ -11,6 +11,11 @@ jobs: contents: read id-token: write steps: + - name: Refuse to publish a retired package + run: | + echo "::error::@sei-js x402 packages are retired. Sei is supported natively upstream via @x402/*. See MIGRATION.md." + exit 1 + - uses: actions/checkout@v4 - name: Setup pnpm diff --git a/.github/workflows/publish_npm_x402_axios.yml b/.github/workflows/publish_npm_x402_axios.yml index 824a5289d8..038c090d75 100644 --- a/.github/workflows/publish_npm_x402_axios.yml +++ b/.github/workflows/publish_npm_x402_axios.yml @@ -11,6 +11,11 @@ jobs: contents: read id-token: write steps: + - name: Refuse to publish a retired package + run: | + echo "::error::@sei-js x402 packages are retired. Sei is supported natively upstream via @x402/*. See MIGRATION.md." + exit 1 + - uses: actions/checkout@v4 - name: Setup pnpm diff --git a/.github/workflows/publish_npm_x402_express.yml b/.github/workflows/publish_npm_x402_express.yml index 385fc63a34..269bc7591f 100644 --- a/.github/workflows/publish_npm_x402_express.yml +++ b/.github/workflows/publish_npm_x402_express.yml @@ -11,6 +11,11 @@ jobs: contents: read id-token: write steps: + - name: Refuse to publish a retired package + run: | + echo "::error::@sei-js x402 packages are retired. Sei is supported natively upstream via @x402/*. See MIGRATION.md." + exit 1 + - uses: actions/checkout@v4 - name: Setup pnpm diff --git a/.github/workflows/publish_npm_x402_fetch.yml b/.github/workflows/publish_npm_x402_fetch.yml index 471e9722c6..32e1135f33 100644 --- a/.github/workflows/publish_npm_x402_fetch.yml +++ b/.github/workflows/publish_npm_x402_fetch.yml @@ -11,6 +11,11 @@ jobs: contents: read id-token: write steps: + - name: Refuse to publish a retired package + run: | + echo "::error::@sei-js x402 packages are retired. Sei is supported natively upstream via @x402/*. See MIGRATION.md." + exit 1 + - uses: actions/checkout@v4 - name: Setup pnpm diff --git a/.github/workflows/publish_npm_x402_hono.yml b/.github/workflows/publish_npm_x402_hono.yml index 6529c3bb98..7ba00b94d4 100644 --- a/.github/workflows/publish_npm_x402_hono.yml +++ b/.github/workflows/publish_npm_x402_hono.yml @@ -11,6 +11,11 @@ jobs: contents: read id-token: write steps: + - name: Refuse to publish a retired package + run: | + echo "::error::@sei-js x402 packages are retired. Sei is supported natively upstream via @x402/*. See MIGRATION.md." + exit 1 + - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: diff --git a/.github/workflows/publish_npm_x402_next.yml b/.github/workflows/publish_npm_x402_next.yml index ddde392ee2..870b7f7ce3 100644 --- a/.github/workflows/publish_npm_x402_next.yml +++ b/.github/workflows/publish_npm_x402_next.yml @@ -11,6 +11,11 @@ jobs: contents: read id-token: write steps: + - name: Refuse to publish a retired package + run: | + echo "::error::@sei-js x402 packages are retired. Sei is supported natively upstream via @x402/*. See MIGRATION.md." + exit 1 + - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a94c3cf71d..678cf5576f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,11 +1,7 @@ name: Release @sei-js packages on: - push: - branches: - - main - paths: - - "typescript/**" + workflow_dispatch: concurrency: ${{ github.workflow }}-${{ github.ref }} @@ -18,6 +14,11 @@ jobs: pull-requests: write id-token: write steps: + - name: Refuse to release a retired package set + run: | + echo "::error::@sei-js x402 packages are retired. Sei is supported natively upstream via @x402/*. See MIGRATION.md." + exit 1 + - name: Checkout Repo uses: actions/checkout@v4 with: diff --git a/MIGRATION.md b/MIGRATION.md new file mode 100644 index 0000000000..704b0eaa18 --- /dev/null +++ b/MIGRATION.md @@ -0,0 +1,260 @@ +# Migrating off `@sei-js/*` x402 packages + +The `@sei-js/*` x402 packages are **deprecated and no longer maintained**. Sei is now +supported natively in the upstream [x402](https://github.com/x402-foundation/x402) SDK, +so this fork no longer has a reason to exist. + +Migrate to the upstream v2 `@x402/*` packages. + +## Read this first: the Sei mainnet USDC changed + +This fork defaults Sei mainnet (chain 1329) to an IBC-bridged USDC that **does not +implement EIP-3009**. Since EIP-3009 `transferWithAuthorization` is what the `exact` +scheme relies on to settle, payments against that asset cannot settle. + +Upstream uses native USDC, which does implement EIP-3009: + +| Network | Chain | This fork (broken) | Upstream (use this) | +| --- | --- | --- | --- | +| Sei mainnet | 1329 | `0x3894085Ef7Ff0f0aeDf52E2A2704928d1Ec074F1` | `0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392` | +| Sei testnet | 1328 | `0xeAcd10aaA6f362a94823df6BBC3C536841870772` | `0x4fCF1784B31630811181f670Aea7A7bEF803eaED` | + +Both upstream contracts report symbol `USDC`, EIP-712 version `2`, and 6 decimals. If you +hardcoded either fork address anywhere, replace it. If you relied on the default asset, +upgrading picks up the correct one automatically. + +## Package mapping + +| Deprecated | Replacement | +| --- | --- | +| `@sei-js/x402` | `@x402/core` + `@x402/evm` | +| `@sei-js/x402-fetch` | `@x402/fetch` | +| `@sei-js/x402-axios` | `@x402/axios` | +| `@sei-js/x402-express` | `@x402/express` | +| `@sei-js/x402-hono` | `@x402/hono` | +| `@sei-js/x402-next` | `@x402/next` | +| `@sei-js/coinbase-x402` | `@coinbase/x402` | + +The `@sei-js/*` packages tracked x402 v1. The `@x402/*` packages are v2, so this is a +protocol upgrade rather than a rename, and the API changed. The sections below cover +every breaking change you will hit. + +## Network identifiers are now CAIP-2 + +v1 used bare network names. v2 uses CAIP-2 identifiers everywhere a network is named. + +| v1 | v2 | +| --- | --- | +| `"sei"` | `"eip155:1329"` | +| `"sei-testnet"` | `"eip155:1328"` | + +v2 also accepts wildcards such as `"eip155:*"` when registering a scheme for all EVM +chains. + +## Clients + +### fetch + +Before: + +```typescript +import { createWalletClient, http } from "viem"; +import { privateKeyToAccount } from "viem/accounts"; +import { sei } from "viem/chains"; +import { wrapFetchWithPayment } from "@sei-js/x402-fetch"; + +const account = privateKeyToAccount("0xYourPrivateKey"); +const client = createWalletClient({ account, transport: http(), chain: sei }); + +const fetchWithPay = wrapFetchWithPayment(fetch, client); +``` + +After: + +```typescript +import { privateKeyToAccount } from "viem/accounts"; +import { wrapFetchWithPaymentFromConfig } from "@x402/fetch"; +import { ExactEvmScheme } from "@x402/evm"; + +const account = privateKeyToAccount("0xYourPrivateKey"); + +const fetchWithPay = wrapFetchWithPaymentFromConfig(fetch, { + schemes: [{ network: "eip155:1329", client: new ExactEvmScheme(account) }], +}); +``` + +Note that v2 takes a viem `Account` rather than a `WalletClient`, so the chain is no +longer configured on the wallet. It comes from the `network` you register. + +The `maxValue` parameter is gone. Spend limits are now configured on the client instead +of being passed positionally. + +### axios + +Before: + +```typescript +import axios from "axios"; +import { withPaymentInterceptor } from "@sei-js/x402-axios"; + +const api = withPaymentInterceptor(axios.create(), client); +``` + +After: + +```typescript +import axios from "axios"; +import { wrapAxiosWithPaymentFromConfig } from "@x402/axios"; +import { ExactEvmScheme } from "@x402/evm"; + +const api = wrapAxiosWithPaymentFromConfig(axios.create(), { + schemes: [{ network: "eip155:1329", client: new ExactEvmScheme(account) }], +}); +``` + +## Servers + +v1 took `payTo` as the first argument and read `price` and `network` per route. v2 takes a +pre-built `x402ResourceServer` and moves the payment terms into an `accepts` block, which +is what lets a single route offer multiple schemes or networks. + +### express + +Before: + +```typescript +import express from "express"; +import { paymentMiddleware } from "@sei-js/x402-express"; + +const app = express(); + +app.use( + paymentMiddleware("0xYourAddress", { + "/protected": { price: "$0.10", network: "sei" }, + }), +); +``` + +After: + +```typescript +import express from "express"; +import { paymentMiddleware, x402ResourceServer } from "@x402/express"; +import { ExactEvmScheme } from "@x402/evm/exact/server"; +import { HTTPFacilitatorClient } from "@x402/core/server"; + +const app = express(); + +const facilitatorClient = new HTTPFacilitatorClient({ url: "https://x402.org/facilitator" }); +const resourceServer = new x402ResourceServer(facilitatorClient).register( + "eip155:1329", + new ExactEvmScheme(), +); + +app.use( + paymentMiddleware( + { + "GET /protected": { + accepts: { + scheme: "exact", + price: "$0.10", + network: "eip155:1329", + payTo: "0xYourAddress", + }, + description: "Access to premium content", + }, + }, + resourceServer, + ), +); +``` + +Two things to watch for. Route keys now include the HTTP verb (`"GET /protected"` rather +than `"/protected"`), and `payTo` moved from the first positional argument into each +route's `accepts` block, so different routes can pay out to different addresses. + +Import `ExactEvmScheme` from `@x402/evm/exact/server` on the server side, and from +`@x402/evm` on the client side. + +### hono + +Identical shape to express, importing `paymentMiddleware` and `x402ResourceServer` from +`@x402/hono`. + +### next + +v2 renames the entry point from `paymentMiddleware` to `paymentProxy`, and the +conventional file moves from `middleware.ts` to `proxy.ts`. + +Before, in `middleware.ts`: + +```typescript +import { paymentMiddleware } from "@sei-js/x402-next"; + +export const middleware = paymentMiddleware("0xYourAddress", { + "/protected": { price: "$0.01", network: "sei" }, +}); + +export const config = { matcher: ["/protected/:path*"] }; +``` + +After, in `proxy.ts`: + +```typescript +import { paymentProxy, x402ResourceServer } from "@x402/next"; +import { HTTPFacilitatorClient } from "@x402/core/server"; +import { ExactEvmScheme } from "@x402/evm/exact/server"; + +const facilitatorClient = new HTTPFacilitatorClient({ url: "https://x402.org/facilitator" }); +const resourceServer = new x402ResourceServer(facilitatorClient).register( + "eip155:1329", + new ExactEvmScheme(), +); + +export const proxy = paymentProxy( + { + "/protected": { + accepts: { + scheme: "exact", + price: "$0.01", + network: "eip155:1329", + payTo: "0xYourAddress", + }, + description: "Access to protected content", + }, + }, + resourceServer, +); + +export const config = { matcher: ["/protected/:path*"] }; +``` + +## Coinbase facilitator + +`@sei-js/coinbase-x402` was a scope rename of `@coinbase/x402` with no Sei-specific +changes, so switch the import back. The exported API is unchanged: `facilitator` and +`createFacilitatorConfig(apiKeyId, apiKeySecret)`, still reading `CDP_API_KEY_ID` and +`CDP_API_KEY_SECRET` from the environment. + +Its `FacilitatorConfig` output plugs directly into v2's facilitator client: + +```typescript +import { facilitator } from "@coinbase/x402"; +import { HTTPFacilitatorClient } from "@x402/core/server"; + +const facilitatorClient = new HTTPFacilitatorClient(facilitator); +``` + +## Wallet and client helpers + +The fork exported Sei-specific viem helpers from `@sei-js/x402` (`createClientSei`, +`createSignerSei`, `createClientSeiTestnet`, `createSignerSeiTestnet`). These have no v2 +equivalent and are not needed: construct a viem account with `privateKeyToAccount` and let +the registered `network` determine the chain. + +## Further reading + +- [Upstream repository](https://github.com/x402-foundation/x402) +- [Network and token support](https://github.com/x402-foundation/x402/blob/main/docs/core-concepts/network-and-token-support.mdx) +- [PR #3227](https://github.com/x402-foundation/x402/pull/3227), which added the Sei + default stablecoins upstream diff --git a/README.md b/README.md index 9fb6655316..53a55fde85 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,17 @@ # x402 payments protocol +> [!CAUTION] +> **This fork is deprecated and unmaintained.** The `@sei-js/*` x402 packages published from +> this repository are retired. Sei is now supported natively in the upstream +> [x402 SDK](https://github.com/x402-foundation/x402), so use the `@x402/*` packages instead. +> +> **Existing users should migrate: see [MIGRATION.md](./MIGRATION.md).** +> +> Beyond being unmaintained, these packages default Sei mainnet to an IBC-bridged USDC that +> does not implement EIP-3009. Because the `exact` scheme settles via +> `transferWithAuthorization`, payments cannot settle against that asset. Upstream uses +> native USDC, which does implement EIP-3009. + > "1 line of code to accept digital dollars. No fee, 2 second settlement, $0.001 minimum payment." ```typescript diff --git a/scripts/deprecate-sei-x402-packages.sh b/scripts/deprecate-sei-x402-packages.sh new file mode 100755 index 0000000000..25d585e5e2 --- /dev/null +++ b/scripts/deprecate-sei-x402-packages.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash +# +# Deprecates the retired @sei-js x402 packages on npm. +# +# Sei is supported natively in the upstream x402 SDK, so this fork is retired. +# See MIGRATION.md for the user-facing migration path. +# +# Requires an npm login with publish rights on the @sei-js scope. +# +# Usage: +# ./scripts/deprecate-sei-x402-packages.sh # apply +# DRY_RUN=1 ./scripts/deprecate-sei-x402-packages.sh # print only + +set -euo pipefail + +DRY_RUN="${DRY_RUN:-0}" +GUIDE="https://github.com/sei-protocol/x402/blob/main/MIGRATION.md" + +# Shared caveat for the packages that resolve a Sei mainnet default asset. The +# fork points chain 1329 at an IBC-bridged USDC with no EIP-3009 support, so the +# exact scheme cannot settle against it. +USDC_NOTE="It also defaults Sei mainnet to a bridged USDC without EIP-3009 support, so 'exact' payments cannot settle." + +deprecate() { + local pkg="$1" + local replacement="$2" + local note="${3:-}" + + local msg="Deprecated and unmaintained. Sei is now supported natively upstream: use ${replacement} instead." + if [[ -n "$note" ]]; then + msg="${msg} ${note}" + fi + msg="${msg} Migration guide: ${GUIDE}" + + if [[ "$DRY_RUN" == "1" ]]; then + printf 'DRY RUN %s\n -> %s\n\n' "$pkg" "$msg" + return + fi + + echo "Deprecating ${pkg} ..." + npm deprecate "${pkg}@*" "$msg" +} + +if [[ "$DRY_RUN" != "1" ]]; then + if ! npm whoami >/dev/null 2>&1; then + echo "error: not authenticated to npm. Run 'npm login' first." >&2 + exit 1 + fi + echo "Authenticated as $(npm whoami)." + echo +fi + +deprecate "@sei-js/x402" "@x402/core and @x402/evm" "$USDC_NOTE" +deprecate "@sei-js/x402-fetch" "@x402/fetch" "$USDC_NOTE" +deprecate "@sei-js/x402-axios" "@x402/axios" "$USDC_NOTE" +deprecate "@sei-js/x402-express" "@x402/express" "$USDC_NOTE" +deprecate "@sei-js/x402-hono" "@x402/hono" "$USDC_NOTE" +deprecate "@sei-js/x402-next" "@x402/next" "$USDC_NOTE" +deprecate "@sei-js/coinbase-x402" "@coinbase/x402" + +echo +echo "Done. Verify with:" +echo " npm view @sei-js/x402 deprecated" diff --git a/typescript/packages/coinbase-x402/README.md b/typescript/packages/coinbase-x402/README.md index 1676454681..6ae73531e8 100644 --- a/typescript/packages/coinbase-x402/README.md +++ b/typescript/packages/coinbase-x402/README.md @@ -1,5 +1,11 @@ # @coinbase/x402 +> [!CAUTION] +> **`@sei-js/coinbase-x402` is deprecated and unmaintained.** It was a scope rename of +> [`@coinbase/x402`](https://www.npmjs.com/package/@coinbase/x402) with no Sei-specific +> changes, so switch the import back to the upstream package. The exported API is unchanged. +> See [MIGRATION.md](../../../MIGRATION.md). + The official Coinbase facilitator package for the x402 Payment Protocol. This package provides direct access to Coinbase's hosted facilitator service, enabling seamless payment verification and settlement. ## Installation diff --git a/typescript/packages/coinbase-x402/package.json b/typescript/packages/coinbase-x402/package.json index 3686d491dc..5b4cf1e845 100644 --- a/typescript/packages/coinbase-x402/package.json +++ b/typescript/packages/coinbase-x402/package.json @@ -1,6 +1,7 @@ { "name": "@sei-js/coinbase-x402", "version": "0.3.10", + "private": true, "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", diff --git a/typescript/packages/x402-axios/README.md b/typescript/packages/x402-axios/README.md index 9c9bb4b011..c1af4d8d18 100644 --- a/typescript/packages/x402-axios/README.md +++ b/typescript/packages/x402-axios/README.md @@ -1,5 +1,13 @@ # x402-axios +> [!CAUTION] +> **`@sei-js/x402-axios` is deprecated and unmaintained.** Sei is now supported natively in +> the upstream x402 SDK, so use [`@x402/axios`](https://www.npmjs.com/package/@x402/axios) +> instead. See [MIGRATION.md](../../../MIGRATION.md). +> +> This package also defaults Sei mainnet to an IBC-bridged USDC without EIP-3009 support, so +> `exact` payments cannot settle against it. Upstream uses native USDC. + A utility package that extends Axios to automatically handle 402 Payment Required responses using the x402 payment protocol. This package enables seamless integration of payment functionality into your applications when making HTTP requests with Axios. ## Installation diff --git a/typescript/packages/x402-axios/package.json b/typescript/packages/x402-axios/package.json index d73d9f0348..becb8a69c1 100644 --- a/typescript/packages/x402-axios/package.json +++ b/typescript/packages/x402-axios/package.json @@ -1,6 +1,7 @@ { "name": "@sei-js/x402-axios", "version": "0.3.5", + "private": true, "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", diff --git a/typescript/packages/x402-express/README.md b/typescript/packages/x402-express/README.md index ebfb57a7fd..27dc5ca6ab 100644 --- a/typescript/packages/x402-express/README.md +++ b/typescript/packages/x402-express/README.md @@ -1,5 +1,13 @@ # x402-express +> [!CAUTION] +> **`@sei-js/x402-express` is deprecated and unmaintained.** Sei is now supported natively in +> the upstream x402 SDK, so use [`@x402/express`](https://www.npmjs.com/package/@x402/express) +> instead. See [MIGRATION.md](../../../MIGRATION.md). +> +> This package also defaults Sei mainnet to an IBC-bridged USDC without EIP-3009 support, so +> `exact` payments cannot settle against it. Upstream uses native USDC. + Express middleware integration for the x402 Payment Protocol. This package allows you to easily add paywall functionality to your Express.js applications using the x402 protocol. ## Installation diff --git a/typescript/packages/x402-express/package.json b/typescript/packages/x402-express/package.json index 1bbc7fa8f7..e4ab3bbf92 100644 --- a/typescript/packages/x402-express/package.json +++ b/typescript/packages/x402-express/package.json @@ -1,6 +1,7 @@ { "name": "@sei-js/x402-express", "version": "0.3.6", + "private": true, "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", diff --git a/typescript/packages/x402-fetch/README.md b/typescript/packages/x402-fetch/README.md index 5b3bfd3886..ee2c3bc331 100644 --- a/typescript/packages/x402-fetch/README.md +++ b/typescript/packages/x402-fetch/README.md @@ -1,5 +1,13 @@ # x402-fetch +> [!CAUTION] +> **`@sei-js/x402-fetch` is deprecated and unmaintained.** Sei is now supported natively in +> the upstream x402 SDK, so use [`@x402/fetch`](https://www.npmjs.com/package/@x402/fetch) +> instead. See [MIGRATION.md](../../../MIGRATION.md). +> +> This package also defaults Sei mainnet to an IBC-bridged USDC without EIP-3009 support, so +> `exact` payments cannot settle against it. Upstream uses native USDC. + A utility package that extends the native `fetch` API to automatically handle 402 Payment Required responses using the x402 payment protocol. This package enables seamless integration of payment functionality into your applications when making HTTP requests. ## Installation diff --git a/typescript/packages/x402-fetch/package.json b/typescript/packages/x402-fetch/package.json index 921af9cf81..86dbf6f2bc 100644 --- a/typescript/packages/x402-fetch/package.json +++ b/typescript/packages/x402-fetch/package.json @@ -1,6 +1,7 @@ { "name": "@sei-js/x402-fetch", "version": "0.3.5", + "private": true, "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", diff --git a/typescript/packages/x402-hono/README.md b/typescript/packages/x402-hono/README.md index 81f27a9832..40f62bc82f 100644 --- a/typescript/packages/x402-hono/README.md +++ b/typescript/packages/x402-hono/README.md @@ -1,5 +1,13 @@ # x402-hono +> [!CAUTION] +> **`@sei-js/x402-hono` is deprecated and unmaintained.** Sei is now supported natively in +> the upstream x402 SDK, so use [`@x402/hono`](https://www.npmjs.com/package/@x402/hono) +> instead. See [MIGRATION.md](../../../MIGRATION.md). +> +> This package also defaults Sei mainnet to an IBC-bridged USDC without EIP-3009 support, so +> `exact` payments cannot settle against it. Upstream uses native USDC. + Hono middleware integration for the x402 Payment Protocol. This package allows you to easily add paywall functionality to your Hono applications using the x402 protocol. ## Installation diff --git a/typescript/packages/x402-hono/package.json b/typescript/packages/x402-hono/package.json index 91679988fc..6311aef955 100644 --- a/typescript/packages/x402-hono/package.json +++ b/typescript/packages/x402-hono/package.json @@ -1,6 +1,7 @@ { "name": "@sei-js/x402-hono", "version": "0.3.6", + "private": true, "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", diff --git a/typescript/packages/x402-next/README.md b/typescript/packages/x402-next/README.md index 6747e07802..113ee778f3 100644 --- a/typescript/packages/x402-next/README.md +++ b/typescript/packages/x402-next/README.md @@ -1,5 +1,14 @@ # x402-next +> [!CAUTION] +> **`@sei-js/x402-next` is deprecated and unmaintained.** Sei is now supported natively in +> the upstream x402 SDK, so use [`@x402/next`](https://www.npmjs.com/package/@x402/next) +> instead. Note that v2 replaces `paymentMiddleware` with `paymentProxy`. +> See [MIGRATION.md](../../../MIGRATION.md). +> +> This package also defaults Sei mainnet to an IBC-bridged USDC without EIP-3009 support, so +> `exact` payments cannot settle against it. Upstream uses native USDC. + Next.js middleware integration for the x402 Payment Protocol. This package allows you to easily add paywall functionality to your Next.js applications using the x402 protocol. ## Installation diff --git a/typescript/packages/x402-next/package.json b/typescript/packages/x402-next/package.json index 1a4a8cfc03..36d2d0bb09 100644 --- a/typescript/packages/x402-next/package.json +++ b/typescript/packages/x402-next/package.json @@ -1,6 +1,7 @@ { "name": "@sei-js/x402-next", "version": "0.3.6", + "private": true, "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", diff --git a/typescript/packages/x402/README.md b/typescript/packages/x402/README.md index eb9047a1a5..001df5c8ad 100644 --- a/typescript/packages/x402/README.md +++ b/typescript/packages/x402/README.md @@ -1,5 +1,14 @@ # Sei x402 +> [!CAUTION] +> **`@sei-js/x402` is deprecated and unmaintained.** Sei is now supported natively in the +> upstream x402 SDK, so use [`@x402/core`](https://www.npmjs.com/package/@x402/core) and +> [`@x402/evm`](https://www.npmjs.com/package/@x402/evm) instead. +> See [MIGRATION.md](../../../MIGRATION.md). +> +> This package also defaults Sei mainnet to an IBC-bridged USDC without EIP-3009 support, so +> `exact` payments cannot settle against it. Upstream uses native USDC. + Core TypeScript implementation of the x402 Payment Protocol adapted for SEI. This package provides the foundational types, schemas, and utilities that power all x402 integrations. ## Installation diff --git a/typescript/packages/x402/package.json b/typescript/packages/x402/package.json index 043b116694..7adb5a4b7c 100644 --- a/typescript/packages/x402/package.json +++ b/typescript/packages/x402/package.json @@ -1,6 +1,7 @@ { "name": "@sei-js/x402", "version": "0.4.1", + "private": true, "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts",