paygate 2.0.1 → 2.1.0
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/dist/core.js +3 -3
- package/package.json +7 -7
package/dist/core.js
CHANGED
|
@@ -129,7 +129,7 @@ export async function handlePaywall(config, routePrice, resourceUrl, paymentHead
|
|
|
129
129
|
network,
|
|
130
130
|
});
|
|
131
131
|
const requirementsStr = JSON.stringify({
|
|
132
|
-
x402Version:
|
|
132
|
+
x402Version: 2,
|
|
133
133
|
accepts: requirements.accepts,
|
|
134
134
|
}).replace(/[\r\n\0]/g, ' ');
|
|
135
135
|
return {
|
|
@@ -141,7 +141,7 @@ export async function handlePaywall(config, routePrice, resourceUrl, paymentHead
|
|
|
141
141
|
},
|
|
142
142
|
body: {
|
|
143
143
|
error: 'Payment Required',
|
|
144
|
-
x402Version:
|
|
144
|
+
x402Version: 2,
|
|
145
145
|
accepts: requirements.accepts,
|
|
146
146
|
facilitator: facilitatorUrl,
|
|
147
147
|
gasSponsored: true,
|
|
@@ -179,7 +179,7 @@ export async function handlePaywall(config, routePrice, resourceUrl, paymentHead
|
|
|
179
179
|
method: 'POST',
|
|
180
180
|
headers: { 'Content-Type': 'application/json' },
|
|
181
181
|
body: JSON.stringify({
|
|
182
|
-
x402Version:
|
|
182
|
+
x402Version: 2,
|
|
183
183
|
paymentPayload,
|
|
184
184
|
paymentRequirements: accept,
|
|
185
185
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paygate",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Gate your API with USDC micropayments in one line. Add x402 payment enforcement to any Express or Fastify server — agents pay per-request, no accounts needed.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,11 +19,6 @@
|
|
|
19
19
|
"types": "./dist/fastify.d.ts"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
-
"scripts": {
|
|
23
|
-
"build": "tsc",
|
|
24
|
-
"dev": "tsc --watch",
|
|
25
|
-
"prepublishOnly": "pnpm build"
|
|
26
|
-
},
|
|
27
22
|
"dependencies": {
|
|
28
23
|
"ethers": "^6.13.0"
|
|
29
24
|
},
|
|
@@ -74,5 +69,10 @@
|
|
|
74
69
|
"repository": {
|
|
75
70
|
"type": "git",
|
|
76
71
|
"url": "https://github.com/arispay-inc/ArisPay"
|
|
72
|
+
},
|
|
73
|
+
"scripts": {
|
|
74
|
+
"build": "tsc",
|
|
75
|
+
"dev": "tsc --watch",
|
|
76
|
+
"type-check": "tsc --noEmit"
|
|
77
77
|
}
|
|
78
|
-
}
|
|
78
|
+
}
|