@dodoex/api 3.2.0 → 3.3.0-beta.2
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 +674 -674
- package/README.md +29 -29
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/types/services/SwapWidgetApi.d.ts +208 -2
- package/dist/types/services/pool/PoolApi.d.ts +1 -0
- package/package.json +101 -105
|
@@ -90,7 +90,110 @@ export declare class SwapWidgetApi {
|
|
|
90
90
|
}>;
|
|
91
91
|
convertConfigToSwapWidgetProps(configTokenList: ConfigTokenList): {
|
|
92
92
|
tokenList: TokenList;
|
|
93
|
-
theme:
|
|
93
|
+
theme: {
|
|
94
|
+
palette?: {
|
|
95
|
+
primary?: {
|
|
96
|
+
light?: string | undefined;
|
|
97
|
+
main?: string | undefined;
|
|
98
|
+
dark?: string | undefined;
|
|
99
|
+
contrastText?: string | undefined;
|
|
100
|
+
} | undefined;
|
|
101
|
+
secondary?: {
|
|
102
|
+
light?: string | undefined;
|
|
103
|
+
main?: string | undefined;
|
|
104
|
+
dark?: string | undefined;
|
|
105
|
+
contrastText?: string | undefined;
|
|
106
|
+
} | undefined;
|
|
107
|
+
error?: {
|
|
108
|
+
light?: string | undefined;
|
|
109
|
+
main?: string | undefined;
|
|
110
|
+
dark?: string | undefined;
|
|
111
|
+
contrastText?: string | undefined;
|
|
112
|
+
} | undefined;
|
|
113
|
+
warning?: {
|
|
114
|
+
light?: string | undefined;
|
|
115
|
+
main?: string | undefined;
|
|
116
|
+
dark?: string | undefined;
|
|
117
|
+
contrastText?: string | undefined;
|
|
118
|
+
} | undefined;
|
|
119
|
+
success?: {
|
|
120
|
+
light?: string | undefined;
|
|
121
|
+
main?: string | undefined;
|
|
122
|
+
dark?: string | undefined;
|
|
123
|
+
contrastText?: string | undefined;
|
|
124
|
+
} | undefined;
|
|
125
|
+
purple?: {
|
|
126
|
+
light?: string | undefined;
|
|
127
|
+
main?: string | undefined;
|
|
128
|
+
dark?: string | undefined;
|
|
129
|
+
contrastText?: string | undefined;
|
|
130
|
+
} | undefined;
|
|
131
|
+
mode?: "light" | "dark" | undefined;
|
|
132
|
+
text?: {
|
|
133
|
+
primary?: string | undefined;
|
|
134
|
+
secondary?: string | undefined;
|
|
135
|
+
disabled?: string | undefined;
|
|
136
|
+
placeholder?: string | undefined;
|
|
137
|
+
link?: string | undefined;
|
|
138
|
+
} | undefined;
|
|
139
|
+
border?: {
|
|
140
|
+
main?: string | undefined;
|
|
141
|
+
disabled?: string | undefined;
|
|
142
|
+
light?: string | undefined;
|
|
143
|
+
} | undefined;
|
|
144
|
+
hover?: {
|
|
145
|
+
default?: string | undefined;
|
|
146
|
+
} | undefined;
|
|
147
|
+
background?: {
|
|
148
|
+
default?: string | undefined;
|
|
149
|
+
paper?: string | undefined;
|
|
150
|
+
paperContrast?: string | undefined;
|
|
151
|
+
paperDarkContrast?: string | undefined;
|
|
152
|
+
backdrop?: string | undefined;
|
|
153
|
+
input?: string | undefined;
|
|
154
|
+
tag?: string | undefined;
|
|
155
|
+
} | undefined;
|
|
156
|
+
tabActive?: {
|
|
157
|
+
light?: string | undefined;
|
|
158
|
+
main?: string | undefined;
|
|
159
|
+
dark?: string | undefined;
|
|
160
|
+
contrastText?: string | undefined;
|
|
161
|
+
} | undefined;
|
|
162
|
+
getContrastText?: {} | undefined;
|
|
163
|
+
} | undefined;
|
|
164
|
+
shape?: {
|
|
165
|
+
borderRadius?: string | number | undefined;
|
|
166
|
+
} | undefined;
|
|
167
|
+
breakpoints?: {
|
|
168
|
+
step?: number | undefined;
|
|
169
|
+
unit?: string | undefined;
|
|
170
|
+
keys?: ("mobile" | "tablet" | "laptop" | "desktop" | "largeDesktop" | undefined)[] | undefined;
|
|
171
|
+
values?: {
|
|
172
|
+
mobile?: number | undefined;
|
|
173
|
+
tablet?: number | undefined;
|
|
174
|
+
laptop?: number | undefined;
|
|
175
|
+
desktop?: number | undefined;
|
|
176
|
+
largeDesktop?: number | undefined;
|
|
177
|
+
} | undefined;
|
|
178
|
+
up?: {} | undefined;
|
|
179
|
+
down?: {} | undefined;
|
|
180
|
+
between?: {} | undefined;
|
|
181
|
+
only?: {} | undefined;
|
|
182
|
+
not?: {} | undefined;
|
|
183
|
+
} | undefined;
|
|
184
|
+
direction?: "ltr" | "rtl" | undefined;
|
|
185
|
+
mixins?: {} | undefined;
|
|
186
|
+
shadows?: {} | undefined;
|
|
187
|
+
spacing?: number | readonly (string | number)[] | {} | {} | {} | undefined;
|
|
188
|
+
transitions?: {} | undefined;
|
|
189
|
+
components?: {
|
|
190
|
+
[x: string]: any;
|
|
191
|
+
} | undefined;
|
|
192
|
+
typography?: {} | undefined;
|
|
193
|
+
zIndex?: {
|
|
194
|
+
[x: string]: number | undefined;
|
|
195
|
+
} | undefined;
|
|
196
|
+
} | undefined;
|
|
94
197
|
rebateAddress: string | null;
|
|
95
198
|
rebateRatio: number | null;
|
|
96
199
|
swapSlippage: number | null | undefined;
|
|
@@ -107,7 +210,110 @@ export declare class SwapWidgetApi {
|
|
|
107
210
|
getConfigSwapWidgetProps(projectId: string, apikey: string): Promise<{
|
|
108
211
|
swapWidgetProps: {
|
|
109
212
|
tokenList: TokenList;
|
|
110
|
-
theme:
|
|
213
|
+
theme: {
|
|
214
|
+
palette?: {
|
|
215
|
+
primary?: {
|
|
216
|
+
light?: string | undefined;
|
|
217
|
+
main?: string | undefined;
|
|
218
|
+
dark?: string | undefined;
|
|
219
|
+
contrastText?: string | undefined;
|
|
220
|
+
} | undefined;
|
|
221
|
+
secondary?: {
|
|
222
|
+
light?: string | undefined;
|
|
223
|
+
main?: string | undefined;
|
|
224
|
+
dark?: string | undefined;
|
|
225
|
+
contrastText?: string | undefined;
|
|
226
|
+
} | undefined;
|
|
227
|
+
error?: {
|
|
228
|
+
light?: string | undefined;
|
|
229
|
+
main?: string | undefined;
|
|
230
|
+
dark?: string | undefined;
|
|
231
|
+
contrastText?: string | undefined;
|
|
232
|
+
} | undefined;
|
|
233
|
+
warning?: {
|
|
234
|
+
light?: string | undefined;
|
|
235
|
+
main?: string | undefined;
|
|
236
|
+
dark?: string | undefined;
|
|
237
|
+
contrastText?: string | undefined;
|
|
238
|
+
} | undefined;
|
|
239
|
+
success?: {
|
|
240
|
+
light?: string | undefined;
|
|
241
|
+
main?: string | undefined;
|
|
242
|
+
dark?: string | undefined;
|
|
243
|
+
contrastText?: string | undefined;
|
|
244
|
+
} | undefined;
|
|
245
|
+
purple?: {
|
|
246
|
+
light?: string | undefined;
|
|
247
|
+
main?: string | undefined;
|
|
248
|
+
dark?: string | undefined;
|
|
249
|
+
contrastText?: string | undefined;
|
|
250
|
+
} | undefined;
|
|
251
|
+
mode?: "light" | "dark" | undefined;
|
|
252
|
+
text?: {
|
|
253
|
+
primary?: string | undefined;
|
|
254
|
+
secondary?: string | undefined;
|
|
255
|
+
disabled?: string | undefined;
|
|
256
|
+
placeholder?: string | undefined;
|
|
257
|
+
link?: string | undefined;
|
|
258
|
+
} | undefined;
|
|
259
|
+
border?: {
|
|
260
|
+
main?: string | undefined;
|
|
261
|
+
disabled?: string | undefined;
|
|
262
|
+
light?: string | undefined;
|
|
263
|
+
} | undefined;
|
|
264
|
+
hover?: {
|
|
265
|
+
default?: string | undefined;
|
|
266
|
+
} | undefined;
|
|
267
|
+
background?: {
|
|
268
|
+
default?: string | undefined;
|
|
269
|
+
paper?: string | undefined;
|
|
270
|
+
paperContrast?: string | undefined;
|
|
271
|
+
paperDarkContrast?: string | undefined;
|
|
272
|
+
backdrop?: string | undefined;
|
|
273
|
+
input?: string | undefined;
|
|
274
|
+
tag?: string | undefined;
|
|
275
|
+
} | undefined;
|
|
276
|
+
tabActive?: {
|
|
277
|
+
light?: string | undefined;
|
|
278
|
+
main?: string | undefined;
|
|
279
|
+
dark?: string | undefined;
|
|
280
|
+
contrastText?: string | undefined;
|
|
281
|
+
} | undefined;
|
|
282
|
+
getContrastText?: {} | undefined;
|
|
283
|
+
} | undefined;
|
|
284
|
+
shape?: {
|
|
285
|
+
borderRadius?: string | number | undefined;
|
|
286
|
+
} | undefined;
|
|
287
|
+
breakpoints?: {
|
|
288
|
+
step?: number | undefined;
|
|
289
|
+
unit?: string | undefined;
|
|
290
|
+
keys?: ("mobile" | "tablet" | "laptop" | "desktop" | "largeDesktop" | undefined)[] | undefined;
|
|
291
|
+
values?: {
|
|
292
|
+
mobile?: number | undefined;
|
|
293
|
+
tablet?: number | undefined;
|
|
294
|
+
laptop?: number | undefined;
|
|
295
|
+
desktop?: number | undefined;
|
|
296
|
+
largeDesktop?: number | undefined;
|
|
297
|
+
} | undefined;
|
|
298
|
+
up?: {} | undefined;
|
|
299
|
+
down?: {} | undefined;
|
|
300
|
+
between?: {} | undefined;
|
|
301
|
+
only?: {} | undefined;
|
|
302
|
+
not?: {} | undefined;
|
|
303
|
+
} | undefined;
|
|
304
|
+
direction?: "ltr" | "rtl" | undefined;
|
|
305
|
+
mixins?: {} | undefined;
|
|
306
|
+
shadows?: {} | undefined;
|
|
307
|
+
spacing?: number | readonly (string | number)[] | {} | {} | {} | undefined;
|
|
308
|
+
transitions?: {} | undefined;
|
|
309
|
+
components?: {
|
|
310
|
+
[x: string]: any;
|
|
311
|
+
} | undefined;
|
|
312
|
+
typography?: {} | undefined;
|
|
313
|
+
zIndex?: {
|
|
314
|
+
[x: string]: number | undefined;
|
|
315
|
+
} | undefined;
|
|
316
|
+
} | undefined;
|
|
111
317
|
rebateAddress: string | null;
|
|
112
318
|
rebateRatio: number | null;
|
|
113
319
|
swapSlippage: number | null | undefined;
|
|
@@ -405,6 +405,7 @@ export declare class PoolApi {
|
|
|
405
405
|
};
|
|
406
406
|
baseReserve: BigNumber;
|
|
407
407
|
quoteReserve: BigNumber;
|
|
408
|
+
totalSupplyBG: BigNumber | undefined;
|
|
408
409
|
} | null>;
|
|
409
410
|
};
|
|
410
411
|
getDPPOwnerProxyAddressQuery(chainId: number | undefined, poolAddress: string | undefined): {
|
package/package.json
CHANGED
|
@@ -1,105 +1,101 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@dodoex/api",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "DODO API Kit",
|
|
5
|
-
"source": "src/index.ts",
|
|
6
|
-
"types": "dist/types/index.d.ts",
|
|
7
|
-
"main": "dist/index.cjs",
|
|
8
|
-
"module": "dist/index.js",
|
|
9
|
-
"license": "GPL-3.0-or-later",
|
|
10
|
-
"homepage": "https://github.com/DODOEX/widgets#readme",
|
|
11
|
-
"repository": "https://github.com/DODOEX/widgets",
|
|
12
|
-
"files": [
|
|
13
|
-
"dist"
|
|
14
|
-
],
|
|
15
|
-
"scripts": {
|
|
16
|
-
"watch": "yarn run rollup -c --watch",
|
|
17
|
-
"build": "rollup --config",
|
|
18
|
-
"schema:compile": "export $(cat .env | xargs) && env graphql-codegen",
|
|
19
|
-
"schema:watch": "export $(cat .env | xargs) && env graphql-codegen -w",
|
|
20
|
-
"prerelease": "yarn run build",
|
|
21
|
-
"release": "semantic-release",
|
|
22
|
-
"release:local": "np --any-branch --no-cleanup --no-tests",
|
|
23
|
-
"release.npm-publish": "npm publish --access public",
|
|
24
|
-
"release.npm-publish-beta": "npm publish --tag beta"
|
|
25
|
-
},
|
|
26
|
-
"author": "",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"@
|
|
73
|
-
"@
|
|
74
|
-
"@
|
|
75
|
-
"@
|
|
76
|
-
"@
|
|
77
|
-
"@
|
|
78
|
-
"@
|
|
79
|
-
"@rollup/plugin-
|
|
80
|
-
"@rollup/plugin-
|
|
81
|
-
"@rollup/plugin-
|
|
82
|
-
"@rollup
|
|
83
|
-
"@
|
|
84
|
-
"@
|
|
85
|
-
"@
|
|
86
|
-
"@
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
"ts-jest": "^29.0.1",
|
|
103
|
-
"typescript": "^5.6.3"
|
|
104
|
-
}
|
|
105
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@dodoex/api",
|
|
3
|
+
"version": "3.3.0-beta.2",
|
|
4
|
+
"description": "DODO API Kit",
|
|
5
|
+
"source": "src/index.ts",
|
|
6
|
+
"types": "dist/types/index.d.ts",
|
|
7
|
+
"main": "dist/index.cjs",
|
|
8
|
+
"module": "dist/index.js",
|
|
9
|
+
"license": "GPL-3.0-or-later",
|
|
10
|
+
"homepage": "https://github.com/DODOEX/widgets#readme",
|
|
11
|
+
"repository": "https://github.com/DODOEX/widgets",
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"watch": "yarn run rollup -c --watch",
|
|
17
|
+
"build": "rollup --config",
|
|
18
|
+
"schema:compile": "export $(cat .env | xargs) && env graphql-codegen",
|
|
19
|
+
"schema:watch": "export $(cat .env | xargs) && env graphql-codegen -w",
|
|
20
|
+
"prerelease": "yarn run build",
|
|
21
|
+
"release": "semantic-release",
|
|
22
|
+
"release:local": "np --any-branch --no-cleanup --no-tests",
|
|
23
|
+
"release.npm-publish": "npm publish --access public",
|
|
24
|
+
"release.npm-publish-beta": "npm publish --tag beta"
|
|
25
|
+
},
|
|
26
|
+
"author": "",
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/types/index.d.ts",
|
|
30
|
+
"import": "./dist/index.js",
|
|
31
|
+
"require": "./dist/index.cjs"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"dodo",
|
|
36
|
+
"widgets",
|
|
37
|
+
"interfaces"
|
|
38
|
+
],
|
|
39
|
+
"browserslist": {
|
|
40
|
+
"production": [
|
|
41
|
+
">0.2%",
|
|
42
|
+
"not dead",
|
|
43
|
+
"not op_mini all"
|
|
44
|
+
],
|
|
45
|
+
"development": [
|
|
46
|
+
"last 1 chrome version",
|
|
47
|
+
"last 1 firefox version",
|
|
48
|
+
"last 1 safari version"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"@dodoex/contract-request": "1.x",
|
|
53
|
+
"@dodoex/dodo-contract-request": "1.x",
|
|
54
|
+
"bignumber.js": ">=9",
|
|
55
|
+
"lodash": ">=4"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@ethersproject/abi": "^5.7.0",
|
|
59
|
+
"@ethersproject/properties": "^5.7.0",
|
|
60
|
+
"@ethersproject/providers": "^5.7.2",
|
|
61
|
+
"@ethersproject/web": "^5.7.1",
|
|
62
|
+
"cross-fetch": "^4.0.0",
|
|
63
|
+
"graphql": "^16.8.1",
|
|
64
|
+
"graphql-request": "^6.1.0",
|
|
65
|
+
"qs": "^6.11.2"
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@0no-co/graphqlsp": "^1.3.2",
|
|
69
|
+
"@babel/preset-env": "^7.16.11",
|
|
70
|
+
"@babel/preset-react": "^7.18.6",
|
|
71
|
+
"@babel/preset-typescript": "^7.16.7",
|
|
72
|
+
"@ethersproject/contracts": ">=5",
|
|
73
|
+
"@graphql-codegen/cli": "^5.0.0",
|
|
74
|
+
"@graphql-codegen/client-preset": "^4.1.0",
|
|
75
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
76
|
+
"@rollup/plugin-commonjs": "^26.0.1",
|
|
77
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
78
|
+
"@rollup/plugin-replace": "^5.0.7",
|
|
79
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
80
|
+
"@rollup/plugin-typescript": "^12.1.1",
|
|
81
|
+
"@rollup/plugin-url": "^8.0.2",
|
|
82
|
+
"@svgr/rollup": "^6.2.1",
|
|
83
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
84
|
+
"@testing-library/react": "^13.4.0",
|
|
85
|
+
"@testing-library/react-hooks": "^8.0.1",
|
|
86
|
+
"@types/jest": "^29.0.3",
|
|
87
|
+
"babel-plugin-macros": "^3.1.0",
|
|
88
|
+
"babel-runtime": "^6.26.0",
|
|
89
|
+
"dotenv": "^16.0.2",
|
|
90
|
+
"jest": "^29.0.3",
|
|
91
|
+
"jest-environment-hardhat": "^1.1.9",
|
|
92
|
+
"jest-environment-jsdom": "^29.0.3",
|
|
93
|
+
"np": "^7.6.1",
|
|
94
|
+
"rollup": "^4.18.0",
|
|
95
|
+
"rollup-plugin-clear": "^2.0.7",
|
|
96
|
+
"rollup-plugin-dynamic-import-variables": "^1.1.0",
|
|
97
|
+
"svg-jest": "^1.0.1",
|
|
98
|
+
"ts-jest": "^29.0.1",
|
|
99
|
+
"typescript": "^5.6.3"
|
|
100
|
+
}
|
|
101
|
+
}
|