x402-express-mantle 1.0.3 → 1.0.4

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.
Files changed (2) hide show
  1. package/README.md +14 -6
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -14,16 +14,16 @@ Complete x402 Express middleware SDK with built-in Mantle testnet support and US
14
14
  ## Installation
15
15
 
16
16
  ```bash
17
- npm install x402-express-mantle@1.0.2
17
+ npm install x402-express-mantle@1.0.3
18
18
  ```
19
19
 
20
20
  ## Quick Start
21
21
 
22
22
  ```javascript
23
23
  import express from "express";
24
- import { paymentMiddlewareFromConfig } from "x402-express-mantle";
25
- import { ExactEvmScheme } from "x402-express-mantle";
26
- import { HTTPFacilitatorClient } from "x402-express-mantle";
24
+ import { paymentMiddleware, x402ResourceServer } from "x402-express-mantle";
25
+ import { ExactEvmScheme } from "x402-evm-mantle";
26
+ import { HTTPFacilitatorClient } from "x402-core-mantle/http";
27
27
 
28
28
  const app = express();
29
29
 
@@ -56,7 +56,15 @@ const schemes = [
56
56
  ];
57
57
 
58
58
  // Add payment middleware
59
- app.use(paymentMiddlewareFromConfig(routes, facilitatorClient, schemes));
59
+ app.use(
60
+ paymentMiddleware(
61
+ routes,
62
+ new x402ResourceServer(facilitatorClient).register(
63
+ "eip155:5003",
64
+ new ExactEvmScheme()
65
+ )
66
+ )
67
+ );
60
68
 
61
69
  // Your protected route
62
70
  app.get("/premium-data", (req, res) => {
@@ -136,7 +144,7 @@ This SDK includes custom Mantle configurations:
136
144
  ### Vercel
137
145
 
138
146
  ````bash
139
- npm install x402-express-mantle@1.0.2
147
+ npm install x402-express-mantle@1.0.3
140
148
 
141
149
  ## Quick Example
142
150
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x402-express-mantle",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "main": "./lib/cjs/index.js",
5
5
  "module": "./lib/esm/index.mjs",
6
6
  "types": "./lib/cjs/index.d.ts",
@@ -22,9 +22,9 @@
22
22
  "author": "Mantle x402 Team",
23
23
  "description": "x402 Express middleware SDK with built-in Mantle testnet support and USDC Token configurations",
24
24
  "dependencies": {
25
- "x402-core-mantle": "2.1.1-mantle",
26
- "x402-evm-mantle": "2.1.1-mantle",
27
- "x402-svm-mantle": "2.1.1-mantle",
25
+ "x402-core-mantle": "2.1.2-mantle",
26
+ "x402-evm-mantle": "2.1.2-mantle",
27
+ "x402-svm-mantle": "2.1.2-mantle",
28
28
  "@solana/kit": "^2.1.1",
29
29
  "viem": "^2.39.3",
30
30
  "zod": "^3.24.2"