@dodoex/api 3.3.0-beta.7 → 3.4.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 +674 -674
- package/README.md +29 -29
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/types/chainConfig/chain.d.ts +2 -1
- package/dist/types/services/SwapWidgetApi.d.ts +2 -208
- package/package.json +106 -102
|
@@ -90,110 +90,7 @@ export declare class SwapWidgetApi {
|
|
|
90
90
|
}>;
|
|
91
91
|
convertConfigToSwapWidgetProps(configTokenList: ConfigTokenList): {
|
|
92
92
|
tokenList: TokenList;
|
|
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;
|
|
93
|
+
theme: any;
|
|
197
94
|
rebateAddress: string | null;
|
|
198
95
|
rebateRatio: number | null;
|
|
199
96
|
swapSlippage: number | null | undefined;
|
|
@@ -210,110 +107,7 @@ export declare class SwapWidgetApi {
|
|
|
210
107
|
getConfigSwapWidgetProps(projectId: string, apikey: string): Promise<{
|
|
211
108
|
swapWidgetProps: {
|
|
212
109
|
tokenList: TokenList;
|
|
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;
|
|
110
|
+
theme: any;
|
|
317
111
|
rebateAddress: string | null;
|
|
318
112
|
rebateRatio: number | null;
|
|
319
113
|
swapSlippage: number | null | undefined;
|
package/package.json
CHANGED
|
@@ -1,102 +1,106 @@
|
|
|
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
|
-
"@
|
|
83
|
-
"@
|
|
84
|
-
"@
|
|
85
|
-
"@
|
|
86
|
-
"@
|
|
87
|
-
"@
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@dodoex/api",
|
|
3
|
+
"version": "3.4.0",
|
|
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
|
+
"publishConfig": {
|
|
28
|
+
"access": "public",
|
|
29
|
+
"registry": "https://registry.npmjs.org"
|
|
30
|
+
},
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/types/index.d.ts",
|
|
34
|
+
"import": "./dist/index.js",
|
|
35
|
+
"require": "./dist/index.cjs"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"keywords": [
|
|
39
|
+
"dodo",
|
|
40
|
+
"widgets",
|
|
41
|
+
"interfaces"
|
|
42
|
+
],
|
|
43
|
+
"browserslist": {
|
|
44
|
+
"production": [
|
|
45
|
+
">0.2%",
|
|
46
|
+
"not dead",
|
|
47
|
+
"not op_mini all"
|
|
48
|
+
],
|
|
49
|
+
"development": [
|
|
50
|
+
"last 1 chrome version",
|
|
51
|
+
"last 1 firefox version",
|
|
52
|
+
"last 1 safari version"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"@dodoex/contract-request": "1.x",
|
|
57
|
+
"@dodoex/dodo-contract-request": "1.x",
|
|
58
|
+
"bignumber.js": ">=9",
|
|
59
|
+
"lodash": ">=4"
|
|
60
|
+
},
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"@ethersproject/abi": "^5.7.0",
|
|
63
|
+
"@ethersproject/properties": "^5.7.0",
|
|
64
|
+
"@ethersproject/providers": "^5.7.2",
|
|
65
|
+
"@ethersproject/web": "^5.7.1",
|
|
66
|
+
"cross-fetch": "^4.0.0",
|
|
67
|
+
"graphql": "^16.8.1",
|
|
68
|
+
"graphql-request": "^6.1.0",
|
|
69
|
+
"qs": "^6.11.2"
|
|
70
|
+
},
|
|
71
|
+
"devDependencies": {
|
|
72
|
+
"@0no-co/graphqlsp": "^1.3.2",
|
|
73
|
+
"@babel/preset-env": "^7.16.11",
|
|
74
|
+
"@babel/preset-react": "^7.18.6",
|
|
75
|
+
"@babel/preset-typescript": "^7.16.7",
|
|
76
|
+
"@ethersproject/contracts": ">=5",
|
|
77
|
+
"@graphql-codegen/cli": "^5.0.0",
|
|
78
|
+
"@graphql-codegen/client-preset": "^4.1.0",
|
|
79
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
80
|
+
"@rollup/plugin-commonjs": "^26.0.1",
|
|
81
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
82
|
+
"@rollup/plugin-replace": "^5.0.7",
|
|
83
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
84
|
+
"@rollup/plugin-typescript": "^12.1.1",
|
|
85
|
+
"@rollup/plugin-url": "^8.0.2",
|
|
86
|
+
"@svgr/rollup": "^6.2.1",
|
|
87
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
88
|
+
"@testing-library/react": "^13.4.0",
|
|
89
|
+
"@testing-library/react-hooks": "^8.0.1",
|
|
90
|
+
"@types/jest": "^29.0.3",
|
|
91
|
+
"@types/qs": "^6.14.0",
|
|
92
|
+
"babel-plugin-macros": "^3.1.0",
|
|
93
|
+
"babel-runtime": "^6.26.0",
|
|
94
|
+
"dotenv": "^16.0.2",
|
|
95
|
+
"jest": "^29.0.3",
|
|
96
|
+
"jest-environment-hardhat": "^1.1.9",
|
|
97
|
+
"jest-environment-jsdom": "^29.0.3",
|
|
98
|
+
"np": "^7.6.1",
|
|
99
|
+
"rollup": "^4.18.0",
|
|
100
|
+
"rollup-plugin-clear": "^2.0.7",
|
|
101
|
+
"rollup-plugin-dynamic-import-variables": "^1.1.0",
|
|
102
|
+
"svg-jest": "^1.0.1",
|
|
103
|
+
"ts-jest": "^29.0.1",
|
|
104
|
+
"typescript": "^5.6.3"
|
|
105
|
+
}
|
|
106
|
+
}
|