@paraspell/sdk-core 9.2.1 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3044 -2846
- package/dist/index.d.ts +233 -154
- package/dist/index.mjs +3044 -2844
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -178,16 +178,17 @@ type TSendBaseOptions = {
|
|
|
178
178
|
*/
|
|
179
179
|
method?: string;
|
|
180
180
|
};
|
|
181
|
-
|
|
181
|
+
/**
|
|
182
|
+
* Options for transferring from a parachain to another parachain or relay chain
|
|
183
|
+
*/
|
|
184
|
+
type TSendOptions<TApi, TRes> = WithApi<TSendBaseOptions, TApi, TRes>;
|
|
185
|
+
type WithRequiredSenderAddress<TBase> = Omit<TBase, 'senderAddress'> & {
|
|
182
186
|
/**
|
|
183
187
|
* The sender address. A SS58 or H160 format.
|
|
184
188
|
*/
|
|
185
189
|
senderAddress: string;
|
|
186
190
|
};
|
|
187
|
-
|
|
188
|
-
* Options for transferring from a parachain to another parachain or relay chain
|
|
189
|
-
*/
|
|
190
|
-
type TSendOptions<TApi, TRes> = WithApi<TSendBaseOptions, TApi, TRes>;
|
|
191
|
+
type TSendBaseOptionsWithSenderAddress = WithRequiredSenderAddress<TSendBaseOptions>;
|
|
191
192
|
type TSendInternalOptions<TApi, TRes> = Omit<TSendBaseOptions, 'from' | 'currency' | 'feeAsset'> & {
|
|
192
193
|
api: IPolkadotApi<TApi, TRes>;
|
|
193
194
|
asset: WithAmount<TAsset>;
|
|
@@ -394,11 +395,11 @@ type TGetMaxForeignTransferableAmountOptionsBase = {
|
|
|
394
395
|
currency: TCurrencyCore;
|
|
395
396
|
};
|
|
396
397
|
type TGetMaxForeignTransferableAmountOptions<TApi, TRes> = WithApi<TGetMaxForeignTransferableAmountOptionsBase, TApi, TRes>;
|
|
397
|
-
type TGetTransferableAmountOptionsBase = {
|
|
398
|
+
type TGetTransferableAmountOptionsBase<TRes> = {
|
|
398
399
|
/**
|
|
399
|
-
* The address of the account.
|
|
400
|
+
* The sender address of the account.
|
|
400
401
|
*/
|
|
401
|
-
|
|
402
|
+
senderAddress: string;
|
|
402
403
|
/**
|
|
403
404
|
* The node on which to query the balance.
|
|
404
405
|
*/
|
|
@@ -407,14 +408,39 @@ type TGetTransferableAmountOptionsBase = {
|
|
|
407
408
|
* The currency to query.
|
|
408
409
|
*/
|
|
409
410
|
currency: TCurrencyCore;
|
|
411
|
+
/**
|
|
412
|
+
* The transaction to calculate the fee for
|
|
413
|
+
*/
|
|
414
|
+
tx: TRes;
|
|
410
415
|
};
|
|
411
|
-
type TGetTransferableAmountOptions<TApi, TRes> = WithApi<TGetTransferableAmountOptionsBase
|
|
412
|
-
type TVerifyEdOnDestinationOptionsBase = {
|
|
413
|
-
|
|
416
|
+
type TGetTransferableAmountOptions<TApi, TRes> = WithApi<TGetTransferableAmountOptionsBase<TRes>, TApi, TRes>;
|
|
417
|
+
type TVerifyEdOnDestinationOptionsBase<TRes> = {
|
|
418
|
+
/**
|
|
419
|
+
* The origin node.
|
|
420
|
+
*/
|
|
421
|
+
origin: TNodeDotKsmWithRelayChains;
|
|
422
|
+
/**
|
|
423
|
+
* The destination node.
|
|
424
|
+
*/
|
|
425
|
+
destination: TNodeDotKsmWithRelayChains;
|
|
426
|
+
/**
|
|
427
|
+
* The address of the account.
|
|
428
|
+
*/
|
|
414
429
|
address: string;
|
|
430
|
+
/**
|
|
431
|
+
* The account of the sender.
|
|
432
|
+
*/
|
|
433
|
+
senderAddress: string;
|
|
434
|
+
/**
|
|
435
|
+
* The currency to query.
|
|
436
|
+
*/
|
|
415
437
|
currency: WithAmount<TCurrencyCore>;
|
|
438
|
+
/**
|
|
439
|
+
* The transaction to calculate the fee for
|
|
440
|
+
*/
|
|
441
|
+
tx: TRes;
|
|
416
442
|
};
|
|
417
|
-
type TVerifyEdOnDestinationOptions<TApi, TRes> = WithApi<TVerifyEdOnDestinationOptionsBase
|
|
443
|
+
type TVerifyEdOnDestinationOptions<TApi, TRes> = WithApi<TVerifyEdOnDestinationOptionsBase<TRes>, TApi, TRes>;
|
|
418
444
|
|
|
419
445
|
type TEvmNodeFrom = Extract<TNode, 'Ethereum' | 'Moonbeam' | 'Moonriver' | 'Darwinia'>;
|
|
420
446
|
/**
|
|
@@ -613,46 +639,172 @@ type TModuleError = {
|
|
|
613
639
|
|
|
614
640
|
type TEdJsonMap = Record<TNodeDotKsmWithRelayChains, string | null>;
|
|
615
641
|
|
|
642
|
+
/**
|
|
643
|
+
* Error thrown when the Ethereum bridge is halted.
|
|
644
|
+
*/
|
|
645
|
+
declare class BridgeHaltedError extends Error {
|
|
646
|
+
/**
|
|
647
|
+
* Constructs a new BridgeHaltedError.
|
|
648
|
+
*
|
|
649
|
+
* @param message - Optional custom error message.
|
|
650
|
+
*/
|
|
651
|
+
constructor();
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* Error thrown when the Dry Run fails.
|
|
656
|
+
*/
|
|
657
|
+
declare class DryRunFailedError extends Error {
|
|
658
|
+
/**
|
|
659
|
+
* Constructs a new DryRunFailedError.
|
|
660
|
+
*
|
|
661
|
+
* @param reason - The reason why the dry run failed.
|
|
662
|
+
* @param dryRunType - Optional. Specifies if the error is related to the 'origin' or 'destination' dry run.
|
|
663
|
+
*/
|
|
664
|
+
constructor(reason: string, dryRunType?: 'origin' | 'destination');
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* Error thrown when nodes from different relay chains are incompatible.
|
|
669
|
+
*/
|
|
670
|
+
declare class IncompatibleNodesError extends Error {
|
|
671
|
+
/**
|
|
672
|
+
* Constructs a new IncompatibleNodesError.
|
|
673
|
+
*
|
|
674
|
+
* @param message - Optional custom error message.
|
|
675
|
+
*/
|
|
676
|
+
constructor(message?: string);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* Error thrown when an invalid address is provided.
|
|
681
|
+
*/
|
|
682
|
+
declare class InvalidAddressError extends Error {
|
|
683
|
+
/**
|
|
684
|
+
* Constructs a new InvalidAddressError.
|
|
685
|
+
*
|
|
686
|
+
* @param message - The error message.
|
|
687
|
+
*/
|
|
688
|
+
constructor(message: string);
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* Error thrown when the Dry Run fails.
|
|
693
|
+
*/
|
|
694
|
+
declare class InvalidParameterError extends Error {
|
|
695
|
+
/**
|
|
696
|
+
* Constructs a new InvalidParameterError.
|
|
697
|
+
*
|
|
698
|
+
* @param message - Required error message.
|
|
699
|
+
*/
|
|
700
|
+
constructor(message: string);
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* Used to inform user, that Parachain they wish to use is not supported yet
|
|
705
|
+
*/
|
|
706
|
+
declare class NodeNotSupportedError extends Error {
|
|
707
|
+
/**
|
|
708
|
+
* Constructs a new NodeNotSupportedError.
|
|
709
|
+
*
|
|
710
|
+
* @param message - Optional custom error message.
|
|
711
|
+
*/
|
|
712
|
+
constructor(message?: string);
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* Used to inform user, that Parachain they wish to use has not yet implemented full XCM Support
|
|
717
|
+
*/
|
|
718
|
+
declare class NoXCMSupportImplementedError extends Error {
|
|
719
|
+
/**
|
|
720
|
+
* Constructs a new NoXCMSupportImplementedError.
|
|
721
|
+
*
|
|
722
|
+
* @param node - The node for which XCM support is not implemented.
|
|
723
|
+
*/
|
|
724
|
+
constructor(node: TNode);
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* Used to inform user, that Parachain they wish to use does not support scenario they wish to use yet
|
|
729
|
+
*/
|
|
730
|
+
declare class ScenarioNotSupportedError extends Error {
|
|
731
|
+
/**
|
|
732
|
+
* Constructs a new ScenarioNotSupportedError.
|
|
733
|
+
*
|
|
734
|
+
* @param node - The node where the scenario is not supported.
|
|
735
|
+
* @param scenario - The scenario that is not supported.
|
|
736
|
+
* @param message - Optional custom error message.
|
|
737
|
+
*/
|
|
738
|
+
constructor(node: TNode, scenario: TScenario, message?: string);
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
declare class TransferToAhNotSupported extends Error {
|
|
742
|
+
constructor(message?: string);
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* UnableToComputeError is thrown when a computation cannot be performed.
|
|
747
|
+
*/
|
|
748
|
+
declare class UnableToComputeError extends Error {
|
|
749
|
+
/**
|
|
750
|
+
* Constructs a new UnableToComputeError.
|
|
751
|
+
*
|
|
752
|
+
* @param message - Required error message.
|
|
753
|
+
*/
|
|
754
|
+
constructor(message: string);
|
|
755
|
+
}
|
|
756
|
+
|
|
616
757
|
type TTransferInfo = {
|
|
617
758
|
chain: {
|
|
618
759
|
origin: TNodeWithRelayChains;
|
|
619
760
|
destination: TNodeWithRelayChains;
|
|
620
761
|
ecosystem: string;
|
|
621
762
|
};
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
763
|
+
origin: {
|
|
764
|
+
selectedCurrency: {
|
|
765
|
+
sufficient: boolean;
|
|
766
|
+
balance: bigint;
|
|
767
|
+
balanceAfter: bigint;
|
|
768
|
+
currencySymbol: string;
|
|
769
|
+
existentialDeposit: bigint;
|
|
770
|
+
};
|
|
629
771
|
xcmFee: {
|
|
630
|
-
|
|
631
|
-
|
|
772
|
+
sufficient: boolean;
|
|
773
|
+
fee: bigint;
|
|
774
|
+
balance: bigint;
|
|
775
|
+
balanceAfter: bigint;
|
|
776
|
+
currencySymbol: string;
|
|
632
777
|
};
|
|
633
|
-
existentialDeposit: bigint;
|
|
634
|
-
asset: string;
|
|
635
|
-
minNativeTransferableAmount: bigint;
|
|
636
|
-
maxNativeTransferableAmount: bigint;
|
|
637
778
|
};
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
779
|
+
destination: {
|
|
780
|
+
receivedCurrency: {
|
|
781
|
+
sufficient: boolean | UnableToComputeError;
|
|
782
|
+
balance: bigint;
|
|
783
|
+
balanceAfter: bigint | UnableToComputeError;
|
|
784
|
+
currencySymbol: string;
|
|
785
|
+
existentialDeposit: bigint;
|
|
786
|
+
};
|
|
787
|
+
xcmFee: {
|
|
788
|
+
fee: bigint;
|
|
789
|
+
balance: bigint;
|
|
790
|
+
balanceAfter: bigint;
|
|
791
|
+
currencySymbol: string;
|
|
792
|
+
};
|
|
642
793
|
};
|
|
643
794
|
};
|
|
644
795
|
type TOriginFeeDetails = {
|
|
645
796
|
sufficientForXCM: boolean;
|
|
646
797
|
xcmFee: bigint;
|
|
647
798
|
};
|
|
648
|
-
type TGetTransferInfoOptionsBase = {
|
|
799
|
+
type TGetTransferInfoOptionsBase<TRes> = {
|
|
800
|
+
tx: TRes;
|
|
649
801
|
origin: TNodeDotKsmWithRelayChains;
|
|
650
802
|
destination: TNodeDotKsmWithRelayChains;
|
|
651
|
-
|
|
652
|
-
|
|
803
|
+
senderAddress: string;
|
|
804
|
+
address: string;
|
|
653
805
|
currency: WithAmount<TCurrencyCore>;
|
|
654
806
|
};
|
|
655
|
-
type TGetTransferInfoOptions<TApi, TRes> = WithApi<TGetTransferInfoOptionsBase
|
|
807
|
+
type TGetTransferInfoOptions<TApi, TRes> = WithApi<TGetTransferInfoOptionsBase<TRes>, TApi, TRes>;
|
|
656
808
|
|
|
657
809
|
type TGetXcmFeeBaseOptions<TRes> = {
|
|
658
810
|
/**
|
|
@@ -677,17 +829,18 @@ type TGetXcmFeeBaseOptions<TRes> = {
|
|
|
677
829
|
};
|
|
678
830
|
type TGetXcmFeeOptions<TApi, TRes> = WithApi<TGetXcmFeeBaseOptions<TRes>, TApi, TRes>;
|
|
679
831
|
type TGetXcmFeeEstimateOptions<TApi, TRes> = Omit<TGetXcmFeeOptions<TApi, TRes>, 'disableFallback'>;
|
|
832
|
+
type TGetOriginXcmFeeEstimateOptions<TApi, TRes> = Omit<TGetXcmFeeOptions<TApi, TRes>, 'disableFallback' | 'address' | 'currency'>;
|
|
680
833
|
type TGetXcmFeeBuilderOptions = {
|
|
681
834
|
disableFallback: boolean;
|
|
682
835
|
};
|
|
683
|
-
type
|
|
836
|
+
type TGetOriginXcmFeeBaseOptions<TRes> = {
|
|
684
837
|
tx: TRes;
|
|
685
838
|
origin: TNodeDotKsmWithRelayChains;
|
|
686
839
|
destination: TNodeDotKsmWithRelayChains;
|
|
687
840
|
senderAddress: string;
|
|
688
841
|
disableFallback: boolean;
|
|
689
842
|
};
|
|
690
|
-
type
|
|
843
|
+
type TGetOriginXcmFeeOptions<TApi, TRes> = WithApi<TGetOriginXcmFeeBaseOptions<TRes>, TApi, TRes>;
|
|
691
844
|
type TGetFeeForDestNodeBaseOptions = {
|
|
692
845
|
origin: TNodeDotKsmWithRelayChains;
|
|
693
846
|
destination: TNodeDotKsmWithRelayChains;
|
|
@@ -952,17 +1105,50 @@ declare class GeneralBuilder<TApi, TRes, T extends Partial<TSendBaseOptions> = o
|
|
|
952
1105
|
build(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>): Promise<TRes>;
|
|
953
1106
|
dryRun(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>): Promise<TDryRunResult>;
|
|
954
1107
|
/**
|
|
955
|
-
*
|
|
1108
|
+
* Returns the XCM fee for the transfer using dryRun or paymentInfo function.
|
|
1109
|
+
*
|
|
1110
|
+
* @returns An origin and destination fee.
|
|
1111
|
+
*/
|
|
1112
|
+
getXcmFee(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>, { disableFallback }?: TGetXcmFeeBuilderOptions): Promise<TGetXcmFeeResult>;
|
|
1113
|
+
/**
|
|
1114
|
+
* Returns the origin XCM fee for the transfer using dryRun or paymentInfo function.
|
|
1115
|
+
*
|
|
1116
|
+
* @returns An origin fee.
|
|
1117
|
+
*/
|
|
1118
|
+
getOriginXcmFee(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>, { disableFallback }?: TGetXcmFeeBuilderOptions): Promise<TXcmFeeDetail & {
|
|
1119
|
+
forwardedXcms?: any;
|
|
1120
|
+
destParaId?: number;
|
|
1121
|
+
}>;
|
|
1122
|
+
/**
|
|
1123
|
+
* Estimates the origin and destination XCM fee using paymentInfo function.
|
|
956
1124
|
*
|
|
957
1125
|
* @returns An origin and destination fee estimate.
|
|
958
1126
|
*/
|
|
959
1127
|
getXcmFeeEstimate(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>): Promise<TGetXcmFeeEstimateResult>;
|
|
960
1128
|
/**
|
|
961
|
-
*
|
|
1129
|
+
* Estimates the origin XCM fee using paymentInfo function.
|
|
962
1130
|
*
|
|
963
|
-
* @returns An origin
|
|
1131
|
+
* @returns An origin fee estimate.
|
|
964
1132
|
*/
|
|
965
|
-
|
|
1133
|
+
getOriginXcmFeeEstimate(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>): Promise<TGetXcmFeeEstimateDetail>;
|
|
1134
|
+
/**
|
|
1135
|
+
* Returns the max transferable amount for the transfer
|
|
1136
|
+
*
|
|
1137
|
+
* @returns The max transferable amount.
|
|
1138
|
+
*/
|
|
1139
|
+
getTransferableAmount(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>): Promise<bigint>;
|
|
1140
|
+
/**
|
|
1141
|
+
* Returns the max transferable amount for the transfer
|
|
1142
|
+
*
|
|
1143
|
+
* @returns The max transferable amount.
|
|
1144
|
+
*/
|
|
1145
|
+
verifyEdOnDestination(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>): Promise<boolean>;
|
|
1146
|
+
/**
|
|
1147
|
+
* Returns the transfer info for the transfer
|
|
1148
|
+
*
|
|
1149
|
+
* @returns The transfer info.
|
|
1150
|
+
*/
|
|
1151
|
+
getTransferInfo(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>): Promise<TTransferInfo>;
|
|
966
1152
|
/**
|
|
967
1153
|
* Returns the API instance used by the builder.
|
|
968
1154
|
*
|
|
@@ -1541,108 +1727,6 @@ declare const nodes: <TApi, TRes>() => {
|
|
|
1541
1727
|
Polimec: Polimec<TApi, TRes>;
|
|
1542
1728
|
};
|
|
1543
1729
|
|
|
1544
|
-
/**
|
|
1545
|
-
* Error thrown when the Ethereum bridge is halted.
|
|
1546
|
-
*/
|
|
1547
|
-
declare class BridgeHaltedError extends Error {
|
|
1548
|
-
/**
|
|
1549
|
-
* Constructs a new BridgeHaltedError.
|
|
1550
|
-
*
|
|
1551
|
-
* @param message - Optional custom error message.
|
|
1552
|
-
*/
|
|
1553
|
-
constructor();
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
/**
|
|
1557
|
-
* Error thrown when the Dry Run fails.
|
|
1558
|
-
*/
|
|
1559
|
-
declare class DryRunFailedError extends Error {
|
|
1560
|
-
/**
|
|
1561
|
-
* Constructs a new DryRunFailedError.
|
|
1562
|
-
*
|
|
1563
|
-
* @param message - Optional custom error message.
|
|
1564
|
-
*/
|
|
1565
|
-
constructor(reason: string);
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
/**
|
|
1569
|
-
* Error thrown when nodes from different relay chains are incompatible.
|
|
1570
|
-
*/
|
|
1571
|
-
declare class IncompatibleNodesError extends Error {
|
|
1572
|
-
/**
|
|
1573
|
-
* Constructs a new IncompatibleNodesError.
|
|
1574
|
-
*
|
|
1575
|
-
* @param message - Optional custom error message.
|
|
1576
|
-
*/
|
|
1577
|
-
constructor(message?: string);
|
|
1578
|
-
}
|
|
1579
|
-
|
|
1580
|
-
/**
|
|
1581
|
-
* Error thrown when an invalid address is provided.
|
|
1582
|
-
*/
|
|
1583
|
-
declare class InvalidAddressError extends Error {
|
|
1584
|
-
/**
|
|
1585
|
-
* Constructs a new InvalidAddressError.
|
|
1586
|
-
*
|
|
1587
|
-
* @param message - The error message.
|
|
1588
|
-
*/
|
|
1589
|
-
constructor(message: string);
|
|
1590
|
-
}
|
|
1591
|
-
|
|
1592
|
-
/**
|
|
1593
|
-
* Error thrown when the Dry Run fails.
|
|
1594
|
-
*/
|
|
1595
|
-
declare class InvalidParameterError extends Error {
|
|
1596
|
-
/**
|
|
1597
|
-
* Constructs a new InvalidParameterError.
|
|
1598
|
-
*
|
|
1599
|
-
* @param message - Required error message.
|
|
1600
|
-
*/
|
|
1601
|
-
constructor(message: string);
|
|
1602
|
-
}
|
|
1603
|
-
|
|
1604
|
-
/**
|
|
1605
|
-
* Used to inform user, that Parachain they wish to use is not supported yet
|
|
1606
|
-
*/
|
|
1607
|
-
declare class NodeNotSupportedError extends Error {
|
|
1608
|
-
/**
|
|
1609
|
-
* Constructs a new NodeNotSupportedError.
|
|
1610
|
-
*
|
|
1611
|
-
* @param message - Optional custom error message.
|
|
1612
|
-
*/
|
|
1613
|
-
constructor(message?: string);
|
|
1614
|
-
}
|
|
1615
|
-
|
|
1616
|
-
/**
|
|
1617
|
-
* Used to inform user, that Parachain they wish to use has not yet implemented full XCM Support
|
|
1618
|
-
*/
|
|
1619
|
-
declare class NoXCMSupportImplementedError extends Error {
|
|
1620
|
-
/**
|
|
1621
|
-
* Constructs a new NoXCMSupportImplementedError.
|
|
1622
|
-
*
|
|
1623
|
-
* @param node - The node for which XCM support is not implemented.
|
|
1624
|
-
*/
|
|
1625
|
-
constructor(node: TNode);
|
|
1626
|
-
}
|
|
1627
|
-
|
|
1628
|
-
/**
|
|
1629
|
-
* Used to inform user, that Parachain they wish to use does not support scenario they wish to use yet
|
|
1630
|
-
*/
|
|
1631
|
-
declare class ScenarioNotSupportedError extends Error {
|
|
1632
|
-
/**
|
|
1633
|
-
* Constructs a new ScenarioNotSupportedError.
|
|
1634
|
-
*
|
|
1635
|
-
* @param node - The node where the scenario is not supported.
|
|
1636
|
-
* @param scenario - The scenario that is not supported.
|
|
1637
|
-
* @param message - Optional custom error message.
|
|
1638
|
-
*/
|
|
1639
|
-
constructor(node: TNode, scenario: TScenario, message?: string);
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
declare class TransferToAhNotSupported extends Error {
|
|
1643
|
-
constructor(message?: string);
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1646
1730
|
declare const getNodeConfig: (node: TNodeDotKsmWithRelayChains) => TNodeConfig;
|
|
1647
1731
|
|
|
1648
1732
|
declare const getNodeProviders: (node: TNodeDotKsmWithRelayChains) => string[];
|
|
@@ -1677,14 +1761,10 @@ declare const getBalanceNative: <TApi, TRes>(options: TGetBalanceNativeOptions<T
|
|
|
1677
1761
|
declare const getOriginFeeDetailsInternal: <TApi, TRes>({ api, account, accountDestination, ahAddress, currency, origin, destination, feeMarginPercentage }: TGetOriginFeeDetailsOptions<TApi, TRes>) => Promise<TOriginFeeDetails>;
|
|
1678
1762
|
declare const getOriginFeeDetails: <TApi, TRes>(options: TGetOriginFeeDetailsOptions<TApi, TRes>) => Promise<TOriginFeeDetails>;
|
|
1679
1763
|
|
|
1680
|
-
declare const
|
|
1681
|
-
declare const getMaxNativeTransferableAmount: <TApi, TRes>(options: TGetMaxNativeTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
|
|
1682
|
-
declare const getMaxForeignTransferableAmountInternal: <TApi, TRes>({ api, address, node, currency }: TGetMaxForeignTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
|
|
1683
|
-
declare const getMaxForeignTransferableAmount: <TApi, TRes>(options: TGetMaxForeignTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
|
|
1684
|
-
declare const getTransferableAmountInternal: <TApi, TRes>({ api, address, node, currency }: TGetTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
|
|
1764
|
+
declare const getTransferableAmountInternal: <TApi, TRes>({ api, senderAddress, node, currency, tx }: TGetTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
|
|
1685
1765
|
declare const getTransferableAmount: <TApi, TRes>(options: TGetTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
|
|
1686
1766
|
|
|
1687
|
-
declare const getTransferInfo: <TApi, TRes>({ origin, destination,
|
|
1767
|
+
declare const getTransferInfo: <TApi, TRes>({ api, tx, origin, destination, senderAddress, address, currency }: TGetTransferInfoOptions<TApi, TRes>) => Promise<TTransferInfo>;
|
|
1688
1768
|
|
|
1689
1769
|
declare const verifyEdOnDestination: <TApi, TRes>(options: TVerifyEdOnDestinationOptions<TApi, TRes>) => Promise<boolean>;
|
|
1690
1770
|
|
|
@@ -1701,17 +1781,16 @@ declare const transferMoonbeamToEth: <TApi, TRes>({ api, from, to, signer, addre
|
|
|
1701
1781
|
declare const isEthersSigner: (signer: Signer | WalletClient) => signer is Signer;
|
|
1702
1782
|
declare const isEthersContract: (contract: Contract | GetContractReturnType<Abi | readonly unknown[]>) => contract is Contract;
|
|
1703
1783
|
|
|
1704
|
-
declare const
|
|
1705
|
-
fee?: bigint;
|
|
1706
|
-
feeType?: TFeeType;
|
|
1707
|
-
dryRunError?: string;
|
|
1784
|
+
declare const getOriginXcmFee: <TApi, TRes>({ api, tx, origin, destination, senderAddress, disableFallback }: TGetOriginXcmFeeOptions<TApi, TRes>) => Promise<TXcmFeeDetail & {
|
|
1708
1785
|
forwardedXcms?: any;
|
|
1709
1786
|
destParaId?: number;
|
|
1710
1787
|
}>;
|
|
1711
1788
|
|
|
1789
|
+
declare const getOriginXcmFeeEstimate: <TApi, TRes>({ api, tx, origin, destination, senderAddress }: TGetOriginXcmFeeEstimateOptions<TApi, TRes>) => Promise<TGetXcmFeeEstimateDetail>;
|
|
1790
|
+
|
|
1712
1791
|
declare const getXcmFee: <TApi, TRes>({ api, tx, origin, destination, senderAddress, address, currency, disableFallback }: TGetXcmFeeOptions<TApi, TRes>) => Promise<TGetXcmFeeResult>;
|
|
1713
1792
|
|
|
1714
|
-
declare const getXcmFeeEstimate: <TApi, TRes>(
|
|
1793
|
+
declare const getXcmFeeEstimate: <TApi, TRes>(options: TGetXcmFeeEstimateOptions<TApi, TRes>) => Promise<TGetXcmFeeEstimateResult>;
|
|
1715
1794
|
|
|
1716
1795
|
declare const getBridgeStatus: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>) => Promise<TBridgeStatus>;
|
|
1717
1796
|
|
|
@@ -1768,5 +1847,5 @@ declare const validateAddress: (address: TAddress, node: TNodeWithRelayChains, i
|
|
|
1768
1847
|
*/
|
|
1769
1848
|
declare const determineRelayChain: (node: TNodeWithRelayChains) => TRelaychain;
|
|
1770
1849
|
|
|
1771
|
-
export { AssetClaimBuilder, BatchMode, BridgeHaltedError, Builder, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, GeneralBuilder, IncompatibleNodesError, InvalidAddressError, InvalidParameterError, NoXCMSupportImplementedError, NodeNotSupportedError, PolkadotXcmError, ScenarioNotSupportedError, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, Version, XTokensError, blake2b256, blake2b512, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, convertSs58, createApiInstanceForNode, createBeneficiaryMultiLocation, createVersionedBeneficiary, createX1Payload, deriveAccountId, determineRelayChain, dryRun, dryRunOrigin, encodeSs58, generateAddressMultiLocationV4, getAssetBalance, getAssetBalanceInternal, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getBridgeStatus,
|
|
1772
|
-
export type { IPolkadotApi, IPolkadotXCMTransfer, IXTokensTransfer, IXTransferTransfer, OneKey, TAddress, TApiOrUrl, TAssetClaimOptions, TAssetClaimOptionsBase, TBalanceResponse, TBatchOptions, TBifrostToken, TBridgeStatus, TCreateBeneficiaryOptions, TDestWeight, TDestination, TDryRunBaseOptions, TDryRunCallBaseOptions, TDryRunCallOptions, TDryRunNodeFailure, TDryRunNodeResult, TDryRunNodeResultInternal, TDryRunNodeSuccess, TDryRunOptions, TDryRunResult, TDryRunXcmBaseOptions, TDryRunXcmOptions, TEdJsonMap, TEvmBuilderOptions, TEvmBuilderOptionsBase, TEvmNodeFrom, TFeeType, TForeignAssetId, TForeignOrNativeAsset, TForeignOrTokenAsset, TGetAssetBalanceOptions, TGetAssetBalanceOptionsBase, TGetBalanceForeignOptions, TGetBalanceForeignOptionsBase, TGetBalanceNativeOptions, TGetBalanceNativeOptionsBase, TGetFeeForDestNodeBaseOptions, TGetFeeForDestNodeOptions,
|
|
1850
|
+
export { AssetClaimBuilder, BatchMode, BridgeHaltedError, Builder, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, GeneralBuilder, IncompatibleNodesError, InvalidAddressError, InvalidParameterError, NoXCMSupportImplementedError, NodeNotSupportedError, PolkadotXcmError, ScenarioNotSupportedError, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, UnableToComputeError, Version, XTokensError, blake2b256, blake2b512, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, convertSs58, createApiInstanceForNode, createBeneficiaryMultiLocation, createVersionedBeneficiary, createX1Payload, deriveAccountId, determineRelayChain, dryRun, dryRunOrigin, encodeSs58, generateAddressMultiLocationV4, getAssetBalance, getAssetBalanceInternal, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getBridgeStatus, getFees, getNode, getNodeConfig, getNodeProviders, getOriginFeeDetails, getOriginFeeDetailsInternal, getOriginXcmFee, getOriginXcmFeeEstimate, getParaEthTransferFees, getParaId, getTNode, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeEstimate, isEthersContract, isEthersSigner, resolveModuleError, resolveParaId, reverseTransformMultiLocation, send, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, transformMultiLocation, validateAddress, verifyEdOnDestination };
|
|
1851
|
+
export type { IPolkadotApi, IPolkadotXCMTransfer, IXTokensTransfer, IXTransferTransfer, OneKey, TAddress, TApiOrUrl, TAssetClaimOptions, TAssetClaimOptionsBase, TBalanceResponse, TBatchOptions, TBifrostToken, TBridgeStatus, TCreateBeneficiaryOptions, TDestWeight, TDestination, TDryRunBaseOptions, TDryRunCallBaseOptions, TDryRunCallOptions, TDryRunNodeFailure, TDryRunNodeResult, TDryRunNodeResultInternal, TDryRunNodeSuccess, TDryRunOptions, TDryRunResult, TDryRunXcmBaseOptions, TDryRunXcmOptions, TEdJsonMap, TEvmBuilderOptions, TEvmBuilderOptionsBase, TEvmNodeFrom, TFeeType, TForeignAssetId, TForeignOrNativeAsset, TForeignOrTokenAsset, TGetAssetBalanceOptions, TGetAssetBalanceOptionsBase, TGetBalanceForeignOptions, TGetBalanceForeignOptionsBase, TGetBalanceNativeOptions, TGetBalanceNativeOptionsBase, TGetFeeForDestNodeBaseOptions, TGetFeeForDestNodeOptions, TGetMaxForeignTransferableAmountOptions, TGetMaxForeignTransferableAmountOptionsBase, TGetMaxNativeTransferableAmountOptions, TGetMaxNativeTransferableAmountOptionsBase, TGetOriginFeeDetailsOptions, TGetOriginFeeDetailsOptionsBase, TGetOriginXcmFeeBaseOptions, TGetOriginXcmFeeEstimateOptions, TGetOriginXcmFeeOptions, TGetTransferInfoOptions, TGetTransferInfoOptionsBase, TGetTransferableAmountOptions, TGetTransferableAmountOptionsBase, TGetXcmFeeBaseOptions, TGetXcmFeeBuilderOptions, TGetXcmFeeEstimateDetail, TGetXcmFeeEstimateOptions, TGetXcmFeeEstimateResult, TGetXcmFeeOptions, TGetXcmFeeResult, THubKey, TMantaAsset, TModuleError, TNativeTokenAsset, TNodeConfig, TNodeConfigMap, TNodleAsset, TOriginFeeDetails, TOtherReserveAsset, TPolkadotXCMTransferOptions, TPolkadotXcmSection, TProviderEntry, TRelayToParaDestination, TRelayToParaOptions, TRelayToParaOverrides, TRelaychain, TReserveAsset, TScenario, TSelfReserveAsset, TSendBaseOptions, TSendBaseOptionsWithSenderAddress, TSendInternalOptions, TSendOptions, TSerializeEthTransferOptions, TSerializedApiCall, TSerializedEthTransfer, TTransferInfo, TTransferLocalOptions, TVerifyEdOnDestinationOptions, TVerifyEdOnDestinationOptionsBase, TVersionClaimAssets, TWeight, TXTokensCurrencySelection, TXTokensSection, TXTokensTransferOptions, TXTransferSection, TXTransferTransferOptions, TXcmAsset, TXcmFeeDetail, TXcmForeignAsset, TXcmPalletSection, TXcmVersioned, TZeitgeistAsset, WithApi, WithRequiredSenderAddress };
|