@swapkit/types 1.0.0-rc.47 → 1.0.0-rc.48

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/index.js ADDED
@@ -0,0 +1,966 @@
1
+ // src/abis/erc20.ts
2
+ var erc20ABI = [
3
+ { inputs: [], stateMutability: "nonpayable", type: "constructor" },
4
+ {
5
+ anonymous: false,
6
+ inputs: [
7
+ { indexed: true, internalType: "address", name: "owner", type: "address" },
8
+ { indexed: true, internalType: "address", name: "spender", type: "address" },
9
+ { indexed: false, internalType: "uint256", name: "value", type: "uint256" }
10
+ ],
11
+ name: "Approval",
12
+ type: "event"
13
+ },
14
+ {
15
+ anonymous: false,
16
+ inputs: [
17
+ { indexed: true, internalType: "address", name: "from", type: "address" },
18
+ { indexed: true, internalType: "address", name: "to", type: "address" },
19
+ { indexed: false, internalType: "uint256", name: "value", type: "uint256" }
20
+ ],
21
+ name: "Transfer",
22
+ type: "event"
23
+ },
24
+ {
25
+ inputs: [
26
+ { internalType: "address", name: "", type: "address" },
27
+ { internalType: "address", name: "", type: "address" }
28
+ ],
29
+ name: "allowance",
30
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
31
+ stateMutability: "view",
32
+ type: "function"
33
+ },
34
+ {
35
+ inputs: [
36
+ { internalType: "address", name: "spender", type: "address" },
37
+ { internalType: "uint256", name: "value", type: "uint256" }
38
+ ],
39
+ name: "approve",
40
+ outputs: [{ internalType: "bool", name: "success", type: "bool" }],
41
+ stateMutability: "nonpayable",
42
+ type: "function"
43
+ },
44
+ {
45
+ inputs: [{ internalType: "address", name: "", type: "address" }],
46
+ name: "balanceOf",
47
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
48
+ stateMutability: "view",
49
+ type: "function"
50
+ },
51
+ {
52
+ inputs: [],
53
+ name: "decimals",
54
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
55
+ stateMutability: "view",
56
+ type: "function"
57
+ },
58
+ {
59
+ inputs: [],
60
+ name: "name",
61
+ outputs: [{ internalType: "string", name: "", type: "string" }],
62
+ stateMutability: "view",
63
+ type: "function"
64
+ },
65
+ {
66
+ inputs: [],
67
+ name: "symbol",
68
+ outputs: [{ internalType: "string", name: "", type: "string" }],
69
+ stateMutability: "view",
70
+ type: "function"
71
+ },
72
+ {
73
+ inputs: [],
74
+ name: "totalSupply",
75
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
76
+ stateMutability: "view",
77
+ type: "function"
78
+ },
79
+ {
80
+ inputs: [
81
+ { internalType: "address", name: "to", type: "address" },
82
+ { internalType: "uint256", name: "value", type: "uint256" }
83
+ ],
84
+ name: "transfer",
85
+ outputs: [{ internalType: "bool", name: "success", type: "bool" }],
86
+ stateMutability: "nonpayable",
87
+ type: "function"
88
+ },
89
+ {
90
+ inputs: [
91
+ { internalType: "address", name: "from", type: "address" },
92
+ { internalType: "address", name: "to", type: "address" },
93
+ { internalType: "uint256", name: "value", type: "uint256" }
94
+ ],
95
+ name: "transferFrom",
96
+ outputs: [{ internalType: "bool", name: "success", type: "bool" }],
97
+ stateMutability: "nonpayable",
98
+ type: "function"
99
+ }
100
+ ];
101
+ // src/abis/tcEthVault.ts
102
+ var TCEthereumVaultAbi = [
103
+ {
104
+ inputs: [{ internalType: "address", name: "rune", type: "address" }],
105
+ stateMutability: "nonpayable",
106
+ type: "constructor"
107
+ },
108
+ {
109
+ anonymous: false,
110
+ inputs: [
111
+ { indexed: true, internalType: "address", name: "to", type: "address" },
112
+ { indexed: true, internalType: "address", name: "asset", type: "address" },
113
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
114
+ { indexed: false, internalType: "string", name: "memo", type: "string" }
115
+ ],
116
+ name: "Deposit",
117
+ type: "event"
118
+ },
119
+ {
120
+ anonymous: false,
121
+ inputs: [
122
+ { indexed: true, internalType: "address", name: "oldVault", type: "address" },
123
+ { indexed: true, internalType: "address", name: "newVault", type: "address" },
124
+ { indexed: false, internalType: "address", name: "asset", type: "address" },
125
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
126
+ { indexed: false, internalType: "string", name: "memo", type: "string" }
127
+ ],
128
+ name: "TransferAllowance",
129
+ type: "event"
130
+ },
131
+ {
132
+ anonymous: false,
133
+ inputs: [
134
+ { indexed: true, internalType: "address", name: "vault", type: "address" },
135
+ { indexed: true, internalType: "address", name: "to", type: "address" },
136
+ { indexed: false, internalType: "address", name: "asset", type: "address" },
137
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
138
+ { indexed: false, internalType: "string", name: "memo", type: "string" }
139
+ ],
140
+ name: "TransferOut",
141
+ type: "event"
142
+ },
143
+ {
144
+ anonymous: false,
145
+ inputs: [
146
+ { indexed: true, internalType: "address", name: "vault", type: "address" },
147
+ { indexed: false, internalType: "address", name: "target", type: "address" },
148
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
149
+ { indexed: false, internalType: "address", name: "finalAsset", type: "address" },
150
+ { indexed: false, internalType: "address", name: "to", type: "address" },
151
+ { indexed: false, internalType: "uint256", name: "amountOutMin", type: "uint256" },
152
+ { indexed: false, internalType: "string", name: "memo", type: "string" }
153
+ ],
154
+ name: "TransferOutAndCall",
155
+ type: "event"
156
+ },
157
+ {
158
+ anonymous: false,
159
+ inputs: [
160
+ { indexed: true, internalType: "address", name: "oldVault", type: "address" },
161
+ { indexed: true, internalType: "address", name: "newVault", type: "address" },
162
+ {
163
+ components: [
164
+ { internalType: "address", name: "asset", type: "address" },
165
+ { internalType: "uint256", name: "amount", type: "uint256" }
166
+ ],
167
+ indexed: false,
168
+ internalType: "struct THORChain_Router.Coin[]",
169
+ name: "coins",
170
+ type: "tuple[]"
171
+ },
172
+ { indexed: false, internalType: "string", name: "memo", type: "string" }
173
+ ],
174
+ name: "VaultTransfer",
175
+ type: "event"
176
+ },
177
+ {
178
+ inputs: [],
179
+ name: "RUNE",
180
+ outputs: [{ internalType: "address", name: "", type: "address" }],
181
+ stateMutability: "view",
182
+ type: "function"
183
+ },
184
+ {
185
+ inputs: [
186
+ { internalType: "address payable", name: "vault", type: "address" },
187
+ { internalType: "address", name: "asset", type: "address" },
188
+ { internalType: "uint256", name: "amount", type: "uint256" },
189
+ { internalType: "string", name: "memo", type: "string" }
190
+ ],
191
+ name: "deposit",
192
+ outputs: [],
193
+ stateMutability: "payable",
194
+ type: "function"
195
+ },
196
+ {
197
+ inputs: [
198
+ { internalType: "address payable", name: "vault", type: "address" },
199
+ { internalType: "address", name: "asset", type: "address" },
200
+ { internalType: "uint256", name: "amount", type: "uint256" },
201
+ { internalType: "string", name: "memo", type: "string" },
202
+ { internalType: "uint256", name: "expiration", type: "uint256" }
203
+ ],
204
+ name: "depositWithExpiry",
205
+ outputs: [],
206
+ stateMutability: "payable",
207
+ type: "function"
208
+ },
209
+ {
210
+ inputs: [
211
+ { internalType: "address", name: "router", type: "address" },
212
+ { internalType: "address payable", name: "asgard", type: "address" },
213
+ {
214
+ components: [
215
+ { internalType: "address", name: "asset", type: "address" },
216
+ { internalType: "uint256", name: "amount", type: "uint256" }
217
+ ],
218
+ internalType: "struct THORChain_Router.Coin[]",
219
+ name: "coins",
220
+ type: "tuple[]"
221
+ },
222
+ { internalType: "string", name: "memo", type: "string" }
223
+ ],
224
+ name: "returnVaultAssets",
225
+ outputs: [],
226
+ stateMutability: "payable",
227
+ type: "function"
228
+ },
229
+ {
230
+ inputs: [
231
+ { internalType: "address", name: "router", type: "address" },
232
+ { internalType: "address", name: "newVault", type: "address" },
233
+ { internalType: "address", name: "asset", type: "address" },
234
+ { internalType: "uint256", name: "amount", type: "uint256" },
235
+ { internalType: "string", name: "memo", type: "string" }
236
+ ],
237
+ name: "transferAllowance",
238
+ outputs: [],
239
+ stateMutability: "nonpayable",
240
+ type: "function"
241
+ },
242
+ {
243
+ inputs: [
244
+ { internalType: "address payable", name: "to", type: "address" },
245
+ { internalType: "address", name: "asset", type: "address" },
246
+ { internalType: "uint256", name: "amount", type: "uint256" },
247
+ { internalType: "string", name: "memo", type: "string" }
248
+ ],
249
+ name: "transferOut",
250
+ outputs: [],
251
+ stateMutability: "payable",
252
+ type: "function"
253
+ },
254
+ {
255
+ inputs: [
256
+ { internalType: "address payable", name: "aggregator", type: "address" },
257
+ { internalType: "address", name: "finalToken", type: "address" },
258
+ { internalType: "address", name: "to", type: "address" },
259
+ { internalType: "uint256", name: "amountOutMin", type: "uint256" },
260
+ { internalType: "string", name: "memo", type: "string" }
261
+ ],
262
+ name: "transferOutAndCall",
263
+ outputs: [],
264
+ stateMutability: "payable",
265
+ type: "function"
266
+ },
267
+ {
268
+ inputs: [
269
+ { internalType: "address", name: "vault", type: "address" },
270
+ { internalType: "address", name: "token", type: "address" }
271
+ ],
272
+ name: "vaultAllowance",
273
+ outputs: [{ internalType: "uint256", name: "amount", type: "uint256" }],
274
+ stateMutability: "view",
275
+ type: "function"
276
+ }
277
+ ];
278
+ var TCAvalancheDepositABI = [
279
+ { inputs: [], stateMutability: "nonpayable", type: "constructor" },
280
+ {
281
+ anonymous: false,
282
+ inputs: [
283
+ { indexed: true, internalType: "address", name: "to", type: "address" },
284
+ { indexed: true, internalType: "address", name: "asset", type: "address" },
285
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
286
+ { indexed: false, internalType: "string", name: "memo", type: "string" }
287
+ ],
288
+ name: "Deposit",
289
+ type: "event"
290
+ },
291
+ {
292
+ anonymous: false,
293
+ inputs: [
294
+ { indexed: true, internalType: "address", name: "oldVault", type: "address" },
295
+ { indexed: true, internalType: "address", name: "newVault", type: "address" },
296
+ { indexed: false, internalType: "address", name: "asset", type: "address" },
297
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
298
+ { indexed: false, internalType: "string", name: "memo", type: "string" }
299
+ ],
300
+ name: "TransferAllowance",
301
+ type: "event"
302
+ },
303
+ {
304
+ anonymous: false,
305
+ inputs: [
306
+ { indexed: true, internalType: "address", name: "vault", type: "address" },
307
+ { indexed: true, internalType: "address", name: "to", type: "address" },
308
+ { indexed: false, internalType: "address", name: "asset", type: "address" },
309
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
310
+ { indexed: false, internalType: "string", name: "memo", type: "string" }
311
+ ],
312
+ name: "TransferOut",
313
+ type: "event"
314
+ },
315
+ {
316
+ anonymous: false,
317
+ inputs: [
318
+ { indexed: true, internalType: "address", name: "vault", type: "address" },
319
+ { indexed: false, internalType: "address", name: "target", type: "address" },
320
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
321
+ { indexed: false, internalType: "address", name: "finalAsset", type: "address" },
322
+ { indexed: false, internalType: "address", name: "to", type: "address" },
323
+ { indexed: false, internalType: "uint256", name: "amountOutMin", type: "uint256" },
324
+ { indexed: false, internalType: "string", name: "memo", type: "string" }
325
+ ],
326
+ name: "TransferOutAndCall",
327
+ type: "event"
328
+ },
329
+ {
330
+ anonymous: false,
331
+ inputs: [
332
+ { indexed: true, internalType: "address", name: "oldVault", type: "address" },
333
+ { indexed: true, internalType: "address", name: "newVault", type: "address" },
334
+ {
335
+ components: [
336
+ { internalType: "address", name: "asset", type: "address" },
337
+ { internalType: "uint256", name: "amount", type: "uint256" }
338
+ ],
339
+ indexed: false,
340
+ internalType: "struct AvaxRouter.Coin[]",
341
+ name: "coins",
342
+ type: "tuple[]"
343
+ },
344
+ { indexed: false, internalType: "string", name: "memo", type: "string" }
345
+ ],
346
+ name: "VaultTransfer",
347
+ type: "event"
348
+ },
349
+ {
350
+ inputs: [
351
+ { internalType: "address payable", name: "vault", type: "address" },
352
+ { internalType: "address", name: "asset", type: "address" },
353
+ { internalType: "uint256", name: "amount", type: "uint256" },
354
+ { internalType: "string", name: "memo", type: "string" }
355
+ ],
356
+ name: "deposit",
357
+ outputs: [],
358
+ stateMutability: "payable",
359
+ type: "function"
360
+ },
361
+ {
362
+ inputs: [
363
+ { internalType: "address payable", name: "vault", type: "address" },
364
+ { internalType: "address", name: "asset", type: "address" },
365
+ { internalType: "uint256", name: "amount", type: "uint256" },
366
+ { internalType: "string", name: "memo", type: "string" },
367
+ { internalType: "uint256", name: "expiration", type: "uint256" }
368
+ ],
369
+ name: "depositWithExpiry",
370
+ outputs: [],
371
+ stateMutability: "payable",
372
+ type: "function"
373
+ },
374
+ {
375
+ inputs: [
376
+ { internalType: "address", name: "router", type: "address" },
377
+ { internalType: "address payable", name: "asgard", type: "address" },
378
+ {
379
+ components: [
380
+ { internalType: "address", name: "asset", type: "address" },
381
+ { internalType: "uint256", name: "amount", type: "uint256" }
382
+ ],
383
+ internalType: "struct AvaxRouter.Coin[]",
384
+ name: "coins",
385
+ type: "tuple[]"
386
+ },
387
+ { internalType: "string", name: "memo", type: "string" }
388
+ ],
389
+ name: "returnVaultAssets",
390
+ outputs: [],
391
+ stateMutability: "payable",
392
+ type: "function"
393
+ },
394
+ {
395
+ inputs: [
396
+ { internalType: "address", name: "router", type: "address" },
397
+ { internalType: "address", name: "newVault", type: "address" },
398
+ { internalType: "address", name: "asset", type: "address" },
399
+ { internalType: "uint256", name: "amount", type: "uint256" },
400
+ { internalType: "string", name: "memo", type: "string" }
401
+ ],
402
+ name: "transferAllowance",
403
+ outputs: [],
404
+ stateMutability: "nonpayable",
405
+ type: "function"
406
+ },
407
+ {
408
+ inputs: [
409
+ { internalType: "address payable", name: "to", type: "address" },
410
+ { internalType: "address", name: "asset", type: "address" },
411
+ { internalType: "uint256", name: "amount", type: "uint256" },
412
+ { internalType: "string", name: "memo", type: "string" }
413
+ ],
414
+ name: "transferOut",
415
+ outputs: [],
416
+ stateMutability: "payable",
417
+ type: "function"
418
+ },
419
+ {
420
+ inputs: [
421
+ { internalType: "address payable", name: "target", type: "address" },
422
+ { internalType: "address", name: "finalToken", type: "address" },
423
+ { internalType: "address", name: "to", type: "address" },
424
+ { internalType: "uint256", name: "amountOutMin", type: "uint256" },
425
+ { internalType: "string", name: "memo", type: "string" }
426
+ ],
427
+ name: "transferOutAndCall",
428
+ outputs: [],
429
+ stateMutability: "payable",
430
+ type: "function"
431
+ },
432
+ {
433
+ inputs: [
434
+ { internalType: "address", name: "vault", type: "address" },
435
+ { internalType: "address", name: "token", type: "address" }
436
+ ],
437
+ name: "vaultAllowance",
438
+ outputs: [{ internalType: "uint256", name: "amount", type: "uint256" }],
439
+ stateMutability: "view",
440
+ type: "function"
441
+ }
442
+ ];
443
+ var TCBscDepositABI = [
444
+ { inputs: [], stateMutability: "nonpayable", type: "constructor" },
445
+ {
446
+ anonymous: false,
447
+ inputs: [
448
+ { indexed: true, internalType: "address", name: "to", type: "address" },
449
+ { indexed: true, internalType: "address", name: "asset", type: "address" },
450
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
451
+ { indexed: false, internalType: "string", name: "memo", type: "string" }
452
+ ],
453
+ name: "Deposit",
454
+ type: "event"
455
+ },
456
+ {
457
+ anonymous: false,
458
+ inputs: [
459
+ { indexed: true, internalType: "address", name: "oldVault", type: "address" },
460
+ { indexed: true, internalType: "address", name: "newVault", type: "address" },
461
+ { indexed: false, internalType: "address", name: "asset", type: "address" },
462
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
463
+ { indexed: false, internalType: "string", name: "memo", type: "string" }
464
+ ],
465
+ name: "TransferAllowance",
466
+ type: "event"
467
+ },
468
+ {
469
+ anonymous: false,
470
+ inputs: [
471
+ { indexed: true, internalType: "address", name: "vault", type: "address" },
472
+ { indexed: true, internalType: "address", name: "to", type: "address" },
473
+ { indexed: false, internalType: "address", name: "asset", type: "address" },
474
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
475
+ { indexed: false, internalType: "string", name: "memo", type: "string" }
476
+ ],
477
+ name: "TransferOut",
478
+ type: "event"
479
+ },
480
+ {
481
+ anonymous: false,
482
+ inputs: [
483
+ { indexed: true, internalType: "address", name: "vault", type: "address" },
484
+ { indexed: false, internalType: "address", name: "target", type: "address" },
485
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
486
+ { indexed: false, internalType: "address", name: "finalAsset", type: "address" },
487
+ { indexed: false, internalType: "address", name: "to", type: "address" },
488
+ { indexed: false, internalType: "uint256", name: "amountOutMin", type: "uint256" },
489
+ { indexed: false, internalType: "string", name: "memo", type: "string" }
490
+ ],
491
+ name: "TransferOutAndCall",
492
+ type: "event"
493
+ },
494
+ {
495
+ anonymous: false,
496
+ inputs: [
497
+ { indexed: true, internalType: "address", name: "oldVault", type: "address" },
498
+ { indexed: true, internalType: "address", name: "newVault", type: "address" },
499
+ {
500
+ components: [
501
+ { internalType: "address", name: "asset", type: "address" },
502
+ { internalType: "uint256", name: "amount", type: "uint256" }
503
+ ],
504
+ indexed: false,
505
+ internalType: "struct THORChain_Router.Coin[]",
506
+ name: "coins",
507
+ type: "tuple[]"
508
+ },
509
+ { indexed: false, internalType: "string", name: "memo", type: "string" }
510
+ ],
511
+ name: "VaultTransfer",
512
+ type: "event"
513
+ },
514
+ {
515
+ inputs: [
516
+ { internalType: "address payable", name: "vault", type: "address" },
517
+ { internalType: "address", name: "asset", type: "address" },
518
+ { internalType: "uint256", name: "amount", type: "uint256" },
519
+ { internalType: "string", name: "memo", type: "string" },
520
+ { internalType: "uint256", name: "expiration", type: "uint256" }
521
+ ],
522
+ name: "depositWithExpiry",
523
+ outputs: [],
524
+ stateMutability: "payable",
525
+ type: "function"
526
+ },
527
+ {
528
+ inputs: [
529
+ { internalType: "address", name: "router", type: "address" },
530
+ { internalType: "address payable", name: "asgard", type: "address" },
531
+ {
532
+ components: [
533
+ { internalType: "address", name: "asset", type: "address" },
534
+ { internalType: "uint256", name: "amount", type: "uint256" }
535
+ ],
536
+ internalType: "struct THORChain_Router.Coin[]",
537
+ name: "coins",
538
+ type: "tuple[]"
539
+ },
540
+ { internalType: "string", name: "memo", type: "string" }
541
+ ],
542
+ name: "returnVaultAssets",
543
+ outputs: [],
544
+ stateMutability: "payable",
545
+ type: "function"
546
+ },
547
+ {
548
+ inputs: [
549
+ { internalType: "address", name: "router", type: "address" },
550
+ { internalType: "address", name: "newVault", type: "address" },
551
+ { internalType: "address", name: "asset", type: "address" },
552
+ { internalType: "uint256", name: "amount", type: "uint256" },
553
+ { internalType: "string", name: "memo", type: "string" }
554
+ ],
555
+ name: "transferAllowance",
556
+ outputs: [],
557
+ stateMutability: "nonpayable",
558
+ type: "function"
559
+ },
560
+ {
561
+ inputs: [
562
+ { internalType: "address payable", name: "to", type: "address" },
563
+ { internalType: "address", name: "asset", type: "address" },
564
+ { internalType: "uint256", name: "amount", type: "uint256" },
565
+ { internalType: "string", name: "memo", type: "string" }
566
+ ],
567
+ name: "transferOut",
568
+ outputs: [],
569
+ stateMutability: "payable",
570
+ type: "function"
571
+ },
572
+ {
573
+ inputs: [
574
+ { internalType: "address payable", name: "target", type: "address" },
575
+ { internalType: "address", name: "finalToken", type: "address" },
576
+ { internalType: "address", name: "to", type: "address" },
577
+ { internalType: "uint256", name: "amountOutMin", type: "uint256" },
578
+ { internalType: "string", name: "memo", type: "string" }
579
+ ],
580
+ name: "transferOutAndCall",
581
+ outputs: [],
582
+ stateMutability: "payable",
583
+ type: "function"
584
+ },
585
+ {
586
+ inputs: [
587
+ { internalType: "address", name: "vault", type: "address" },
588
+ { internalType: "address", name: "token", type: "address" }
589
+ ],
590
+ name: "vaultAllowance",
591
+ outputs: [{ internalType: "uint256", name: "amount", type: "uint256" }],
592
+ stateMutability: "view",
593
+ type: "function"
594
+ }
595
+ ];
596
+ // src/commonTypes.ts
597
+ var QuoteMode;
598
+ (function(QuoteMode2) {
599
+ QuoteMode2["TC_SUPPORTED_TO_TC_SUPPORTED"] = "TC-TC";
600
+ QuoteMode2["TC_SUPPORTED_TO_ETH"] = "TC-ERC20";
601
+ QuoteMode2["TC_SUPPORTED_TO_AVAX"] = "TC-ARC20";
602
+ QuoteMode2["TC_SUPPORTED_TO_BSC"] = "TC-BEP20";
603
+ QuoteMode2["ETH_TO_TC_SUPPORTED"] = "ERC20-TC";
604
+ QuoteMode2["ETH_TO_ETH"] = "ERC20-ERC20";
605
+ QuoteMode2["ETH_TO_AVAX"] = "ERC20-ARC20";
606
+ QuoteMode2["ETH_TO_BSC"] = "ERC20-BEP20";
607
+ QuoteMode2["AVAX_TO_TC_SUPPORTED"] = "ARC20-TC";
608
+ QuoteMode2["AVAX_TO_ETH"] = "ARC20-ERC20";
609
+ QuoteMode2["AVAX_TO_AVAX"] = "ARC20-ARC20";
610
+ QuoteMode2["AVAX_TO_BSC"] = "ARC20-BEP20";
611
+ QuoteMode2["BSC_TO_TC_SUPPORTED"] = "BEP20-TC";
612
+ QuoteMode2["BSC_TO_ETH"] = "BEP20-ERC20";
613
+ QuoteMode2["BSC_TO_AVAX"] = "BEP20-ARC20";
614
+ QuoteMode2["BSC_TO_BSC"] = "BEP20-BEP20";
615
+ })(QuoteMode || (QuoteMode = {}));
616
+ var AGG_SWAP = [QuoteMode.ETH_TO_ETH, QuoteMode.AVAX_TO_AVAX, QuoteMode.BSC_TO_BSC];
617
+ var SWAP_IN = [
618
+ QuoteMode.ETH_TO_TC_SUPPORTED,
619
+ QuoteMode.ETH_TO_AVAX,
620
+ QuoteMode.ETH_TO_BSC,
621
+ QuoteMode.AVAX_TO_TC_SUPPORTED,
622
+ QuoteMode.AVAX_TO_ETH,
623
+ QuoteMode.AVAX_TO_BSC,
624
+ QuoteMode.BSC_TO_TC_SUPPORTED,
625
+ QuoteMode.BSC_TO_ETH,
626
+ QuoteMode.BSC_TO_AVAX
627
+ ];
628
+ var SWAP_OUT = [
629
+ QuoteMode.TC_SUPPORTED_TO_TC_SUPPORTED,
630
+ QuoteMode.TC_SUPPORTED_TO_ETH,
631
+ QuoteMode.TC_SUPPORTED_TO_AVAX,
632
+ QuoteMode.TC_SUPPORTED_TO_BSC
633
+ ];
634
+ // src/network.ts
635
+ var Chain;
636
+ (function(Chain2) {
637
+ Chain2["Arbitrum"] = "ARB";
638
+ Chain2["Avalanche"] = "AVAX";
639
+ Chain2["Binance"] = "BNB";
640
+ Chain2["BinanceSmartChain"] = "BSC";
641
+ Chain2["Bitcoin"] = "BTC";
642
+ Chain2["BitcoinCash"] = "BCH";
643
+ Chain2["Cosmos"] = "GAIA";
644
+ Chain2["Dash"] = "DASH";
645
+ Chain2["Dogecoin"] = "DOGE";
646
+ Chain2["Ethereum"] = "ETH";
647
+ Chain2["Kujira"] = "KUJI";
648
+ Chain2["Litecoin"] = "LTC";
649
+ Chain2["Maya"] = "MAYA";
650
+ Chain2["Optimism"] = "OP";
651
+ Chain2["Polkadot"] = "DOT";
652
+ Chain2["Chainflip"] = "FLIP";
653
+ Chain2["Polygon"] = "MATIC";
654
+ Chain2["THORChain"] = "THOR";
655
+ })(Chain || (Chain = {}));
656
+ var ContractAddress;
657
+ (function(ContractAddress2) {
658
+ ContractAddress2["ARB"] = "0x0000000000000000000000000000000000000000";
659
+ ContractAddress2["AVAX"] = "0x0000000000000000000000000000000000000000";
660
+ ContractAddress2["ETH"] = "0x0000000000000000000000000000000000000000";
661
+ ContractAddress2["BSC"] = "0x0000000000000000000000000000000000000000";
662
+ ContractAddress2["MATIC"] = "0x0000000000000000000000000000000000001010";
663
+ ContractAddress2["OP"] = "0x4200000000000000000000000000000000000042";
664
+ })(ContractAddress || (ContractAddress = {}));
665
+ var DerivationPath;
666
+ (function(DerivationPath2) {
667
+ DerivationPath2["ARB"] = "m/44'/60'/0'/0";
668
+ DerivationPath2["AVAX"] = "m/44'/60'/0'/0";
669
+ DerivationPath2["BCH"] = "m/44'/145'/0'/0";
670
+ DerivationPath2["BNB"] = "m/44'/714'/0'/0";
671
+ DerivationPath2["BSC"] = "m/44'/60'/0'/0";
672
+ DerivationPath2["BTC"] = "m/84'/0'/0'/0";
673
+ DerivationPath2["DASH"] = "m/44'/5'/0'/0";
674
+ DerivationPath2["DOGE"] = "m/44'/3'/0'/0";
675
+ DerivationPath2["DOT"] = "////";
676
+ DerivationPath2["ETH"] = "m/44'/60'/0'/0";
677
+ DerivationPath2["FLIP"] = "////";
678
+ DerivationPath2["GAIA"] = "m/44'/118'/0'/0";
679
+ DerivationPath2["KUJI"] = "m/44'/118'/0'/0";
680
+ DerivationPath2["LTC"] = "m/84'/2'/0'/0";
681
+ DerivationPath2["MATIC"] = "m/44'/60'/0'/0";
682
+ DerivationPath2["MAYA"] = "m/44'/931'/0'/0";
683
+ DerivationPath2["OP"] = "m/44'/60'/0'/0";
684
+ DerivationPath2["THOR"] = "m/44'/931'/0'/0";
685
+ })(DerivationPath || (DerivationPath = {}));
686
+ var NetworkDerivationPath = {
687
+ ARB: [44, 60, 0, 0, 0],
688
+ AVAX: [44, 60, 0, 0, 0],
689
+ BCH: [44, 145, 0, 0, 0],
690
+ BNB: [44, 714, 0, 0, 0],
691
+ BSC: [44, 60, 0, 0, 0],
692
+ BTC: [84, 0, 0, 0, 0],
693
+ DASH: [44, 5, 0, 0, 0],
694
+ DOGE: [44, 3, 0, 0, 0],
695
+ ETH: [44, 60, 0, 0, 0],
696
+ GAIA: [44, 118, 0, 0, 0],
697
+ KUJI: [44, 118, 0, 0, 0],
698
+ LTC: [84, 2, 0, 0, 0],
699
+ MATIC: [44, 60, 0, 0, 0],
700
+ MAYA: [44, 931, 0, 0, 0],
701
+ OP: [44, 60, 0, 0, 0],
702
+ THOR: [44, 931, 0, 0, 0],
703
+ DOT: [0, 0, 0, 0, 0],
704
+ FLIP: [0, 0, 0, 0, 0]
705
+ };
706
+ var BaseDecimal;
707
+ (function(BaseDecimal2) {
708
+ BaseDecimal2[BaseDecimal2["ARB"] = 18] = "ARB";
709
+ BaseDecimal2[BaseDecimal2["AVAX"] = 18] = "AVAX";
710
+ BaseDecimal2[BaseDecimal2["BCH"] = 8] = "BCH";
711
+ BaseDecimal2[BaseDecimal2["BNB"] = 8] = "BNB";
712
+ BaseDecimal2[BaseDecimal2["BSC"] = 18] = "BSC";
713
+ BaseDecimal2[BaseDecimal2["BTC"] = 8] = "BTC";
714
+ BaseDecimal2[BaseDecimal2["DASH"] = 8] = "DASH";
715
+ BaseDecimal2[BaseDecimal2["DOGE"] = 8] = "DOGE";
716
+ BaseDecimal2[BaseDecimal2["DOT"] = 10] = "DOT";
717
+ BaseDecimal2[BaseDecimal2["ETH"] = 18] = "ETH";
718
+ BaseDecimal2[BaseDecimal2["FLIP"] = 18] = "FLIP";
719
+ BaseDecimal2[BaseDecimal2["GAIA"] = 6] = "GAIA";
720
+ BaseDecimal2[BaseDecimal2["KUJI"] = 6] = "KUJI";
721
+ BaseDecimal2[BaseDecimal2["LTC"] = 8] = "LTC";
722
+ BaseDecimal2[BaseDecimal2["MATIC"] = 18] = "MATIC";
723
+ BaseDecimal2[BaseDecimal2["MAYA"] = 10] = "MAYA";
724
+ BaseDecimal2[BaseDecimal2["OP"] = 18] = "OP";
725
+ BaseDecimal2[BaseDecimal2["THOR"] = 8] = "THOR";
726
+ BaseDecimal2[BaseDecimal2["ZEC"] = 8] = "ZEC";
727
+ })(BaseDecimal || (BaseDecimal = {}));
728
+ var SubstrateChains = [Chain.Polkadot, Chain.Chainflip];
729
+ var EVMChains = [
730
+ Chain.Ethereum,
731
+ Chain.Avalanche,
732
+ Chain.BinanceSmartChain,
733
+ Chain.Arbitrum,
734
+ Chain.Optimism,
735
+ Chain.Polygon
736
+ ];
737
+ var EVMChainList = EVMChains;
738
+ var UTXOChains = [
739
+ Chain.Bitcoin,
740
+ Chain.BitcoinCash,
741
+ Chain.Dash,
742
+ Chain.Dogecoin,
743
+ Chain.Litecoin
744
+ ];
745
+ var UTXOChainList = UTXOChains;
746
+ var CosmosChains = [
747
+ Chain.Cosmos,
748
+ Chain.THORChain,
749
+ Chain.Binance,
750
+ Chain.Maya,
751
+ Chain.Kujira
752
+ ];
753
+ var CosmosChainList = CosmosChains;
754
+ var TCSupportedChains = [
755
+ Chain.Avalanche,
756
+ Chain.Binance,
757
+ Chain.BinanceSmartChain,
758
+ Chain.Bitcoin,
759
+ Chain.BitcoinCash,
760
+ Chain.Cosmos,
761
+ Chain.Dogecoin,
762
+ Chain.Ethereum,
763
+ Chain.Litecoin,
764
+ Chain.THORChain
765
+ ];
766
+ var TCSupportedChainList = TCSupportedChains;
767
+ var ChainId;
768
+ (function(ChainId2) {
769
+ ChainId2["Arbitrum"] = "42161";
770
+ ChainId2["ArbitrumHex"] = "0xa4b1";
771
+ ChainId2["Avalanche"] = "43114";
772
+ ChainId2["AvalancheHex"] = "0xa86a";
773
+ ChainId2["Binance"] = "Binance-Chain-Tigris";
774
+ ChainId2["BinanceSmartChain"] = "56";
775
+ ChainId2["BinanceSmartChainHex"] = "0x38";
776
+ ChainId2["Bitcoin"] = "bitcoin";
777
+ ChainId2["BitcoinCash"] = "bitcoincash";
778
+ ChainId2["Chainflip"] = "chainflip";
779
+ ChainId2["Cosmos"] = "cosmoshub-4";
780
+ ChainId2["Dash"] = "dash";
781
+ ChainId2["Dogecoin"] = "dogecoin";
782
+ ChainId2["Kujira"] = "kaiyo-1";
783
+ ChainId2["Ethereum"] = "1";
784
+ ChainId2["EthereumHex"] = "0x1";
785
+ ChainId2["Litecoin"] = "litecoin";
786
+ ChainId2["Maya"] = "mayachain-mainnet-v1";
787
+ ChainId2["MayaStagenet"] = "mayachain-stagenet-v1";
788
+ ChainId2["Optimism"] = "10";
789
+ ChainId2["OptimismHex"] = "0xa";
790
+ ChainId2["Polkadot"] = "polkadot";
791
+ ChainId2["Polygon"] = "137";
792
+ ChainId2["PolygonHex"] = "0x89";
793
+ ChainId2["THORChain"] = "thorchain-mainnet-v1";
794
+ ChainId2["THORChainStagenet"] = "thorchain-stagenet-v2";
795
+ })(ChainId || (ChainId = {}));
796
+ var RPCUrl;
797
+ (function(RPCUrl2) {
798
+ RPCUrl2["Arbitrum"] = "https://arb1.arbitrum.io/rpc";
799
+ RPCUrl2["Avalanche"] = "https://node-router.thorswap.net/avalanche-c";
800
+ RPCUrl2["Binance"] = "";
801
+ RPCUrl2["BinanceSmartChain"] = "https://bsc-dataseed.binance.org";
802
+ RPCUrl2["Bitcoin"] = "https://node-router.thorswap.net/bitcoin";
803
+ RPCUrl2["BitcoinCash"] = "https://node-router.thorswap.net/bitcoin-cash";
804
+ RPCUrl2["Chainflip"] = "wss://mainnet-archive.chainflip.io";
805
+ RPCUrl2["Cosmos"] = "https://node-router.thorswap.net/cosmos/rpc";
806
+ RPCUrl2["Dash"] = "https://node-router.thorswap.net/dash";
807
+ RPCUrl2["Dogecoin"] = "https://node-router.thorswap.net/dogecoin";
808
+ RPCUrl2["Ethereum"] = "https://node-router.thorswap.net/ethereum";
809
+ RPCUrl2["Kujira"] = "https://rpc-kujira.synergynodes.com/";
810
+ RPCUrl2["Litecoin"] = "https://node-router.thorswap.net/litecoin";
811
+ RPCUrl2["Maya"] = "https://tendermint.mayachain.info";
812
+ RPCUrl2["MayaStagenet"] = "https://stagenet.tendermint.mayachain.info";
813
+ RPCUrl2["Optimism"] = "https://mainnet.optimism.io";
814
+ RPCUrl2["Polkadot"] = "wss://rpc.polkadot.io";
815
+ RPCUrl2["Polygon"] = "https://polygon-rpc.com";
816
+ RPCUrl2["THORChain"] = "https://rpc.thorswap.net";
817
+ RPCUrl2["THORChainStagenet"] = "https://stagenet-rpc.ninerealms.com";
818
+ })(RPCUrl || (RPCUrl = {}));
819
+ var chains = Object.values(Chain);
820
+ var chainNames = Object.keys(Chain);
821
+ var ChainToChainName = chains.reduce((acc, chain) => {
822
+ const chainName = chainNames.find((key) => Chain[key] === chain);
823
+ if (chainName)
824
+ acc[chain] = chainName;
825
+ return acc;
826
+ }, {});
827
+ var ChainToChainId = chains.reduce((acc, chain) => {
828
+ acc[chain] = ChainId[ChainToChainName[chain]];
829
+ return acc;
830
+ }, {});
831
+ var ChainToRPC = chains.reduce((acc, chain) => {
832
+ acc[chain] = RPCUrl[ChainToChainName[chain]];
833
+ return acc;
834
+ }, {});
835
+ var ChainToHexChainId = chains.reduce((acc, chain) => {
836
+ const chainString = `${ChainToChainName[chain]}Hex`;
837
+ acc[chain] = ChainId[chainString];
838
+ return acc;
839
+ }, {});
840
+ var ChainIdToChain = {
841
+ [ChainId.ArbitrumHex]: Chain.Arbitrum,
842
+ [ChainId.Arbitrum]: Chain.Arbitrum,
843
+ [ChainId.AvalancheHex]: Chain.Avalanche,
844
+ [ChainId.Avalanche]: Chain.Avalanche,
845
+ [ChainId.BinanceSmartChainHex]: Chain.BinanceSmartChain,
846
+ [ChainId.BinanceSmartChain]: Chain.BinanceSmartChain,
847
+ [ChainId.Binance]: Chain.Binance,
848
+ [ChainId.BitcoinCash]: Chain.BitcoinCash,
849
+ [ChainId.Bitcoin]: Chain.Bitcoin,
850
+ [ChainId.Chainflip]: Chain.Chainflip,
851
+ [ChainId.Cosmos]: Chain.Cosmos,
852
+ [ChainId.Dash]: Chain.Dash,
853
+ [ChainId.Dogecoin]: Chain.Dogecoin,
854
+ [ChainId.EthereumHex]: Chain.Ethereum,
855
+ [ChainId.Kujira]: Chain.Kujira,
856
+ [ChainId.Ethereum]: Chain.Ethereum,
857
+ [ChainId.Litecoin]: Chain.Litecoin,
858
+ [ChainId.MayaStagenet]: Chain.Maya,
859
+ [ChainId.Maya]: Chain.Maya,
860
+ [ChainId.OptimismHex]: Chain.Optimism,
861
+ [ChainId.Optimism]: Chain.Optimism,
862
+ [ChainId.Polkadot]: Chain.Polkadot,
863
+ [ChainId.PolygonHex]: Chain.Polygon,
864
+ [ChainId.Polygon]: Chain.Polygon,
865
+ [ChainId.THORChainStagenet]: Chain.THORChain,
866
+ [ChainId.THORChain]: Chain.THORChain
867
+ };
868
+ var ChainToExplorerUrl = {
869
+ [Chain.Arbitrum]: "https://arbiscan.io",
870
+ [Chain.Avalanche]: "https://snowtrace.io",
871
+ [Chain.BinanceSmartChain]: "https://bscscan.com",
872
+ [Chain.Binance]: "https://explorer.binance.org",
873
+ [Chain.BitcoinCash]: "https://www.blockchair.com/bitcoin-cash",
874
+ [Chain.Bitcoin]: "https://blockchair.com/bitcoin",
875
+ [Chain.Chainflip]: "https://explorer.polkascan.io/polkadot",
876
+ [Chain.Cosmos]: "https://www.mintscan.io/cosmos",
877
+ [Chain.Dash]: "https://blockchair.com/dash",
878
+ [Chain.Dogecoin]: "https://blockchair.com/dogecoin",
879
+ [Chain.Kujira]: "https://finder.kujira.network/kaiyo-1",
880
+ [Chain.Ethereum]: "https://etherscan.io",
881
+ [Chain.Litecoin]: "https://blockchair.com/litecoin",
882
+ [Chain.Maya]: "https://www.mayascan.org",
883
+ [Chain.Optimism]: "https://optimistic.etherscan.io",
884
+ [Chain.Polkadot]: "https://polkadot.subscan.io/",
885
+ [Chain.Polygon]: "https://polygonscan.com",
886
+ [Chain.THORChain]: "https://runescan.io"
887
+ };
888
+ // src/thorchain.ts
889
+ var MemoType;
890
+ (function(MemoType2) {
891
+ MemoType2["BOND"] = "BOND";
892
+ MemoType2["DEPOSIT"] = "+";
893
+ MemoType2["LEAVE"] = "LEAVE";
894
+ MemoType2["THORNAME_REGISTER"] = "~";
895
+ MemoType2["UNBOND"] = "UNBOND";
896
+ MemoType2["WITHDRAW"] = "-";
897
+ MemoType2["OPEN_LOAN"] = "$+";
898
+ MemoType2["CLOSE_LOAN"] = "$-";
899
+ })(MemoType || (MemoType = {}));
900
+ // src/transactions.ts
901
+ var FeeOption;
902
+ (function(FeeOption2) {
903
+ FeeOption2["Average"] = "average";
904
+ FeeOption2["Fast"] = "fast";
905
+ FeeOption2["Fastest"] = "fastest";
906
+ })(FeeOption || (FeeOption = {}));
907
+ // src/wallet.ts
908
+ var WalletOption;
909
+ (function(WalletOption2) {
910
+ WalletOption2["KEYSTORE"] = "KEYSTORE";
911
+ WalletOption2["KEEPKEY"] = "KEEPKEY";
912
+ WalletOption2["XDEFI"] = "XDEFI";
913
+ WalletOption2["METAMASK"] = "METAMASK";
914
+ WalletOption2["COINBASE_WEB"] = "COINBASE_WEB";
915
+ WalletOption2["TREZOR"] = "TREZOR";
916
+ WalletOption2["TRUSTWALLET_WEB"] = "TRUSTWALLET_WEB";
917
+ WalletOption2["LEDGER"] = "LEDGER";
918
+ WalletOption2["KEPLR"] = "KEPLR";
919
+ WalletOption2["OKX"] = "OKX";
920
+ WalletOption2["OKX_MOBILE"] = "OKX_MOBILE";
921
+ WalletOption2["BRAVE"] = "BRAVE";
922
+ WalletOption2["WALLETCONNECT"] = "WALLETCONNECT";
923
+ })(WalletOption || (WalletOption = {}));
924
+ var LedgerErrorCode;
925
+ (function(LedgerErrorCode2) {
926
+ LedgerErrorCode2[LedgerErrorCode2["NoError"] = 36864] = "NoError";
927
+ LedgerErrorCode2[LedgerErrorCode2["LockedDevice"] = 21781] = "LockedDevice";
928
+ LedgerErrorCode2[LedgerErrorCode2["TC_NotFound"] = 65535] = "TC_NotFound";
929
+ })(LedgerErrorCode || (LedgerErrorCode = {}));
930
+ export {
931
+ erc20ABI,
932
+ WalletOption,
933
+ UTXOChains,
934
+ UTXOChainList,
935
+ TCSupportedChains,
936
+ TCSupportedChainList,
937
+ TCEthereumVaultAbi,
938
+ TCBscDepositABI,
939
+ TCAvalancheDepositABI,
940
+ SubstrateChains,
941
+ SWAP_OUT,
942
+ SWAP_IN,
943
+ RPCUrl,
944
+ QuoteMode,
945
+ NetworkDerivationPath,
946
+ MemoType,
947
+ LedgerErrorCode,
948
+ FeeOption,
949
+ EVMChains,
950
+ EVMChainList,
951
+ DerivationPath,
952
+ CosmosChains,
953
+ CosmosChainList,
954
+ ContractAddress,
955
+ ChainToRPC,
956
+ ChainToHexChainId,
957
+ ChainToExplorerUrl,
958
+ ChainToChainId,
959
+ ChainIdToChain,
960
+ ChainId,
961
+ Chain,
962
+ BaseDecimal,
963
+ AGG_SWAP
964
+ };
965
+
966
+ //# debugId=6E1FA6FFC042AE8864756e2164756e21