@parallel-protocol/x402 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -209,7 +209,7 @@ For the four natively supported networks, `acceptedTokens` defaults to `[USDp, U
209
209
 
210
210
  | Network | USDp | USDC | sUSDp |
211
211
  |---------|------|------|-------|
212
- | `ethereum` | `0x9B3a8f7CEC208e247d97dEE13313690977e24459` | `0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48` | `0x0d45b129dc868963025Db79A9074EA9c9e32Cae4` |
212
+ | `ethereum` | `0x9B3a8f7CEC208e247d97dEE13313690977e24459` | `0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48` | `0xd3a452B305C8285c0Dd7b8537665c734d3D279eF` |
213
213
  | `base` | `0x76A9A0062ec6712b99B4f63bD2b4270185759dd5` | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` | `0x472eD57b376fE400259FB28e5C46eB53f0E3e7E7` |
214
214
  | `avalanche` | `0x9eE1963f05553eF838604Dd39403be21ceF26AA4` | `0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E` | `0x9d92c21205383651610f90722131655a5b8ed3e0` |
215
215
  | `hyperevm` | `0xBE65F0F410A72BeC163dC65d46c83699e957D588` | `0xb88339cb7199b77e23db6e890353e22632ba630f` | `0x9B3a8f7CEC208e247d97dEE13313690977e24459` |
@@ -245,7 +245,7 @@ var FacilitatorClient = class {
245
245
  var PARALLEL_TOKENS = {
246
246
  ethereum: {
247
247
  usdp: "0x9B3a8f7CEC208e247d97dEE13313690977e24459",
248
- susdp: "0x0d45b129dc868963025Db79A9074EA9c9e32Cae4",
248
+ susdp: "0xd3a452B305C8285c0Dd7b8537665c734d3D279eF",
249
249
  usdc: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
250
250
  frxUSD: "0xCAcd6fd266aF91b8AeD52aCCc382b4e165586E29",
251
251
  sfrxUSD: "0xcf62F905562626CfcDD2261162a51fd02Fc9c5b6",
@@ -247,7 +247,7 @@ var FacilitatorClient = class {
247
247
  var PARALLEL_TOKENS = {
248
248
  ethereum: {
249
249
  usdp: "0x9B3a8f7CEC208e247d97dEE13313690977e24459",
250
- susdp: "0x0d45b129dc868963025Db79A9074EA9c9e32Cae4",
250
+ susdp: "0xd3a452B305C8285c0Dd7b8537665c734d3D279eF",
251
251
  usdc: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
252
252
  frxUSD: "0xCAcd6fd266aF91b8AeD52aCCc382b4e165586E29",
253
253
  sfrxUSD: "0xcf62F905562626CfcDD2261162a51fd02Fc9c5b6",
package/dist/express.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkXUNNMCO5_cjs = require('./chunk-XUNNMCO5.cjs');
4
- var chunkO744P75D_cjs = require('./chunk-O744P75D.cjs');
4
+ var chunkKQPIZ6SZ_cjs = require('./chunk-KQPIZ6SZ.cjs');
5
5
 
6
6
  // src/express/adapter.ts
7
7
  var TIMEOUT_BODY = JSON.stringify({
@@ -113,7 +113,7 @@ var ExpressAdapter = class {
113
113
 
114
114
  // src/express/index.ts
115
115
  function paymentMiddleware(config) {
116
- const middleware = chunkO744P75D_cjs.createPaymentMiddleware(config);
116
+ const middleware = chunkKQPIZ6SZ_cjs.createPaymentMiddleware(config);
117
117
  return async (req, res, next) => {
118
118
  const result = await middleware(new ExpressAdapter(req, res, next));
119
119
  if ("pass" in result) {
package/dist/express.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { raceTimeout, HANDLER_TIMEOUT } from './chunk-2UEAVMCH.js';
2
- import { createPaymentMiddleware } from './chunk-3TJ2BENA.js';
2
+ import { createPaymentMiddleware } from './chunk-75GLDK7L.js';
3
3
 
4
4
  // src/express/adapter.ts
5
5
  var TIMEOUT_BODY = JSON.stringify({
package/dist/fastify.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkO744P75D_cjs = require('./chunk-O744P75D.cjs');
3
+ var chunkKQPIZ6SZ_cjs = require('./chunk-KQPIZ6SZ.cjs');
4
4
  var fp = require('fastify-plugin');
5
5
 
6
6
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -31,7 +31,7 @@ var FastifyAdapter = class {
31
31
  // src/fastify/index.ts
32
32
  function paymentMiddleware(config) {
33
33
  return fp__default.default(async (fastify) => {
34
- const gate = chunkO744P75D_cjs.createPaymentGate(config);
34
+ const gate = chunkKQPIZ6SZ_cjs.createPaymentGate(config);
35
35
  const settleMap = /* @__PURE__ */ new WeakMap();
36
36
  fastify.addHook("onRequest", async (req, reply) => {
37
37
  const gateResult = await gate(new FastifyAdapter(req));
@@ -54,7 +54,7 @@ function paymentMiddleware(config) {
54
54
  try {
55
55
  const settleResponse = await settle();
56
56
  if (settleResponse.success) {
57
- reply.header("payment-response", chunkO744P75D_cjs.encodeBase64(settleResponse));
57
+ reply.header("payment-response", chunkKQPIZ6SZ_cjs.encodeBase64(settleResponse));
58
58
  reply.header("access-control-expose-headers", "payment-response");
59
59
  settled = true;
60
60
  }
package/dist/fastify.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createPaymentGate, encodeBase64 } from './chunk-3TJ2BENA.js';
1
+ import { createPaymentGate, encodeBase64 } from './chunk-75GLDK7L.js';
2
2
  import fp from 'fastify-plugin';
3
3
 
4
4
  // src/fastify/adapter.ts
package/dist/hono.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkXUNNMCO5_cjs = require('./chunk-XUNNMCO5.cjs');
4
- var chunkO744P75D_cjs = require('./chunk-O744P75D.cjs');
4
+ var chunkKQPIZ6SZ_cjs = require('./chunk-KQPIZ6SZ.cjs');
5
5
 
6
6
  // src/hono/adapter.ts
7
7
  var TIMEOUT_BODY = JSON.stringify({
@@ -58,7 +58,7 @@ var HonoAdapter = class {
58
58
 
59
59
  // src/hono/index.ts
60
60
  function paymentMiddleware(config) {
61
- const middleware = chunkO744P75D_cjs.createPaymentMiddleware(config);
61
+ const middleware = chunkKQPIZ6SZ_cjs.createPaymentMiddleware(config);
62
62
  return async (c, next) => {
63
63
  const result = await middleware(new HonoAdapter(c, next));
64
64
  if ("pass" in result) {
package/dist/hono.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { raceTimeout, HANDLER_TIMEOUT } from './chunk-2UEAVMCH.js';
2
- import { createPaymentMiddleware } from './chunk-3TJ2BENA.js';
2
+ import { createPaymentMiddleware } from './chunk-75GLDK7L.js';
3
3
 
4
4
  // src/hono/adapter.ts
5
5
  var TIMEOUT_BODY = JSON.stringify({
package/dist/index.cjs CHANGED
@@ -1,54 +1,54 @@
1
1
  'use strict';
2
2
 
3
- var chunkO744P75D_cjs = require('./chunk-O744P75D.cjs');
3
+ var chunkKQPIZ6SZ_cjs = require('./chunk-KQPIZ6SZ.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "FacilitatorClient", {
8
8
  enumerable: true,
9
- get: function () { return chunkO744P75D_cjs.FacilitatorClient; }
9
+ get: function () { return chunkKQPIZ6SZ_cjs.FacilitatorClient; }
10
10
  });
11
11
  Object.defineProperty(exports, "PARALLEL_TOKENS", {
12
12
  enumerable: true,
13
- get: function () { return chunkO744P75D_cjs.PARALLEL_TOKENS; }
13
+ get: function () { return chunkKQPIZ6SZ_cjs.PARALLEL_TOKENS; }
14
14
  });
15
15
  Object.defineProperty(exports, "X402ConfigError", {
16
16
  enumerable: true,
17
- get: function () { return chunkO744P75D_cjs.X402ConfigError; }
17
+ get: function () { return chunkKQPIZ6SZ_cjs.X402ConfigError; }
18
18
  });
19
19
  Object.defineProperty(exports, "X402RuntimeError", {
20
20
  enumerable: true,
21
- get: function () { return chunkO744P75D_cjs.X402RuntimeError; }
21
+ get: function () { return chunkKQPIZ6SZ_cjs.X402RuntimeError; }
22
22
  });
23
23
  Object.defineProperty(exports, "X402_ERROR_CODES", {
24
24
  enumerable: true,
25
- get: function () { return chunkO744P75D_cjs.X402_ERROR_CODES; }
25
+ get: function () { return chunkKQPIZ6SZ_cjs.X402_ERROR_CODES; }
26
26
  });
27
27
  Object.defineProperty(exports, "createPaymentGate", {
28
28
  enumerable: true,
29
- get: function () { return chunkO744P75D_cjs.createPaymentGate; }
29
+ get: function () { return chunkKQPIZ6SZ_cjs.createPaymentGate; }
30
30
  });
31
31
  Object.defineProperty(exports, "createPaymentMiddleware", {
32
32
  enumerable: true,
33
- get: function () { return chunkO744P75D_cjs.createPaymentMiddleware; }
33
+ get: function () { return chunkKQPIZ6SZ_cjs.createPaymentMiddleware; }
34
34
  });
35
35
  Object.defineProperty(exports, "encodeBase64", {
36
36
  enumerable: true,
37
- get: function () { return chunkO744P75D_cjs.encodeBase64; }
37
+ get: function () { return chunkKQPIZ6SZ_cjs.encodeBase64; }
38
38
  });
39
39
  Object.defineProperty(exports, "getDefaultAcceptedTokens", {
40
40
  enumerable: true,
41
- get: function () { return chunkO744P75D_cjs.getDefaultAcceptedTokens; }
41
+ get: function () { return chunkKQPIZ6SZ_cjs.getDefaultAcceptedTokens; }
42
42
  });
43
43
  Object.defineProperty(exports, "parsePrice", {
44
44
  enumerable: true,
45
- get: function () { return chunkO744P75D_cjs.parsePrice; }
45
+ get: function () { return chunkKQPIZ6SZ_cjs.parsePrice; }
46
46
  });
47
47
  Object.defineProperty(exports, "toEip155Network", {
48
48
  enumerable: true,
49
- get: function () { return chunkO744P75D_cjs.toEip155Network; }
49
+ get: function () { return chunkKQPIZ6SZ_cjs.toEip155Network; }
50
50
  });
51
51
  Object.defineProperty(exports, "validateAddress", {
52
52
  enumerable: true,
53
- get: function () { return chunkO744P75D_cjs.validateAddress; }
53
+ get: function () { return chunkKQPIZ6SZ_cjs.validateAddress; }
54
54
  });
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { FacilitatorClient, PARALLEL_TOKENS, X402ConfigError, X402RuntimeError, X402_ERROR_CODES, createPaymentGate, createPaymentMiddleware, encodeBase64, getDefaultAcceptedTokens, parsePrice, toEip155Network, validateAddress } from './chunk-3TJ2BENA.js';
1
+ export { FacilitatorClient, PARALLEL_TOKENS, X402ConfigError, X402RuntimeError, X402_ERROR_CODES, createPaymentGate, createPaymentMiddleware, encodeBase64, getDefaultAcceptedTokens, parsePrice, toEip155Network, validateAddress } from './chunk-75GLDK7L.js';
package/dist/next.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkXUNNMCO5_cjs = require('./chunk-XUNNMCO5.cjs');
4
- var chunkO744P75D_cjs = require('./chunk-O744P75D.cjs');
4
+ var chunkKQPIZ6SZ_cjs = require('./chunk-KQPIZ6SZ.cjs');
5
5
  var server = require('next/server');
6
6
 
7
7
  // src/next/adapter.ts
@@ -26,7 +26,7 @@ var NextAdapter = class {
26
26
 
27
27
  // src/next/index.ts
28
28
  function withPayment(config, handler) {
29
- const gate = chunkO744P75D_cjs.createPaymentGate(config);
29
+ const gate = chunkKQPIZ6SZ_cjs.createPaymentGate(config);
30
30
  return async (req) => {
31
31
  const gateResult = await gate(new NextAdapter(req));
32
32
  if (gateResult.type === "pass") {
@@ -56,7 +56,7 @@ function withPayment(config, handler) {
56
56
  const settleResponse = await gateResult.settle();
57
57
  if (settleResponse.success) {
58
58
  const headers = new Headers(response.headers);
59
- headers.set("payment-response", chunkO744P75D_cjs.encodeBase64(settleResponse));
59
+ headers.set("payment-response", chunkKQPIZ6SZ_cjs.encodeBase64(settleResponse));
60
60
  headers.set("access-control-expose-headers", "payment-response");
61
61
  return new server.NextResponse(response.body, {
62
62
  status: response.status,
package/dist/next.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { raceTimeout, HANDLER_TIMEOUT } from './chunk-2UEAVMCH.js';
2
- import { createPaymentGate, encodeBase64 } from './chunk-3TJ2BENA.js';
2
+ import { createPaymentGate, encodeBase64 } from './chunk-75GLDK7L.js';
3
3
  import { NextResponse } from 'next/server';
4
4
 
5
5
  // src/next/adapter.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parallel-protocol/x402",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Parallel Protocol x402 payment middleware — Express, Next.js, Fastify, Hono",
5
5
  "author": "Parallel Protocol <contact@parallel.best>",
6
6
  "repository": {
@@ -123,7 +123,7 @@
123
123
  "vitest": "^4.0.14"
124
124
  },
125
125
  "dependencies": {
126
- "@parallel-protocol/chains": "^0.2.0",
126
+ "@parallel-protocol/chains": "^0.2.1",
127
127
  "fastify-plugin": "^6.0.0",
128
128
  "zod": "^4.4.3"
129
129
  },