@xswap-link/sdk 0.1.1 → 0.1.3
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/CHANGELOG.md +20 -0
- package/dist/index.css +98 -39
- package/dist/index.d.mts +62 -157
- package/dist/index.d.ts +62 -157
- package/dist/index.js +962 -1923
- package/dist/index.mjs +919 -1887
- package/package.json +1 -1
- package/src/components/Skeleton/index.tsx +8 -5
- package/src/components/TxConfigForm/FeesDetails.tsx +5 -5
- package/src/components/TxConfigForm/Form.tsx +20 -14
- package/src/components/TxConfigForm/History.tsx +50 -101
- package/src/components/TxConfigForm/HistoryCard.tsx +22 -42
- package/src/components/TxConfigForm/Summary.tsx +57 -28
- package/src/components/TxConfigForm/SwapPanel.tsx +70 -77
- package/src/components/TxConfigForm/TokenPicker.tsx +69 -66
- package/src/components/TxConfigForm/TopBar.tsx +19 -19
- package/src/components/TxConfigForm/UsdPrice.tsx +41 -0
- package/src/components/TxConfigForm/index.tsx +1 -2
- package/src/components/TxHistoryButton/index.tsx +150 -0
- package/src/components/icons/ArrowLeftIcon.tsx +16 -0
- package/src/components/icons/ChevronUpIcon.tsx +1 -6
- package/src/components/icons/CircularProgressIcon.tsx +13 -15
- package/src/components/icons/XSwapLogo.tsx +98 -0
- package/src/components/icons/index.ts +2 -0
- package/src/components/index.ts +1 -0
- package/src/constants/index.ts +3 -2
- package/src/contracts/abi/index.ts +0 -2
- package/src/contracts/addresses.ts +6 -0
- package/src/models/Addresses.ts +1 -0
- package/src/models/TransactionHistory.ts +44 -29
- package/src/services/integrations/transactions.ts +166 -1
- package/src/utils/index.ts +7 -0
- package/tailwind.config.js +9 -0
- package/tsconfig.json +3 -7
- package/src/contracts/abi/XSwapRouter.json +0 -1242
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @xswap-link/xswap-sdk
|
|
2
2
|
|
|
3
|
+
## 0.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f0ac6a8: make sure srcToken has decimals provided
|
|
8
|
+
- 0cb3862: disable "switch chain" button while disconnected
|
|
9
|
+
- a8ad8df: add destination token USD value
|
|
10
|
+
- 4260f16: apply styling for mobile
|
|
11
|
+
- e01a44b: add swap tx data validation
|
|
12
|
+
- 3ff62e4: add displaying transaction history
|
|
13
|
+
|
|
14
|
+
## 0.1.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- e7dae6e: remove local storage usage from history
|
|
19
|
+
- 9a72993: define fallback source chain
|
|
20
|
+
- 8cf2f51: fix: show empty history with message instead of circular progress
|
|
21
|
+
- bef4486: fix custom width in tailwind config and form component
|
|
22
|
+
|
|
3
23
|
## 0.1.1
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/index.css
CHANGED
|
@@ -337,12 +337,18 @@ video {
|
|
|
337
337
|
.bottom-0 {
|
|
338
338
|
bottom: 0px;
|
|
339
339
|
}
|
|
340
|
+
.bottom-5 {
|
|
341
|
+
bottom: 1.25rem;
|
|
342
|
+
}
|
|
340
343
|
.left-0 {
|
|
341
344
|
left: 0px;
|
|
342
345
|
}
|
|
343
346
|
.right-0 {
|
|
344
347
|
right: 0px;
|
|
345
348
|
}
|
|
349
|
+
.right-2 {
|
|
350
|
+
right: 0.5rem;
|
|
351
|
+
}
|
|
346
352
|
.right-4 {
|
|
347
353
|
right: 1rem;
|
|
348
354
|
}
|
|
@@ -370,6 +376,9 @@ video {
|
|
|
370
376
|
.z-20 {
|
|
371
377
|
z-index: 20;
|
|
372
378
|
}
|
|
379
|
+
.z-50 {
|
|
380
|
+
z-index: 50;
|
|
381
|
+
}
|
|
373
382
|
.z-\[1\] {
|
|
374
383
|
z-index: 1;
|
|
375
384
|
}
|
|
@@ -408,9 +417,6 @@ video {
|
|
|
408
417
|
margin-top: 1rem;
|
|
409
418
|
margin-bottom: 1rem;
|
|
410
419
|
}
|
|
411
|
-
.-ml-1 {
|
|
412
|
-
margin-left: -0.25rem;
|
|
413
|
-
}
|
|
414
420
|
.mb-1 {
|
|
415
421
|
margin-bottom: 0.25rem;
|
|
416
422
|
}
|
|
@@ -429,9 +435,6 @@ video {
|
|
|
429
435
|
.mr-1 {
|
|
430
436
|
margin-right: 0.25rem;
|
|
431
437
|
}
|
|
432
|
-
.mr-3 {
|
|
433
|
-
margin-right: 0.75rem;
|
|
434
|
-
}
|
|
435
438
|
.mt-4 {
|
|
436
439
|
margin-top: 1rem;
|
|
437
440
|
}
|
|
@@ -447,8 +450,8 @@ video {
|
|
|
447
450
|
.inline-flex {
|
|
448
451
|
display: inline-flex;
|
|
449
452
|
}
|
|
450
|
-
.h-
|
|
451
|
-
height:
|
|
453
|
+
.h-14 {
|
|
454
|
+
height: 3.5rem;
|
|
452
455
|
}
|
|
453
456
|
.h-3 {
|
|
454
457
|
height: 0.75rem;
|
|
@@ -474,18 +477,27 @@ video {
|
|
|
474
477
|
.h-9 {
|
|
475
478
|
height: 2.25rem;
|
|
476
479
|
}
|
|
480
|
+
.h-96 {
|
|
481
|
+
height: 24rem;
|
|
482
|
+
}
|
|
477
483
|
.h-\[2px\] {
|
|
478
484
|
height: 2px;
|
|
479
485
|
}
|
|
486
|
+
.h-\[30vh\] {
|
|
487
|
+
height: 30vh;
|
|
488
|
+
}
|
|
489
|
+
.h-\[36px\] {
|
|
490
|
+
height: 36px;
|
|
491
|
+
}
|
|
480
492
|
.h-\[41px\] {
|
|
481
493
|
height: 41px;
|
|
482
494
|
}
|
|
483
|
-
.h-\[50vh\] {
|
|
484
|
-
height: 50vh;
|
|
485
|
-
}
|
|
486
495
|
.h-\[70\%\] {
|
|
487
496
|
height: 70%;
|
|
488
497
|
}
|
|
498
|
+
.h-\[9px\] {
|
|
499
|
+
height: 9px;
|
|
500
|
+
}
|
|
489
501
|
.h-full {
|
|
490
502
|
height: 100%;
|
|
491
503
|
}
|
|
@@ -543,33 +555,33 @@ video {
|
|
|
543
555
|
.w-\[100\%\+48px\] {
|
|
544
556
|
width: 100%+48px;
|
|
545
557
|
}
|
|
546
|
-
.w-\[
|
|
547
|
-
width:
|
|
558
|
+
.w-\[100px\] {
|
|
559
|
+
width: 100px;
|
|
560
|
+
}
|
|
561
|
+
.w-\[15px\] {
|
|
562
|
+
width: 15px;
|
|
548
563
|
}
|
|
549
564
|
.w-\[310px\] {
|
|
550
565
|
width: 310px;
|
|
551
566
|
}
|
|
552
|
-
.w-\[360px\] {
|
|
553
|
-
width: 360px;
|
|
554
|
-
}
|
|
555
567
|
.w-\[452px\] {
|
|
556
568
|
width: 452px;
|
|
557
569
|
}
|
|
558
570
|
.w-full {
|
|
559
571
|
width: 100%;
|
|
560
572
|
}
|
|
573
|
+
.w-x_mobile {
|
|
574
|
+
width: 320px;
|
|
575
|
+
}
|
|
576
|
+
.min-w-60 {
|
|
577
|
+
min-width: 15rem;
|
|
578
|
+
}
|
|
561
579
|
.min-w-\[26px\] {
|
|
562
580
|
min-width: 26px;
|
|
563
581
|
}
|
|
564
582
|
.max-w-full {
|
|
565
583
|
max-width: 100%;
|
|
566
584
|
}
|
|
567
|
-
.flex-1 {
|
|
568
|
-
flex: 1 1 0%;
|
|
569
|
-
}
|
|
570
|
-
.flex-grow {
|
|
571
|
-
flex-grow: 1;
|
|
572
|
-
}
|
|
573
585
|
.grow {
|
|
574
586
|
flex-grow: 1;
|
|
575
587
|
}
|
|
@@ -602,8 +614,8 @@ video {
|
|
|
602
614
|
transform: rotate(360deg);
|
|
603
615
|
}
|
|
604
616
|
}
|
|
605
|
-
.animate-spin {
|
|
606
|
-
animation: spin
|
|
617
|
+
.animate-spin-slow {
|
|
618
|
+
animation: spin 3s linear infinite;
|
|
607
619
|
}
|
|
608
620
|
.cursor-pointer {
|
|
609
621
|
cursor: pointer;
|
|
@@ -623,9 +635,6 @@ video {
|
|
|
623
635
|
.items-center {
|
|
624
636
|
align-items: center;
|
|
625
637
|
}
|
|
626
|
-
.justify-end {
|
|
627
|
-
justify-content: flex-end;
|
|
628
|
-
}
|
|
629
638
|
.justify-center {
|
|
630
639
|
justify-content: center;
|
|
631
640
|
}
|
|
@@ -647,9 +656,6 @@ video {
|
|
|
647
656
|
.gap-4 {
|
|
648
657
|
gap: 1rem;
|
|
649
658
|
}
|
|
650
|
-
.gap-8 {
|
|
651
|
-
gap: 2rem;
|
|
652
|
-
}
|
|
653
659
|
.overflow-auto {
|
|
654
660
|
overflow: auto;
|
|
655
661
|
}
|
|
@@ -723,9 +729,15 @@ video {
|
|
|
723
729
|
--tw-border-opacity: 1;
|
|
724
730
|
border-color: rgb(255 183 77 / var(--tw-border-opacity));
|
|
725
731
|
}
|
|
732
|
+
.border-x_blue_dark {
|
|
733
|
+
border-color: rgba(43, 74, 157, 1);
|
|
734
|
+
}
|
|
726
735
|
.border-x_error_border {
|
|
727
736
|
border-color: rgba(255, 111, 0, 1);
|
|
728
737
|
}
|
|
738
|
+
.border-x_green_dark {
|
|
739
|
+
border-color: rgba(46, 125, 50, 1);
|
|
740
|
+
}
|
|
729
741
|
.bg-\[\#272e40\] {
|
|
730
742
|
--tw-bg-opacity: 1;
|
|
731
743
|
background-color: rgb(39 46 64 / var(--tw-bg-opacity));
|
|
@@ -788,11 +800,21 @@ video {
|
|
|
788
800
|
--tw-gradient-to: rgb(54 129 198 / 0) var(--tw-gradient-to-position);
|
|
789
801
|
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
|
|
790
802
|
}
|
|
803
|
+
.from-\[rgba\(54\,129\,198\,0\.1\)\] {
|
|
804
|
+
--tw-gradient-from: rgba(54,129,198,0.1) var(--tw-gradient-from-position);
|
|
805
|
+
--tw-gradient-to: rgba(54, 129, 198, 0) var(--tw-gradient-to-position);
|
|
806
|
+
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
|
|
807
|
+
}
|
|
791
808
|
.from-\[rgba\(54\,129\,198\,1\)\] {
|
|
792
809
|
--tw-gradient-from: rgba(54,129,198,1) var(--tw-gradient-from-position);
|
|
793
810
|
--tw-gradient-to: rgba(54, 129, 198, 0) var(--tw-gradient-to-position);
|
|
794
811
|
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
|
|
795
812
|
}
|
|
813
|
+
.from-\[rgba\(76\,175\,80\,0\.1\)\] {
|
|
814
|
+
--tw-gradient-from: rgba(76,175,80,0.1) var(--tw-gradient-from-position);
|
|
815
|
+
--tw-gradient-to: rgba(76, 175, 80, 0) var(--tw-gradient-to-position);
|
|
816
|
+
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
|
|
817
|
+
}
|
|
796
818
|
.from-x_blue_light {
|
|
797
819
|
--tw-gradient-from: rgba(54,129,198,1) var(--tw-gradient-from-position);
|
|
798
820
|
--tw-gradient-to: rgba(54, 129, 198, 0) var(--tw-gradient-to-position);
|
|
@@ -801,9 +823,15 @@ video {
|
|
|
801
823
|
.to-\[\#2b4a9d\] {
|
|
802
824
|
--tw-gradient-to: #2b4a9d var(--tw-gradient-to-position);
|
|
803
825
|
}
|
|
826
|
+
.to-\[rgba\(43\,74\,157\,0\.1\)\] {
|
|
827
|
+
--tw-gradient-to: rgba(43,74,157,0.1) var(--tw-gradient-to-position);
|
|
828
|
+
}
|
|
804
829
|
.to-\[rgba\(43\,74\,157\,1\)\] {
|
|
805
830
|
--tw-gradient-to: rgba(43,74,157,1) var(--tw-gradient-to-position);
|
|
806
831
|
}
|
|
832
|
+
.to-\[rgba\(46\,125\,50\,0\.1\)\] {
|
|
833
|
+
--tw-gradient-to: rgba(46,125,50,0.1) var(--tw-gradient-to-position);
|
|
834
|
+
}
|
|
807
835
|
.to-x_blue_dark {
|
|
808
836
|
--tw-gradient-to: rgba(43,74,157,1) var(--tw-gradient-to-position);
|
|
809
837
|
}
|
|
@@ -878,8 +906,8 @@ video {
|
|
|
878
906
|
padding-top: 1rem;
|
|
879
907
|
padding-bottom: 1rem;
|
|
880
908
|
}
|
|
881
|
-
.pl-
|
|
882
|
-
padding-left:
|
|
909
|
+
.pl-9 {
|
|
910
|
+
padding-left: 2.25rem;
|
|
883
911
|
}
|
|
884
912
|
.pr-8 {
|
|
885
913
|
padding-right: 2rem;
|
|
@@ -1001,15 +1029,9 @@ video {
|
|
|
1001
1029
|
.no-underline {
|
|
1002
1030
|
text-decoration-line: none;
|
|
1003
1031
|
}
|
|
1004
|
-
.opacity-25 {
|
|
1005
|
-
opacity: 0.25;
|
|
1006
|
-
}
|
|
1007
1032
|
.opacity-60 {
|
|
1008
1033
|
opacity: 0.6;
|
|
1009
1034
|
}
|
|
1010
|
-
.opacity-75 {
|
|
1011
|
-
opacity: 0.75;
|
|
1012
|
-
}
|
|
1013
1035
|
.outline-none {
|
|
1014
1036
|
outline: 2px solid transparent;
|
|
1015
1037
|
outline-offset: 2px;
|
|
@@ -1102,7 +1124,44 @@ video {
|
|
|
1102
1124
|
outline-offset: 2px;
|
|
1103
1125
|
}
|
|
1104
1126
|
@media (min-width: 640px) {
|
|
1105
|
-
.sm\:
|
|
1127
|
+
.sm\:h-6 {
|
|
1128
|
+
height: 1.5rem;
|
|
1129
|
+
}
|
|
1130
|
+
.sm\:w-6 {
|
|
1131
|
+
width: 1.5rem;
|
|
1132
|
+
}
|
|
1133
|
+
.sm\:w-\[190px\] {
|
|
1134
|
+
width: 190px;
|
|
1135
|
+
}
|
|
1136
|
+
.sm\:w-\[520px\] {
|
|
1137
|
+
width: 520px;
|
|
1138
|
+
}
|
|
1139
|
+
.sm\:w-x_desktop {
|
|
1106
1140
|
width: 600px;
|
|
1107
1141
|
}
|
|
1142
|
+
.sm\:flex-row {
|
|
1143
|
+
flex-direction: row;
|
|
1144
|
+
}
|
|
1145
|
+
.sm\:gap-5 {
|
|
1146
|
+
gap: 1.25rem;
|
|
1147
|
+
}
|
|
1148
|
+
.sm\:pl-4 {
|
|
1149
|
+
padding-left: 1rem;
|
|
1150
|
+
}
|
|
1151
|
+
.sm\:text-3xl {
|
|
1152
|
+
font-size: 1.875rem;
|
|
1153
|
+
line-height: 2.25rem;
|
|
1154
|
+
}
|
|
1155
|
+
.sm\:text-base {
|
|
1156
|
+
font-size: 1rem;
|
|
1157
|
+
line-height: 1.5rem;
|
|
1158
|
+
}
|
|
1159
|
+
.sm\:text-sm {
|
|
1160
|
+
font-size: 0.875rem;
|
|
1161
|
+
line-height: 1.25rem;
|
|
1162
|
+
}
|
|
1163
|
+
.sm\:text-xl {
|
|
1164
|
+
font-size: 1.25rem;
|
|
1165
|
+
line-height: 1.75rem;
|
|
1166
|
+
}
|
|
1108
1167
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BigNumber, ethers, BigNumberish } from 'ethers';
|
|
2
2
|
import { TransactionRequest } from '@ethersproject/providers';
|
|
3
|
+
import { FC } from 'react';
|
|
3
4
|
|
|
4
5
|
declare const Alert: ({ desc }: {
|
|
5
6
|
desc: string;
|
|
@@ -13,7 +14,8 @@ type Contracts = {
|
|
|
13
14
|
};
|
|
14
15
|
declare enum ContractName {
|
|
15
16
|
BatchQuery = "BatchQuery",
|
|
16
|
-
FeeCollector = "FeeCollector"
|
|
17
|
+
FeeCollector = "FeeCollector",
|
|
18
|
+
XSwapRouter = "XSwapRouter"
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
type XSwapConfig = {
|
|
@@ -200,32 +202,33 @@ type ReferralInfo = {
|
|
|
200
202
|
|
|
201
203
|
type TransferType = "CROSS_CHAIN" | "SINGLE_CHAIN";
|
|
202
204
|
type TransactionHistory = {
|
|
203
|
-
history:
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
205
|
+
history: HistoryTransaction[];
|
|
206
|
+
};
|
|
207
|
+
type HistoryTransaction = {
|
|
208
|
+
transferId: string;
|
|
209
|
+
transferType: TransferType;
|
|
210
|
+
walletAddress: string;
|
|
211
|
+
failed: boolean;
|
|
212
|
+
source: {
|
|
213
|
+
blockchainId: string;
|
|
214
|
+
transactionHash: string;
|
|
215
|
+
blockTime: Date;
|
|
216
|
+
tokenAmount: string;
|
|
217
|
+
tokenAddress: string;
|
|
218
|
+
transferredTokenAddress: string;
|
|
219
|
+
transferredTokenAmount: string;
|
|
220
|
+
valueForInstantCcipRecieve: string;
|
|
221
|
+
tokenOutAddress: string;
|
|
222
|
+
estimatedAmountOut: string;
|
|
223
|
+
targetBlockchainId: string;
|
|
224
|
+
} | null;
|
|
225
|
+
target: {
|
|
226
|
+
blockchainId: string;
|
|
227
|
+
transactionHash: string;
|
|
228
|
+
blockTime: Date;
|
|
229
|
+
tokenAmount: string;
|
|
230
|
+
tokenAddress: string;
|
|
231
|
+
} | null;
|
|
229
232
|
};
|
|
230
233
|
type TransactionStatus = "IN_PROGRESS" | "DONE" | "REVERTED";
|
|
231
234
|
type Transaction = {
|
|
@@ -240,6 +243,18 @@ type Transaction = {
|
|
|
240
243
|
estimatedDeliveryTimestamp: number;
|
|
241
244
|
status: TransactionStatus;
|
|
242
245
|
};
|
|
246
|
+
type MonitoredTransaction = {
|
|
247
|
+
fromChain: string | undefined;
|
|
248
|
+
fromChainImage: string | undefined;
|
|
249
|
+
fromToken: string | undefined;
|
|
250
|
+
fromTokenImage: string | undefined;
|
|
251
|
+
fromAmount: string | undefined;
|
|
252
|
+
toChain: string | undefined;
|
|
253
|
+
toChainImage: string | undefined;
|
|
254
|
+
isDone: boolean;
|
|
255
|
+
txHash: string;
|
|
256
|
+
explorer: string | undefined;
|
|
257
|
+
};
|
|
243
258
|
|
|
244
259
|
type TxConfigFormProps = {
|
|
245
260
|
dstChainId: string;
|
|
@@ -250,11 +265,21 @@ type TxConfigFormProps = {
|
|
|
250
265
|
};
|
|
251
266
|
declare const openTxConfigForm: ({ dstChainId, dstTokenAddr, customContractCalls, desc, supportedChains, }: TxConfigFormProps) => Promise<Route>;
|
|
252
267
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
268
|
+
interface Props$1 {
|
|
269
|
+
transaction: MonitoredTransaction;
|
|
270
|
+
}
|
|
271
|
+
declare const TxHistoryButton: FC<Props$1>;
|
|
272
|
+
declare const addTransactionToRenderedTransactions: (transaction: MonitoredTransaction) => void;
|
|
273
|
+
declare const removeTransactionFromRenderedTransactions: (txHash: string) => void;
|
|
274
|
+
declare const updateTransactionDoneInRenderedTransactions: (txHash: string) => void;
|
|
275
|
+
declare const renderTxHistoryButtons: () => void;
|
|
276
|
+
|
|
277
|
+
type Props = {
|
|
278
|
+
width: string;
|
|
279
|
+
height: string;
|
|
280
|
+
other?: string;
|
|
257
281
|
};
|
|
282
|
+
declare const Skeleton: ({ width, height }: Props) => JSX.Element;
|
|
258
283
|
|
|
259
284
|
declare const DEFAULT_ECOSYSTEM = Ecosystem.EVM;
|
|
260
285
|
declare const NUMBER_INPUT_REGEX: RegExp;
|
|
@@ -262,9 +287,10 @@ declare const SLIPPAGE_PRESETS: number[];
|
|
|
262
287
|
declare const DELIVERY_TIME: number;
|
|
263
288
|
declare const EXPRESS_DELIVERY_TIME: number;
|
|
264
289
|
declare const BALANCES_CHUNK_SIZE = 500;
|
|
265
|
-
declare const BALANCE_DISPLAY_MIN_LIMIT = 0.0001;
|
|
266
290
|
declare const ROUTE_TIMEOUT_MS = 5000;
|
|
267
|
-
declare const MINIMUM_DISPLAYED_TOKEN_AMOUNT = 0.
|
|
291
|
+
declare const MINIMUM_DISPLAYED_TOKEN_AMOUNT = 0.0001;
|
|
292
|
+
declare const DEFAULT_SOURCE_CHAIN_ID = "1";
|
|
293
|
+
declare const CCIP_EXPLORER = "https://ccip.chain.link/";
|
|
268
294
|
|
|
269
295
|
declare const BatchQueryAbi: ({
|
|
270
296
|
inputs: {
|
|
@@ -329,129 +355,6 @@ declare const ERC20Abi: ({
|
|
|
329
355
|
payable?: undefined;
|
|
330
356
|
stateMutability?: undefined;
|
|
331
357
|
})[];
|
|
332
|
-
declare const XSwapRouterAbi: ({
|
|
333
|
-
inputs: never[];
|
|
334
|
-
stateMutability: string;
|
|
335
|
-
type: string;
|
|
336
|
-
name?: undefined;
|
|
337
|
-
anonymous?: undefined;
|
|
338
|
-
outputs?: undefined;
|
|
339
|
-
} | {
|
|
340
|
-
inputs: {
|
|
341
|
-
internalType: string;
|
|
342
|
-
name: string;
|
|
343
|
-
type: string;
|
|
344
|
-
}[];
|
|
345
|
-
name: string;
|
|
346
|
-
type: string;
|
|
347
|
-
stateMutability?: undefined;
|
|
348
|
-
anonymous?: undefined;
|
|
349
|
-
outputs?: undefined;
|
|
350
|
-
} | {
|
|
351
|
-
anonymous: boolean;
|
|
352
|
-
inputs: {
|
|
353
|
-
indexed: boolean;
|
|
354
|
-
internalType: string;
|
|
355
|
-
name: string;
|
|
356
|
-
type: string;
|
|
357
|
-
}[];
|
|
358
|
-
name: string;
|
|
359
|
-
type: string;
|
|
360
|
-
stateMutability?: undefined;
|
|
361
|
-
outputs?: undefined;
|
|
362
|
-
} | {
|
|
363
|
-
inputs: ({
|
|
364
|
-
internalType: string;
|
|
365
|
-
name: string;
|
|
366
|
-
type: string;
|
|
367
|
-
components?: undefined;
|
|
368
|
-
} | {
|
|
369
|
-
components: ({
|
|
370
|
-
internalType: string;
|
|
371
|
-
name: string;
|
|
372
|
-
type: string;
|
|
373
|
-
components?: undefined;
|
|
374
|
-
} | {
|
|
375
|
-
components: {
|
|
376
|
-
internalType: string;
|
|
377
|
-
name: string;
|
|
378
|
-
type: string;
|
|
379
|
-
}[];
|
|
380
|
-
internalType: string;
|
|
381
|
-
name: string;
|
|
382
|
-
type: string;
|
|
383
|
-
})[];
|
|
384
|
-
internalType: string;
|
|
385
|
-
name: string;
|
|
386
|
-
type: string;
|
|
387
|
-
})[];
|
|
388
|
-
name: string;
|
|
389
|
-
outputs: {
|
|
390
|
-
components: ({
|
|
391
|
-
internalType: string;
|
|
392
|
-
name: string;
|
|
393
|
-
type: string;
|
|
394
|
-
components?: undefined;
|
|
395
|
-
} | {
|
|
396
|
-
components: {
|
|
397
|
-
internalType: string;
|
|
398
|
-
name: string;
|
|
399
|
-
type: string;
|
|
400
|
-
}[];
|
|
401
|
-
internalType: string;
|
|
402
|
-
name: string;
|
|
403
|
-
type: string;
|
|
404
|
-
})[];
|
|
405
|
-
internalType: string;
|
|
406
|
-
name: string;
|
|
407
|
-
type: string;
|
|
408
|
-
}[];
|
|
409
|
-
stateMutability: string;
|
|
410
|
-
type: string;
|
|
411
|
-
anonymous?: undefined;
|
|
412
|
-
} | {
|
|
413
|
-
inputs: ({
|
|
414
|
-
internalType: string;
|
|
415
|
-
name: string;
|
|
416
|
-
type: string;
|
|
417
|
-
components?: undefined;
|
|
418
|
-
} | {
|
|
419
|
-
components: ({
|
|
420
|
-
internalType: string;
|
|
421
|
-
name: string;
|
|
422
|
-
type: string;
|
|
423
|
-
components?: undefined;
|
|
424
|
-
} | {
|
|
425
|
-
components: {
|
|
426
|
-
internalType: string;
|
|
427
|
-
name: string;
|
|
428
|
-
type: string;
|
|
429
|
-
}[];
|
|
430
|
-
internalType: string;
|
|
431
|
-
name: string;
|
|
432
|
-
type: string;
|
|
433
|
-
})[];
|
|
434
|
-
internalType: string;
|
|
435
|
-
name: string;
|
|
436
|
-
type: string;
|
|
437
|
-
})[];
|
|
438
|
-
name: string;
|
|
439
|
-
outputs: {
|
|
440
|
-
internalType: string;
|
|
441
|
-
name: string;
|
|
442
|
-
type: string;
|
|
443
|
-
}[];
|
|
444
|
-
stateMutability: string;
|
|
445
|
-
type: string;
|
|
446
|
-
anonymous?: undefined;
|
|
447
|
-
} | {
|
|
448
|
-
stateMutability: string;
|
|
449
|
-
type: string;
|
|
450
|
-
inputs?: undefined;
|
|
451
|
-
name?: undefined;
|
|
452
|
-
anonymous?: undefined;
|
|
453
|
-
outputs?: undefined;
|
|
454
|
-
})[];
|
|
455
358
|
|
|
456
359
|
declare const ADDRESSES: Addresses;
|
|
457
360
|
|
|
@@ -487,6 +390,7 @@ declare function getPrices(payload: GetPricesPayload): Promise<TokenPrices>;
|
|
|
487
390
|
declare const generateStakingCalls: ({ token, staking, stakingAbi, stakingFunName, stakingFunParams, }: GenerateStakingCallsParams) => ContractCall[];
|
|
488
391
|
|
|
489
392
|
declare const getSwapTx: ({ dstChain, dstToken, customContractCalls, desc, }: GetSwapTxPayload) => Promise<Transactions>;
|
|
393
|
+
declare const monitorTransactionStatus: (srcChainId: number, txHash: string) => Promise<void>;
|
|
490
394
|
|
|
491
395
|
declare const IERC20: ethers.utils.Interface;
|
|
492
396
|
declare const getBalanceOf: (wallet: string, token: string, rpcUrl: string) => Promise<string>;
|
|
@@ -518,5 +422,6 @@ declare const deepMergeObjects: (obj1: Record<string, any>, obj2: Record<string,
|
|
|
518
422
|
[x: string]: any;
|
|
519
423
|
};
|
|
520
424
|
declare const chunkArray: (array: any[], chunkSize: number) => any[][];
|
|
425
|
+
declare const getDate: (blockTimestamp: number) => string;
|
|
521
426
|
|
|
522
|
-
export { ADDRESSES, type AddReferralPayload, type Addresses, Alert, BALANCES_CHUNK_SIZE,
|
|
427
|
+
export { ADDRESSES, type AddReferralPayload, type Addresses, Alert, BALANCES_CHUNK_SIZE, BatchQueryAbi, type BridgeToken, CCIP_EXPLORER, type Chain, type CoinTypeAddress, type CollectFees, type ContractCall, ContractName, type Contracts, DEFAULT_ECOSYSTEM, DEFAULT_SOURCE_CHAIN_ID, DELIVERY_TIME, ERC20Abi, EXPRESS_DELIVERY_TIME, Ecosystem, Environment, type GenerateStakingCallsParams, type GetPricesPayload, type GetRoutePayload, type GetSwapTxPayload, type HistoryTransaction, IERC20, MINIMUM_DISPLAYED_TOKEN_AMOUNT, type MonitoredTransaction, NUMBER_INPUT_REGEX, type Prices, type Protocol, ROUTE_TIMEOUT_MS, type Referral, type ReferralInfo, type Route, SLIPPAGE_PRESETS, Skeleton, type Token, type TokenBalances, type TokenPrices, type Transaction, type TransactionHistory, type TransactionStatus, type Transactions, type TxConfigFormData, type TxConfigFormProps, TxHistoryButton, Web3Environment, XSwapCallType, type XSwapConfig, type XSwapFee, type XSwapFees, addTransactionToRenderedTransactions, chunkArray, deepMergeObjects, findPlaceholderIndex, generateApproveTxData, generateRandomBigNumber, generateStakingCalls, generateUniqueRandomBigNumber, getBalanceOf, getBalances, getBridgeTokens, getChainData, getChains, getDate, getHistory, getPrices, getRoute, getSwapTx, getTokens, monitorTransactionStatus, openTxConfigForm, removeTransactionFromRenderedTransactions, renderTxHistoryButtons, replaceNull, safeBigNumberFrom, shortAddress, updateTransactionDoneInRenderedTransactions, weiToHumanReadable };
|