@orbs-network/spot-react 0.1.0 → 1.0.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/dist/ccip-bPFWIGtu.js +149 -0
- package/dist/index-Jq763Rdi.js +45137 -0
- package/dist/index.d.ts +2 -2
- package/dist/spot-react/package.json.d.ts +63 -0
- package/dist/spot-react/src/components/TokenLogo.d.ts +9 -0
- package/dist/spot-react/src/components/TokenLogo.d.ts.map +1 -0
- package/dist/spot-react/src/components/format-number.d.ts +10 -0
- package/dist/spot-react/src/components/format-number.d.ts.map +1 -0
- package/dist/spot-react/src/components/order-details.d.ts +75 -0
- package/dist/spot-react/src/components/order-details.d.ts.map +1 -0
- package/dist/spot-react/src/components/orders/order-fills.d.ts +8 -0
- package/dist/spot-react/src/components/orders/order-fills.d.ts.map +1 -0
- package/dist/spot-react/src/components/orders/order-preview.d.ts +3 -0
- package/dist/spot-react/src/components/orders/order-preview.d.ts.map +1 -0
- package/dist/spot-react/src/components/orders/orders-list.d.ts +2 -0
- package/dist/spot-react/src/components/orders/orders-list.d.ts.map +1 -0
- package/dist/spot-react/src/components/orders/orders.d.ts +2 -0
- package/dist/spot-react/src/components/orders/orders.d.ts.map +1 -0
- package/dist/spot-react/src/components/portal.d.ts +6 -0
- package/dist/spot-react/src/components/portal.d.ts.map +1 -0
- package/dist/spot-react/src/components/submit-order-panel.d.ts +10 -0
- package/dist/spot-react/src/components/submit-order-panel.d.ts.map +1 -0
- package/dist/spot-react/src/consts.d.ts +8 -0
- package/dist/spot-react/src/consts.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/helper-hooks.d.ts +438 -0
- package/dist/spot-react/src/hooks/helper-hooks.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/order-hooks.d.ts +39 -0
- package/dist/spot-react/src/hooks/order-hooks.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-addresses.d.ts +4 -0
- package/dist/spot-react/src/hooks/use-addresses.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-amounts-usd.d.ts +5 -0
- package/dist/spot-react/src/hooks/use-amounts-usd.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-build-order-info.d.ts +90 -0
- package/dist/spot-react/src/hooks/use-build-order-info.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-cancel-order.d.ts +6 -0
- package/dist/spot-react/src/hooks/use-cancel-order.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-deadline.d.ts +2 -0
- package/dist/spot-react/src/hooks/use-deadline.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-default-values.d.ts +3 -0
- package/dist/spot-react/src/hooks/use-default-values.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-disclaimer-panel.d.ts +5 -0
- package/dist/spot-react/src/hooks/use-disclaimer-panel.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-dst-amount.d.ts +11 -0
- package/dist/spot-react/src/hooks/use-dst-amount.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-dst-token-panel.d.ts +7 -0
- package/dist/spot-react/src/hooks/use-dst-token-panel.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-duration.d.ts +25 -0
- package/dist/spot-react/src/hooks/use-duration.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-fees.d.ts +6 -0
- package/dist/spot-react/src/hooks/use-fees.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-fill-delay.d.ts +19 -0
- package/dist/spot-react/src/hooks/use-fill-delay.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-get-transaction-receipt.d.ts +2 -0
- package/dist/spot-react/src/hooks/use-get-transaction-receipt.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-history-order.d.ts +3 -0
- package/dist/spot-react/src/hooks/use-history-order.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-input-errors.d.ts +2 -0
- package/dist/spot-react/src/hooks/use-input-errors.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-input-with-percentage.d.ts +18 -0
- package/dist/spot-react/src/hooks/use-input-with-percentage.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-invert-trade-panel.d.ts +8 -0
- package/dist/spot-react/src/hooks/use-invert-trade-panel.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-limit-price-panel.d.ts +27 -0
- package/dist/spot-react/src/hooks/use-limit-price-panel.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-limit-price.d.ts +27 -0
- package/dist/spot-react/src/hooks/use-limit-price.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-order.d.ts +121 -0
- package/dist/spot-react/src/hooks/use-order.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-partner-chains.d.ts +2 -0
- package/dist/spot-react/src/hooks/use-partner-chains.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-repermit-order-data.d.ts +37 -0
- package/dist/spot-react/src/hooks/use-repermit-order-data.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-src-amount.d.ts +6 -0
- package/dist/spot-react/src/hooks/use-src-amount.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-submit-order-panel.d.ts +31 -0
- package/dist/spot-react/src/hooks/use-submit-order-panel.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-submit-order.d.ts +3 -0
- package/dist/spot-react/src/hooks/use-submit-order.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-toggle-price.d.ts +5 -0
- package/dist/spot-react/src/hooks/use-toggle-price.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-trade-price.d.ts +2 -0
- package/dist/spot-react/src/hooks/use-trade-price.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-trades.d.ts +32 -0
- package/dist/spot-react/src/hooks/use-trades.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-translations.d.ts +3 -0
- package/dist/spot-react/src/hooks/use-translations.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-trigger-price-panel.d.ts +28 -0
- package/dist/spot-react/src/hooks/use-trigger-price-panel.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-trigger-price.d.ts +25 -0
- package/dist/spot-react/src/hooks/use-trigger-price.d.ts.map +1 -0
- package/dist/spot-react/src/i18n/en.json.d.ts +99 -0
- package/dist/spot-react/src/index.d.ts +38 -0
- package/dist/spot-react/src/index.d.ts.map +1 -0
- package/dist/spot-react/src/spot-context.d.ts +6 -0
- package/dist/spot-react/src/spot-context.d.ts.map +1 -0
- package/dist/spot-react/src/store.d.ts +11 -0
- package/dist/spot-react/src/store.d.ts.map +1 -0
- package/dist/spot-react/src/types.d.ts +487 -0
- package/dist/spot-react/src/types.d.ts.map +1 -0
- package/dist/spot-react/src/utils.d.ts +26 -0
- package/dist/spot-react/src/utils.d.ts.map +1 -0
- package/dist/spot-react.js +133 -0
- package/dist/spot-react.umd.cjs +126 -0
- package/dist/spot-ui/src/index.d.ts +14 -0
- package/dist/spot-ui/src/index.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/abi/erc20.json.d.ts +291 -0
- package/dist/spot-ui/src/lib/abi/index.d.ts +260 -0
- package/dist/spot-ui/src/lib/abi/index.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/abi/iweth.json.d.ts +41 -0
- package/dist/spot-ui/src/lib/abi/repermit.json.d.ts +315 -0
- package/dist/spot-ui/src/lib/analytics.d.ts +108 -0
- package/dist/spot-ui/src/lib/analytics.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/build-repermit-order-data.d.ts +55 -0
- package/dist/spot-ui/src/lib/build-repermit-order-data.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/consts.d.ts +118 -0
- package/dist/spot-ui/src/lib/consts.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/lib.d.ts +67 -0
- package/dist/spot-ui/src/lib/lib.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/networks.d.ts +445 -0
- package/dist/spot-ui/src/lib/networks.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/orders/index.d.ts +11 -0
- package/dist/spot-ui/src/lib/orders/index.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/orders/v1-orders.d.ts +34 -0
- package/dist/spot-ui/src/lib/orders/v1-orders.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/orders/v2-orders.d.ts +10 -0
- package/dist/spot-ui/src/lib/orders/v2-orders.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/submit-order.d.ts +3 -0
- package/dist/spot-ui/src/lib/submit-order.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/types.d.ts +308 -0
- package/dist/spot-ui/src/lib/types.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/utils.d.ts +458 -0
- package/dist/spot-ui/src/lib/utils.d.ts.map +1 -0
- package/package.json +41 -19
- package/dist/index.cjs.js +0 -14
- package/dist/index.d.ts.map +0 -1
- package/dist/index.es.js +0 -626
- package/dist/wallet-info.d.ts +0 -7
- package/dist/wallet-info.d.ts.map +0 -1
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
declare const _default: [
|
|
2
|
+
{
|
|
3
|
+
"type": "constructor",
|
|
4
|
+
"inputs": [],
|
|
5
|
+
"stateMutability": "nonpayable"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"type": "function",
|
|
9
|
+
"name": "DOMAIN_SEPARATOR",
|
|
10
|
+
"inputs": [],
|
|
11
|
+
"outputs": [
|
|
12
|
+
{
|
|
13
|
+
"name": "",
|
|
14
|
+
"type": "bytes32",
|
|
15
|
+
"internalType": "bytes32"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"stateMutability": "view"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"type": "function",
|
|
22
|
+
"name": "cancel",
|
|
23
|
+
"inputs": [
|
|
24
|
+
{
|
|
25
|
+
"name": "digests",
|
|
26
|
+
"type": "bytes32[]",
|
|
27
|
+
"internalType": "bytes32[]"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"outputs": [],
|
|
31
|
+
"stateMutability": "nonpayable"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "function",
|
|
35
|
+
"name": "eip712Domain",
|
|
36
|
+
"inputs": [],
|
|
37
|
+
"outputs": [
|
|
38
|
+
{
|
|
39
|
+
"name": "fields",
|
|
40
|
+
"type": "bytes1",
|
|
41
|
+
"internalType": "bytes1"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "name",
|
|
45
|
+
"type": "string",
|
|
46
|
+
"internalType": "string"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "version",
|
|
50
|
+
"type": "string",
|
|
51
|
+
"internalType": "string"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "chainId",
|
|
55
|
+
"type": "uint256",
|
|
56
|
+
"internalType": "uint256"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "verifyingContract",
|
|
60
|
+
"type": "address",
|
|
61
|
+
"internalType": "address"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "salt",
|
|
65
|
+
"type": "bytes32",
|
|
66
|
+
"internalType": "bytes32"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "extensions",
|
|
70
|
+
"type": "uint256[]",
|
|
71
|
+
"internalType": "uint256[]"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"stateMutability": "view"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": "function",
|
|
78
|
+
"name": "hashTypedData",
|
|
79
|
+
"inputs": [
|
|
80
|
+
{
|
|
81
|
+
"name": "structHash",
|
|
82
|
+
"type": "bytes32",
|
|
83
|
+
"internalType": "bytes32"
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"outputs": [
|
|
87
|
+
{
|
|
88
|
+
"name": "digest",
|
|
89
|
+
"type": "bytes32",
|
|
90
|
+
"internalType": "bytes32"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"stateMutability": "view"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"type": "function",
|
|
97
|
+
"name": "repermitWitnessTransferFrom",
|
|
98
|
+
"inputs": [
|
|
99
|
+
{
|
|
100
|
+
"name": "permit",
|
|
101
|
+
"type": "tuple",
|
|
102
|
+
"internalType": "struct RePermitLib.RePermitTransferFrom",
|
|
103
|
+
"components": [
|
|
104
|
+
{
|
|
105
|
+
"name": "permitted",
|
|
106
|
+
"type": "tuple",
|
|
107
|
+
"internalType": "struct RePermitLib.TokenPermissions",
|
|
108
|
+
"components": [
|
|
109
|
+
{
|
|
110
|
+
"name": "token",
|
|
111
|
+
"type": "address",
|
|
112
|
+
"internalType": "address"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "amount",
|
|
116
|
+
"type": "uint256",
|
|
117
|
+
"internalType": "uint256"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "nonce",
|
|
123
|
+
"type": "uint256",
|
|
124
|
+
"internalType": "uint256"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"name": "deadline",
|
|
128
|
+
"type": "uint256",
|
|
129
|
+
"internalType": "uint256"
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "request",
|
|
135
|
+
"type": "tuple",
|
|
136
|
+
"internalType": "struct RePermitLib.TransferRequest",
|
|
137
|
+
"components": [
|
|
138
|
+
{
|
|
139
|
+
"name": "to",
|
|
140
|
+
"type": "address",
|
|
141
|
+
"internalType": "address"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "amount",
|
|
145
|
+
"type": "uint256",
|
|
146
|
+
"internalType": "uint256"
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"name": "signer",
|
|
152
|
+
"type": "address",
|
|
153
|
+
"internalType": "address"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "witness",
|
|
157
|
+
"type": "bytes32",
|
|
158
|
+
"internalType": "bytes32"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"name": "witnessTypeString",
|
|
162
|
+
"type": "string",
|
|
163
|
+
"internalType": "string"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "signature",
|
|
167
|
+
"type": "bytes",
|
|
168
|
+
"internalType": "bytes"
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"outputs": [],
|
|
172
|
+
"stateMutability": "nonpayable"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"type": "function",
|
|
176
|
+
"name": "spent",
|
|
177
|
+
"inputs": [
|
|
178
|
+
{
|
|
179
|
+
"name": "",
|
|
180
|
+
"type": "address",
|
|
181
|
+
"internalType": "address"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "",
|
|
185
|
+
"type": "bytes32",
|
|
186
|
+
"internalType": "bytes32"
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
"outputs": [
|
|
190
|
+
{
|
|
191
|
+
"name": "",
|
|
192
|
+
"type": "uint256",
|
|
193
|
+
"internalType": "uint256"
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"stateMutability": "view"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"type": "event",
|
|
200
|
+
"name": "Cancel",
|
|
201
|
+
"inputs": [
|
|
202
|
+
{
|
|
203
|
+
"name": "signer",
|
|
204
|
+
"type": "address",
|
|
205
|
+
"indexed": true,
|
|
206
|
+
"internalType": "address"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"name": "digest",
|
|
210
|
+
"type": "bytes32",
|
|
211
|
+
"indexed": false,
|
|
212
|
+
"internalType": "bytes32"
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
"anonymous": false
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"type": "event",
|
|
219
|
+
"name": "EIP712DomainChanged",
|
|
220
|
+
"inputs": [],
|
|
221
|
+
"anonymous": false
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"type": "event",
|
|
225
|
+
"name": "Spend",
|
|
226
|
+
"inputs": [
|
|
227
|
+
{
|
|
228
|
+
"name": "signer",
|
|
229
|
+
"type": "address",
|
|
230
|
+
"indexed": true,
|
|
231
|
+
"internalType": "address"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"name": "permitHash",
|
|
235
|
+
"type": "bytes32",
|
|
236
|
+
"indexed": true,
|
|
237
|
+
"internalType": "bytes32"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"name": "token",
|
|
241
|
+
"type": "address",
|
|
242
|
+
"indexed": true,
|
|
243
|
+
"internalType": "address"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"name": "to",
|
|
247
|
+
"type": "address",
|
|
248
|
+
"indexed": false,
|
|
249
|
+
"internalType": "address"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"name": "amount",
|
|
253
|
+
"type": "uint256",
|
|
254
|
+
"indexed": false,
|
|
255
|
+
"internalType": "uint256"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"name": "totalSpent",
|
|
259
|
+
"type": "uint256",
|
|
260
|
+
"indexed": false,
|
|
261
|
+
"internalType": "uint256"
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
"anonymous": false
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"type": "error",
|
|
268
|
+
"name": "Canceled",
|
|
269
|
+
"inputs": []
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"type": "error",
|
|
273
|
+
"name": "Expired",
|
|
274
|
+
"inputs": []
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"type": "error",
|
|
278
|
+
"name": "InsufficientAllowance",
|
|
279
|
+
"inputs": []
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"type": "error",
|
|
283
|
+
"name": "InvalidShortString",
|
|
284
|
+
"inputs": []
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"type": "error",
|
|
288
|
+
"name": "InvalidSignature",
|
|
289
|
+
"inputs": []
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"type": "error",
|
|
293
|
+
"name": "SafeERC20FailedOperation",
|
|
294
|
+
"inputs": [
|
|
295
|
+
{
|
|
296
|
+
"name": "token",
|
|
297
|
+
"type": "address",
|
|
298
|
+
"internalType": "address"
|
|
299
|
+
}
|
|
300
|
+
]
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"type": "error",
|
|
304
|
+
"name": "StringTooLong",
|
|
305
|
+
"inputs": [
|
|
306
|
+
{
|
|
307
|
+
"name": "str",
|
|
308
|
+
"type": "string",
|
|
309
|
+
"internalType": "string"
|
|
310
|
+
}
|
|
311
|
+
]
|
|
312
|
+
}
|
|
313
|
+
];
|
|
314
|
+
|
|
315
|
+
export default _default;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Address, Module, Partners, RePermitOrder, SpotConfig } from './types';
|
|
2
|
+
export declare function setUIVersion(version: string): void;
|
|
3
|
+
interface Token {
|
|
4
|
+
address: string;
|
|
5
|
+
symbol: string;
|
|
6
|
+
decimals: number;
|
|
7
|
+
}
|
|
8
|
+
type Action = "cancel order" | "wrap" | "approve" | "sign order" | "create order" | "module-import" | "reset" | "crash";
|
|
9
|
+
interface Data {
|
|
10
|
+
_id: string;
|
|
11
|
+
spotVersion?: string;
|
|
12
|
+
uiVersion?: string;
|
|
13
|
+
origin?: string;
|
|
14
|
+
actionError?: string;
|
|
15
|
+
cancelOrderSuccess?: boolean;
|
|
16
|
+
orderSubmitted?: boolean;
|
|
17
|
+
orderHash?: string;
|
|
18
|
+
orderSuccess?: boolean;
|
|
19
|
+
action?: Action;
|
|
20
|
+
wrapTxHash?: string;
|
|
21
|
+
cancelOrderTxHash?: string;
|
|
22
|
+
cancelOrderIdsV1?: string[];
|
|
23
|
+
cancelOrderIdsV2?: string[];
|
|
24
|
+
approvalTxHash?: string;
|
|
25
|
+
walletAddress?: string;
|
|
26
|
+
fromTokenAddress?: string;
|
|
27
|
+
fromTokenSymbol?: string;
|
|
28
|
+
toTokenAddress?: string;
|
|
29
|
+
order?: RePermitOrder;
|
|
30
|
+
signature?: string;
|
|
31
|
+
toTokenSymbol?: string;
|
|
32
|
+
fromTokenAmount?: string;
|
|
33
|
+
chunksAmount?: number;
|
|
34
|
+
minDstAmountOutPerTrade?: string;
|
|
35
|
+
triggerPricePerTrade?: string;
|
|
36
|
+
deadline?: number;
|
|
37
|
+
fillDelay?: number;
|
|
38
|
+
srcChunkAmount?: string;
|
|
39
|
+
module?: Module;
|
|
40
|
+
slippage?: number;
|
|
41
|
+
orderType?: "market" | "limit";
|
|
42
|
+
partner?: Partners;
|
|
43
|
+
adapter?: Address;
|
|
44
|
+
cosigner?: Address;
|
|
45
|
+
executor?: Address;
|
|
46
|
+
fee?: Address;
|
|
47
|
+
reactor?: Address;
|
|
48
|
+
refinery?: Address;
|
|
49
|
+
repermit?: Address;
|
|
50
|
+
router?: Address;
|
|
51
|
+
type?: string;
|
|
52
|
+
wm?: Address;
|
|
53
|
+
chainName?: string;
|
|
54
|
+
chainId?: number;
|
|
55
|
+
twapVersion?: number;
|
|
56
|
+
twapAddress?: string;
|
|
57
|
+
lensAddress?: string;
|
|
58
|
+
bidDelaySeconds?: number;
|
|
59
|
+
minChunkSizeUsd?: number;
|
|
60
|
+
name?: string;
|
|
61
|
+
exchangeAddress?: string;
|
|
62
|
+
exchangeType?: string;
|
|
63
|
+
pathfinderKey?: string;
|
|
64
|
+
}
|
|
65
|
+
declare class Analytics {
|
|
66
|
+
timeout: any;
|
|
67
|
+
config: SpotConfig | undefined;
|
|
68
|
+
data: Data;
|
|
69
|
+
updateAndSend(values?: Partial<Data>, noTimeout?: boolean, callback?: () => void): Promise<void>;
|
|
70
|
+
onCancelOrderRequest(cancelOrderIds: string[], version: 1 | 2): void;
|
|
71
|
+
onCancelOrderSuccess(hash?: string): void;
|
|
72
|
+
onCancelOrderError(error: any): void;
|
|
73
|
+
onWrapSuccess(wrapTxHash?: string): void;
|
|
74
|
+
onWrapRequest(): void;
|
|
75
|
+
onWrapError(error: any): void;
|
|
76
|
+
onApproveRequest(): void;
|
|
77
|
+
onApproveSuccess(approvalTxHash?: string): void;
|
|
78
|
+
onApproveError(error: any): void;
|
|
79
|
+
onCrash(error: any): void;
|
|
80
|
+
onTxError(error: any): void;
|
|
81
|
+
onRequestOrder({ account, chainId, module, srcToken, dstToken, fromTokenAmount, srcChunkAmount, minDstAmountOutPerTrade, triggerPricePerTrade, deadline, fillDelay, slippage, isMarketOrder, chunksAmount, }: {
|
|
82
|
+
account: string;
|
|
83
|
+
chainId: number;
|
|
84
|
+
module: Module;
|
|
85
|
+
srcToken: Token;
|
|
86
|
+
dstToken: Token;
|
|
87
|
+
fromTokenAmount: string;
|
|
88
|
+
srcChunkAmount: string;
|
|
89
|
+
minDstAmountOutPerTrade: string;
|
|
90
|
+
triggerPricePerTrade: string;
|
|
91
|
+
deadline: number;
|
|
92
|
+
fillDelay: number;
|
|
93
|
+
slippage: number;
|
|
94
|
+
isMarketOrder: boolean;
|
|
95
|
+
chunksAmount: number;
|
|
96
|
+
}): void;
|
|
97
|
+
onSignOrderRequest(order: RePermitOrder): void;
|
|
98
|
+
onSignOrderError(error: any): void;
|
|
99
|
+
onSignOrderSuccess(signature: string): void;
|
|
100
|
+
init(config: SpotConfig, minChunkSizeUsd: number, chainId?: number): void;
|
|
101
|
+
onCreateOrderError(error: any): void;
|
|
102
|
+
onCreateOrderRequest(): void;
|
|
103
|
+
onCreateOrderSuccess(orderHash?: string): Promise<void>;
|
|
104
|
+
onLoad(): void;
|
|
105
|
+
}
|
|
106
|
+
export declare const analytics: Analytics;
|
|
107
|
+
export {};
|
|
108
|
+
//# sourceMappingURL=analytics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C;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,OAAO,CAAC;QACvB,YAAY,EAAE,MAAM,CAAC;KACtB;IAsBD,kBAAkB,CAAC,KAAK,EAAE,aAAa;IAOvC,gBAAgB,CAAC,KAAK,EAAE,GAAG;IAI3B,kBAAkB,CAAC,SAAS,EAAE,MAAM;IAOpC,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;IAclE,kBAAkB,CAAC,KAAK,EAAE,GAAG;IAI7B,oBAAoB;IAMd,oBAAoB,CAAC,SAAS,CAAC,EAAE,MAAM;IAyC7C,MAAM;CAMP;AAED,eAAO,MAAM,SAAS,WAAkB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Module, RePermitOrder, SpotConfig } from './types';
|
|
2
|
+
type Props = {
|
|
3
|
+
chainId: number;
|
|
4
|
+
srcToken: string;
|
|
5
|
+
dstToken: string;
|
|
6
|
+
srcAmount: string;
|
|
7
|
+
deadlineMillis: number;
|
|
8
|
+
fillDelayMillis: number;
|
|
9
|
+
slippage: number;
|
|
10
|
+
account: string;
|
|
11
|
+
srcAmountPerTrade: string;
|
|
12
|
+
dstMinAmountPerTrade?: string;
|
|
13
|
+
triggerAmountPerTrade?: string;
|
|
14
|
+
config: SpotConfig;
|
|
15
|
+
module: Module;
|
|
16
|
+
feePercentage?: number;
|
|
17
|
+
};
|
|
18
|
+
export declare const buildRePermitOrderData: (props: Props) => {
|
|
19
|
+
domain: {
|
|
20
|
+
name: string;
|
|
21
|
+
version: string;
|
|
22
|
+
chainId: number;
|
|
23
|
+
verifyingContract: `0x${string}`;
|
|
24
|
+
};
|
|
25
|
+
order: RePermitOrder;
|
|
26
|
+
types: {
|
|
27
|
+
RePermitWitnessTransferFrom: {
|
|
28
|
+
name: string;
|
|
29
|
+
type: string;
|
|
30
|
+
}[];
|
|
31
|
+
Exchange: {
|
|
32
|
+
name: string;
|
|
33
|
+
type: string;
|
|
34
|
+
}[];
|
|
35
|
+
Input: {
|
|
36
|
+
name: string;
|
|
37
|
+
type: string;
|
|
38
|
+
}[];
|
|
39
|
+
Order: {
|
|
40
|
+
name: string;
|
|
41
|
+
type: string;
|
|
42
|
+
}[];
|
|
43
|
+
Output: {
|
|
44
|
+
name: string;
|
|
45
|
+
type: string;
|
|
46
|
+
}[];
|
|
47
|
+
TokenPermissions: {
|
|
48
|
+
name: string;
|
|
49
|
+
type: string;
|
|
50
|
+
}[];
|
|
51
|
+
};
|
|
52
|
+
primaryType: "RePermitWitnessTransferFrom";
|
|
53
|
+
};
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=build-repermit-order-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-repermit-order-data.d.ts","sourceRoot":"","sources":["../../../../../spot-ui/src/lib/build-repermit-order-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAYrE,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAC;AAqMF,eAAO,MAAM,sBAAsB,GAAI,OAAO,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIlD,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { networks } from './networks';
|
|
2
|
+
import { Config, TimeDuration } from './types';
|
|
3
|
+
export declare const SPOT_VERSION: string | undefined;
|
|
4
|
+
export declare const getApiEndpoint: (isDev: boolean) => "https://order-sink-dev.orbs.network" | "https://order-sink.orbs.network" | "https://order-sink-v2.orbs.network";
|
|
5
|
+
export declare const SUGGEST_CHUNK_VALUE = 100;
|
|
6
|
+
export declare const MIN_CHUNKS = 1;
|
|
7
|
+
export declare const MIN_FILL_DELAY_MILLIS: number;
|
|
8
|
+
export declare const MAX_ORDER_DURATION_MILLIS: number;
|
|
9
|
+
export declare const MIN_ORDER_DURATION_MILLIS: number;
|
|
10
|
+
export declare const MIN_FILL_DELAY_MINUTES: number;
|
|
11
|
+
export declare const THE_GRAPH_ORDERS_API: {
|
|
12
|
+
[networks.eth
|
|
13
|
+
.id]: string;
|
|
14
|
+
[networks.bsc
|
|
15
|
+
.id]: string;
|
|
16
|
+
[networks.poly
|
|
17
|
+
.id]: string;
|
|
18
|
+
[networks.arb
|
|
19
|
+
.id]: string;
|
|
20
|
+
[networks.base
|
|
21
|
+
.id]: string;
|
|
22
|
+
[networks.sei
|
|
23
|
+
.id]: string;
|
|
24
|
+
[networks.linea
|
|
25
|
+
.id]: string;
|
|
26
|
+
[networks.sonic
|
|
27
|
+
.id]: string;
|
|
28
|
+
[networks.ftm
|
|
29
|
+
.id]: string;
|
|
30
|
+
[networks.katana
|
|
31
|
+
.id]: string;
|
|
32
|
+
[networks.avax
|
|
33
|
+
.id]: string;
|
|
34
|
+
[networks.bera
|
|
35
|
+
.id]: string;
|
|
36
|
+
[networks.flare.id]: string;
|
|
37
|
+
[networks.cronosZkEvm.id]: string;
|
|
38
|
+
};
|
|
39
|
+
export declare const zeroAddress = "0x0000000000000000000000000000000000000000";
|
|
40
|
+
export declare const nativeTokenAddresses: string[];
|
|
41
|
+
export declare const maxUint256 = "115792089237316195423570985008687907853269984665640564039457584007913129639935";
|
|
42
|
+
export declare const getPartnerIdentifier: (config: Config) => string;
|
|
43
|
+
export declare const LEGACY_EXCHANGES_MAP: Record<string, string[]>;
|
|
44
|
+
export declare const DEFAULT_FILL_DELAY: TimeDuration;
|
|
45
|
+
export declare const FEES = 0.25;
|
|
46
|
+
export declare const EXCLUSIVITY_OVERRIDE_BPS = "100";
|
|
47
|
+
export declare const REPERMIT_PRIMARY_TYPE: "RePermitWitnessTransferFrom";
|
|
48
|
+
export declare const EIP712_TYPES: {
|
|
49
|
+
RePermitWitnessTransferFrom: {
|
|
50
|
+
name: string;
|
|
51
|
+
type: string;
|
|
52
|
+
}[];
|
|
53
|
+
Exchange: {
|
|
54
|
+
name: string;
|
|
55
|
+
type: string;
|
|
56
|
+
}[];
|
|
57
|
+
Input: {
|
|
58
|
+
name: string;
|
|
59
|
+
type: string;
|
|
60
|
+
}[];
|
|
61
|
+
Order: {
|
|
62
|
+
name: string;
|
|
63
|
+
type: string;
|
|
64
|
+
}[];
|
|
65
|
+
Output: {
|
|
66
|
+
name: string;
|
|
67
|
+
type: string;
|
|
68
|
+
}[];
|
|
69
|
+
TokenPermissions: {
|
|
70
|
+
name: string;
|
|
71
|
+
type: string;
|
|
72
|
+
}[];
|
|
73
|
+
};
|
|
74
|
+
export declare const EIP712_TYPES_DEV: {
|
|
75
|
+
RePermitWitnessTransferFrom: {
|
|
76
|
+
name: string;
|
|
77
|
+
type: string;
|
|
78
|
+
}[];
|
|
79
|
+
Exchange: {
|
|
80
|
+
name: string;
|
|
81
|
+
type: string;
|
|
82
|
+
}[];
|
|
83
|
+
Input: {
|
|
84
|
+
name: string;
|
|
85
|
+
type: string;
|
|
86
|
+
}[];
|
|
87
|
+
Order: {
|
|
88
|
+
name: string;
|
|
89
|
+
type: string;
|
|
90
|
+
}[];
|
|
91
|
+
Output: {
|
|
92
|
+
name: string;
|
|
93
|
+
type: string;
|
|
94
|
+
}[];
|
|
95
|
+
TokenPermissions: {
|
|
96
|
+
name: string;
|
|
97
|
+
type: string;
|
|
98
|
+
}[];
|
|
99
|
+
};
|
|
100
|
+
export declare const ORBS_TWAP_FAQ_URL = "https://www.orbs.com/dtwap-and-dlimit-faq/";
|
|
101
|
+
export declare const ORBS_SLTP_FAQ_URL = "https://www.orbs.com/dtwap-and-dlimit-faq/#dSLTP";
|
|
102
|
+
export declare const ORBS_LOGO = "https://raw.githubusercontent.com/orbs-network/twap-ui/master/logo/orbslogo.svg";
|
|
103
|
+
export declare const ORBS_LOGO_FALLBACK = "https://www.orbs.com/assets/img/common/logo.svg";
|
|
104
|
+
export declare const ORBS_WEBSITE_URL = "https://www.orbs.com/";
|
|
105
|
+
export declare const DISCLAIMER_URL = "https://www.orbs.com/dtwap-dlimit-disclaimer";
|
|
106
|
+
export declare enum QUERY_PARAMS {
|
|
107
|
+
FRESHNESS = "freshness",
|
|
108
|
+
MIN_CHUNK_SIZE_USD = "minChunkSizeUsd",
|
|
109
|
+
ENV = "env",
|
|
110
|
+
DURATION = "duration",
|
|
111
|
+
IGNORE_ERRORS = "ignore-errors"
|
|
112
|
+
}
|
|
113
|
+
export declare const DEFAULT_STOP_LOSS_PERCENTAGE = "-5";
|
|
114
|
+
export declare const DEFAULT_TAKE_PROFIT_PERCENTAGE = "10";
|
|
115
|
+
export declare const DEFAULT_STOP_LOSS_LIMIT_PERCENTAGE = "-10";
|
|
116
|
+
export declare const DEFAULT_TAKE_PROFIT_LIMIT_PERCENTAGE = "5";
|
|
117
|
+
export declare const CRASH_ERROR_MESSAGE = "Something went wrong";
|
|
118
|
+
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../../../spot-ui/src/lib/consts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAY,MAAM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,UAOhC,CAAC;AAEF,eAAO,MAAM,UAAU,mFAC2D,CAAC;AAEnF,eAAO,MAAM,oBAAoB,GAAI,QAAQ,MAAM,WACf,CAAC;AAErC,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAiDzD,CAAC;AACF,eAAO,MAAM,kBAAkB,EAG1B,YAAY,CAAC;AAClB,eAAO,MAAM,IAAI,OAAO,CAAC;AACzB,eAAO,MAAM,wBAAwB,QAAQ,CAAC;AAE9C,eAAO,MAAM,qBAAqB,EAAG,6BAAsC,CAAC;AAE5E,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;CA6HxB,CAAC;AAGF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;CAkI5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,+CAA+C,CAAC;AAC9E,eAAO,MAAM,iBAAiB,qDACsB,CAAC;AAErD,eAAO,MAAM,SAAS,oFAC6D,CAAC;AACpF,eAAO,MAAM,kBAAkB,oDACoB,CAAC;AACpD,eAAO,MAAM,gBAAgB,0BAA0B,CAAC;AACxD,eAAO,MAAM,cAAc,iDAAiD,CAAC;AAE7E,oBAAY,YAAY;IACtB,SAAS,cAAc;IACvB,kBAAkB,oBAAoB;IACtC,GAAG,QAAQ;IACX,QAAQ,aAAa;IACrB,aAAa,kBAAkB;CAChC;AAED,eAAO,MAAM,4BAA4B,OAAO,CAAC;AACjD,eAAO,MAAM,8BAA8B,OAAO,CAAC;AAEnD,eAAO,MAAM,kCAAkC,QAAQ,CAAC;AACxD,eAAO,MAAM,oCAAoC,MAAM,CAAC;AAIxD,eAAO,MAAM,mBAAmB,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Config, InputError, Module, PartnerPayloadItem, Partners, SpotConfig, TimeDuration } from './types';
|
|
2
|
+
export declare const getDestTokenAmount: (srcAmount?: string, limitPrice?: string, srcTokenDecimals?: number) => string | undefined;
|
|
3
|
+
export declare const getDestTokenMinAmountPerChunk: (srcChunkAmount?: string, limitPrice?: string, isMarketOrder?: boolean, srcTokenDecimals?: number) => string;
|
|
4
|
+
export declare const getTriggerPricePerChunk: (module: Module, srcChunkAmount?: string, triggerPrice?: string, srcTokenDecimals?: number) => string | undefined;
|
|
5
|
+
export declare const getDuration: (module: Module, chunks: number, fillDelay: TimeDuration, customDuration?: TimeDuration) => TimeDuration;
|
|
6
|
+
export declare const getChunks: (maxPossibleChunks: number, module: Module, typedChunks?: number) => number;
|
|
7
|
+
export declare const getMaxPossibleChunks: (fillDelay: TimeDuration, typedSrcAmount?: string, oneSrcTokenUsd?: string, minChunkSizeUsd?: number) => number;
|
|
8
|
+
export declare const getDeadline: (currentTimeMillis: number, duration: TimeDuration) => number;
|
|
9
|
+
export declare const getEstimatedDelayBetweenChunksMillis: (config: Config) => number;
|
|
10
|
+
export declare const getSrcTokenChunkAmount: (srcAmount?: string, chunks?: number) => string;
|
|
11
|
+
export declare const getMaxFillDelayError: (fillDelay: TimeDuration, chunks: number) => {
|
|
12
|
+
isError: boolean;
|
|
13
|
+
value: number;
|
|
14
|
+
};
|
|
15
|
+
export declare const getStopLossPriceError: (marketPrice: string | undefined, triggerPrice: string | undefined, module: Module) => {
|
|
16
|
+
isError: boolean;
|
|
17
|
+
value: string;
|
|
18
|
+
} | undefined;
|
|
19
|
+
export declare const getTakeProfitPriceError: (marketPrice: string | undefined, triggerPrice: string | undefined, module: Module) => {
|
|
20
|
+
isError: boolean;
|
|
21
|
+
value: string;
|
|
22
|
+
} | undefined;
|
|
23
|
+
export declare const getStopLossLimitPriceError: (triggerPrice: string | undefined, limitPrice: string | undefined, isMarketOrder: boolean | undefined, module: Module) => {
|
|
24
|
+
isError: boolean;
|
|
25
|
+
value: string;
|
|
26
|
+
} | undefined;
|
|
27
|
+
export declare const getTakeProfitLimitPriceError: (triggerPrice: string | undefined, limitPrice: string | undefined, isMarketOrder: boolean | undefined, module: Module) => {
|
|
28
|
+
isError: boolean;
|
|
29
|
+
value: string;
|
|
30
|
+
} | undefined;
|
|
31
|
+
export declare const getMaxOrderDurationError: (module: Module, duration: TimeDuration) => {
|
|
32
|
+
isError: boolean;
|
|
33
|
+
value: number;
|
|
34
|
+
};
|
|
35
|
+
export declare const getMinOrderDurationError: (duration: TimeDuration) => {
|
|
36
|
+
isError: boolean;
|
|
37
|
+
value: number;
|
|
38
|
+
};
|
|
39
|
+
export declare const getMinFillDelayError: (fillDelay: TimeDuration) => {
|
|
40
|
+
isError: boolean;
|
|
41
|
+
value: number;
|
|
42
|
+
};
|
|
43
|
+
export declare const getMinTradeSizeError: (typedSrcAmount: string, oneSrcTokenUsd: string, minChunkSizeUsd: number) => {
|
|
44
|
+
isError: boolean;
|
|
45
|
+
value: number;
|
|
46
|
+
};
|
|
47
|
+
export declare const getMaxChunksError: (chunks: number, maxChunks: number, module: Module) => {
|
|
48
|
+
isError: boolean;
|
|
49
|
+
value: number;
|
|
50
|
+
};
|
|
51
|
+
export declare const getConfig: (_dex: Partners, chainId?: number) => SpotConfig;
|
|
52
|
+
export declare const getPartners: () => PartnerPayloadItem[];
|
|
53
|
+
export declare const getMinChunkSizeUsd: (minChunkSizeUsd: number) => number;
|
|
54
|
+
export declare const getErrors: ({ marketPrice, typedInputAmount, srcUsd1Token, marketPriceLoading, triggerPriceError, limitPriceError, tradesError, fillDelayError, durationError, balanceError, minTradeSizeError, }: {
|
|
55
|
+
marketPrice?: string;
|
|
56
|
+
typedInputAmount?: string;
|
|
57
|
+
srcUsd1Token?: string;
|
|
58
|
+
marketPriceLoading?: boolean;
|
|
59
|
+
triggerPriceError?: InputError;
|
|
60
|
+
limitPriceError?: InputError;
|
|
61
|
+
tradesError?: InputError;
|
|
62
|
+
fillDelayError?: InputError;
|
|
63
|
+
durationError?: InputError;
|
|
64
|
+
balanceError?: InputError;
|
|
65
|
+
minTradeSizeError?: InputError;
|
|
66
|
+
}) => InputError | undefined;
|
|
67
|
+
//# sourceMappingURL=lib.d.ts.map
|