Skip to content

Commit 3093609

Browse files
committed
added sdk
1 parent 466012c commit 3093609

24 files changed

+9135
-1
lines changed

.github/workflows/unit-tests.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Unit Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
tests:
9+
name: Unit tests
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: Setup node
18+
uses: actions/setup-node@v2
19+
with:
20+
node-version: 18
21+
registry-url: https://registry.npmjs.org
22+
23+
- name: Install dependencies
24+
run: yarn install --frozen-lockfile
25+
26+
- name: Run tests
27+
run: yarn test

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.log
2+
.DS_Store
3+
node_modules
4+
dist

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
yarn format & yarn test

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.github
2+
node_modules

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all",
4+
"tabWidth": 4,
5+
"printWidth": 180,
6+
"semi": true
7+
}

.size-limit.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[
2+
{
3+
"path": "dist/sdk.cjs.production.min.js",
4+
"limit": "10 KB"
5+
},
6+
{
7+
"path": "dist/sdk.esm.js",
8+
"limit": "10 KB"
9+
}
10+
]

.yarnrc

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

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
# permit2-sdk
1+
# Permit2 sdk
2+
3+
[![npm version](https://img.shields.io/npm/v/@real-wagmi/permit2-sdk/latest.svg)](https://www.npmjs.com/package/@real-wagmi/permit2-sdk/v/latest)

jest.config.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"preset": "ts-jest",
3+
"testEnvironment": "node",
4+
"transform": {
5+
"^.+\\.ts?$": "ts-jest"
6+
},
7+
"transformIgnorePatterns": ["<rootDir>/node_modules/"]
8+
}

package.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"name": "@real-wagmi/permit2-sdk",
3+
"version": "1.0.0",
4+
"main": "dist/index.js",
5+
"typings": "dist/index.d.ts",
6+
"module": "dist/index.mjs",
7+
"files": [
8+
"dist"
9+
],
10+
"engines": {
11+
"node": ">=18"
12+
},
13+
"publishConfig": {
14+
"access": "public"
15+
},
16+
"scripts": {
17+
"start": "tsup --watch",
18+
"build": "tsup",
19+
"test": "vitest --run",
20+
"lint": "tsdx lint",
21+
"prepare": "yarn build",
22+
"size": "size-limit",
23+
"analyze": "size-limit --why",
24+
"format": "prettier --write \"*/**/*.ts\""
25+
},
26+
"author": "Wagmi",
27+
"devDependencies": {
28+
"@size-limit/preset-small-lib": "^9.0.0",
29+
"@types/big.js": "^6.2.0",
30+
"@types/jest": "^29.5.12",
31+
"husky": "^8.0.3",
32+
"size-limit": "^9.0.0",
33+
"tsdx": "^0.14.1",
34+
"tslib": "^2.6.2",
35+
"tsup": "^7.2.0",
36+
"typescript": "^5.2.2"
37+
},
38+
"repository": "https://github.com/RealWagmi/permit2-sdk.git",
39+
"keywords": [
40+
"wagmi",
41+
"ethereum"
42+
],
43+
"dependencies": {
44+
"@real-wagmi/sdk": "^1.3.9",
45+
"tiny-invariant": "^1.3.1",
46+
"viem": "^2.7.20",
47+
"vitest": "^1.3.1"
48+
}
49+
}

0 commit comments

Comments
 (0)