@ring-protocol/universal-router-sdk 0.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/README.md +33 -0
- package/dist/entities/Command.d.ts +12 -0
- package/dist/entities/actions/index.d.ts +2 -0
- package/dist/entities/actions/uniswap.d.ts +30 -0
- package/dist/entities/actions/unwrapWETH.d.ts +12 -0
- package/dist/entities/index.d.ts +2 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +8 -0
- package/dist/swapRouter.d.ts +37 -0
- package/dist/test/forge/writeInterop.d.ts +2 -0
- package/dist/test/utils/addresses.d.ts +5 -0
- package/dist/test/utils/hexToDecimalString.d.ts +2 -0
- package/dist/test/utils/permit2.d.ts +7 -0
- package/dist/test/utils/uniswapData.d.ts +24 -0
- package/dist/universal-router-sdk.cjs.development.js +1461 -0
- package/dist/universal-router-sdk.cjs.development.js.map +1 -0
- package/dist/universal-router-sdk.cjs.production.min.js +2 -0
- package/dist/universal-router-sdk.cjs.production.min.js.map +1 -0
- package/dist/universal-router-sdk.esm.js +1454 -0
- package/dist/universal-router-sdk.esm.js.map +1 -0
- package/dist/utils/commandParser.d.ts +34 -0
- package/dist/utils/constants.d.ts +30 -0
- package/dist/utils/getCurrencyAddress.d.ts +2 -0
- package/dist/utils/inputTokens.d.ts +23 -0
- package/dist/utils/numbers.d.ts +6 -0
- package/dist/utils/pathCurrency.d.ts +3 -0
- package/dist/utils/routerCommands.d.ts +64 -0
- package/dist/utils/routerTradeAdapter.d.ts +73 -0
- package/package.json +113 -0
package/package.json
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ring-protocol/universal-router-sdk",
|
|
3
|
+
"description": "sdk for integrating with the Universal Router contracts",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/Few-Protocol/ring-sdks.git"
|
|
7
|
+
},
|
|
8
|
+
"keywords": [
|
|
9
|
+
"uniswap",
|
|
10
|
+
"ethereum"
|
|
11
|
+
],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"main": "dist/index.js",
|
|
14
|
+
"typings": "dist/index.d.ts",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=14"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsdx build",
|
|
23
|
+
"docs": "typedoc",
|
|
24
|
+
"forge:fix": "forge fmt",
|
|
25
|
+
"lint": "yarn prettier",
|
|
26
|
+
"lint:fix": "yarn prettier:fix && yarn forge:fix",
|
|
27
|
+
"prettier": "prettier --check '**/*.ts' && prettier --check '**/*.json'",
|
|
28
|
+
"prettier:fix": "prettier --write '**/*.ts' && prettier --write '**/*.json'",
|
|
29
|
+
"release": "semantic-release",
|
|
30
|
+
"test": "yarn test:hardhat && yarn test:forge",
|
|
31
|
+
"test:forge": "forge test",
|
|
32
|
+
"test:hardhat": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' hardhat test"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@openzeppelin/contracts": "4.7.0",
|
|
36
|
+
"@ring-protocol/permit2-sdk": "0.1.0",
|
|
37
|
+
"@ring-protocol/router-sdk": "0.1.0",
|
|
38
|
+
"@ring-protocol/sdk-core": "0.1.0",
|
|
39
|
+
"@ring-protocol/v2-sdk": "0.1.0",
|
|
40
|
+
"@ring-protocol/v3-sdk": "0.1.0",
|
|
41
|
+
"@ring-protocol/v4-sdk": "0.1.0",
|
|
42
|
+
"@uniswap/universal-router": "2.0.0-beta.2",
|
|
43
|
+
"@uniswap/v2-core": "^1.0.1",
|
|
44
|
+
"@uniswap/v3-core": "1.0.0",
|
|
45
|
+
"bignumber.js": "^9.0.2",
|
|
46
|
+
"ethers": "^5.7.0"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/chai": "^4.3.3",
|
|
50
|
+
"@types/mocha": "^9.1.1",
|
|
51
|
+
"@types/node": "^18.7.16",
|
|
52
|
+
"@types/node-fetch": "^2.6.2",
|
|
53
|
+
"chai": "^4.3.6",
|
|
54
|
+
"dotenv": "^16.0.3",
|
|
55
|
+
"eslint-plugin-prettier": "^3.4.1",
|
|
56
|
+
"hardhat": "^2.25.0",
|
|
57
|
+
"prettier": "^2.4.1",
|
|
58
|
+
"ts-node": "^10.9.1",
|
|
59
|
+
"tsdx": "^0.14.1",
|
|
60
|
+
"tslib": "^2.3.0",
|
|
61
|
+
"typedoc": "^0.21.2",
|
|
62
|
+
"typescript": "^4.3.3"
|
|
63
|
+
},
|
|
64
|
+
"prettier": {
|
|
65
|
+
"printWidth": 120,
|
|
66
|
+
"semi": false,
|
|
67
|
+
"singleQuote": true,
|
|
68
|
+
"trailingComma": "es5"
|
|
69
|
+
},
|
|
70
|
+
"publishConfig": {
|
|
71
|
+
"access": "public"
|
|
72
|
+
},
|
|
73
|
+
"release": {
|
|
74
|
+
"extends": "semantic-release-monorepo",
|
|
75
|
+
"branches": [
|
|
76
|
+
{
|
|
77
|
+
"name": "main",
|
|
78
|
+
"prerelease": false
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"plugins": [
|
|
82
|
+
[
|
|
83
|
+
"@semantic-release/commit-analyzer",
|
|
84
|
+
{
|
|
85
|
+
"preset": "angular",
|
|
86
|
+
"releaseRules": "../../publishing/release-rules.cjs"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"@semantic-release/release-notes-generator",
|
|
90
|
+
[
|
|
91
|
+
"@semantic-release/exec",
|
|
92
|
+
{
|
|
93
|
+
"prepareCmd": "node ../../publishing/replace-workspace-deps.js"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"@semantic-release/npm",
|
|
97
|
+
"@semantic-release/github",
|
|
98
|
+
[
|
|
99
|
+
"@semantic-release/exec",
|
|
100
|
+
{
|
|
101
|
+
"successCmd": "git restore ../../sdks/*/package.json ../../yarn.lock && [ -f ../../yarn.lock.bak ] && mv ../../yarn.lock.bak ../../yarn.lock || true; yarn",
|
|
102
|
+
"failCmd": "git restore ../../sdks/*/package.json ../../yarn.lock && [ -f ../../yarn.lock.bak ] && mv ../../yarn.lock.bak ../../yarn.lock || true; yarn",
|
|
103
|
+
"execCwd": "../.."
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
"installConfig": {
|
|
109
|
+
"hoistingLimits": "workspaces"
|
|
110
|
+
},
|
|
111
|
+
"sideEffects": false,
|
|
112
|
+
"version": "0.1.0"
|
|
113
|
+
}
|