Skip to content

Commit 48c4994

Browse files
committed
initial commit
0 parents  commit 48c4994

47 files changed

Lines changed: 7834 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version-file: .nvmrc
21+
22+
- run: corepack enable
23+
24+
- run: pnpm install --frozen-lockfile
25+
26+
- run: pnpm typecheck
27+
28+
- run: pnpm build
29+
30+
- run: pnpm audit --audit-level=moderate

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
node_modules/
2+
dist/
3+
*.tsbuildinfo
4+
.env
5+
.env.*
6+
!.env.example
7+
*.log
8+
npm-debug.log*
9+
coverage/
10+
.DS_Store
11+
.vscode/
12+
.idea/
13+
*.swp
14+
scripts/
15+
test/
16+
README.md

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ignore-scripts=true
2+
engine-strict=true

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 x402toll contributors
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.json

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
{
2+
"name": "x402-toll",
3+
"version": "0.1.1",
4+
"main": "./dist/cjs/index.js",
5+
"module": "./dist/esm/index.js",
6+
"types": "./dist/cjs/index.d.ts",
7+
"scripts": {
8+
"build": "rm -rf dist && tsup",
9+
"test": "vitest run",
10+
"test:watch": "vitest",
11+
"watch": "tsc --watch",
12+
"typecheck": "tsc --noEmit",
13+
"prepublishOnly": "pnpm typecheck && pnpm build",
14+
"release": "pnpm typecheck && pnpm build && np --package-manager=pnpm"
15+
},
16+
"keywords": [],
17+
"license": "MIT",
18+
"author": "Shodipo Ayomide",
19+
"repository": "https://github.com/Developerayo/x402toll",
20+
"description": "Classify the caller, then allow, block, or charge via x402",
21+
"devDependencies": {
22+
"@types/express": "^4.17.21",
23+
"@types/node": "^20.11.0",
24+
"@x402/core": "^2.11.0",
25+
"express": "^4.18.0",
26+
"ioredis": "^5.4.0",
27+
"next": "^15.0.0",
28+
"tsup": "^8.4.0",
29+
"typescript": "^5.7.3",
30+
"vitest": "^2.1.0"
31+
},
32+
"dependencies": {
33+
"ipaddr.js": "^2.2.0",
34+
"isbot": "^5.1.0",
35+
"jose": "^5.9.0"
36+
},
37+
"peerDependencies": {
38+
"@x402/core": "^2.3.0",
39+
"express": "^4.18.0",
40+
"ioredis": "^5.4.0",
41+
"next": "^14.0.0 || ^15.0.0 || ^16.0.0"
42+
},
43+
"peerDependenciesMeta": {
44+
"express": {
45+
"optional": true
46+
},
47+
"ioredis": {
48+
"optional": true
49+
},
50+
"next": {
51+
"optional": true
52+
}
53+
},
54+
"exports": {
55+
".": {
56+
"import": {
57+
"types": "./dist/esm/index.d.mts",
58+
"default": "./dist/esm/index.mjs"
59+
},
60+
"require": {
61+
"types": "./dist/cjs/index.d.ts",
62+
"default": "./dist/cjs/index.js"
63+
}
64+
},
65+
"./express": {
66+
"import": {
67+
"types": "./dist/esm/express/index.d.mts",
68+
"default": "./dist/esm/express/index.mjs"
69+
},
70+
"require": {
71+
"types": "./dist/cjs/express/index.d.ts",
72+
"default": "./dist/cjs/express/index.js"
73+
}
74+
},
75+
"./next": {
76+
"import": {
77+
"types": "./dist/esm/next/index.d.mts",
78+
"default": "./dist/esm/next/index.mjs"
79+
},
80+
"require": {
81+
"types": "./dist/cjs/next/index.d.ts",
82+
"default": "./dist/cjs/next/index.js"
83+
}
84+
},
85+
"./next/edge": {
86+
"import": {
87+
"types": "./dist/esm/next/edge/index.d.mts",
88+
"default": "./dist/esm/next/edge/index.mjs"
89+
}
90+
},
91+
"./signals": {
92+
"import": {
93+
"types": "./dist/esm/signals/index.d.mts",
94+
"default": "./dist/esm/signals/index.mjs"
95+
},
96+
"require": {
97+
"types": "./dist/cjs/signals/index.d.ts",
98+
"default": "./dist/cjs/signals/index.js"
99+
}
100+
},
101+
"./registry": {
102+
"import": {
103+
"types": "./dist/esm/registry/index.d.mts",
104+
"default": "./dist/esm/registry/index.mjs"
105+
},
106+
"require": {
107+
"types": "./dist/cjs/registry/index.d.ts",
108+
"default": "./dist/cjs/registry/index.js"
109+
}
110+
},
111+
"./store-redis": {
112+
"import": {
113+
"types": "./dist/esm/store-redis/index.d.mts",
114+
"default": "./dist/esm/store-redis/index.mjs"
115+
},
116+
"require": {
117+
"types": "./dist/cjs/store-redis/index.d.ts",
118+
"default": "./dist/cjs/store-redis/index.js"
119+
}
120+
}
121+
},
122+
"files": [
123+
"dist"
124+
]
125+
}

0 commit comments

Comments
 (0)