@chipi-stack/x402 14.1.0 → 14.2.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/LICENSE +21 -0
- package/README.md +36 -0
- package/dist/index.d.ts +1 -1
- package/package.json +52 -10
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-2026 Chipi Pay
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# @chipi-stack/x402
|
|
2
|
+
|
|
3
|
+
x402 Payment Protocol for Starknet — AI agent payments, micropayments, and HTTP-native pay-per-use middleware.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @chipi-stack/x402
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What it does
|
|
12
|
+
|
|
13
|
+
The x402 package implements the [HTTP 402 Payment Required](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/402) protocol for Starknet, enabling:
|
|
14
|
+
|
|
15
|
+
- **Facilitator** — validates and settles payments on-chain
|
|
16
|
+
- **Middleware** — Express/Next.js middleware that gates endpoints behind payments
|
|
17
|
+
- **Client** — handles payment negotiation and token attachment
|
|
18
|
+
|
|
19
|
+
Payments are gasless (via paymaster), non-custodial, and settle in USDC on Starknet mainnet.
|
|
20
|
+
|
|
21
|
+
## What you can ship
|
|
22
|
+
|
|
23
|
+
- **Paywalled APIs for AI agents** — charge per-call with autonomous payment negotiation
|
|
24
|
+
- **Micropayments for content/data** — gate articles, datasets, or media behind sub-dollar payments
|
|
25
|
+
- **Pay-per-call API monetization** — monetize any HTTP endpoint without subscriptions
|
|
26
|
+
- **Machine-to-machine autonomous payments** — let agents pay agents without human intervention
|
|
27
|
+
|
|
28
|
+
Have an idea? [Tell us what you want to build](https://github.com/chipi-pay/build-with-chipi/issues/new)
|
|
29
|
+
|
|
30
|
+
## Documentation
|
|
31
|
+
|
|
32
|
+
Full docs and integration guide: [docs.chipipay.com](https://docs.chipipay.com)
|
|
33
|
+
|
|
34
|
+
## License
|
|
35
|
+
|
|
36
|
+
MIT — Chipi Pay
|
package/dist/index.d.ts
CHANGED
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
export { X402Facilitator, type X402FacilitatorCreateOptions } from "@chipi-stack/backend";
|
|
9
9
|
export { x402Middleware, type X402MiddlewareConfig, type X402MiddlewareFlatConfig } from "@chipi-stack/backend";
|
|
10
10
|
export { X402Client, X402_DOMAIN, X402_TYPES, buildX402TypedData, type BuildX402SimpleParams } from "@chipi-stack/core";
|
|
11
|
-
export type { PaymentRequirement, PaymentPayload, VerifyResponse, SettleResponse, NonceStore, X402ClientConfig, X402FacilitatorConfig, X402PaymentConfig, } from "@chipi-stack/types";
|
|
11
|
+
export type { PaymentRequirement, PaymentPayload, VerifyResponse, SettleResponse, NonceStore, X402ClientConfig, X402FacilitatorConfig, X402PaymentConfig, SpendingPolicyConfig, SpendingPolicyData, SetSpendingPolicyParams, GetSpendingPolicyParams, RemoveSpendingPolicyParams, } from "@chipi-stack/types";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chipi-stack/x402",
|
|
3
|
-
"version": "14.
|
|
4
|
-
"description": "x402 Payment Protocol for Starknet
|
|
3
|
+
"version": "14.2.0",
|
|
4
|
+
"description": "x402 Payment Protocol for Starknet — AI agent payments, micropayments, and HTTP-native pay-per-use middleware",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -14,23 +14,65 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
17
|
+
"keywords": [
|
|
18
|
+
"chipi",
|
|
19
|
+
"chipi-pay",
|
|
20
|
+
"chipi-stack",
|
|
21
|
+
"x402",
|
|
22
|
+
"http-402",
|
|
23
|
+
"payment-required",
|
|
24
|
+
"starknet",
|
|
25
|
+
"web3",
|
|
26
|
+
"blockchain",
|
|
27
|
+
"payments",
|
|
28
|
+
"crypto-payments",
|
|
29
|
+
"stablecoin-payments",
|
|
30
|
+
"stablecoins",
|
|
31
|
+
"usdc",
|
|
32
|
+
"micropayments",
|
|
33
|
+
"pay-per-use",
|
|
34
|
+
"ai",
|
|
35
|
+
"ai-agent",
|
|
36
|
+
"ai-payments",
|
|
37
|
+
"agent-payments",
|
|
38
|
+
"mcp",
|
|
39
|
+
"model-context-protocol",
|
|
40
|
+
"autonomous-payments",
|
|
41
|
+
"machine-to-machine",
|
|
42
|
+
"middleware",
|
|
43
|
+
"sdk",
|
|
44
|
+
"typescript"
|
|
45
|
+
],
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "git+https://github.com/chipi-pay/build-with-chipi.git"
|
|
49
|
+
},
|
|
50
|
+
"homepage": "https://docs.chipipay.com",
|
|
51
|
+
"bugs": {
|
|
52
|
+
"url": "https://github.com/chipi-pay/build-with-chipi/issues"
|
|
20
53
|
},
|
|
54
|
+
"author": {
|
|
55
|
+
"name": "Chipi Pay",
|
|
56
|
+
"email": "carlos@chipipay.com",
|
|
57
|
+
"url": "https://chipipay.com"
|
|
58
|
+
},
|
|
59
|
+
"license": "MIT",
|
|
21
60
|
"dependencies": {
|
|
22
|
-
"@chipi-stack/
|
|
23
|
-
"@chipi-stack/
|
|
24
|
-
"@chipi-stack/types": "
|
|
61
|
+
"@chipi-stack/core": "^0.3.1",
|
|
62
|
+
"@chipi-stack/backend": "^14.2.0",
|
|
63
|
+
"@chipi-stack/types": "^14.2.0"
|
|
25
64
|
},
|
|
26
65
|
"devDependencies": {
|
|
27
66
|
"typescript": "^5.7.3"
|
|
28
67
|
},
|
|
29
68
|
"engines": {
|
|
30
|
-
"node": ">=
|
|
69
|
+
"node": ">=20.19.0"
|
|
31
70
|
},
|
|
32
71
|
"publishConfig": {
|
|
33
72
|
"access": "public"
|
|
34
73
|
},
|
|
35
|
-
"
|
|
74
|
+
"scripts": {
|
|
75
|
+
"build": "tsc",
|
|
76
|
+
"typecheck": "tsc --noEmit"
|
|
77
|
+
}
|
|
36
78
|
}
|