@orbs-network/spot-react 2.0.1 → 2.1.1
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 +277 -148
- package/dist/spot-react/src/context/client-error-notice.d.ts +7 -0
- package/dist/spot-react/src/context/client-error-notice.d.ts.map +1 -0
- package/dist/spot-react/src/context/create-spot-store.d.ts +53 -0
- package/dist/spot-react/src/context/create-spot-store.d.ts.map +1 -0
- package/dist/spot-react/src/context/error-boundary.d.ts +7 -0
- package/dist/spot-react/src/context/error-boundary.d.ts.map +1 -0
- package/dist/spot-react/src/context/order-form-context.d.ts +7 -0
- package/dist/spot-react/src/context/order-form-context.d.ts.map +1 -0
- package/dist/spot-react/src/context/spot-form-synchronizer.d.ts +14 -0
- package/dist/spot-react/src/context/spot-form-synchronizer.d.ts.map +1 -0
- package/dist/spot-react/src/context/spot-provider.d.ts +3 -0
- package/dist/spot-react/src/context/spot-provider.d.ts.map +1 -0
- package/dist/spot-react/src/context/spot-runtime-context.d.ts +33 -0
- package/dist/spot-react/src/context/spot-runtime-context.d.ts.map +1 -0
- package/dist/spot-react/src/context/spot-store-context.d.ts +10 -0
- package/dist/spot-react/src/context/spot-store-context.d.ts.map +1 -0
- package/dist/spot-react/src/context/use-client.d.ts +10 -0
- package/dist/spot-react/src/context/use-client.d.ts.map +1 -0
- package/dist/spot-react/src/context/use-spot-analytics.d.ts +3 -0
- package/dist/spot-react/src/context/use-spot-analytics.d.ts.map +1 -0
- package/dist/spot-react/src/context/use-spot-provider-state.d.ts +11 -0
- package/dist/spot-react/src/context/use-spot-provider-state.d.ts.map +1 -0
- package/dist/spot-react/src/execute-order.d.ts +25 -0
- package/dist/spot-react/src/execute-order.d.ts.map +1 -0
- package/dist/spot-react/src/execution-state.d.ts +19 -0
- package/dist/spot-react/src/execution-state.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/helper-hooks.d.ts +0 -547
- package/dist/spot-react/src/hooks/helper-hooks.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/order-hooks.d.ts +28 -18
- package/dist/spot-react/src/hooks/order-hooks.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-cancel-order.d.ts +5 -4
- package/dist/spot-react/src/hooks/use-cancel-order.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-disclaimer.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-duration.d.ts +3 -20
- package/dist/spot-react/src/hooks/use-duration.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-execution.d.ts +30 -0
- package/dist/spot-react/src/hooks/use-execution.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-fill-delay.d.ts +3 -22
- package/dist/spot-react/src/hooks/use-fill-delay.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-history-order.d.ts +51 -28
- package/dist/spot-react/src/hooks/use-history-order.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-input-errors.d.ts +1 -1
- package/dist/spot-react/src/hooks/use-input-errors.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-limit-price.d.ts +14 -21
- package/dist/spot-react/src/hooks/use-limit-price.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-output-amount.d.ts +5 -0
- package/dist/spot-react/src/hooks/use-output-amount.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-price-display.d.ts +10 -0
- package/dist/spot-react/src/hooks/use-price-display.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-submit-order.d.ts +1 -2
- package/dist/spot-react/src/hooks/use-submit-order.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-swap-execution.d.ts +9 -10
- package/dist/spot-react/src/hooks/use-swap-execution.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-trades.d.ts +7 -17
- package/dist/spot-react/src/hooks/use-trades.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-trigger-price.d.ts +13 -20
- package/dist/spot-react/src/hooks/use-trigger-price.d.ts.map +1 -1
- package/dist/spot-react/src/index.d.ts +20 -11
- package/dist/spot-react/src/index.d.ts.map +1 -1
- package/dist/spot-react/src/order-history-data.d.ts +14 -0
- package/dist/spot-react/src/order-history-data.d.ts.map +1 -0
- package/dist/spot-react/src/types.d.ts +108 -123
- package/dist/spot-react/src/types.d.ts.map +1 -1
- package/dist/spot-react.js +1627 -6489
- package/dist/spot-react.umd.cjs +1 -64
- package/package.json +8 -13
- package/dist/spot-react/package.json.d.ts +0 -56
- package/dist/spot-react/src/hooks/use-amounts-usd.d.ts +0 -5
- package/dist/spot-react/src/hooks/use-amounts-usd.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-build-order-info.d.ts +0 -62
- package/dist/spot-react/src/hooks/use-build-order-info.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-deadline.d.ts +0 -2
- package/dist/spot-react/src/hooks/use-deadline.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-default-values.d.ts +0 -3
- package/dist/spot-react/src/hooks/use-default-values.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-dst-amount.d.ts +0 -11
- package/dist/spot-react/src/hooks/use-dst-amount.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-dst-token-panel.d.ts +0 -7
- package/dist/spot-react/src/hooks/use-dst-token-panel.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-fees.d.ts +0 -7
- package/dist/spot-react/src/hooks/use-fees.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-form-data.d.ts +0 -57
- package/dist/spot-react/src/hooks/use-form-data.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-input-with-percentage.d.ts +0 -16
- package/dist/spot-react/src/hooks/use-input-with-percentage.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-limit-price-panel.d.ts +0 -22
- package/dist/spot-react/src/hooks/use-limit-price-panel.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-partner-chains.d.ts +0 -2
- package/dist/spot-react/src/hooks/use-partner-chains.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-price-panel.d.ts +0 -21
- package/dist/spot-react/src/hooks/use-price-panel.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-repermit-data.d.ts +0 -7
- package/dist/spot-react/src/hooks/use-repermit-data.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-repermit-order-data.d.ts +0 -20
- package/dist/spot-react/src/hooks/use-repermit-order-data.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-spot.d.ts +0 -40
- package/dist/spot-react/src/hooks/use-spot.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-src-amount.d.ts +0 -6
- package/dist/spot-react/src/hooks/use-src-amount.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-submit-order-panel.d.ts +0 -28
- package/dist/spot-react/src/hooks/use-submit-order-panel.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-trade-price.d.ts +0 -2
- package/dist/spot-react/src/hooks/use-trade-price.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-trigger-price-panel.d.ts +0 -23
- package/dist/spot-react/src/hooks/use-trigger-price-panel.d.ts.map +0 -1
- package/dist/spot-react/src/spot-context.d.ts +0 -6
- package/dist/spot-react/src/spot-context.d.ts.map +0 -1
- package/dist/spot-react/src/store.d.ts +0 -11
- package/dist/spot-react/src/store.d.ts.map +0 -1
- package/dist/spot-react/src/utils.d.ts +0 -20
- package/dist/spot-react/src/utils.d.ts.map +0 -1
- package/dist/spot-ui/src/index.d.ts +0 -14
- package/dist/spot-ui/src/index.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/abi/erc20.json.d.ts +0 -291
- package/dist/spot-ui/src/lib/abi/index.d.ts +0 -260
- package/dist/spot-ui/src/lib/abi/index.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/abi/iweth.json.d.ts +0 -41
- package/dist/spot-ui/src/lib/abi/repermit.json.d.ts +0 -315
- package/dist/spot-ui/src/lib/analytics.d.ts +0 -111
- package/dist/spot-ui/src/lib/analytics.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/build-repermit-order-data.d.ts +0 -35
- package/dist/spot-ui/src/lib/build-repermit-order-data.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/consts.d.ts +0 -99
- package/dist/spot-ui/src/lib/consts.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/lib.d.ts +0 -80
- package/dist/spot-ui/src/lib/lib.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/networks.d.ts +0 -571
- package/dist/spot-ui/src/lib/networks.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/orders/index.d.ts +0 -15
- package/dist/spot-ui/src/lib/orders/index.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/orders/v1-orders.d.ts +0 -34
- package/dist/spot-ui/src/lib/orders/v1-orders.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/orders/v2-orders.d.ts +0 -11
- package/dist/spot-ui/src/lib/orders/v2-orders.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/submit-order.d.ts +0 -3
- package/dist/spot-ui/src/lib/submit-order.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/types.d.ts +0 -318
- package/dist/spot-ui/src/lib/types.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/utils.d.ts +0 -578
- package/dist/spot-ui/src/lib/utils.d.ts.map +0 -1
|
@@ -1,315 +0,0 @@
|
|
|
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;
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { Address, Config, Module, Partners, RePermitData, RePermitOrder } 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" | "config-update" | "reset" | "crash";
|
|
9
|
-
interface Data {
|
|
10
|
-
_id: string;
|
|
11
|
-
spotVersion?: string;
|
|
12
|
-
uiVersion?: string;
|
|
13
|
-
appId?: string;
|
|
14
|
-
origin?: string;
|
|
15
|
-
actionError?: string;
|
|
16
|
-
cancelOrderSuccess?: boolean;
|
|
17
|
-
orderSubmitted?: boolean;
|
|
18
|
-
orderHash?: string;
|
|
19
|
-
orderSuccess?: boolean;
|
|
20
|
-
action?: Action;
|
|
21
|
-
wrapTxHash?: string;
|
|
22
|
-
cancelOrderTxHash?: string;
|
|
23
|
-
cancelOrderIdsV1?: string[];
|
|
24
|
-
cancelOrderIdsV2?: string[];
|
|
25
|
-
approvalTxHash?: string;
|
|
26
|
-
walletAddress?: string;
|
|
27
|
-
fromTokenAddress?: string;
|
|
28
|
-
fromTokenSymbol?: string;
|
|
29
|
-
toTokenAddress?: string;
|
|
30
|
-
order?: RePermitOrder;
|
|
31
|
-
signature?: string;
|
|
32
|
-
toTokenSymbol?: string;
|
|
33
|
-
fromTokenAmount?: string;
|
|
34
|
-
chunksAmount?: number;
|
|
35
|
-
minDstAmountOutPerTrade?: string;
|
|
36
|
-
triggerPricePerTrade?: string;
|
|
37
|
-
deadline?: number;
|
|
38
|
-
fillDelay?: number;
|
|
39
|
-
srcChunkAmount?: string;
|
|
40
|
-
module?: Module;
|
|
41
|
-
slippage?: number;
|
|
42
|
-
orderType?: "market" | "limit";
|
|
43
|
-
partner?: Partners;
|
|
44
|
-
adapter?: Address;
|
|
45
|
-
cosigner?: Address;
|
|
46
|
-
executor?: Address;
|
|
47
|
-
fee?: Address;
|
|
48
|
-
reactor?: Address;
|
|
49
|
-
refinery?: Address;
|
|
50
|
-
repermit?: Address;
|
|
51
|
-
router?: Address;
|
|
52
|
-
type?: string;
|
|
53
|
-
wm?: Address;
|
|
54
|
-
chainName?: string;
|
|
55
|
-
chainId?: number;
|
|
56
|
-
twapVersion?: number;
|
|
57
|
-
twapAddress?: string;
|
|
58
|
-
lensAddress?: string;
|
|
59
|
-
bidDelaySeconds?: number;
|
|
60
|
-
minChunkSizeUsd?: number;
|
|
61
|
-
name?: string;
|
|
62
|
-
exchangeAddress?: string;
|
|
63
|
-
exchangeType?: string;
|
|
64
|
-
pathfinderKey?: string;
|
|
65
|
-
}
|
|
66
|
-
declare class Analytics {
|
|
67
|
-
timeout: any;
|
|
68
|
-
configDetails: Partial<Data>;
|
|
69
|
-
configUpdateKey: string;
|
|
70
|
-
moduleImportKey: string;
|
|
71
|
-
data: Data;
|
|
72
|
-
updateAndSend(values?: Partial<Data>, noTimeout?: boolean, callback?: () => void): Promise<void>;
|
|
73
|
-
onCancelOrderRequest(cancelOrderIds: string[], version: 1 | 2): void;
|
|
74
|
-
onCancelOrderSuccess(hash?: string): void;
|
|
75
|
-
onCancelOrderError(error: any): void;
|
|
76
|
-
onWrapSuccess(wrapTxHash?: string): void;
|
|
77
|
-
onWrapRequest(): void;
|
|
78
|
-
onWrapError(error: any): void;
|
|
79
|
-
onApproveRequest(): void;
|
|
80
|
-
onApproveSuccess(approvalTxHash?: string): void;
|
|
81
|
-
onApproveError(error: any): void;
|
|
82
|
-
onCrash(error: any): void;
|
|
83
|
-
onTxError(error: any): void;
|
|
84
|
-
onRequestOrder({ account, chainId, module, srcToken, dstToken, fromTokenAmount, srcChunkAmount, minDstAmountOutPerTrade, triggerPricePerTrade, deadline, fillDelay, slippage, isMarketOrder, chunksAmount, }: {
|
|
85
|
-
account: string;
|
|
86
|
-
chainId: number;
|
|
87
|
-
module: Module;
|
|
88
|
-
srcToken: Token;
|
|
89
|
-
dstToken: Token;
|
|
90
|
-
fromTokenAmount: string;
|
|
91
|
-
srcChunkAmount: string;
|
|
92
|
-
minDstAmountOutPerTrade: string;
|
|
93
|
-
triggerPricePerTrade: string;
|
|
94
|
-
deadline: number;
|
|
95
|
-
fillDelay: number;
|
|
96
|
-
slippage: number;
|
|
97
|
-
isMarketOrder: boolean;
|
|
98
|
-
chunksAmount: number;
|
|
99
|
-
}): void;
|
|
100
|
-
onSignOrderRequest(order: RePermitOrder): void;
|
|
101
|
-
onSignOrderError(error: any): void;
|
|
102
|
-
onSignOrderSuccess(signature: string): void;
|
|
103
|
-
init(partner: Partners, minChunkSizeUsd: number, chainId?: number, appId?: string): void;
|
|
104
|
-
onFetchedConfig(permitData: RePermitData, partner: Partners, twapConfig?: Config, minChunkSizeUsd?: number, isDev?: boolean): void;
|
|
105
|
-
onCreateOrderError(error: any): void;
|
|
106
|
-
onCreateOrderRequest(): void;
|
|
107
|
-
onCreateOrderSuccess(orderHash?: string): Promise<void>;
|
|
108
|
-
}
|
|
109
|
-
export declare const analytics: Analytics;
|
|
110
|
-
export {};
|
|
111
|
-
//# sourceMappingURL=analytics.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../../../spot-ui/src/lib/analytics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,MAAM,EACN,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,aAAa,EACd,MAAM,SAAS,CAAC;AAcjB,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,QAE3C;AAQD,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AA0DD,KAAK,MAAM,GACP,cAAc,GACd,MAAM,GACN,SAAS,GACT,YAAY,GACZ,cAAc,GACd,eAAe,GACf,eAAe,GACf,OAAO,GACP,OAAO,CAAC;AAEZ,UAAU,IAAI;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAA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EACN,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,cAAc,EACd,uBAA4B,EAC5B,oBAAyB,EACzB,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,aAAa,EACb,YAAY,GACb,EAAE;QACD,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,KAAK,CAAC;QAChB,QAAQ,EAAE,KAAK,CAAC;QAChB,eAAe,EAAE,MAAM,CAAC;QACxB,cAAc,EAAE,MAAM,CAAC;QACvB,uBAAuB,EAAE,MAAM,CAAC;QAChC,oBAAoB,EAAE,MAAM,CAAC;QAC7B,QAAQ,EAAE,MAAM,CAAC;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,CACF,OAAO,EAAE,QAAQ,EACjB,eAAe,EAAE,MAAM,EACvB,OAAO,CAAC,EAAE,MAAM,EAChB,KAAK,CAAC,EAAE,MAAM;IAwBhB,eAAe,CACb,UAAU,EAAE,YAAY,EACxB,OAAO,EAAE,QAAQ,EACjB,UAAU,CAAC,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,EACxB,KAAK,UAAQ;IAwBf,kBAAkB,CAAC,KAAK,EAAE,GAAG;IAI7B,oBAAoB;IAOd,oBAAoB,CAAC,SAAS,CAAC,EAAE,MAAM;CA0C9C;AAED,eAAO,MAAM,SAAS,WAAkB,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Address, Module, Partners, RePermitData, RePermitOrder } from './types';
|
|
2
|
-
export type BuildRePermitOrderDataParams = {
|
|
3
|
-
chainId: number;
|
|
4
|
-
srcTokenAddress: string;
|
|
5
|
-
dstTokenAddress: string;
|
|
6
|
-
totalSrcAmount: string;
|
|
7
|
-
currentTimeMillis: number;
|
|
8
|
-
deadlineMillis: number;
|
|
9
|
-
fillDelayMillis: number;
|
|
10
|
-
totalTrades: number;
|
|
11
|
-
slippageBps: number;
|
|
12
|
-
swapperAddress: string;
|
|
13
|
-
srcAmountPerTrade: string;
|
|
14
|
-
minDstAmountPerTrade?: string;
|
|
15
|
-
triggerAmountPerTrade?: string;
|
|
16
|
-
permitData: RePermitData;
|
|
17
|
-
module: Module;
|
|
18
|
-
};
|
|
19
|
-
export declare const fetchRePermitData: (partner: Partners, chainId: number, isDev?: boolean) => Promise<RePermitData>;
|
|
20
|
-
export declare const buildRePermitOrderData: ({ chainId, srcTokenAddress, dstTokenAddress, totalSrcAmount, currentTimeMillis, deadlineMillis, fillDelayMillis, totalTrades, slippageBps, swapperAddress, srcAmountPerTrade, minDstAmountPerTrade, triggerAmountPerTrade, permitData, module, }: BuildRePermitOrderDataParams) => {
|
|
21
|
-
order: RePermitOrder;
|
|
22
|
-
domain: {
|
|
23
|
-
name: string;
|
|
24
|
-
version: string;
|
|
25
|
-
chainId: number;
|
|
26
|
-
verifyingContract: Address;
|
|
27
|
-
};
|
|
28
|
-
partner?: string;
|
|
29
|
-
primaryType: string;
|
|
30
|
-
types: Record<string, {
|
|
31
|
-
name: string;
|
|
32
|
-
type: string;
|
|
33
|
-
}[]>;
|
|
34
|
-
};
|
|
35
|
-
//# sourceMappingURL=build-repermit-order-data.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,EACL,OAAO,EACP,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,aAAa,EACd,MAAM,SAAS,CAAC;AAajB,MAAM,MAAM,4BAA4B,GAAG;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,UAAU,EAAE,YAAY,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,SAAS,QAAQ,EACjB,SAAS,MAAM,EACf,eAAa,KACZ,OAAO,CAAC,YAAY,CAetB,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,kPAgBpC,4BAA4B;;;;;;;;;;;;;;CA4D9B,CAAC"}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { networks } from './networks';
|
|
2
|
-
import { Config, Partners, 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 getRePermitConfigEndpoint: (isDev?: boolean) => string;
|
|
6
|
-
export declare const getOrderApiEndpoints: (isDev: boolean) => string[];
|
|
7
|
-
export declare const getOrderSinkExchange: ({ endpoint, exchange, partner, }: {
|
|
8
|
-
endpoint: string;
|
|
9
|
-
exchange?: string;
|
|
10
|
-
partner?: Partners;
|
|
11
|
-
}) => string | undefined;
|
|
12
|
-
export declare const SUGGEST_CHUNK_VALUE = 100;
|
|
13
|
-
export declare const MIN_CHUNKS = 1;
|
|
14
|
-
export declare const MIN_FILL_DELAY_MILLIS: number;
|
|
15
|
-
export declare const MAX_ORDER_DURATION_MILLIS: number;
|
|
16
|
-
export declare const MIN_ORDER_DURATION_MILLIS: number;
|
|
17
|
-
export declare const MIN_FILL_DELAY_MINUTES: number;
|
|
18
|
-
export declare const THE_GRAPH_ORDERS_API: {
|
|
19
|
-
[networks.eth
|
|
20
|
-
.id]: string;
|
|
21
|
-
[networks.bsc
|
|
22
|
-
.id]: string;
|
|
23
|
-
[networks.poly
|
|
24
|
-
.id]: string;
|
|
25
|
-
[networks.arb
|
|
26
|
-
.id]: string;
|
|
27
|
-
[networks.base
|
|
28
|
-
.id]: string;
|
|
29
|
-
[networks.sei
|
|
30
|
-
.id]: string;
|
|
31
|
-
[networks.linea
|
|
32
|
-
.id]: string;
|
|
33
|
-
[networks.sonic
|
|
34
|
-
.id]: string;
|
|
35
|
-
[networks.ftm
|
|
36
|
-
.id]: string;
|
|
37
|
-
[networks.katana
|
|
38
|
-
.id]: string;
|
|
39
|
-
[networks.avax
|
|
40
|
-
.id]: string;
|
|
41
|
-
[networks.bera
|
|
42
|
-
.id]: string;
|
|
43
|
-
[networks.flare.id]: string;
|
|
44
|
-
[networks.cronosZkEvm.id]: string;
|
|
45
|
-
};
|
|
46
|
-
export declare const zeroAddress = "0x0000000000000000000000000000000000000000";
|
|
47
|
-
export declare const nativeTokenAddresses: string[];
|
|
48
|
-
export declare const maxUint256 = "115792089237316195423570985008687907853269984665640564039457584007913129639935";
|
|
49
|
-
export declare const getPartnerIdentifier: (config: Config) => string;
|
|
50
|
-
export declare const LEGACY_EXCHANGES_MAP: Record<string, string[]>;
|
|
51
|
-
export declare const DEFAULT_FILL_DELAY: TimeDuration;
|
|
52
|
-
export declare const FEES = 0.25;
|
|
53
|
-
export declare const EXCLUSIVITY_OVERRIDE_BPS = "100";
|
|
54
|
-
export declare const REPERMIT_PRIMARY_TYPE: "RePermitWitnessTransferFrom";
|
|
55
|
-
export declare const EIP712_TYPES: {
|
|
56
|
-
RePermitWitnessTransferFrom: {
|
|
57
|
-
name: string;
|
|
58
|
-
type: string;
|
|
59
|
-
}[];
|
|
60
|
-
Exchange: {
|
|
61
|
-
name: string;
|
|
62
|
-
type: string;
|
|
63
|
-
}[];
|
|
64
|
-
Input: {
|
|
65
|
-
name: string;
|
|
66
|
-
type: string;
|
|
67
|
-
}[];
|
|
68
|
-
Order: {
|
|
69
|
-
name: string;
|
|
70
|
-
type: string;
|
|
71
|
-
}[];
|
|
72
|
-
Output: {
|
|
73
|
-
name: string;
|
|
74
|
-
type: string;
|
|
75
|
-
}[];
|
|
76
|
-
TokenPermissions: {
|
|
77
|
-
name: string;
|
|
78
|
-
type: string;
|
|
79
|
-
}[];
|
|
80
|
-
};
|
|
81
|
-
export declare const ORBS_TWAP_FAQ_URL = "https://www.orbs.com/dtwap-and-dlimit-faq/";
|
|
82
|
-
export declare const ORBS_SLTP_FAQ_URL = "https://www.orbs.com/dtwap-and-dlimit-faq/#dSLTP";
|
|
83
|
-
export declare const ORBS_LOGO = "https://raw.githubusercontent.com/orbs-network/twap-ui/master/logo/orbslogo.svg";
|
|
84
|
-
export declare const ORBS_LOGO_FALLBACK = "https://www.orbs.com/assets/img/common/logo.svg";
|
|
85
|
-
export declare const ORBS_WEBSITE_URL = "https://www.orbs.com/";
|
|
86
|
-
export declare const DISCLAIMER_URL = "https://www.orbs.com/dtwap-dlimit-disclaimer";
|
|
87
|
-
export declare enum QUERY_PARAMS {
|
|
88
|
-
FRESHNESS = "freshness",
|
|
89
|
-
MIN_CHUNK_SIZE_USD = "minChunkSizeUsd",
|
|
90
|
-
ENV = "env",
|
|
91
|
-
DURATION = "duration",
|
|
92
|
-
IGNORE_ERRORS = "ignore-errors"
|
|
93
|
-
}
|
|
94
|
-
export declare const DEFAULT_STOP_LOSS_PERCENTAGE = "-5";
|
|
95
|
-
export declare const DEFAULT_TAKE_PROFIT_PERCENTAGE = "10";
|
|
96
|
-
export declare const DEFAULT_STOP_LOSS_LIMIT_PERCENTAGE = "-10";
|
|
97
|
-
export declare const DEFAULT_TAKE_PROFIT_LIMIT_PERCENTAGE = "5";
|
|
98
|
-
export declare const CRASH_ERROR_MESSAGE = "Something went wrong";
|
|
99
|
-
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,QAAQ,EAAE,YAAY,EAAY,MAAM,SAAS,CAAC;AASnE,eAAO,MAAM,YAAY,oBAAgC,CAAC;AAG1D,eAAO,MAAM,cAAc,GAAI,OAAO,OAAO,qHAS5C,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,eAAa,WACJ,CAAC;AAEpD,eAAO,MAAM,oBAAoB,GAAI,OAAO,OAAO,aASlD,CAAC;AAOF,eAAO,MAAM,oBAAoB,GAAI,kCAIlC;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB,uBAMA,CAAC;AACF,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,qBAAqB,QAAgB,CAAC;AAEnD,eAAO,MAAM,yBAAyB,QAA4B,CAAC;AAEnE,eAAO,MAAM,yBAAyB,QAAgB,CAAC;AAEvD,eAAO,MAAM,sBAAsB,QAAsC,CAAC;AAO1E,eAAO,MAAM,oBAAoB;IAC/B,CAAC,QAAQ,CAAC,GAAG;SACV,EAAE,CAAC,SAAgE;IACtE,CAAC,QAAQ,CAAC,GAAG;SACV,EAAE,CAAC,SAAiE;IACvE,CAAC,QAAQ,CAAC,IAAI;SACX,EAAE,CAAC,SAAiE;IACvE,CAAC,QAAQ,CAA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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"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { Config, InputError, Module, PartnerPayloadItem, Partners, 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: (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 getTwapConfig: (partner: Partners, chainId: number) => {
|
|
52
|
-
chainName: string;
|
|
53
|
-
chainId: number;
|
|
54
|
-
twapVersion: number;
|
|
55
|
-
twapAddress: string;
|
|
56
|
-
lensAddress: string;
|
|
57
|
-
takers: string[];
|
|
58
|
-
bidDelaySeconds: number;
|
|
59
|
-
minChunkSizeUsd: number;
|
|
60
|
-
name: string;
|
|
61
|
-
partner: string;
|
|
62
|
-
exchangeAddress: string;
|
|
63
|
-
exchangeType: string;
|
|
64
|
-
} | undefined;
|
|
65
|
-
export declare const getPartners: () => PartnerPayloadItem[];
|
|
66
|
-
export declare const getMinChunkSizeUsd: (minChunkSizeUsd: number) => number;
|
|
67
|
-
export declare const getErrors: ({ marketPrice, typedInputAmount, srcUsd1Token, marketPriceLoading, triggerPriceError, limitPriceError, tradesError, fillDelayError, durationError, balanceError, minTradeSizeError, }: {
|
|
68
|
-
marketPrice?: string;
|
|
69
|
-
typedInputAmount?: string;
|
|
70
|
-
srcUsd1Token?: string;
|
|
71
|
-
marketPriceLoading?: boolean;
|
|
72
|
-
triggerPriceError?: InputError;
|
|
73
|
-
limitPriceError?: InputError;
|
|
74
|
-
tradesError?: InputError;
|
|
75
|
-
fillDelayError?: InputError;
|
|
76
|
-
durationError?: InputError;
|
|
77
|
-
balanceError?: InputError;
|
|
78
|
-
minTradeSizeError?: InputError;
|
|
79
|
-
}) => InputError | undefined;
|
|
80
|
-
//# sourceMappingURL=lib.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../../../../spot-ui/src/lib/lib.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,MAAM,EACN,UAAU,EACV,MAAM,EACN,kBAAkB,EAClB,QAAQ,EACR,YAAY,EAEb,MAAM,SAAS,CAAC;AAejB,eAAO,MAAM,kBAAkB,GAC7B,YAAY,MAAM,EAClB,aAAa,MAAM,EACnB,mBAAmB,MAAM,uBAO1B,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACxC,iBAAiB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