@paraspell/sdk 5.10.0 → 6.1.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/README.md +8 -51
- package/dist/index.cjs +1692 -1117
- package/dist/index.d.ts +91 -140
- package/dist/index.mjs +1689 -1113
- package/package.json +12 -10
package/dist/index.d.ts
CHANGED
|
@@ -20,13 +20,17 @@ interface TMultiAssetV4 {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
type TCurrency = string | number | bigint;
|
|
23
|
-
type
|
|
23
|
+
type TCurrencySymbol = {
|
|
24
24
|
symbol: string;
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
|
+
type TCurrencyCore = TCurrencySymbol | {
|
|
26
27
|
id: TCurrency;
|
|
27
28
|
};
|
|
28
|
-
type
|
|
29
|
-
|
|
29
|
+
type TCurrencyInput = TCurrencyCore | {
|
|
30
|
+
multilocation: TMultiLocation;
|
|
31
|
+
} | {
|
|
32
|
+
multiasset: TMultiAsset[];
|
|
33
|
+
};
|
|
30
34
|
interface TCurrencySelection {
|
|
31
35
|
id: {
|
|
32
36
|
Concrete: TMultiLocation;
|
|
@@ -189,7 +193,7 @@ type TTransferReturn = Extrinsic | TSerializedApiCall;
|
|
|
189
193
|
type TSerializedApiCall = {
|
|
190
194
|
module: string;
|
|
191
195
|
section: string;
|
|
192
|
-
parameters:
|
|
196
|
+
parameters: unknown[];
|
|
193
197
|
};
|
|
194
198
|
type CheckKeepAliveOptions = {
|
|
195
199
|
originApi: ApiPromise;
|
|
@@ -200,6 +204,16 @@ type CheckKeepAliveOptions = {
|
|
|
200
204
|
currencySymbol?: string;
|
|
201
205
|
destNode?: TNodePolkadotKusama;
|
|
202
206
|
};
|
|
207
|
+
type TDestWeight = {
|
|
208
|
+
refTime: string;
|
|
209
|
+
proofSize: string;
|
|
210
|
+
};
|
|
211
|
+
type XTransferModule = 'xTransfer';
|
|
212
|
+
type XTransferSection = 'transfer';
|
|
213
|
+
type XTokensModule = 'xTokens';
|
|
214
|
+
type XTokensSection = 'transfer' | 'transferMultiasset';
|
|
215
|
+
type PolkadotXcmModule = 'polkadotXcm';
|
|
216
|
+
type PolkadotXcmSection = 'limitedTeleportAssets' | 'limitedReserveTransferAssets' | 'reserveTransferAssets' | 'reserveWithdrawAssets' | 'transferAssets';
|
|
203
217
|
|
|
204
218
|
type JunctionType = 'Parachain' | 'AccountId32' | 'AccountIndex64' | 'AccountKey20' | 'PalletInstance' | 'GeneralIndex' | 'GeneralKey' | 'OnlyChild' | 'Plurality' | 'GlobalConsensus';
|
|
205
219
|
type NetworkId = string | null;
|
|
@@ -399,6 +413,7 @@ declare class Bajun extends ParachainNode implements IXTokensTransfer {
|
|
|
399
413
|
declare class Basilisk extends ParachainNode implements IXTokensTransfer {
|
|
400
414
|
constructor();
|
|
401
415
|
transferXTokens(input: XTokensTransferInput): TTransferReturn;
|
|
416
|
+
getProvider(): string;
|
|
402
417
|
}
|
|
403
418
|
|
|
404
419
|
declare class BifrostKusama extends ParachainNode implements IXTokensTransfer {
|
|
@@ -435,6 +450,7 @@ declare class Moonriver extends ParachainNode implements IXTokensTransfer {
|
|
|
435
450
|
declare class Litmus extends ParachainNode implements IXTokensTransfer {
|
|
436
451
|
constructor();
|
|
437
452
|
transferXTokens(input: XTokensTransferInput): TTransferReturn;
|
|
453
|
+
getProvider(): string;
|
|
438
454
|
}
|
|
439
455
|
|
|
440
456
|
declare class Kintsugi extends ParachainNode implements IXTokensTransfer {
|
|
@@ -499,6 +515,14 @@ declare class CoretimeKusama extends ParachainNode implements IPolkadotXCMTransf
|
|
|
499
515
|
transferRelayToPara(options: TRelayToParaInternalOptions): TSerializedApiCall;
|
|
500
516
|
}
|
|
501
517
|
|
|
518
|
+
declare class CoretimePolkadot extends ParachainNode implements IPolkadotXCMTransfer {
|
|
519
|
+
constructor();
|
|
520
|
+
_assetCheckEnabled: boolean;
|
|
521
|
+
transferPolkadotXCM(input: PolkadotXCMTransferInput): TTransferReturn;
|
|
522
|
+
transferRelayToPara(options: TRelayToParaInternalOptions): TSerializedApiCall;
|
|
523
|
+
getProvider(): string;
|
|
524
|
+
}
|
|
525
|
+
|
|
502
526
|
declare class Encointer extends ParachainNode implements IPolkadotXCMTransfer {
|
|
503
527
|
constructor();
|
|
504
528
|
transferPolkadotXCM(input: PolkadotXCMTransferInput): TTransferReturn;
|
|
@@ -507,7 +531,6 @@ declare class Encointer extends ParachainNode implements IPolkadotXCMTransfer {
|
|
|
507
531
|
|
|
508
532
|
declare class Robonomics extends ParachainNode implements IPolkadotXCMTransfer {
|
|
509
533
|
constructor();
|
|
510
|
-
private static readonly FEE;
|
|
511
534
|
transferPolkadotXCM(input: PolkadotXCMTransferInput): TTransferReturn;
|
|
512
535
|
}
|
|
513
536
|
|
|
@@ -594,8 +617,9 @@ declare class Phala extends ParachainNode implements IXTransferTransfer {
|
|
|
594
617
|
transferXTransfer(input: XTransferTransferInput): TTransferReturn;
|
|
595
618
|
}
|
|
596
619
|
|
|
597
|
-
declare class Subsocial extends ParachainNode {
|
|
620
|
+
declare class Subsocial extends ParachainNode implements IPolkadotXCMTransfer {
|
|
598
621
|
constructor();
|
|
622
|
+
transferPolkadotXCM(input: PolkadotXCMTransferInput): TTransferReturn;
|
|
599
623
|
}
|
|
600
624
|
|
|
601
625
|
declare class KiltSpiritnet extends ParachainNode implements IPolkadotXCMTransfer {
|
|
@@ -641,10 +665,14 @@ declare class Peaq extends ParachainNode implements IXTokensTransfer {
|
|
|
641
665
|
getProvider(): string;
|
|
642
666
|
}
|
|
643
667
|
|
|
644
|
-
declare
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
668
|
+
declare class Polimec extends ParachainNode {
|
|
669
|
+
constructor();
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
declare const NODE_NAMES_DOT_KSM: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Litentry", "Moonbeam", "Parallel", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Pioneer", "Calamari", "CrustShadow", "Crab", "Imbue", "Integritee", "InvArchTinker", "Karura", "Kintsugi", "Litmus", "Moonriver", "ParallelHeiko", "Picasso", "Quartz", "Robonomics", "Shiden", "Turing", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Polkadex", "Zeitgeist", "Collectives", "Khala", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec"];
|
|
673
|
+
declare const NODE_NAMES: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Litentry", "Moonbeam", "Parallel", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Pioneer", "Calamari", "CrustShadow", "Crab", "Imbue", "Integritee", "InvArchTinker", "Karura", "Kintsugi", "Litmus", "Moonriver", "ParallelHeiko", "Picasso", "Quartz", "Robonomics", "Shiden", "Turing", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Polkadex", "Zeitgeist", "Collectives", "Khala", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec", "Ethereum"];
|
|
674
|
+
declare const NODES_WITH_RELAY_CHAINS: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Litentry", "Moonbeam", "Parallel", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Pioneer", "Calamari", "CrustShadow", "Crab", "Imbue", "Integritee", "InvArchTinker", "Karura", "Kintsugi", "Litmus", "Moonriver", "ParallelHeiko", "Picasso", "Quartz", "Robonomics", "Shiden", "Turing", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Polkadex", "Zeitgeist", "Collectives", "Khala", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec", "Ethereum", "Polkadot", "Kusama"];
|
|
675
|
+
declare const NODES_WITH_RELAY_CHAINS_DOT_KSM: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Litentry", "Moonbeam", "Parallel", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Pioneer", "Calamari", "CrustShadow", "Crab", "Imbue", "Integritee", "InvArchTinker", "Karura", "Kintsugi", "Litmus", "Moonriver", "ParallelHeiko", "Picasso", "Quartz", "Robonomics", "Shiden", "Turing", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Polkadex", "Zeitgeist", "Collectives", "Khala", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec", "Polkadot", "Kusama"];
|
|
648
676
|
declare const nodes: {
|
|
649
677
|
AssetHubPolkadot: AssetHubPolkadot;
|
|
650
678
|
Acala: Acala;
|
|
@@ -665,6 +693,7 @@ declare const nodes: {
|
|
|
665
693
|
Parallel: Parallel;
|
|
666
694
|
AssetHubKusama: AssetHubKusama;
|
|
667
695
|
CoretimeKusama: CoretimeKusama;
|
|
696
|
+
CoretimePolkadot: CoretimePolkadot;
|
|
668
697
|
Encointer: Encointer;
|
|
669
698
|
Altair: Altair;
|
|
670
699
|
Amplitude: Amplitude;
|
|
@@ -703,6 +732,7 @@ declare const nodes: {
|
|
|
703
732
|
Ethereum: Ethereum;
|
|
704
733
|
Mythos: Mythos;
|
|
705
734
|
Peaq: Peaq;
|
|
735
|
+
Polimec: Polimec;
|
|
706
736
|
};
|
|
707
737
|
declare const SUPPORTED_PALLETS: readonly ["XTokens", "OrmlXTokens", "PolkadotXcm", "RelayerXcm", "XTransfer"];
|
|
708
738
|
|
|
@@ -731,6 +761,7 @@ type TNodeAssets = {
|
|
|
731
761
|
nativeAssetSymbol: string;
|
|
732
762
|
nativeAssets: TNativeAssetDetails[];
|
|
733
763
|
otherAssets: TAssetDetails[];
|
|
764
|
+
multiLocations?: TMultiLocation[];
|
|
734
765
|
};
|
|
735
766
|
type TAssetJsonMap = Record<TNodeWithRelayChains, TNodeAssets>;
|
|
736
767
|
|
|
@@ -741,32 +772,12 @@ interface TPalletMap {
|
|
|
741
772
|
}
|
|
742
773
|
type TPalletJsonMap = Record<TNodePolkadotKusama, TPalletMap>;
|
|
743
774
|
|
|
744
|
-
interface TOpenChannelOptions {
|
|
745
|
-
api: ApiPromise;
|
|
746
|
-
origin: TNode;
|
|
747
|
-
destination: TNode;
|
|
748
|
-
maxSize: number;
|
|
749
|
-
maxMessageSize: number;
|
|
750
|
-
}
|
|
751
|
-
interface TCloseChannelOptions {
|
|
752
|
-
api: ApiPromise;
|
|
753
|
-
origin: TNode;
|
|
754
|
-
inbound: number;
|
|
755
|
-
outbound: number;
|
|
756
|
-
}
|
|
757
|
-
interface TCloseChannelInternalOptions extends TCloseChannelOptions {
|
|
758
|
-
serializedApiCallEnabled?: boolean;
|
|
759
|
-
}
|
|
760
|
-
interface TOpenChannelInternalOptions extends TOpenChannelOptions {
|
|
761
|
-
serializedApiCallEnabled?: boolean;
|
|
762
|
-
}
|
|
763
|
-
|
|
764
775
|
type TEdJsonMap = Record<TNodeDotKsmWithRelayChains, string | null>;
|
|
765
776
|
|
|
766
777
|
type TEvmBuilderOptions = {
|
|
767
778
|
to: TNodePolkadotKusama;
|
|
768
779
|
amount: string;
|
|
769
|
-
currency:
|
|
780
|
+
currency: TCurrencyCore;
|
|
770
781
|
address: string;
|
|
771
782
|
signer: Signer;
|
|
772
783
|
};
|
|
@@ -778,6 +789,7 @@ type TSerializedEthTransfer = {
|
|
|
778
789
|
destinationParaId: number;
|
|
779
790
|
destinationFee: bigint;
|
|
780
791
|
amount: bigint;
|
|
792
|
+
fee: bigint;
|
|
781
793
|
};
|
|
782
794
|
type OptionalProperties<T> = {
|
|
783
795
|
[P in keyof T]?: T[P] | undefined;
|
|
@@ -791,60 +803,6 @@ type TBatchOptions = {
|
|
|
791
803
|
mode: BatchMode;
|
|
792
804
|
};
|
|
793
805
|
|
|
794
|
-
declare const sendSerializedApiCall: (options: TSendOptions) => Promise<TSerializedApiCall>;
|
|
795
|
-
declare const send: (options: TSendOptions) => Promise<Extrinsic>;
|
|
796
|
-
declare const transferRelayToParaCommon: (options: TRelayToParaCommonOptions) => Promise<TTransferReturn>;
|
|
797
|
-
declare const transferRelayToPara: (options: TRelayToParaOptions) => Promise<Extrinsic>;
|
|
798
|
-
declare const transferRelayToParaSerializedApiCall: (options: TRelayToParaOptions) => Promise<TSerializedApiCall>;
|
|
799
|
-
|
|
800
|
-
declare const buildEthTransferOptions: ({ currency, to, address, destAddress, amount }: TSerializeEthTransferOptions) => Promise<TSerializedEthTransfer>;
|
|
801
|
-
|
|
802
|
-
declare const index$3_buildEthTransferOptions: typeof buildEthTransferOptions;
|
|
803
|
-
declare const index$3_send: typeof send;
|
|
804
|
-
declare const index$3_sendSerializedApiCall: typeof sendSerializedApiCall;
|
|
805
|
-
declare const index$3_transferRelayToPara: typeof transferRelayToPara;
|
|
806
|
-
declare const index$3_transferRelayToParaCommon: typeof transferRelayToParaCommon;
|
|
807
|
-
declare const index$3_transferRelayToParaSerializedApiCall: typeof transferRelayToParaSerializedApiCall;
|
|
808
|
-
declare namespace index$3 {
|
|
809
|
-
export { index$3_buildEthTransferOptions as buildEthTransferOptions, index$3_send as send, index$3_sendSerializedApiCall as sendSerializedApiCall, index$3_transferRelayToPara as transferRelayToPara, index$3_transferRelayToParaCommon as transferRelayToParaCommon, index$3_transferRelayToParaSerializedApiCall as transferRelayToParaSerializedApiCall };
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
declare const openChannel: (options: TOpenChannelOptions) => Extrinsic;
|
|
813
|
-
declare const openChannelSerializedApiCall: (options: TOpenChannelOptions) => TSerializedApiCall;
|
|
814
|
-
|
|
815
|
-
declare const index$2_openChannel: typeof openChannel;
|
|
816
|
-
declare const index$2_openChannelSerializedApiCall: typeof openChannelSerializedApiCall;
|
|
817
|
-
declare namespace index$2 {
|
|
818
|
-
export { index$2_openChannel as openChannel, index$2_openChannelSerializedApiCall as openChannelSerializedApiCall };
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
declare const closeChannel: (options: TCloseChannelOptions) => Extrinsic;
|
|
822
|
-
declare const closeChannelSerializedApiCall: (options: TCloseChannelOptions) => TSerializedApiCall;
|
|
823
|
-
|
|
824
|
-
declare const index$1_closeChannel: typeof closeChannel;
|
|
825
|
-
declare const index$1_closeChannelSerializedApiCall: typeof closeChannelSerializedApiCall;
|
|
826
|
-
declare namespace index$1 {
|
|
827
|
-
export { index$1_closeChannel as closeChannel, index$1_closeChannelSerializedApiCall as closeChannelSerializedApiCall };
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
declare const getAssetsObject: (node: TNodeWithRelayChains) => TNodeAssets;
|
|
831
|
-
declare const getAssetId: (node: TNode, symbol: string) => string | null;
|
|
832
|
-
declare const getRelayChainSymbol: (node: TNodeWithRelayChains) => TRelayChainSymbol;
|
|
833
|
-
declare const getNativeAssets: (node: TNode) => TNativeAssetDetails[];
|
|
834
|
-
declare const getOtherAssets: (node: TNode) => TAssetDetails[];
|
|
835
|
-
declare const getAssets: (node: TNodeWithRelayChains) => TAsset[];
|
|
836
|
-
declare const getAllAssetsSymbols: (node: TNodeWithRelayChains) => string[];
|
|
837
|
-
declare const getNativeAssetSymbol: (node: TNodeWithRelayChains) => string;
|
|
838
|
-
declare const hasSupportForAsset: (node: TNode, symbol: string) => boolean;
|
|
839
|
-
declare const getSupportedAssets: (origin: TNodeWithRelayChains, destination: TNodeWithRelayChains) => TAsset[];
|
|
840
|
-
declare const getAssetDecimals: (node: TNodeWithRelayChains, symbol: string) => number | null;
|
|
841
|
-
declare const getParaId: (node: TNode) => number;
|
|
842
|
-
declare const getTNode: (paraId: number) => TNode | null;
|
|
843
|
-
|
|
844
|
-
declare const getBalanceNative: (address: string, node: TNodeWithRelayChains, api?: ApiPromise) => Promise<bigint>;
|
|
845
|
-
|
|
846
|
-
declare const getBalanceForeign: (address: string, node: TNodePolkadotKusama, symbolOrId: string, api?: ApiPromise) => Promise<bigint | null>;
|
|
847
|
-
|
|
848
806
|
interface TTransferInfo {
|
|
849
807
|
chain: {
|
|
850
808
|
origin: TNodeWithRelayChains;
|
|
@@ -873,7 +831,46 @@ interface TTransferInfo {
|
|
|
873
831
|
existentialDeposit: bigint;
|
|
874
832
|
};
|
|
875
833
|
}
|
|
876
|
-
|
|
834
|
+
|
|
835
|
+
declare const sendSerializedApiCall: (options: TSendOptions) => Promise<TSerializedApiCall>;
|
|
836
|
+
declare const send: (options: TSendOptions) => Promise<Extrinsic>;
|
|
837
|
+
declare const transferRelayToParaCommon: (options: TRelayToParaCommonOptions) => Promise<TTransferReturn>;
|
|
838
|
+
declare const transferRelayToPara: (options: TRelayToParaOptions) => Promise<Extrinsic>;
|
|
839
|
+
declare const transferRelayToParaSerializedApiCall: (options: TRelayToParaOptions) => Promise<TSerializedApiCall>;
|
|
840
|
+
|
|
841
|
+
declare const buildEthTransferOptions: ({ currency, to, address, destAddress, amount }: TSerializeEthTransferOptions) => Promise<TSerializedEthTransfer>;
|
|
842
|
+
|
|
843
|
+
declare const index$1_buildEthTransferOptions: typeof buildEthTransferOptions;
|
|
844
|
+
declare const index$1_send: typeof send;
|
|
845
|
+
declare const index$1_sendSerializedApiCall: typeof sendSerializedApiCall;
|
|
846
|
+
declare const index$1_transferRelayToPara: typeof transferRelayToPara;
|
|
847
|
+
declare const index$1_transferRelayToParaCommon: typeof transferRelayToParaCommon;
|
|
848
|
+
declare const index$1_transferRelayToParaSerializedApiCall: typeof transferRelayToParaSerializedApiCall;
|
|
849
|
+
declare namespace index$1 {
|
|
850
|
+
export { index$1_buildEthTransferOptions as buildEthTransferOptions, index$1_send as send, index$1_sendSerializedApiCall as sendSerializedApiCall, index$1_transferRelayToPara as transferRelayToPara, index$1_transferRelayToParaCommon as transferRelayToParaCommon, index$1_transferRelayToParaSerializedApiCall as transferRelayToParaSerializedApiCall };
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
declare const getAssetsObject: (node: TNodeWithRelayChains) => TNodeAssets;
|
|
854
|
+
declare const getAssetId: (node: TNode, symbol: string) => string | null;
|
|
855
|
+
declare const getRelayChainSymbol: (node: TNodeWithRelayChains) => TRelayChainSymbol;
|
|
856
|
+
declare const getNativeAssets: (node: TNode) => TNativeAssetDetails[];
|
|
857
|
+
declare const getOtherAssets: (node: TNode) => TAssetDetails[];
|
|
858
|
+
declare const getAssets: (node: TNodeWithRelayChains) => TAsset[];
|
|
859
|
+
declare const getAllAssetsSymbols: (node: TNodeWithRelayChains) => string[];
|
|
860
|
+
declare const getNativeAssetSymbol: (node: TNodeWithRelayChains) => string;
|
|
861
|
+
declare const hasSupportForAsset: (node: TNode, symbol: string) => boolean;
|
|
862
|
+
declare const getSupportedAssets: (origin: TNodeWithRelayChains, destination: TNodeWithRelayChains) => TAsset[];
|
|
863
|
+
declare const getAssetDecimals: (node: TNodeWithRelayChains, symbol: string) => number | null;
|
|
864
|
+
declare const getParaId: (node: TNode) => number;
|
|
865
|
+
declare const getTNode: (paraId: number) => TNode | null;
|
|
866
|
+
|
|
867
|
+
declare const getExistentialDeposit: (node: TNodeDotKsmWithRelayChains) => string | null;
|
|
868
|
+
|
|
869
|
+
declare const getBalanceNative: (address: string, node: TNodeWithRelayChains, api?: ApiPromise) => Promise<bigint>;
|
|
870
|
+
|
|
871
|
+
declare const getBalanceForeign: (address: string, node: TNodePolkadotKusama, symbolOrId: TCurrencyCore, api?: ApiPromise) => Promise<bigint | null>;
|
|
872
|
+
|
|
873
|
+
declare const getTransferInfo: (origin: TNodeDotKsmWithRelayChains, destination: TNodeDotKsmWithRelayChains, accountOrigin: string, accountDestination: string, currency: TCurrencyCore, amount: string) => Promise<TTransferInfo>;
|
|
877
874
|
|
|
878
875
|
declare const index_getAllAssetsSymbols: typeof getAllAssetsSymbols;
|
|
879
876
|
declare const index_getAssetDecimals: typeof getAssetDecimals;
|
|
@@ -882,6 +879,7 @@ declare const index_getAssets: typeof getAssets;
|
|
|
882
879
|
declare const index_getAssetsObject: typeof getAssetsObject;
|
|
883
880
|
declare const index_getBalanceForeign: typeof getBalanceForeign;
|
|
884
881
|
declare const index_getBalanceNative: typeof getBalanceNative;
|
|
882
|
+
declare const index_getExistentialDeposit: typeof getExistentialDeposit;
|
|
885
883
|
declare const index_getNativeAssetSymbol: typeof getNativeAssetSymbol;
|
|
886
884
|
declare const index_getNativeAssets: typeof getNativeAssets;
|
|
887
885
|
declare const index_getOtherAssets: typeof getOtherAssets;
|
|
@@ -892,53 +890,12 @@ declare const index_getTNode: typeof getTNode;
|
|
|
892
890
|
declare const index_getTransferInfo: typeof getTransferInfo;
|
|
893
891
|
declare const index_hasSupportForAsset: typeof hasSupportForAsset;
|
|
894
892
|
declare namespace index {
|
|
895
|
-
export { index_getAllAssetsSymbols as getAllAssetsSymbols, index_getAssetDecimals as getAssetDecimals, index_getAssetId as getAssetId, index_getAssets as getAssets, index_getAssetsObject as getAssetsObject, index_getBalanceForeign as getBalanceForeign, index_getBalanceNative as getBalanceNative, index_getNativeAssetSymbol as getNativeAssetSymbol, index_getNativeAssets as getNativeAssets, index_getOtherAssets as getOtherAssets, index_getParaId as getParaId, index_getRelayChainSymbol as getRelayChainSymbol, index_getSupportedAssets as getSupportedAssets, index_getTNode as getTNode, index_getTransferInfo as getTransferInfo, index_hasSupportForAsset as hasSupportForAsset };
|
|
893
|
+
export { index_getAllAssetsSymbols as getAllAssetsSymbols, index_getAssetDecimals as getAssetDecimals, index_getAssetId as getAssetId, index_getAssets as getAssets, index_getAssetsObject as getAssetsObject, index_getBalanceForeign as getBalanceForeign, index_getBalanceNative as getBalanceNative, index_getExistentialDeposit as getExistentialDeposit, index_getNativeAssetSymbol as getNativeAssetSymbol, index_getNativeAssets as getNativeAssets, index_getOtherAssets as getOtherAssets, index_getParaId as getParaId, index_getRelayChainSymbol as getRelayChainSymbol, index_getSupportedAssets as getSupportedAssets, index_getTNode as getTNode, index_getTransferInfo as getTransferInfo, index_hasSupportForAsset as hasSupportForAsset };
|
|
896
894
|
}
|
|
897
895
|
|
|
898
896
|
declare const getDefaultPallet: (node: TNodePolkadotKusama) => TPallet;
|
|
899
897
|
declare const getSupportedPallets: (node: TNodePolkadotKusama) => TPallet[];
|
|
900
898
|
|
|
901
|
-
interface OutboundCloseChannelBuilder {
|
|
902
|
-
outbound: (inbound: number) => FinalBuilder;
|
|
903
|
-
}
|
|
904
|
-
interface InboundCloseChannelBuilder {
|
|
905
|
-
inbound: (inbound: number) => OutboundCloseChannelBuilder;
|
|
906
|
-
}
|
|
907
|
-
declare class CloseChannelBuilder implements InboundCloseChannelBuilder, OutboundCloseChannelBuilder, FinalBuilder {
|
|
908
|
-
private readonly api;
|
|
909
|
-
private readonly from;
|
|
910
|
-
private _inbound;
|
|
911
|
-
private _outbound;
|
|
912
|
-
private constructor();
|
|
913
|
-
static create(api: ApiPromise, from: TNode): InboundCloseChannelBuilder;
|
|
914
|
-
inbound(inbound: number): this;
|
|
915
|
-
outbound(outbound: number): this;
|
|
916
|
-
private buildOptions;
|
|
917
|
-
build(): Extrinsic;
|
|
918
|
-
buildSerializedApiCall(): TSerializedApiCall;
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
interface MaxMessageSizeOpenChannelBuilder {
|
|
922
|
-
maxMessageSize: (size: number) => FinalBuilder;
|
|
923
|
-
}
|
|
924
|
-
interface MaxSizeOpenChannelBuilder {
|
|
925
|
-
maxSize: (size: number) => MaxMessageSizeOpenChannelBuilder;
|
|
926
|
-
}
|
|
927
|
-
declare class OpenChannelBuilder implements MaxSizeOpenChannelBuilder, MaxMessageSizeOpenChannelBuilder, FinalBuilder {
|
|
928
|
-
private readonly api;
|
|
929
|
-
private readonly from;
|
|
930
|
-
private readonly to;
|
|
931
|
-
private _maxSize;
|
|
932
|
-
private _maxMessageSize;
|
|
933
|
-
private constructor();
|
|
934
|
-
static create(api: ApiPromise, from: TNode, to: TDestination): MaxSizeOpenChannelBuilder;
|
|
935
|
-
maxSize(size: number): this;
|
|
936
|
-
maxMessageSize(size: number): this;
|
|
937
|
-
private buildOptions;
|
|
938
|
-
build(): Extrinsic;
|
|
939
|
-
buildSerializedApiCall(): TSerializedApiCall;
|
|
940
|
-
}
|
|
941
|
-
|
|
942
899
|
type TOptions = TSendOptions | TRelayToParaOptions;
|
|
943
900
|
type TTransaction = {
|
|
944
901
|
func: (options: TOptions) => Promise<Extrinsic>;
|
|
@@ -963,7 +920,6 @@ declare class ToGeneralBuilder {
|
|
|
963
920
|
private readonly paraIdTo?;
|
|
964
921
|
constructor(api: ApiPromise | undefined, from: TNode, to: TDestination, batchManager: BatchTransactionManager, paraIdTo?: number);
|
|
965
922
|
currency(currency: TCurrencyInput): AmountOrFeeAssetBuilder;
|
|
966
|
-
openChannel(): MaxSizeOpenChannelBuilder;
|
|
967
923
|
}
|
|
968
924
|
declare class FromGeneralBuilder {
|
|
969
925
|
private batchManager;
|
|
@@ -974,7 +930,6 @@ declare class FromGeneralBuilder {
|
|
|
974
930
|
to(node: TDestination, paraIdTo?: number): ToGeneralBuilder;
|
|
975
931
|
feeAsset(feeAsset: TCurrency): AmountBuilder;
|
|
976
932
|
amount(amount: TAmount | null): AddressBuilder;
|
|
977
|
-
closeChannel(): InboundCloseChannelBuilder;
|
|
978
933
|
}
|
|
979
934
|
declare class GeneralBuilder {
|
|
980
935
|
private readonly batchManager;
|
|
@@ -988,10 +943,6 @@ declare class GeneralBuilder {
|
|
|
988
943
|
buildBatch(options?: TBatchOptions): Promise<Extrinsic>;
|
|
989
944
|
}
|
|
990
945
|
declare const Builder: (api?: ApiPromise) => GeneralBuilder;
|
|
991
|
-
interface FinalBuilder {
|
|
992
|
-
build: () => Extrinsic | never;
|
|
993
|
-
buildSerializedApiCall: () => TSerializedApiCall;
|
|
994
|
-
}
|
|
995
946
|
interface FinalBuilderAsync {
|
|
996
947
|
build: () => Promise<Extrinsic>;
|
|
997
948
|
buildSerializedApiCall: () => Promise<TSerializedApiCall>;
|
|
@@ -1010,7 +961,7 @@ interface AmountBuilder {
|
|
|
1010
961
|
}
|
|
1011
962
|
interface AmountOrFeeAssetBuilder {
|
|
1012
963
|
amount: (amount: TAmount | null) => AddressBuilder;
|
|
1013
|
-
feeAsset: (feeAsset:
|
|
964
|
+
feeAsset: (feeAsset: TCurrency) => AmountBuilder;
|
|
1014
965
|
}
|
|
1015
966
|
interface FungibleBuilder {
|
|
1016
967
|
fungible: (multiAssets: TMultiAsset[]) => AccountBuilder;
|
|
@@ -1028,7 +979,7 @@ declare class EvmBuilderClass {
|
|
|
1028
979
|
constructor(provider: AbstractProvider);
|
|
1029
980
|
to(node: TNodePolkadotKusama): this;
|
|
1030
981
|
amount(amount: string): this;
|
|
1031
|
-
currency(currency:
|
|
982
|
+
currency(currency: TCurrencyCore): this;
|
|
1032
983
|
address(address: string): this;
|
|
1033
984
|
signer(signer: Signer): this;
|
|
1034
985
|
build(): Promise<void>;
|
|
@@ -1040,6 +991,8 @@ declare const getNodeEndpointOption: (node: TNodePolkadotKusama) => _polkadot_ap
|
|
|
1040
991
|
declare const getAllNodeProviders: (node: TNodePolkadotKusama) => string[];
|
|
1041
992
|
declare const getNodeProvider: (node: TNodeWithRelayChains) => string;
|
|
1042
993
|
declare const createApiInstanceForNode: (node: TNodeWithRelayChains) => Promise<ApiPromise>;
|
|
994
|
+
declare const determineRelayChain: (node: TNodeWithRelayChains) => TNodeDotKsmWithRelayChains;
|
|
995
|
+
declare const isRelayChain: (node: TNodeWithRelayChains) => boolean;
|
|
1043
996
|
|
|
1044
997
|
declare class InvalidCurrencyError extends Error {
|
|
1045
998
|
constructor(message: string);
|
|
@@ -1065,6 +1018,4 @@ declare class DuplicateAssetError extends Error {
|
|
|
1065
1018
|
constructor(symbol: string);
|
|
1066
1019
|
}
|
|
1067
1020
|
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
export { BatchMode, Builder, type CheckKeepAliveOptions, CloseChannelBuilder, DuplicateAssetError, EvmBuilder, type Extrinsic, type IPolkadotXCMTransfer, type IXTokensTransfer, type IXTransferTransfer, type InboundCloseChannelBuilder, IncompatibleNodesError, InvalidCurrencyError, type JunctionType, type Junctions, type MaxMessageSizeOpenChannelBuilder, type MaxSizeOpenChannelBuilder, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, NoXCMSupportImplementedError, NodeNotSupportedError, OpenChannelBuilder, type OutboundCloseChannelBuilder, Parents, type PolkadotXCMTransferInput, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TAsset, type TAssetDetails, type TAssetJsonMap, type TBatchOptions, type TCloseChannelInternalOptions, type TCloseChannelOptions, type TCurrency, type TCurrencyCore, type TCurrencyInput, type TCurrencySelection, type TCurrencySelectionHeader, type TCurrencySelectionHeaderArr, type TCurrencySelectionV4, type TCurrencySpecifier, type TDestination, type TEdJsonMap, type TEvmBuilderOptions, type TForeignAsset, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TJunction, type TMantaAsset, type TMultiAsset, type TMultiAssetV3, type TMultiAssetV4, type TMultiLocation, type TMultiLocationHeader, type TNativeAssetDetails, type TNativeTokenAsset, type TNode, type TNodeAssets, type TNodeDotKsmWithRelayChains, type TNodePolkadotKusama, type TNodeWithRelayChains, type TNodleAsset, type TOpenChannelInternalOptions, type TOpenChannelOptions, type TOptionalEvmBuilderOptions, type TOtherReserveAsset, type TPallet, type TPalletJsonMap, type TPalletMap, type TRelayChainSymbol, type TRelayChainType, type TRelayToParaCommonOptions, type TRelayToParaInternalOptions, type TRelayToParaOptions, type TReserveAsset, type TScenario, type TSelfReserveAsset, type TSendBaseOptions, type TSendInternalOptions, type TSendOptions, type TSendOptionsCommon, type TSerializeEthTransferOptions, type TSerializedApiCall, type TSerializedEthTransfer, type TTransferReturn, type TVersionClaimAssets, type TXTokensCurrencySelection, type TXcmAsset, type TZeitgeistAsset, Version, type XTokensTransferInput, type XTransferTransferInput, index as assets, buildEthTransferOptions, index$1 as closeChannels, createApiInstanceForNode, getAllAssetsSymbols, getAllNodeProviders, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getBalanceForeign, getBalanceNative, getDefaultPallet, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getNode, getNodeEndpointOption, getNodeProvider, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getTNode, getTransferInfo, hasSupportForAsset, index$2 as openChannels, send, sendSerializedApiCall, transferRelayToPara, transferRelayToParaCommon, transferRelayToParaSerializedApiCall, index$3 as xcmPallet };
|
|
1021
|
+
export { BatchMode, Builder, type CheckKeepAliveOptions, DuplicateAssetError, EvmBuilder, type Extrinsic, GeneralBuilder, type IPolkadotXCMTransfer, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidCurrencyError, type JunctionParachain, type JunctionType, type Junctions, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, NoXCMSupportImplementedError, NodeNotSupportedError, Parents, type PolkadotXCMTransferInput, type PolkadotXcmModule, type PolkadotXcmSection, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TAsset, type TAssetDetails, type TAssetJsonMap, type TBatchOptions, type TCurrency, type TCurrencyCore, type TCurrencyInput, type TCurrencySelection, type TCurrencySelectionHeader, type TCurrencySelectionHeaderArr, type TCurrencySelectionV4, type TCurrencySymbol, type TDestWeight, type TDestination, type TEdJsonMap, type TEvmBuilderOptions, type TForeignAsset, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TJunction, type TMantaAsset, type TMultiAsset, type TMultiAssetV3, type TMultiAssetV4, type TMultiLocation, type TMultiLocationHeader, type TNativeAssetDetails, type TNativeTokenAsset, type TNode, type TNodeAssets, type TNodeDotKsmWithRelayChains, type TNodePolkadotKusama, type TNodeWithRelayChains, type TNodleAsset, type TOptionalEvmBuilderOptions, type TOtherReserveAsset, type TPallet, type TPalletJsonMap, type TPalletMap, type TRelayChainSymbol, type TRelayChainType, type TRelayToParaCommonOptions, type TRelayToParaInternalOptions, type TRelayToParaOptions, type TReserveAsset, type TScenario, type TSelfReserveAsset, type TSendBaseOptions, type TSendInternalOptions, type TSendOptions, type TSendOptionsCommon, type TSerializeEthTransferOptions, type TSerializedApiCall, type TSerializedEthTransfer, type TTransferInfo, type TTransferReturn, type TVersionClaimAssets, type TXTokensCurrencySelection, type TXcmAsset, type TZeitgeistAsset, type UseKeepAliveFinalBuilder, Version, type XTokensModule, type XTokensSection, type XTokensTransferInput, type XTransferModule, type XTransferSection, type XTransferTransferInput, index as assets, buildEthTransferOptions, createApiInstanceForNode, determineRelayChain, getAllAssetsSymbols, getAllNodeProviders, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getBalanceForeign, getBalanceNative, getDefaultPallet, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getNode, getNodeEndpointOption, getNodeProvider, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getTNode, getTransferInfo, hasSupportForAsset, isRelayChain, send, sendSerializedApiCall, transferRelayToPara, transferRelayToParaCommon, transferRelayToParaSerializedApiCall, index$1 as xcmPallet };
|