@paraspell/sdk-core 8.8.0 → 8.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. package/README.md +2 -8
  2. package/dist/index.cjs +2581 -15883
  3. package/dist/index.d.ts +1158 -1520
  4. package/dist/index.mjs +2379 -15655
  5. package/package.json +5 -5
package/dist/index.d.ts CHANGED
@@ -1,3 +1,11 @@
1
+ import * as _paraspell_assets from '@paraspell/assets';
2
+ import { TMultiAsset, TCurrencyInputWithAmount, TCurrencyInput, WithAmount, TAsset, TMultiAssetWithFee, TCurrencyCore, TAmount } from '@paraspell/assets';
3
+ export * from '@paraspell/assets';
4
+ import * as _paraspell_sdk_common from '@paraspell/sdk-common';
5
+ import { TMultiLocation, TNodeDotKsmWithRelayChains, TNodeWithRelayChains, TNodePolkadotKusama, TNode, TJunction, TEcosystemType, TJunctions } from '@paraspell/sdk-common';
6
+ export * from '@paraspell/sdk-common';
7
+ import { TPallet } from '@paraspell/pallets';
8
+ export * from '@paraspell/pallets';
1
9
  import { Signer, AbstractProvider, Contract } from 'ethers';
2
10
  import { WalletClient, GetContractReturnType, Abi } from 'viem';
3
11
 
@@ -6,144 +14,6 @@ type WithApi<TBase, TApi, TRes> = TBase & {
6
14
  };
7
15
  type TApiOrUrl<TApi> = TApi | string | string[];
8
16
 
9
- type TJunctionType = 'Parachain' | 'AccountId32' | 'AccountIndex64' | 'AccountKey20' | 'PalletInstance' | 'GeneralIndex' | 'GeneralKey' | 'OnlyChild' | 'Plurality' | 'GlobalConsensus';
10
- type TNetworkId = string | null;
11
- type TBodyId = string | null;
12
- type TBodyPart = string | null;
13
- type TStringOrNumber = string | number;
14
- type TStringOrNumberOrBigInt = TStringOrNumber | bigint;
15
- type THexString = string;
16
- type TJunctionParachain = {
17
- Parachain: TStringOrNumberOrBigInt | undefined;
18
- };
19
- type TJunctionAccountId32 = {
20
- AccountId32: {
21
- network?: TNetworkId;
22
- id: THexString;
23
- };
24
- };
25
- type TJunctionAccountIndex64 = {
26
- AccountIndex64: {
27
- network: TNetworkId;
28
- index: TStringOrNumberOrBigInt;
29
- };
30
- };
31
- type TJunctionAccountKey20 = {
32
- AccountKey20: {
33
- network?: TNetworkId;
34
- key: THexString;
35
- };
36
- };
37
- type TJunctionPalletInstance = {
38
- PalletInstance: TStringOrNumberOrBigInt;
39
- };
40
- type TJunctionGeneralIndex = {
41
- GeneralIndex: TStringOrNumberOrBigInt;
42
- };
43
- type TJunctionGeneralKey = {
44
- GeneralKey: {
45
- length: TStringOrNumberOrBigInt;
46
- data: THexString;
47
- };
48
- };
49
- type TJunctionOnlyChild = {
50
- OnlyChild: string;
51
- };
52
- type TJunctionPlurality = {
53
- Plurality: {
54
- id: TBodyId;
55
- part: TBodyPart;
56
- };
57
- };
58
- type TJunctionGlobalConsensus = {
59
- GlobalConsensus: TNetworkId | object;
60
- };
61
- type TJunction = TJunctionParachain | TJunctionAccountId32 | TJunctionAccountIndex64 | TJunctionAccountKey20 | TJunctionPalletInstance | TJunctionGeneralIndex | TJunctionGeneralKey | TJunctionOnlyChild | TJunctionPlurality | TJunctionGlobalConsensus;
62
- interface TJunctions {
63
- Here?: null;
64
- X1?: TJunction | [TJunction];
65
- X2?: [TJunction, TJunction];
66
- X3?: [TJunction, TJunction, TJunction];
67
- X4?: [TJunction, TJunction, TJunction, TJunction];
68
- X5?: [TJunction, TJunction, TJunction, TJunction, TJunction];
69
- X6?: [TJunction, TJunction, TJunction, TJunction, TJunction, TJunction];
70
- X7?: [TJunction, TJunction, TJunction, TJunction, TJunction, TJunction, TJunction];
71
- X8?: [TJunction, TJunction, TJunction, TJunction, TJunction, TJunction, TJunction, TJunction];
72
- }
73
- interface TMultiLocation {
74
- parents: TStringOrNumber;
75
- interior: TJunctions | 'Here';
76
- }
77
-
78
- type AtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
79
- [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
80
- }[Keys];
81
- type TBaseAsset = {
82
- symbol: string;
83
- decimals?: number;
84
- manuallyAdded?: boolean;
85
- alias?: string;
86
- existentialDeposit?: string;
87
- };
88
- type TNativeAsset = TBaseAsset & {
89
- isNative: true;
90
- multiLocation?: object;
91
- };
92
- type TForeignAsset = TBaseAsset & AtLeastOne<{
93
- assetId?: string;
94
- multiLocation?: object;
95
- }>;
96
- type TAsset = TNativeAsset | TForeignAsset;
97
- type TNodeAssets = {
98
- relayChainAssetSymbol: TRelayChainSymbol;
99
- nativeAssetSymbol: string;
100
- isEVM: boolean;
101
- supportsDryRunApi: boolean;
102
- nativeAssets: TNativeAsset[];
103
- otherAssets: TForeignAsset[];
104
- };
105
- type TAssetJsonMap = Record<TNodeWithRelayChains, TNodeAssets>;
106
-
107
- type TCurrency = string | number | bigint;
108
- type TSymbolSpecifier = {
109
- type: 'Native' | 'Foreign' | 'ForeignAbstract';
110
- value: string;
111
- };
112
- type TOverrideMultiLocationSpecifier = {
113
- type: 'Override';
114
- value: TMultiLocation;
115
- };
116
- type TCurrencySymbolValue = string | TSymbolSpecifier;
117
- type TCurrencySymbol = {
118
- symbol: TCurrencySymbolValue;
119
- };
120
- type TCurrencyCore = TCurrencySymbol | {
121
- id: TCurrency;
122
- } | {
123
- multilocation: TMultiLocationValue;
124
- };
125
- type TMultiAssetWithFee = TMultiAsset & {
126
- isFeeAsset?: boolean;
127
- };
128
- type TMultiLocationValue = string | TMultiLocation;
129
- type TMultiLocationValueWithOverride = TMultiLocationValue | TOverrideMultiLocationSpecifier;
130
- type TCurrencyInputWithAmount = WithAmount<TCurrencySymbol | {
131
- id: TCurrency;
132
- } | {
133
- multilocation: TMultiLocationValueWithOverride;
134
- }> | {
135
- multiasset: TMultiAsset[] | WithAmount<TCurrencyCore>[];
136
- };
137
- type TCurrencyInput = TCurrencySymbol | {
138
- id: TCurrency;
139
- } | {
140
- multilocation: TMultiLocationValueWithOverride;
141
- } | {
142
- multiasset: TMultiAsset[] | WithAmount<TCurrencyCore>[];
143
- };
144
- type WithAmount<TBase> = TBase & {
145
- amount: TAmount;
146
- };
147
17
  type OneKey<K extends string, V = unknown> = {
148
18
  [P in K]: Record<P, V> & Partial<Record<Exclude<K, P>, never>> extends infer O ? {
149
19
  [Q in keyof O]: O[Q];
@@ -189,1358 +59,1282 @@ type TBifrostToken = {
189
59
  };
190
60
  type TXTokensCurrencySelection = TXcmVersioned<TMultiLocation | TMultiAsset | TMultiAsset[]> | TXcmForeignAsset | TForeignAssetId | TForeignOrTokenAsset | TXcmAsset | TMantaAsset | TOtherReserveAsset | TBifrostToken | string | bigint | number | undefined;
191
61
 
192
- declare const ETH_CHAIN_ID: bigint;
193
- declare const ETHEREUM_JUNCTION: TJunction;
194
- /**
195
- * Supported nodes excluding relay chains and Ethereum.
196
- */
197
- declare const NODE_NAMES_DOT_KSM: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Heima", "Moonbeam", "Parallel", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Calamari", "CrustShadow", "Crab", "Imbue", "InvArchTinker", "Karura", "Kintsugi", "Moonriver", "ParallelHeiko", "Picasso", "Quartz", "RobonomicsKusama", "RobonomicsPolkadot", "PeoplePolkadot", "PeopleKusama", "Shiden", "Turing", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Zeitgeist", "Collectives", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec"];
62
+ type TRelaychain = 'Polkadot' | 'Kusama';
63
+
64
+ type TPolkadotXCMTransferOptions<TApi, TRes> = {
65
+ api: IPolkadotApi<TApi, TRes>;
66
+ header: TXcmVersioned<TMultiLocation>;
67
+ addressSelection: TXcmVersioned<TMultiLocation>;
68
+ address: TAddress;
69
+ currencySelection: TXcmVersioned<TMultiAsset[]>;
70
+ overriddenAsset?: TMultiLocation | TMultiAssetWithFee[];
71
+ scenario: TScenario;
72
+ asset: WithAmount<TAsset>;
73
+ feeAsset?: TAsset;
74
+ destination: TDestination;
75
+ paraIdTo?: number;
76
+ version?: Version;
77
+ senderAddress?: string;
78
+ pallet?: string;
79
+ method?: string;
80
+ };
81
+ type TXTokensTransferOptions<TApi, TRes> = {
82
+ api: IPolkadotApi<TApi, TRes>;
83
+ asset: WithAmount<TAsset>;
84
+ addressSelection: TXcmVersioned<TMultiLocation>;
85
+ fees: number;
86
+ scenario: TScenario;
87
+ origin: TNodePolkadotKusama;
88
+ destination: TDestination;
89
+ paraIdTo?: number;
90
+ overriddenAsset?: TMultiLocation | TMultiAssetWithFee[];
91
+ pallet?: string;
92
+ method?: string;
93
+ };
94
+ type TXTransferTransferOptions<TApi, TRes> = {
95
+ api: IPolkadotApi<TApi, TRes>;
96
+ asset: WithAmount<TAsset>;
97
+ recipientAddress: TAddress;
98
+ origin: TNodePolkadotKusama;
99
+ paraId?: number;
100
+ destination: TDestination;
101
+ overriddenAsset?: TMultiLocation | TMultiAsset[];
102
+ pallet?: string;
103
+ method?: string;
104
+ };
105
+ interface IPolkadotXCMTransfer {
106
+ transferPolkadotXCM: <TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>) => Promise<TRes>;
107
+ }
108
+ interface IXTokensTransfer {
109
+ transferXTokens: <TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>) => TRes;
110
+ }
111
+ interface IXTransferTransfer {
112
+ transferXTransfer: <TApi, TRes>(input: TXTransferTransferOptions<TApi, TRes>) => TRes;
113
+ }
114
+ type TScenario = 'ParaToRelay' | 'ParaToPara' | 'RelayToPara';
198
115
  /**
199
- * Supported nodes including Ethereum.
116
+ * The XCM version.
200
117
  */
201
- declare const NODE_NAMES: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Heima", "Moonbeam", "Parallel", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Calamari", "CrustShadow", "Crab", "Imbue", "InvArchTinker", "Karura", "Kintsugi", "Moonriver", "ParallelHeiko", "Picasso", "Quartz", "RobonomicsKusama", "RobonomicsPolkadot", "PeoplePolkadot", "PeopleKusama", "Shiden", "Turing", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Zeitgeist", "Collectives", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec", "Ethereum"];
118
+ declare enum Version {
119
+ V1 = "V1",
120
+ V2 = "V2",
121
+ V3 = "V3",
122
+ V4 = "V4"
123
+ }
202
124
  /**
203
- * Supported nodes including relay chains and Ethereum.
125
+ * The supported XCM versions for asset claims.
204
126
  */
205
- declare const NODES_WITH_RELAY_CHAINS: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Heima", "Moonbeam", "Parallel", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Calamari", "CrustShadow", "Crab", "Imbue", "InvArchTinker", "Karura", "Kintsugi", "Moonriver", "ParallelHeiko", "Picasso", "Quartz", "RobonomicsKusama", "RobonomicsPolkadot", "PeoplePolkadot", "PeopleKusama", "Shiden", "Turing", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Zeitgeist", "Collectives", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec", "Ethereum", "Polkadot", "Kusama"];
127
+ type TVersionClaimAssets = Version.V3 | Version.V2;
128
+ type TAddress = string | TMultiLocation;
129
+ type TDestination = TNodeWithRelayChains | TMultiLocation;
130
+ type TRelayToParaDestination = TNodePolkadotKusama | TMultiLocation;
131
+ type TSendBaseOptions = {
132
+ /**
133
+ * The origin node
134
+ */
135
+ from: TNodeDotKsmWithRelayChains;
136
+ /**
137
+ * The destination address. A SS58 or H160 format.
138
+ */
139
+ address: TAddress;
140
+ /**
141
+ * The optional sender address. A SS58
142
+ */
143
+ senderAddress?: string;
144
+ /**
145
+ * The destination node or multi-location
146
+ */
147
+ to: TDestination;
148
+ /**
149
+ * The currency to transfer. Either ID, symbol, multi-location, or multi-asset
150
+ */
151
+ currency: TCurrencyInputWithAmount;
152
+ /**
153
+ * The optional fee asset. Either ID, symbol, or multi-location
154
+ */
155
+ feeAsset?: TCurrencyInput;
156
+ /**
157
+ * The optional destination parachain ID
158
+ */
159
+ paraIdTo?: number;
160
+ /**
161
+ * The optional overrided XCM version
162
+ */
163
+ version?: Version;
164
+ /**
165
+ * The optional pallet override
166
+ */
167
+ pallet?: string;
168
+ /**
169
+ * The optional pallet method override
170
+ */
171
+ method?: string;
172
+ };
206
173
  /**
207
- * Supported nodes including relay chains and excluding Ethereum.
174
+ * Options for transferring from a parachain to another parachain or relay chain
208
175
  */
209
- declare const NODES_WITH_RELAY_CHAINS_DOT_KSM: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Heima", "Moonbeam", "Parallel", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Calamari", "CrustShadow", "Crab", "Imbue", "InvArchTinker", "Karura", "Kintsugi", "Moonriver", "ParallelHeiko", "Picasso", "Quartz", "RobonomicsKusama", "RobonomicsPolkadot", "PeoplePolkadot", "PeopleKusama", "Shiden", "Turing", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Zeitgeist", "Collectives", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec", "Polkadot", "Kusama"];
176
+ type TSendOptions<TApi, TRes> = WithApi<TSendBaseOptions, TApi, TRes>;
177
+ type TSendInternalOptions<TApi, TRes> = Omit<TSendBaseOptions, 'from' | 'currency' | 'feeAsset'> & {
178
+ api: IPolkadotApi<TApi, TRes>;
179
+ asset: WithAmount<TAsset>;
180
+ feeAsset?: TAsset;
181
+ overriddenAsset?: TMultiLocation | TMultiAssetWithFee[];
182
+ };
183
+ type TRelayToParaBaseOptions = {
184
+ /**
185
+ * The origin node
186
+ */
187
+ origin: TRelaychain;
188
+ /**
189
+ * The destination node or multi-location
190
+ */
191
+ destination: TRelayToParaDestination;
192
+ /**
193
+ * The destination address. A SS58 or H160 format.
194
+ */
195
+ address: TAddress;
196
+ /**
197
+ * The optional destination parachain ID
198
+ */
199
+ paraIdTo?: number;
200
+ /**
201
+ * The optional overrided XCM version
202
+ */
203
+ version?: Version;
204
+ /**
205
+ * The DOT or KSM asset to transfer
206
+ */
207
+ asset: WithAmount<TAsset>;
208
+ /**
209
+ * The optional pallet override
210
+ */
211
+ pallet?: string;
212
+ /**
213
+ * The optional pallet method override
214
+ */
215
+ method?: string;
216
+ };
217
+ type TRelayToParaOverrides = {
218
+ section: TXcmPalletSection;
219
+ includeFee: boolean;
220
+ };
210
221
  /**
211
- * Supported XCM pallets.
222
+ * Options for transferring from a relay chain to a parachain
212
223
  */
213
- declare const SUPPORTED_PALLETS: readonly ["XTokens", "OrmlXTokens", "PolkadotXcm", "RelayerXcm", "XTransfer", "XcmPallet"];
214
-
215
- declare abstract class ParachainNode<TApi, TRes> {
216
- private readonly _node;
217
- private readonly _info;
218
- private readonly _type;
219
- private readonly _version;
220
- protected _assetCheckEnabled: boolean;
221
- constructor(node: TNodePolkadotKusama, info: string, type: TEcosystemType, version: Version);
222
- get info(): string;
223
- get type(): TEcosystemType;
224
- get node(): TNodePolkadotKusama;
225
- get version(): Version;
226
- get assetCheckEnabled(): boolean;
227
- protected canUseXTokens(_: TSendInternalOptions<TApi, TRes>): boolean;
228
- transfer(options: TSendInternalOptions<TApi, TRes>): Promise<TRes>;
229
- getRelayToParaOverrides(): TRelayToParaOverrides;
230
- transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCall;
231
- createCurrencySpec(amount: TAmount, scenario: TScenario, version: Version, _asset?: TAsset): TXcmVersioned<TMultiAsset[]>;
232
- createPolkadotXcmHeader(scenario: TScenario, version: Version, destination: TDestination, paraId?: number): TXcmVersioned<TMultiLocation>;
233
- getNativeAssetSymbol(): string;
234
- protected transferToEthereum<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
235
- }
236
-
237
- declare class Acala<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
238
- constructor();
239
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
240
- }
241
-
242
- declare class Altair<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
243
- constructor();
244
- private getCurrencySelection;
245
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
246
- }
224
+ type TRelayToParaOptions<TApi, TRes> = WithApi<TRelayToParaBaseOptions, TApi, TRes>;
225
+ type TSerializedApiCall = {
226
+ module: TPallet | 'Utility';
227
+ section: string;
228
+ parameters: Record<string, unknown>;
229
+ };
230
+ type TDestWeight = {
231
+ ref_time: bigint;
232
+ proof_size: bigint;
233
+ };
234
+ type TXTransferSection = 'transfer';
235
+ type TXTokensSection = 'transfer' | 'transfer_multiasset' | 'transfer_multiassets';
236
+ type TPolkadotXcmSection = 'limited_teleport_assets' | 'limited_reserve_transfer_assets' | 'reserve_transfer_assets' | 'reserve_withdraw_assets' | 'transfer_assets';
237
+ type TXcmPalletSection = 'limited_teleport_assets' | 'reserve_transfer_assets' | 'limited_reserve_transfer_assets';
238
+ type TWeight = {
239
+ refTime: bigint;
240
+ proofSize: bigint;
241
+ };
242
+ type TCreateBeneficiaryOptions<TApi, TRes> = {
243
+ api: IPolkadotApi<TApi, TRes>;
244
+ scenario: TScenario;
245
+ pallet: TPallet | null;
246
+ recipientAddress: TAddress;
247
+ version: Version;
248
+ paraId?: number;
249
+ };
247
250
 
248
- declare class Amplitude<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
249
- constructor();
250
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
251
- }
251
+ type TAssetClaimOptionsBase = {
252
+ node: TNodeWithRelayChains;
253
+ multiAssets: TMultiAsset[];
254
+ address: TAddress;
255
+ version?: TVersionClaimAssets;
256
+ };
257
+ type TAssetClaimOptions<TApi, TRes> = WithApi<TAssetClaimOptionsBase, TApi, TRes>;
252
258
 
253
- declare class AssetHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
254
- constructor();
255
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
256
- getRelayToParaOverrides(): TRelayToParaOverrides;
257
- createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): {
258
- V1: TMultiAsset[];
259
- V2?: undefined;
260
- V3?: undefined;
261
- V4?: undefined;
262
- } | {
263
- V2: TMultiAsset[];
264
- V1?: undefined;
265
- V3?: undefined;
266
- V4?: undefined;
267
- } | {
268
- V3: TMultiAsset[];
269
- V1?: undefined;
270
- V2?: undefined;
271
- V4?: undefined;
272
- } | {
273
- V4: TMultiAsset[];
274
- V1?: undefined;
275
- V2?: undefined;
276
- V3?: undefined;
277
- };
278
- }
279
-
280
- declare class AssetHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
281
- constructor();
282
- handleBridgeTransfer<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>, targetChain: 'Polkadot' | 'Kusama'): TRes;
283
- handleEthBridgeTransfer<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
284
- handleMythosTransfer<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
285
- handleBifrostEthTransfer: <TApi_1, TRes_1>(input: TPolkadotXCMTransferOptions<TApi_1, TRes_1>) => TRes_1;
286
- patchInput<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TPolkadotXCMTransferOptions<TApi, TRes>;
287
- private getSection;
288
- private handleExecuteTransfer;
289
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
290
- getRelayToParaOverrides(): TRelayToParaOverrides;
291
- createCurrencySpec(amount: TAmount, scenario: TScenario, version: Version, asset?: TAsset): {
292
- V1: TMultiAsset[];
293
- V2?: undefined;
294
- V3?: undefined;
295
- V4?: undefined;
296
- } | {
297
- V2: TMultiAsset[];
298
- V1?: undefined;
299
- V3?: undefined;
300
- V4?: undefined;
301
- } | {
302
- V3: TMultiAsset[];
303
- V1?: undefined;
304
- V2?: undefined;
305
- V4?: undefined;
306
- } | {
307
- V4: TMultiAsset[];
308
- V1?: undefined;
309
- V2?: undefined;
310
- V3?: undefined;
311
- };
312
- }
313
-
314
- declare class Astar<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer, IXTokensTransfer {
315
- constructor();
316
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
317
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
318
- protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
319
- }
320
-
321
- declare class Bajun<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
322
- constructor();
323
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
324
- transferRelayToPara(): TSerializedApiCall;
325
- }
326
-
327
- declare class Basilisk<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
328
- constructor();
329
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
330
- }
331
-
332
- declare class BifrostKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
333
- constructor();
334
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
335
- }
336
-
337
- declare class BifrostPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer, IPolkadotXCMTransfer {
338
- constructor();
339
- getCurrencySelection(asset: TAsset): {
340
- Native: string;
341
- VToken?: undefined;
342
- Token?: undefined;
343
- VSToken2?: undefined;
344
- VToken2?: undefined;
345
- Token2?: undefined;
346
- } | {
347
- VToken: string;
348
- Native?: undefined;
349
- Token?: undefined;
350
- VSToken2?: undefined;
351
- VToken2?: undefined;
352
- Token2?: undefined;
353
- } | {
354
- Token: string;
355
- Native?: undefined;
356
- VToken?: undefined;
357
- VSToken2?: undefined;
358
- VToken2?: undefined;
359
- Token2?: undefined;
360
- } | {
361
- VSToken2: number;
362
- Native?: undefined;
363
- VToken?: undefined;
364
- Token?: undefined;
365
- VToken2?: undefined;
366
- Token2?: undefined;
367
- } | {
368
- VToken2: number;
369
- Native?: undefined;
370
- VToken?: undefined;
371
- Token?: undefined;
372
- VSToken2?: undefined;
373
- Token2?: undefined;
374
- } | {
375
- Token2: number;
376
- Native?: undefined;
377
- VToken?: undefined;
378
- Token?: undefined;
379
- VSToken2?: undefined;
380
- VToken2?: undefined;
381
- };
382
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
383
- transferToAssetHub<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
384
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
385
- protected canUseXTokens({ asset, to: destination }: TSendInternalOptions<TApi, TRes>): boolean;
386
- }
387
-
388
- declare class Bitgreen<TApi, TRes> extends ParachainNode<TApi, TRes> {
389
- constructor();
390
- }
391
-
392
- declare class BridgeHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
393
- constructor();
394
- _assetCheckEnabled: boolean;
395
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
396
- getRelayToParaOverrides(): TRelayToParaOverrides;
397
- }
398
-
399
- declare class BridgeHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
400
- constructor();
401
- _assetCheckEnabled: boolean;
402
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
403
- getRelayToParaOverrides(): TRelayToParaOverrides;
404
- }
405
-
406
- declare class Calamari<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
407
- constructor();
408
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
409
- }
410
-
411
- declare class Centrifuge<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
412
- constructor();
413
- private getCurrencySelection;
414
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
415
- }
416
-
417
- declare class Collectives<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
418
- constructor();
419
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
420
- getRelayToParaOverrides(): TRelayToParaOverrides;
421
- createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): TXcmVersioned<TMultiAsset[]>;
422
- }
423
-
424
- declare class ComposableFinance<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
425
- constructor();
426
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
427
- }
428
-
429
- declare class CoretimeKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
430
- constructor();
431
- _assetCheckEnabled: boolean;
432
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
433
- getRelayToParaOverrides(): TRelayToParaOverrides;
434
- }
435
-
436
- declare class CoretimePolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
437
- constructor();
438
- _assetCheckEnabled: boolean;
439
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
440
- getRelayToParaOverrides(): TRelayToParaOverrides;
441
- }
442
-
443
- declare class Crab<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
444
- constructor();
445
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
446
- transferRelayToPara(): TSerializedApiCall;
447
- createCurrencySpec(amount: string, scenario: TScenario, version: Version, _asset?: TAsset): {
448
- V1: TMultiAsset[];
449
- V2?: undefined;
450
- V3?: undefined;
451
- V4?: undefined;
452
- } | {
453
- V2: TMultiAsset[];
454
- V1?: undefined;
455
- V3?: undefined;
456
- V4?: undefined;
457
- } | {
458
- V3: TMultiAsset[];
459
- V1?: undefined;
460
- V2?: undefined;
461
- V4?: undefined;
462
- } | {
463
- V4: TMultiAsset[];
464
- V1?: undefined;
465
- V2?: undefined;
466
- V3?: undefined;
467
- };
468
- }
469
-
470
- declare class Crust<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
471
- constructor();
472
- private getCurrencySelection;
473
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
474
- }
475
-
476
- declare class CrustShadow<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
477
- constructor();
478
- private getCurrencySelection;
479
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
480
- }
481
-
482
- declare class Curio<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
483
- constructor();
484
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
485
- }
486
-
487
- declare class Darwinia<TApi, TRes> extends ParachainNode<TApi, TRes> {
488
- constructor();
489
- transferRelayToPara(): TSerializedApiCall;
490
- }
491
-
492
- declare class Encointer<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
493
- constructor();
494
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
495
- getRelayToParaOverrides(): TRelayToParaOverrides;
496
- }
497
-
498
- declare class Heima<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
499
- constructor();
500
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
501
- }
502
-
503
- declare class Hydration<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer, IPolkadotXCMTransfer {
504
- private static NATIVE_ASSET_ID;
505
- constructor();
506
- transferToAssetHub<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
507
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
508
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
509
- protected canUseXTokens({ to: destination, asset }: TSendInternalOptions<TApi, TRes>): boolean;
510
- }
511
-
512
- declare class Imbue<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
513
- constructor();
514
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
515
- }
516
-
517
- declare class Interlay<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
518
- constructor();
519
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
520
- }
521
-
522
- declare class InvArchTinker<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
523
- constructor();
524
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
525
- }
526
-
527
- declare class Karura<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
528
- constructor();
529
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
530
- }
531
-
532
- declare class KiltSpiritnet<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
533
- constructor();
534
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
535
- transferRelayToPara(): TSerializedApiCall;
536
- }
537
-
538
- declare class Kintsugi<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
539
- constructor();
540
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
541
- }
542
-
543
- declare class Manta<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
544
- constructor();
545
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
546
- }
547
-
548
- declare class Moonbeam<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
549
- constructor();
550
- private getMultiLocation;
551
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
552
- getRelayToParaOverrides(): TRelayToParaOverrides;
553
- }
554
-
555
- declare class Moonriver<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
556
- constructor();
557
- private getMultiLocation;
558
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
559
- getRelayToParaOverrides(): TRelayToParaOverrides;
560
- }
561
-
562
- declare class Mythos<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
563
- constructor();
564
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
565
- transferRelayToPara(): TSerializedApiCall;
566
- }
567
-
568
- declare class NeuroWeb<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
569
- constructor();
570
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
571
- }
572
-
573
- declare class Nodle<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
574
- constructor();
575
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
576
- transferRelayToPara(): TSerializedApiCall;
577
- }
578
-
579
- declare class Parallel<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
580
- constructor();
581
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
582
- }
583
-
584
- declare class ParallelHeiko<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
585
- constructor();
586
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
587
- }
588
-
589
- declare class Peaq<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
590
- constructor();
591
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
592
- transferRelayToPara(): TSerializedApiCall;
593
- }
594
-
595
- declare class Pendulum<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
596
- constructor();
597
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
598
- transferRelayToPara(): TSerializedApiCall;
599
- }
600
-
601
- declare class PeopleKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
602
- constructor();
603
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
604
- getRelayToParaOverrides(): TRelayToParaOverrides;
605
- }
606
-
607
- declare class PeoplePolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
608
- constructor();
609
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
610
- getRelayToParaOverrides(): TRelayToParaOverrides;
611
- }
612
-
613
- declare class Phala<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTransferTransfer {
614
- constructor();
615
- transferXTransfer<TApi, TRes>(input: TXTransferTransferOptions<TApi, TRes>): TRes;
616
- }
617
-
618
- declare class Picasso<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
619
- constructor();
620
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
621
- }
622
-
623
- declare class Polimec<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
624
- constructor();
625
- private getAssetMultiLocation;
626
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
627
- transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCall;
628
- }
629
-
630
- declare class Quartz<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
631
- private static NATIVE_ASSET_ID;
632
- constructor();
633
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
634
- }
635
-
636
- declare class RobonomicsKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
637
- constructor();
638
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
639
- }
640
-
641
- declare class RobonomicsPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
642
- constructor();
643
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
644
- }
645
-
646
- declare class Shiden<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer, IXTokensTransfer {
647
- constructor();
648
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
649
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
650
- protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
651
- }
652
-
653
- declare class Subsocial<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
654
- constructor();
655
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
656
- }
657
-
658
- declare class Turing<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
659
- constructor();
660
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
661
- }
662
-
663
- declare class Unique<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
664
- private static NATIVE_ASSET_ID;
665
- constructor();
666
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
667
- }
668
-
669
- declare class Zeitgeist<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
670
- constructor();
671
- private getCurrencySelection;
672
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
673
- }
674
-
675
- declare const nodes: <TApi, TRes>() => {
676
- AssetHubPolkadot: AssetHubPolkadot<TApi, TRes>;
677
- Acala: Acala<TApi, TRes>;
678
- Astar: Astar<TApi, TRes>;
679
- Unique: Unique<TApi, TRes>;
680
- Crust: Crust<TApi, TRes>;
681
- BifrostPolkadot: BifrostPolkadot<TApi, TRes>;
682
- BridgeHubPolkadot: BridgeHubPolkadot<TApi, TRes>;
683
- BridgeHubKusama: BridgeHubKusama<TApi, TRes>;
684
- Bitgreen: Bitgreen<TApi, TRes>;
685
- Centrifuge: Centrifuge<TApi, TRes>;
686
- ComposableFinance: ComposableFinance<TApi, TRes>;
687
- Darwinia: Darwinia<TApi, TRes>;
688
- Hydration: Hydration<TApi, TRes>;
689
- Interlay: Interlay<TApi, TRes>;
690
- Heima: Heima<TApi, TRes>;
691
- Moonbeam: Moonbeam<TApi, TRes>;
692
- Parallel: Parallel<TApi, TRes>;
693
- AssetHubKusama: AssetHubKusama<TApi, TRes>;
694
- CoretimeKusama: CoretimeKusama<TApi, TRes>;
695
- CoretimePolkadot: CoretimePolkadot<TApi, TRes>;
696
- Encointer: Encointer<TApi, TRes>;
697
- Altair: Altair<TApi, TRes>;
698
- Amplitude: Amplitude<TApi, TRes>;
699
- Bajun: Bajun<TApi, TRes>;
700
- Basilisk: Basilisk<TApi, TRes>;
701
- BifrostKusama: BifrostKusama<TApi, TRes>;
702
- Calamari: Calamari<TApi, TRes>;
703
- CrustShadow: CrustShadow<TApi, TRes>;
704
- Crab: Crab<TApi, TRes>;
705
- Imbue: Imbue<TApi, TRes>;
706
- InvArchTinker: InvArchTinker<TApi, TRes>;
707
- Karura: Karura<TApi, TRes>;
708
- Kintsugi: Kintsugi<TApi, TRes>;
709
- Moonriver: Moonriver<TApi, TRes>;
710
- ParallelHeiko: ParallelHeiko<TApi, TRes>;
711
- Picasso: Picasso<TApi, TRes>;
712
- Quartz: Quartz<TApi, TRes>;
713
- RobonomicsKusama: RobonomicsKusama<TApi, TRes>;
714
- RobonomicsPolkadot: RobonomicsPolkadot<TApi, TRes>;
715
- PeoplePolkadot: PeoplePolkadot<TApi, TRes>;
716
- PeopleKusama: PeopleKusama<TApi, TRes>;
717
- Shiden: Shiden<TApi, TRes>;
718
- Turing: Turing<TApi, TRes>;
719
- Manta: Manta<TApi, TRes>;
720
- Nodle: Nodle<TApi, TRes>;
721
- NeuroWeb: NeuroWeb<TApi, TRes>;
722
- Pendulum: Pendulum<TApi, TRes>;
723
- Zeitgeist: Zeitgeist<TApi, TRes>;
724
- Collectives: Collectives<TApi, TRes>;
725
- Phala: Phala<TApi, TRes>;
726
- Subsocial: Subsocial<TApi, TRes>;
727
- KiltSpiritnet: KiltSpiritnet<TApi, TRes>;
728
- Curio: Curio<TApi, TRes>;
729
- Mythos: Mythos<TApi, TRes>;
730
- Peaq: Peaq<TApi, TRes>;
731
- Polimec: Polimec<TApi, TRes>;
732
- };
733
-
734
- type TRelaychain = 'Polkadot' | 'Kusama';
735
- type TNode = (typeof NODE_NAMES)[number];
736
- type TNodePolkadotKusama = Exclude<TNode, 'Ethereum'>;
737
- type TNodeWithRelayChains = (typeof NODES_WITH_RELAY_CHAINS)[number];
738
- type TNodeDotKsmWithRelayChains = Exclude<TNodeWithRelayChains, 'Ethereum'>;
739
-
740
- type TPallet = (typeof SUPPORTED_PALLETS)[number];
741
- type TPalletDetails = {
742
- name: TPallet;
743
- index: number;
744
- };
745
- interface TPalletMap {
746
- defaultPallet: TPallet;
747
- supportedPallets: TPalletDetails[];
748
- }
749
- type TPalletJsonMap = Record<TNodeDotKsmWithRelayChains, TPalletMap>;
750
-
751
- type TPolkadotXCMTransferOptions<TApi, TRes> = {
752
- api: IPolkadotApi<TApi, TRes>;
753
- header: TXcmVersioned<TMultiLocation>;
754
- addressSelection: TXcmVersioned<TMultiLocation>;
755
- address: TAddress;
756
- currencySelection: TXcmVersioned<TMultiAsset[]>;
757
- overriddenAsset?: TMultiLocation | TMultiAssetWithFee[];
758
- scenario: TScenario;
759
- asset: WithAmount<TAsset>;
760
- feeAsset?: TAsset;
761
- destination: TDestination;
762
- paraIdTo?: number;
763
- version?: Version;
764
- senderAddress?: string;
765
- pallet?: string;
766
- method?: string;
767
- };
768
- type TXTokensTransferOptions<TApi, TRes> = {
769
- api: IPolkadotApi<TApi, TRes>;
770
- asset: WithAmount<TAsset>;
771
- addressSelection: TXcmVersioned<TMultiLocation>;
772
- fees: number;
773
- scenario: TScenario;
774
- origin: TNodePolkadotKusama;
775
- destination: TDestination;
776
- paraIdTo?: number;
777
- overriddenAsset?: TMultiLocation | TMultiAssetWithFee[];
778
- pallet?: string;
779
- method?: string;
259
+ type TBalanceResponse = {
260
+ free?: string;
261
+ balance?: string;
780
262
  };
781
- type TXTransferTransferOptions<TApi, TRes> = {
782
- api: IPolkadotApi<TApi, TRes>;
783
- asset: WithAmount<TAsset>;
784
- recipientAddress: TAddress;
785
- origin: TNodePolkadotKusama;
786
- paraId?: number;
787
- destination: TDestination;
788
- overriddenAsset?: TMultiLocation | TMultiAsset[];
789
- pallet?: string;
790
- method?: string;
263
+ /**
264
+ * Retrieves the native asset balance for a given account on a specified node.
265
+ */
266
+ type TGetBalanceNativeOptionsBase = {
267
+ /**
268
+ * The address of the account.
269
+ */
270
+ address: string;
271
+ /**
272
+ * The node on which to query the balance.
273
+ */
274
+ node: TNodeDotKsmWithRelayChains;
275
+ /**
276
+ * The native currency to query.
277
+ */
278
+ currency?: {
279
+ symbol: string;
280
+ };
791
281
  };
792
- interface IPolkadotXCMTransfer {
793
- transferPolkadotXCM: <TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>) => Promise<TRes>;
794
- }
795
- interface IXTokensTransfer {
796
- transferXTokens: <TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>) => TRes;
797
- }
798
- interface IXTransferTransfer {
799
- transferXTransfer: <TApi, TRes>(input: TXTransferTransferOptions<TApi, TRes>) => TRes;
800
- }
801
- type TScenario = 'ParaToRelay' | 'ParaToPara' | 'RelayToPara';
282
+ type TGetBalanceNativeOptions<TApi, TRes> = WithApi<TGetBalanceNativeOptionsBase, TApi, TRes>;
802
283
  /**
803
- * The XCM version.
284
+ * Retrieves the balance of a foreign asset for a given account on a specified node.
804
285
  */
805
- declare enum Version {
806
- V1 = "V1",
807
- V2 = "V2",
808
- V3 = "V3",
809
- V4 = "V4"
810
- }
286
+ type TGetBalanceForeignOptionsBase = {
287
+ address: string;
288
+ /**
289
+ * The node on which to query the balance.
290
+ */
291
+ node: TNodePolkadotKusama;
292
+ /**
293
+ * The currency to query.
294
+ */
295
+ currency: TCurrencyCore;
296
+ };
297
+ type TGetBalanceForeignOptions<TApi, TRes> = WithApi<TGetBalanceForeignOptionsBase, TApi, TRes>;
811
298
  /**
812
- * The supported XCM versions for asset claims.
299
+ * Retrieves the asset balance for a given account on a specified node.
813
300
  */
814
- type TVersionClaimAssets = Version.V3 | Version.V2;
815
- declare enum Parents {
816
- ZERO = 0,
817
- ONE = 1,
818
- TWO = 2
819
- }
820
- type TAmount = string | number | bigint;
821
- type TAddress = string | TMultiLocation;
822
- type TDestination = TNodeWithRelayChains | TMultiLocation;
823
- type TRelayToParaDestination = TNodePolkadotKusama | TMultiLocation;
824
- type TSendBaseOptions = {
301
+ type TGetAssetBalanceOptionsBase = {
302
+ /**
303
+ * The address of the account.
304
+ */
305
+ address: string;
306
+ /**
307
+ * The node on which to query the balance.
308
+ */
309
+ node: TNodeDotKsmWithRelayChains;
310
+ /**
311
+ * The currency to query.
312
+ */
313
+ currency: TCurrencyCore;
314
+ };
315
+ type TGetAssetBalanceOptions<TApi, TRes> = WithApi<TGetAssetBalanceOptionsBase, TApi, TRes>;
316
+ type TGetOriginFeeDetailsOptionsBase = {
317
+ /**
318
+ * The origin node.
319
+ */
320
+ origin: TNodeDotKsmWithRelayChains;
321
+ /**
322
+ * The destination node.
323
+ */
324
+ destination: TNodeWithRelayChains;
325
+ /**
326
+ * The currency to transfer.
327
+ */
328
+ currency: WithAmount<TCurrencyCore>;
825
329
  /**
826
- * The origin node
330
+ * The origin account.
827
331
  */
828
- from: TNodeDotKsmWithRelayChains;
332
+ account: string;
829
333
  /**
830
- * The destination address. A SS58 or H160 format.
334
+ * The destination account.
831
335
  */
832
- address: TAddress;
336
+ accountDestination: string;
833
337
  /**
834
- * The optional sender address. A SS58
338
+ * The fee margin percentage.
835
339
  */
836
- senderAddress?: string;
340
+ feeMarginPercentage?: number;
341
+ };
342
+ type TGetOriginFeeDetailsOptions<TApi, TRes> = WithApi<TGetOriginFeeDetailsOptionsBase, TApi, TRes>;
343
+ type TGetMaxNativeTransferableAmountOptionsBase = {
837
344
  /**
838
- * The destination node or multi-location
345
+ * The address of the account.
839
346
  */
840
- to: TDestination;
347
+ address: string;
841
348
  /**
842
- * The currency to transfer. Either ID, symbol, multi-location, or multi-asset
349
+ * The node on which to query the balance.
843
350
  */
844
- currency: TCurrencyInputWithAmount;
351
+ node: TNodeDotKsmWithRelayChains;
845
352
  /**
846
- * The optional fee asset. Either ID, symbol, or multi-location
353
+ * The currency to query.
847
354
  */
848
- feeAsset?: TCurrencyInput;
355
+ currency?: {
356
+ symbol: string;
357
+ };
358
+ };
359
+ type TGetMaxNativeTransferableAmountOptions<TApi, TRes> = WithApi<TGetMaxNativeTransferableAmountOptionsBase, TApi, TRes>;
360
+ type TGetMaxForeignTransferableAmountOptionsBase = {
849
361
  /**
850
- * The optional destination parachain ID
362
+ * The address of the account.
851
363
  */
852
- paraIdTo?: number;
364
+ address: string;
853
365
  /**
854
- * The optional overrided XCM version
366
+ * The node on which to query the balance.
855
367
  */
856
- version?: Version;
368
+ node: TNodePolkadotKusama;
857
369
  /**
858
- * The optional pallet override
370
+ * The currency to query.
859
371
  */
860
- pallet?: string;
372
+ currency: TCurrencyCore;
373
+ };
374
+ type TGetMaxForeignTransferableAmountOptions<TApi, TRes> = WithApi<TGetMaxForeignTransferableAmountOptionsBase, TApi, TRes>;
375
+ type TGetTransferableAmountOptionsBase = {
861
376
  /**
862
- * The optional pallet method override
377
+ * The address of the account.
863
378
  */
864
- method?: string;
379
+ address: string;
380
+ /**
381
+ * The node on which to query the balance.
382
+ */
383
+ node: TNodeDotKsmWithRelayChains;
384
+ /**
385
+ * The currency to query.
386
+ */
387
+ currency: TCurrencyCore;
388
+ };
389
+ type TGetTransferableAmountOptions<TApi, TRes> = WithApi<TGetTransferableAmountOptionsBase, TApi, TRes>;
390
+ type TVerifyEdOnDestinationOptionsBase = {
391
+ node: TNodeDotKsmWithRelayChains;
392
+ address: string;
393
+ currency: WithAmount<TCurrencyCore>;
865
394
  };
395
+ type TVerifyEdOnDestinationOptions<TApi, TRes> = WithApi<TVerifyEdOnDestinationOptionsBase, TApi, TRes>;
396
+
397
+ type TEvmNodeFrom = Extract<TNode, 'Ethereum' | 'Moonbeam' | 'Moonriver' | 'Darwinia'>;
866
398
  /**
867
- * Options for transferring from a parachain to another parachain or relay chain
399
+ * The options for the Ethereum to Polkadot transfer builder.
868
400
  */
869
- type TSendOptions<TApi, TRes> = WithApi<TSendBaseOptions, TApi, TRes>;
870
- type TSendInternalOptions<TApi, TRes> = Omit<TSendBaseOptions, 'from' | 'currency' | 'feeAsset'> & {
871
- api: IPolkadotApi<TApi, TRes>;
872
- asset: WithAmount<TAsset>;
873
- feeAsset?: TAsset;
874
- overriddenAsset?: TMultiLocation | TMultiAssetWithFee[];
875
- };
876
- type TRelayToParaBaseOptions = {
401
+ type TEvmBuilderOptionsBase = {
877
402
  /**
878
- * The origin node
403
+ * The source node. Can be either 'Ethereum', 'Moonbeam', 'Moonriver', or 'Darwinia'.
879
404
  */
880
- origin: TRelaychain;
405
+ from: TEvmNodeFrom;
881
406
  /**
882
- * The destination node or multi-location
407
+ * The destination node on Polkadot network.
883
408
  */
884
- destination: TRelayToParaDestination;
409
+ to: TNodeWithRelayChains;
885
410
  /**
886
- * The destination address. A SS58 or H160 format.
411
+ * The currency to transfer. Symbol or ID.
887
412
  */
888
- address: TAddress;
413
+ currency: TCurrencyInputWithAmount;
889
414
  /**
890
- * The optional destination parachain ID
415
+ * The Polkadot destination address.
891
416
  */
892
- paraIdTo?: number;
417
+ address: string;
893
418
  /**
894
- * The optional overrided XCM version
419
+ * The AssetHub address
895
420
  */
896
- version?: Version;
421
+ ahAddress?: string;
897
422
  /**
898
- * The DOT or KSM asset to transfer
423
+ * The Ethereum signer.
899
424
  */
900
- asset: WithAmount<TAsset>;
425
+ signer: Signer | WalletClient;
426
+ };
427
+ type TEvmBuilderOptions<TApi, TRes> = WithApi<TEvmBuilderOptionsBase, TApi, TRes> & {
428
+ provider?: AbstractProvider;
429
+ };
430
+ type TSerializeEthTransferOptions = Omit<TEvmBuilderOptionsBase, 'signer'> & {
431
+ destAddress: string;
432
+ };
433
+ type TSerializedEthTransfer = {
434
+ token: string;
435
+ destinationParaId: number;
436
+ destinationFee: bigint;
437
+ amount: bigint;
438
+ fee: bigint;
439
+ };
440
+ /**
441
+ * The options for the batch builder.
442
+ */
443
+ declare enum BatchMode {
901
444
  /**
902
- * The optional pallet override
445
+ * Does not commit if one of the calls in the batch fails.
903
446
  */
904
- pallet?: string;
447
+ BATCH_ALL = "BATCH_ALL",
905
448
  /**
906
- * The optional pallet method override
449
+ * Commits each successful call regardless if a call fails.
907
450
  */
908
- method?: string;
909
- };
910
- type TRelayToParaOverrides = {
911
- section: TXcmPalletSection;
912
- includeFee: boolean;
913
- };
451
+ BATCH = "BATCH"
452
+ }
914
453
  /**
915
- * Options for transferring from a relay chain to a parachain
454
+ * The options for the batch builder.
916
455
  */
917
- type TRelayToParaOptions<TApi, TRes> = WithApi<TRelayToParaBaseOptions, TApi, TRes>;
918
- type TSerializedApiCall = {
919
- module: TPallet | 'Utility';
920
- section: string;
921
- parameters: Record<string, unknown>;
456
+ type TBatchOptions = {
457
+ /**
458
+ * The batch mode. Can be either:
459
+ * `BATCH_ALL` - does not commit if one of the calls in the batch fails.
460
+ * `BATCH` - commits each successful call regardless if a call fails.
461
+ */
462
+ mode: BatchMode;
922
463
  };
923
- type TDestWeight = {
924
- ref_time: bigint;
925
- proof_size: bigint;
464
+
465
+ type TProviderEntry = {
466
+ name: string;
467
+ endpoint: string;
926
468
  };
927
- type TXTransferSection = 'transfer';
928
- type TXTokensSection = 'transfer' | 'transfer_multiasset' | 'transfer_multiassets';
929
- type TPolkadotXcmSection = 'limited_teleport_assets' | 'limited_reserve_transfer_assets' | 'reserve_transfer_assets' | 'reserve_withdraw_assets' | 'transfer_assets';
930
- type TXcmPalletSection = 'limited_teleport_assets' | 'reserve_transfer_assets' | 'limited_reserve_transfer_assets';
931
- type TWeight = {
932
- refTime: bigint;
933
- proofSize: bigint;
469
+ type TNodeConfig = {
470
+ name: string;
471
+ info: string;
472
+ paraId: number;
473
+ providers: TProviderEntry[];
474
+ };
475
+ type TNodeConfigMap = Record<TNodeDotKsmWithRelayChains, TNodeConfig>;
476
+
477
+ type TDryRunBaseOptions<TRes> = {
478
+ /**
479
+ * The transaction to dry-run
480
+ */
481
+ tx: TRes;
482
+ /**
483
+ * The node to dry-run on
484
+ */
485
+ node: TNodeDotKsmWithRelayChains;
486
+ /**
487
+ * The address to dry-run with
488
+ */
489
+ address: string;
490
+ };
491
+ type TDryRunOptions<TApi, TRes> = WithApi<TDryRunBaseOptions<TRes>, TApi, TRes>;
492
+ type TDryRunResult = {
493
+ success: true;
494
+ fee: bigint;
495
+ weight?: TWeight;
496
+ } | {
497
+ success: false;
498
+ failureReason: string;
499
+ };
500
+ declare enum XTokensError {
501
+ AssetHasNoReserve = "AssetHasNoReserve",
502
+ NotCrossChainTransfer = "NotCrossChainTransfer",
503
+ InvalidDest = "InvalidDest",
504
+ NotCrossChainTransferableCurrency = "NotCrossChainTransferableCurrency",
505
+ UnweighableMessage = "UnweighableMessage",
506
+ XcmExecutionFailed = "XcmExecutionFailed",
507
+ CannotReanchor = "CannotReanchor",
508
+ InvalidAncestry = "InvalidAncestry",
509
+ InvalidAsset = "InvalidAsset",
510
+ DestinationNotInvertible = "DestinationNotInvertible",
511
+ BadVersion = "BadVersion",
512
+ DistinctReserveForAssetAndFee = "DistinctReserveForAssetAndFee",
513
+ ZeroFee = "ZeroFee",
514
+ ZeroAmount = "ZeroAmount",
515
+ TooManyAssetsBeingSent = "TooManyAssetsBeingSent",
516
+ AssetIndexNonExistent = "AssetIndexNonExistent",
517
+ FeeNotEnough = "FeeNotEnough",
518
+ NotSupportedLocation = "NotSupportedLocation",
519
+ MinXcmFeeNotDefined = "MinXcmFeeNotDefined",
520
+ RateLimited = "RateLimited"
521
+ }
522
+ declare enum PolkadotXcmError {
523
+ Unreachable = "Unreachable",
524
+ SendFailure = "SendFailure",
525
+ Filtered = "Filtered",
526
+ UnweighableMessage = "UnweighableMessage",
527
+ DestinationNotInvertible = "DestinationNotInvertible",
528
+ Empty = "Empty",
529
+ CannotReanchor = "CannotReanchor",
530
+ TooManyAssets = "TooManyAssets",
531
+ InvalidOrigin = "InvalidOrigin",
532
+ BadVersion = "BadVersion",
533
+ BadLocation = "BadLocation",
534
+ NoSubscription = "NoSubscription",
535
+ AlreadySubscribed = "AlreadySubscribed",
536
+ CannotCheckOutTeleport = "CannotCheckOutTeleport",
537
+ LowBalance = "LowBalance",
538
+ TooManyLocks = "TooManyLocks",
539
+ AccountNotSovereign = "AccountNotSovereign",
540
+ FeesNotMet = "FeesNotMet",
541
+ LockNotFound = "LockNotFound",
542
+ InUse = "InUse",
543
+ REMOVED = "REMOVED",
544
+ InvalidAssetUnknownReserve = "InvalidAssetUnknownReserve",
545
+ InvalidAssetUnsupportedReserve = "InvalidAssetUnsupportedReserve",
546
+ TooManyReserves = "TooManyReserves",
547
+ LocalExecutionIncomplete = "LocalExecutionIncomplete"
548
+ }
549
+ type TModuleError = {
550
+ index: string;
551
+ error: string;
934
552
  };
935
553
 
936
- type TMultiAsset = TMultiAssetV3 | TMultiAssetV4;
937
- interface TMultiAssetV3 {
938
- id: {
939
- Concrete: TMultiLocation;
554
+ type TEdJsonMap = Record<TNodeDotKsmWithRelayChains, string | null>;
555
+
556
+ type TTransferInfo = {
557
+ chain: {
558
+ origin: TNodeWithRelayChains;
559
+ destination: TNodeWithRelayChains;
560
+ ecosystem: string;
561
+ };
562
+ currencyBalanceOrigin: {
563
+ balance: bigint;
564
+ currency: string;
940
565
  };
941
- fun: {
942
- Fungible: TAmount;
566
+ originFeeBalance: {
567
+ balance: bigint;
568
+ expectedBalanceAfterXCMFee: bigint;
569
+ xcmFee: {
570
+ sufficientForXCM: boolean;
571
+ xcmFee: bigint;
572
+ };
573
+ existentialDeposit: bigint;
574
+ asset: string;
575
+ minNativeTransferableAmount: bigint;
576
+ maxNativeTransferableAmount: bigint;
943
577
  };
944
- }
945
- interface TMultiAssetV4 {
946
- id: TMultiLocation;
947
- fun: {
948
- Fungible: TAmount;
578
+ destinationFeeBalance: {
579
+ balance: bigint;
580
+ currency: string;
581
+ existentialDeposit: bigint;
949
582
  };
950
- }
951
-
952
- type TAssetClaimOptionsBase = {
953
- node: TNodeWithRelayChains;
954
- multiAssets: TMultiAsset[];
955
- address: TAddress;
956
- version?: TVersionClaimAssets;
957
- };
958
- type TAssetClaimOptions<TApi, TRes> = WithApi<TAssetClaimOptionsBase, TApi, TRes>;
959
-
960
- type TBalanceResponse = {
961
- free?: string;
962
- balance?: string;
963
583
  };
964
- /**
965
- * Retrieves the native asset balance for a given account on a specified node.
966
- */
967
- type TGetBalanceNativeOptionsBase = {
968
- /**
969
- * The address of the account.
970
- */
971
- address: string;
972
- /**
973
- * The node on which to query the balance.
974
- */
975
- node: TNodeDotKsmWithRelayChains;
976
- /**
977
- * The native currency to query.
978
- */
979
- currency?: {
980
- symbol: string;
981
- };
584
+ type TOriginFeeDetails = {
585
+ sufficientForXCM: boolean;
586
+ xcmFee: bigint;
982
587
  };
983
- type TGetBalanceNativeOptions<TApi, TRes> = WithApi<TGetBalanceNativeOptionsBase, TApi, TRes>;
984
- /**
985
- * Retrieves the balance of a foreign asset for a given account on a specified node.
986
- */
987
- type TGetBalanceForeignOptionsBase = {
988
- address: string;
989
- /**
990
- * The node on which to query the balance.
991
- */
992
- node: TNodePolkadotKusama;
993
- /**
994
- * The currency to query.
995
- */
996
- currency: TCurrencyCore;
588
+ type TGetTransferInfoOptionsBase = {
589
+ origin: TNodeDotKsmWithRelayChains;
590
+ destination: TNodeDotKsmWithRelayChains;
591
+ accountOrigin: string;
592
+ accountDestination: string;
593
+ currency: WithAmount<TCurrencyCore>;
997
594
  };
998
- type TGetBalanceForeignOptions<TApi, TRes> = WithApi<TGetBalanceForeignOptionsBase, TApi, TRes>;
595
+ type TGetTransferInfoOptions<TApi, TRes> = WithApi<TGetTransferInfoOptionsBase, TApi, TRes>;
596
+
597
+ interface IPolkadotApi<TApi, TRes> {
598
+ setApi(api?: TApiOrUrl<TApi>): void;
599
+ getApi(): TApi;
600
+ getApiOrUrl(): TApiOrUrl<TApi> | undefined;
601
+ init(node: TNodeWithRelayChains): Promise<void>;
602
+ createApiInstance: (wsUrl: string | string[]) => Promise<TApi>;
603
+ accountToHex(address: string, isPrefixed?: boolean): string;
604
+ callTxMethod(serializedCall: TSerializedApiCall): TRes;
605
+ callBatchMethod(calls: TRes[], mode: BatchMode): TRes;
606
+ objectToHex(obj: unknown, typeName: string): Promise<string>;
607
+ hexToUint8a(hex: string): Uint8Array;
608
+ stringToUint8a(str: string): Uint8Array;
609
+ calculateTransactionFee(tx: TRes, address: string): Promise<bigint>;
610
+ quoteAhPrice(fromMl: TMultiLocation, toMl: TMultiLocation, amountIn: bigint, includeFee?: boolean): Promise<bigint | undefined>;
611
+ getBalanceNative(address: string): Promise<bigint>;
612
+ getBalanceNativeAcala(address: string, symbol: string): Promise<bigint>;
613
+ getBalanceForeignPolkadotXcm(address: string, id?: string): Promise<bigint>;
614
+ getMythosForeignBalance(address: string): Promise<bigint>;
615
+ getAssetHubForeignBalance(address: string, multiLocation: TMultiLocation): Promise<bigint>;
616
+ getForeignAssetsByIdBalance(address: string, assetId: string): Promise<bigint>;
617
+ getBalanceForeignXTokens(node: TNodePolkadotKusama, address: string, asset: TAsset): Promise<bigint>;
618
+ getBalanceForeignBifrost(address: string, asset: TAsset): Promise<bigint>;
619
+ getBalanceForeignAssetsAccount(address: string, assetId: bigint | number): Promise<bigint>;
620
+ getFromRpc(module: string, method: string, key: string): Promise<string>;
621
+ blake2AsHex(data: Uint8Array): string;
622
+ clone(): IPolkadotApi<TApi, TRes>;
623
+ createApiForNode(node: TNodeWithRelayChains): Promise<IPolkadotApi<TApi, TRes>>;
624
+ getDryRun(options: TDryRunBaseOptions<TRes>): Promise<TDryRunResult>;
625
+ setDisconnectAllowed(allowed: boolean): void;
626
+ getDisconnectAllowed(): boolean;
627
+ disconnect(force?: boolean): Promise<void>;
628
+ }
629
+
999
630
  /**
1000
- * Retrieves the asset balance for a given account on a specified node.
631
+ * Builder class for constructing asset claim transactions.
1001
632
  */
1002
- type TGetAssetBalanceOptionsBase = {
1003
- /**
1004
- * The address of the account.
1005
- */
1006
- address: string;
1007
- /**
1008
- * The node on which to query the balance.
1009
- */
1010
- node: TNodeDotKsmWithRelayChains;
1011
- /**
1012
- * The currency to query.
1013
- */
1014
- currency: TCurrencyCore;
1015
- };
1016
- type TGetAssetBalanceOptions<TApi, TRes> = WithApi<TGetAssetBalanceOptionsBase, TApi, TRes>;
1017
- type TGetOriginFeeDetailsOptionsBase = {
1018
- /**
1019
- * The origin node.
1020
- */
1021
- origin: TNodeDotKsmWithRelayChains;
1022
- /**
1023
- * The destination node.
1024
- */
1025
- destination: TNodeWithRelayChains;
633
+ declare class AssetClaimBuilder<TApi, TRes, T extends Partial<TAssetClaimOptionsBase> = object> {
634
+ readonly api: IPolkadotApi<TApi, TRes>;
635
+ readonly _options: T;
636
+ constructor(api: IPolkadotApi<TApi, TRes>, options?: T);
1026
637
  /**
1027
- * The currency to transfer.
638
+ * Specifies the assets to be claimed.
639
+ *
640
+ * @param multiAssets - An array of assets to claim in a multi-asset format.
641
+ * @returns An instance of Builder
1028
642
  */
1029
- currency: WithAmount<TCurrencyCore>;
643
+ fungible(multiAssets: TMultiAsset[]): AssetClaimBuilder<TApi, TRes, T & {
644
+ multiAssets: TMultiAsset[];
645
+ }>;
1030
646
  /**
1031
- * The origin account.
647
+ * Specifies the account address on which the assets will be claimed.
648
+ *
649
+ * @param address - The destination account address.
650
+ * @returns An instance of Builder
1032
651
  */
1033
- account: string;
652
+ account(address: TAddress): AssetClaimBuilder<TApi, TRes, T & {
653
+ address: TAddress;
654
+ }>;
1034
655
  /**
1035
- * The destination account.
656
+ * Sets the XCM version to be used for the asset claim.
657
+ *
658
+ * @param version - The XCM version.
659
+ * @returns An instance of Builder
1036
660
  */
1037
- accountDestination: string;
661
+ xcmVersion(version: TVersionClaimAssets): AssetClaimBuilder<TApi, TRes, T & {
662
+ version: TVersionClaimAssets;
663
+ }>;
1038
664
  /**
1039
- * The fee margin percentage.
665
+ * Builds and returns the asset claim extrinsic.
666
+ *
667
+ * @returns A Promise that resolves to the asset claim extrinsic.
1040
668
  */
1041
- feeMarginPercentage?: number;
1042
- };
1043
- type TGetOriginFeeDetailsOptions<TApi, TRes> = WithApi<TGetOriginFeeDetailsOptionsBase, TApi, TRes>;
1044
- type TGetMaxNativeTransferableAmountOptionsBase = {
669
+ build(this: AssetClaimBuilder<TApi, TRes, TAssetClaimOptionsBase>): Promise<TRes>;
1045
670
  /**
1046
- * The address of the account.
671
+ * Returns the API instance used by the builder.
672
+ *
673
+ * @returns The API instance.
1047
674
  */
1048
- address: string;
675
+ getApi(): TApi;
1049
676
  /**
1050
- * The node on which to query the balance.
677
+ * Disconnects the API.
678
+ *
679
+ * @returns A Promise that resolves when the API is disconnected.
1051
680
  */
1052
- node: TNodeDotKsmWithRelayChains;
681
+ disconnect(): Promise<void>;
682
+ }
683
+
684
+ declare class BatchTransactionManager<TApi, TRes> {
685
+ transactionOptions: TSendOptions<TApi, TRes>[];
686
+ addTransaction(options: TSendOptions<TApi, TRes>): void;
687
+ isEmpty(): boolean;
688
+ buildBatch(api: IPolkadotApi<TApi, TRes>, from: TNodeDotKsmWithRelayChains, options?: TBatchOptions): Promise<TRes>;
689
+ }
690
+
691
+ /**
692
+ * A builder class for constructing Para-to-Para, Para-to-Relay, Relay-to-Para transactions and asset claims.
693
+ */
694
+ declare class GeneralBuilder<TApi, TRes, T extends Partial<TSendBaseOptions> = object> {
695
+ readonly batchManager: BatchTransactionManager<TApi, TRes>;
696
+ readonly api: IPolkadotApi<TApi, TRes>;
697
+ readonly _options: T;
698
+ constructor(api: IPolkadotApi<TApi, TRes>, batchManager: BatchTransactionManager<TApi, TRes>, options?: T);
1053
699
  /**
1054
- * The currency to query.
700
+ * Specifies the origin node for the transaction.
701
+ *
702
+ * @param node - The node from which the transaction originates.
703
+ * @returns An instance of Builder
1055
704
  */
1056
- currency?: {
1057
- symbol: string;
1058
- };
1059
- };
1060
- type TGetMaxNativeTransferableAmountOptions<TApi, TRes> = WithApi<TGetMaxNativeTransferableAmountOptionsBase, TApi, TRes>;
1061
- type TGetMaxForeignTransferableAmountOptionsBase = {
705
+ from(node: TNodeDotKsmWithRelayChains): GeneralBuilder<TApi, TRes, T & {
706
+ from: TNodeDotKsmWithRelayChains;
707
+ }>;
1062
708
  /**
1063
- * The address of the account.
709
+ * Specifies the destination node for the transaction.
710
+ *
711
+ * @param node - The node to which the transaction is sent.
712
+ * @param paraIdTo - (Optional) The parachain ID of the destination node.
713
+ * @returns An instance of Builder
1064
714
  */
1065
- address: string;
715
+ to(node: TDestination, paraIdTo?: number): GeneralBuilder<TApi, TRes, T & {
716
+ to: TDestination;
717
+ }>;
1066
718
  /**
1067
- * The node on which to query the balance.
719
+ * Initiates the process to claim assets from a specified node.
720
+ *
721
+ * @param node - The node from which to claim assets.
722
+ * @returns An instance of Builder
1068
723
  */
1069
- node: TNodePolkadotKusama;
724
+ claimFrom(node: TNodeWithRelayChains): AssetClaimBuilder<TApi, TRes, {
725
+ node: TNodeWithRelayChains;
726
+ }>;
1070
727
  /**
1071
- * The currency to query.
728
+ * Specifies the currency to be used in the transaction. Symbol, ID, multi-location or multi-asset.
729
+ *
730
+ * @param currency - The currency to be transferred.
731
+ * @returns An instance of Builder
1072
732
  */
1073
- currency: TCurrencyCore;
1074
- };
1075
- type TGetMaxForeignTransferableAmountOptions<TApi, TRes> = WithApi<TGetMaxForeignTransferableAmountOptionsBase, TApi, TRes>;
1076
- type TGetTransferableAmountOptionsBase = {
733
+ currency(currency: TCurrencyInputWithAmount): GeneralBuilder<TApi, TRes, T & {
734
+ currency: TCurrencyInputWithAmount;
735
+ }>;
1077
736
  /**
1078
- * The address of the account.
737
+ * Sets the recipient address.
738
+ *
739
+ * @param address - The destination address.
740
+ * @returns An instance of Builder
1079
741
  */
1080
- address: string;
742
+ address(address: TAddress, senderAddress?: string): GeneralBuilder<TApi, TRes, T & {
743
+ address: TAddress;
744
+ }>;
1081
745
  /**
1082
- * The node on which to query the balance.
746
+ * Sets the XCM version to be used for the transfer.
747
+ *
748
+ * @param version - The XCM version.
749
+ * @returns An instance of Builder
1083
750
  */
1084
- node: TNodeDotKsmWithRelayChains;
751
+ xcmVersion(version: Version): GeneralBuilder<TApi, TRes, T & {
752
+ version: Version;
753
+ }>;
1085
754
  /**
1086
- * The currency to query.
755
+ * Sets a custom pallet for the transaction.
756
+ *
757
+ * @param palletName - The name of the custom pallet to be used.
758
+ * @returns An instance of the Builder.
1087
759
  */
1088
- currency: TCurrencyCore;
1089
- };
1090
- type TGetTransferableAmountOptions<TApi, TRes> = WithApi<TGetTransferableAmountOptionsBase, TApi, TRes>;
1091
- type TVerifyEdOnDestinationOptionsBase = {
1092
- node: TNodeDotKsmWithRelayChains;
1093
- address: string;
1094
- currency: WithAmount<TCurrencyCore>;
1095
- };
1096
- type TVerifyEdOnDestinationOptions<TApi, TRes> = WithApi<TVerifyEdOnDestinationOptionsBase, TApi, TRes>;
1097
-
1098
- type TEvmNodeFrom = Extract<TNode, 'Ethereum' | 'Moonbeam' | 'Moonriver' | 'Darwinia'>;
1099
- /**
1100
- * The options for the Ethereum to Polkadot transfer builder.
1101
- */
1102
- type TEvmBuilderOptionsBase = {
760
+ customPallet(pallet: string, method: string): GeneralBuilder<TApi, TRes, T & {
761
+ pallet: string;
762
+ method: string;
763
+ }>;
1103
764
  /**
1104
- * The source node. Can be either 'Ethereum', 'Moonbeam', 'Moonriver', or 'Darwinia'.
765
+ * Optional fee asset for the transaction.
766
+ *
767
+ * @param currency - The currency to be used for the fee.
768
+ * @returns An instance of the Builder
1105
769
  */
1106
- from: TEvmNodeFrom;
770
+ feeAsset(currency: TCurrencyInput | undefined): GeneralBuilder<TApi, TRes, T & {
771
+ feeAsset: TCurrencyInput | undefined;
772
+ }>;
1107
773
  /**
1108
- * The destination node on Polkadot network.
774
+ * Adds the transfer transaction to the batch.
775
+ *
776
+ * @returns An instance of Builder
1109
777
  */
1110
- to: TNodeWithRelayChains;
778
+ addToBatch(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>): GeneralBuilder<TApi, TRes, T & {
779
+ from: TNodeDotKsmWithRelayChains;
780
+ }>;
1111
781
  /**
1112
- * The currency to transfer. Symbol or ID.
782
+ * Builds and returns the batched transaction based on the configured parameters.
783
+ *
784
+ * @param options - (Optional) Options to customize the batch transaction.
785
+ * @returns A Extrinsic representing the batched transactions.
1113
786
  */
1114
- currency: TCurrencyInputWithAmount;
787
+ buildBatch(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>, options?: TBatchOptions): Promise<TRes>;
1115
788
  /**
1116
- * The Polkadot destination address.
789
+ * Builds and returns the transfer extrinsic.
790
+ *
791
+ * @returns A Promise that resolves to the transfer extrinsic.
1117
792
  */
1118
- address: string;
793
+ build(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>): Promise<TRes>;
794
+ dryRun(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>, senderAddress: string): Promise<TDryRunResult>;
1119
795
  /**
1120
- * The AssetHub address
796
+ * Returns the API instance used by the builder.
797
+ *
798
+ * @returns The API instance.
1121
799
  */
1122
- ahAddress?: string;
800
+ getApi(): TApi;
1123
801
  /**
1124
- * The Ethereum signer.
802
+ * Disconnects the API.
803
+ *
804
+ * @returns A Promise that resolves when the API is disconnected.
1125
805
  */
1126
- signer: Signer | WalletClient;
1127
- };
1128
- type TEvmBuilderOptions<TApi, TRes> = WithApi<TEvmBuilderOptionsBase, TApi, TRes> & {
1129
- provider?: AbstractProvider;
1130
- };
1131
- type TSerializeEthTransferOptions = Omit<TEvmBuilderOptionsBase, 'signer'> & {
1132
- destAddress: string;
1133
- };
1134
- type TSerializedEthTransfer = {
1135
- token: string;
1136
- destinationParaId: number;
1137
- destinationFee: bigint;
1138
- amount: bigint;
1139
- fee: bigint;
1140
- };
806
+ disconnect(): Promise<void>;
807
+ }
1141
808
  /**
1142
- * The options for the batch builder.
809
+ * Creates a new Builder instance.
810
+ *
811
+ * @param api - The API instance to use for building transactions. If not provided, a new instance will be created.
812
+ * @returns A new Builder instance.
1143
813
  */
1144
- declare enum BatchMode {
1145
- /**
1146
- * Does not commit if one of the calls in the batch fails.
1147
- */
1148
- BATCH_ALL = "BATCH_ALL",
1149
- /**
1150
- * Commits each successful call regardless if a call fails.
1151
- */
1152
- BATCH = "BATCH"
814
+ declare const Builder: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>) => GeneralBuilder<TApi, TRes, object>;
815
+
816
+ declare const ETH_CHAIN_ID: bigint;
817
+ declare const ETHEREUM_JUNCTION: TJunction;
818
+
819
+ declare abstract class ParachainNode<TApi, TRes> {
820
+ private readonly _node;
821
+ private readonly _info;
822
+ private readonly _type;
823
+ private readonly _version;
824
+ protected _assetCheckEnabled: boolean;
825
+ constructor(node: TNodePolkadotKusama, info: string, type: TEcosystemType, version: Version);
826
+ get info(): string;
827
+ get type(): TEcosystemType;
828
+ get node(): TNodePolkadotKusama;
829
+ get version(): Version;
830
+ get assetCheckEnabled(): boolean;
831
+ protected canUseXTokens(_: TSendInternalOptions<TApi, TRes>): boolean;
832
+ transfer(options: TSendInternalOptions<TApi, TRes>): Promise<TRes>;
833
+ getRelayToParaOverrides(): TRelayToParaOverrides;
834
+ transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCall;
835
+ createCurrencySpec(amount: TAmount, scenario: TScenario, version: Version, _asset?: TAsset): TXcmVersioned<TMultiAsset[]>;
836
+ createPolkadotXcmHeader(scenario: TScenario, version: Version, destination: TDestination, paraId?: number): TXcmVersioned<TMultiLocation>;
837
+ getNativeAssetSymbol(): string;
838
+ protected transferToEthereum<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
839
+ }
840
+
841
+ declare class Acala<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
842
+ constructor();
843
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
844
+ }
845
+
846
+ declare class Altair<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
847
+ constructor();
848
+ private getCurrencySelection;
849
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
850
+ }
851
+
852
+ declare class Amplitude<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
853
+ constructor();
854
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
855
+ }
856
+
857
+ declare class AssetHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
858
+ constructor();
859
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
860
+ getRelayToParaOverrides(): TRelayToParaOverrides;
861
+ createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): {
862
+ V1: _paraspell_assets.TMultiAsset[];
863
+ V2?: undefined;
864
+ V3?: undefined;
865
+ V4?: undefined;
866
+ } | {
867
+ V2: _paraspell_assets.TMultiAsset[];
868
+ V1?: undefined;
869
+ V3?: undefined;
870
+ V4?: undefined;
871
+ } | {
872
+ V3: _paraspell_assets.TMultiAsset[];
873
+ V1?: undefined;
874
+ V2?: undefined;
875
+ V4?: undefined;
876
+ } | {
877
+ V4: _paraspell_assets.TMultiAsset[];
878
+ V1?: undefined;
879
+ V2?: undefined;
880
+ V3?: undefined;
881
+ };
882
+ }
883
+
884
+ declare class AssetHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
885
+ constructor();
886
+ handleBridgeTransfer<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>, targetChain: 'Polkadot' | 'Kusama'): TRes;
887
+ handleEthBridgeTransfer<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
888
+ handleMythosTransfer<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
889
+ handleBifrostEthTransfer: <TApi_1, TRes_1>(input: TPolkadotXCMTransferOptions<TApi_1, TRes_1>) => TRes_1;
890
+ patchInput<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TPolkadotXCMTransferOptions<TApi, TRes>;
891
+ private getSection;
892
+ private handleExecuteTransfer;
893
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
894
+ getRelayToParaOverrides(): TRelayToParaOverrides;
895
+ createCurrencySpec(amount: TAmount, scenario: TScenario, version: Version, asset?: TAsset): {
896
+ V1: _paraspell_assets.TMultiAsset[];
897
+ V2?: undefined;
898
+ V3?: undefined;
899
+ V4?: undefined;
900
+ } | {
901
+ V2: _paraspell_assets.TMultiAsset[];
902
+ V1?: undefined;
903
+ V3?: undefined;
904
+ V4?: undefined;
905
+ } | {
906
+ V3: _paraspell_assets.TMultiAsset[];
907
+ V1?: undefined;
908
+ V2?: undefined;
909
+ V4?: undefined;
910
+ } | {
911
+ V4: _paraspell_assets.TMultiAsset[];
912
+ V1?: undefined;
913
+ V2?: undefined;
914
+ V3?: undefined;
915
+ };
916
+ }
917
+
918
+ declare class Astar<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer, IXTokensTransfer {
919
+ constructor();
920
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
921
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
922
+ protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
923
+ }
924
+
925
+ declare class Bajun<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
926
+ constructor();
927
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
928
+ transferRelayToPara(): TSerializedApiCall;
929
+ }
930
+
931
+ declare class Basilisk<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
932
+ constructor();
933
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
934
+ }
935
+
936
+ declare class BifrostKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
937
+ constructor();
938
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
939
+ }
940
+
941
+ declare class BifrostPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer, IPolkadotXCMTransfer {
942
+ constructor();
943
+ getCurrencySelection(asset: TAsset): {
944
+ Native: string;
945
+ VToken?: undefined;
946
+ Token?: undefined;
947
+ VSToken2?: undefined;
948
+ VToken2?: undefined;
949
+ Token2?: undefined;
950
+ } | {
951
+ VToken: string;
952
+ Native?: undefined;
953
+ Token?: undefined;
954
+ VSToken2?: undefined;
955
+ VToken2?: undefined;
956
+ Token2?: undefined;
957
+ } | {
958
+ Token: string;
959
+ Native?: undefined;
960
+ VToken?: undefined;
961
+ VSToken2?: undefined;
962
+ VToken2?: undefined;
963
+ Token2?: undefined;
964
+ } | {
965
+ VSToken2: number;
966
+ Native?: undefined;
967
+ VToken?: undefined;
968
+ Token?: undefined;
969
+ VToken2?: undefined;
970
+ Token2?: undefined;
971
+ } | {
972
+ VToken2: number;
973
+ Native?: undefined;
974
+ VToken?: undefined;
975
+ Token?: undefined;
976
+ VSToken2?: undefined;
977
+ Token2?: undefined;
978
+ } | {
979
+ Token2: number;
980
+ Native?: undefined;
981
+ VToken?: undefined;
982
+ Token?: undefined;
983
+ VSToken2?: undefined;
984
+ VToken2?: undefined;
985
+ };
986
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
987
+ transferToAssetHub<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
988
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
989
+ protected canUseXTokens({ asset, to: destination }: TSendInternalOptions<TApi, TRes>): boolean;
1153
990
  }
1154
- /**
1155
- * The options for the batch builder.
1156
- */
1157
- type TBatchOptions = {
1158
- /**
1159
- * The batch mode. Can be either:
1160
- * `BATCH_ALL` - does not commit if one of the calls in the batch fails.
1161
- * `BATCH` - commits each successful call regardless if a call fails.
1162
- */
1163
- mode: BatchMode;
1164
- };
1165
991
 
1166
- type TProviderEntry = {
1167
- name: string;
1168
- endpoint: string;
1169
- };
1170
- type TNodeConfig = {
1171
- name: string;
1172
- info: string;
1173
- paraId: number;
1174
- providers: TProviderEntry[];
1175
- };
1176
- type TNodeConfigMap = Record<TNodeDotKsmWithRelayChains, TNodeConfig>;
992
+ declare class Bitgreen<TApi, TRes> extends ParachainNode<TApi, TRes> {
993
+ constructor();
994
+ }
1177
995
 
1178
- type TDryRunBaseOptions<TRes> = {
1179
- /**
1180
- * The transaction to dry-run
1181
- */
1182
- tx: TRes;
1183
- /**
1184
- * The node to dry-run on
1185
- */
1186
- node: TNodeDotKsmWithRelayChains;
1187
- /**
1188
- * The address to dry-run with
1189
- */
1190
- address: string;
1191
- };
1192
- type TDryRunOptions<TApi, TRes> = WithApi<TDryRunBaseOptions<TRes>, TApi, TRes>;
1193
- type TDryRunResult = {
1194
- success: true;
1195
- fee: bigint;
1196
- weight?: TWeight;
1197
- } | {
1198
- success: false;
1199
- failureReason: string;
1200
- };
1201
- declare enum XTokensError {
1202
- AssetHasNoReserve = "AssetHasNoReserve",
1203
- NotCrossChainTransfer = "NotCrossChainTransfer",
1204
- InvalidDest = "InvalidDest",
1205
- NotCrossChainTransferableCurrency = "NotCrossChainTransferableCurrency",
1206
- UnweighableMessage = "UnweighableMessage",
1207
- XcmExecutionFailed = "XcmExecutionFailed",
1208
- CannotReanchor = "CannotReanchor",
1209
- InvalidAncestry = "InvalidAncestry",
1210
- InvalidAsset = "InvalidAsset",
1211
- DestinationNotInvertible = "DestinationNotInvertible",
1212
- BadVersion = "BadVersion",
1213
- DistinctReserveForAssetAndFee = "DistinctReserveForAssetAndFee",
1214
- ZeroFee = "ZeroFee",
1215
- ZeroAmount = "ZeroAmount",
1216
- TooManyAssetsBeingSent = "TooManyAssetsBeingSent",
1217
- AssetIndexNonExistent = "AssetIndexNonExistent",
1218
- FeeNotEnough = "FeeNotEnough",
1219
- NotSupportedLocation = "NotSupportedLocation",
1220
- MinXcmFeeNotDefined = "MinXcmFeeNotDefined",
1221
- RateLimited = "RateLimited"
996
+ declare class BridgeHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
997
+ constructor();
998
+ _assetCheckEnabled: boolean;
999
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1000
+ getRelayToParaOverrides(): TRelayToParaOverrides;
1222
1001
  }
1223
- declare enum PolkadotXcmError {
1224
- Unreachable = "Unreachable",
1225
- SendFailure = "SendFailure",
1226
- Filtered = "Filtered",
1227
- UnweighableMessage = "UnweighableMessage",
1228
- DestinationNotInvertible = "DestinationNotInvertible",
1229
- Empty = "Empty",
1230
- CannotReanchor = "CannotReanchor",
1231
- TooManyAssets = "TooManyAssets",
1232
- InvalidOrigin = "InvalidOrigin",
1233
- BadVersion = "BadVersion",
1234
- BadLocation = "BadLocation",
1235
- NoSubscription = "NoSubscription",
1236
- AlreadySubscribed = "AlreadySubscribed",
1237
- CannotCheckOutTeleport = "CannotCheckOutTeleport",
1238
- LowBalance = "LowBalance",
1239
- TooManyLocks = "TooManyLocks",
1240
- AccountNotSovereign = "AccountNotSovereign",
1241
- FeesNotMet = "FeesNotMet",
1242
- LockNotFound = "LockNotFound",
1243
- InUse = "InUse",
1244
- REMOVED = "REMOVED",
1245
- InvalidAssetUnknownReserve = "InvalidAssetUnknownReserve",
1246
- InvalidAssetUnsupportedReserve = "InvalidAssetUnsupportedReserve",
1247
- TooManyReserves = "TooManyReserves",
1248
- LocalExecutionIncomplete = "LocalExecutionIncomplete"
1002
+
1003
+ declare class BridgeHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1004
+ constructor();
1005
+ _assetCheckEnabled: boolean;
1006
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1007
+ getRelayToParaOverrides(): TRelayToParaOverrides;
1249
1008
  }
1250
- type TModuleError = {
1251
- index: string;
1252
- error: string;
1253
- };
1254
1009
 
1255
- type TEdJsonMap = Record<TNodeDotKsmWithRelayChains, string | null>;
1010
+ declare class Calamari<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1011
+ constructor();
1012
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1013
+ }
1256
1014
 
1257
- type TEcosystemType = 'polkadot' | 'kusama' | 'ethereum';
1258
- type TRelayChainSymbol = 'DOT' | 'KSM';
1015
+ declare class Centrifuge<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1016
+ constructor();
1017
+ private getCurrencySelection;
1018
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1019
+ }
1259
1020
 
1260
- type TTransferInfo = {
1261
- chain: {
1262
- origin: TNodeWithRelayChains;
1263
- destination: TNodeWithRelayChains;
1264
- ecosystem: string;
1265
- };
1266
- currencyBalanceOrigin: {
1267
- balance: bigint;
1268
- currency: string;
1269
- };
1270
- originFeeBalance: {
1271
- balance: bigint;
1272
- expectedBalanceAfterXCMFee: bigint;
1273
- xcmFee: {
1274
- sufficientForXCM: boolean;
1275
- xcmFee: bigint;
1276
- };
1277
- existentialDeposit: bigint;
1278
- asset: string;
1279
- minNativeTransferableAmount: bigint;
1280
- maxNativeTransferableAmount: bigint;
1281
- };
1282
- destinationFeeBalance: {
1283
- balance: bigint;
1284
- currency: string;
1285
- existentialDeposit: bigint;
1021
+ declare class Collectives<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1022
+ constructor();
1023
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1024
+ getRelayToParaOverrides(): TRelayToParaOverrides;
1025
+ createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): TXcmVersioned<_paraspell_assets.TMultiAsset[]>;
1026
+ }
1027
+
1028
+ declare class ComposableFinance<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1029
+ constructor();
1030
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1031
+ }
1032
+
1033
+ declare class CoretimeKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1034
+ constructor();
1035
+ _assetCheckEnabled: boolean;
1036
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1037
+ getRelayToParaOverrides(): TRelayToParaOverrides;
1038
+ }
1039
+
1040
+ declare class CoretimePolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1041
+ constructor();
1042
+ _assetCheckEnabled: boolean;
1043
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1044
+ getRelayToParaOverrides(): TRelayToParaOverrides;
1045
+ }
1046
+
1047
+ declare class Crab<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1048
+ constructor();
1049
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1050
+ transferRelayToPara(): TSerializedApiCall;
1051
+ createCurrencySpec(amount: string, scenario: TScenario, version: Version, _asset?: TAsset): {
1052
+ V1: _paraspell_assets.TMultiAsset[];
1053
+ V2?: undefined;
1054
+ V3?: undefined;
1055
+ V4?: undefined;
1056
+ } | {
1057
+ V2: _paraspell_assets.TMultiAsset[];
1058
+ V1?: undefined;
1059
+ V3?: undefined;
1060
+ V4?: undefined;
1061
+ } | {
1062
+ V3: _paraspell_assets.TMultiAsset[];
1063
+ V1?: undefined;
1064
+ V2?: undefined;
1065
+ V4?: undefined;
1066
+ } | {
1067
+ V4: _paraspell_assets.TMultiAsset[];
1068
+ V1?: undefined;
1069
+ V2?: undefined;
1070
+ V3?: undefined;
1286
1071
  };
1287
- };
1288
- type TOriginFeeDetails = {
1289
- sufficientForXCM: boolean;
1290
- xcmFee: bigint;
1291
- };
1292
- type TGetTransferInfoOptionsBase = {
1293
- origin: TNodeDotKsmWithRelayChains;
1294
- destination: TNodeDotKsmWithRelayChains;
1295
- accountOrigin: string;
1296
- accountDestination: string;
1297
- currency: WithAmount<TCurrencyCore>;
1298
- };
1299
- type TGetTransferInfoOptions<TApi, TRes> = WithApi<TGetTransferInfoOptionsBase, TApi, TRes>;
1072
+ }
1073
+
1074
+ declare class Crust<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1075
+ constructor();
1076
+ private getCurrencySelection;
1077
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1078
+ }
1079
+
1080
+ declare class CrustShadow<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1081
+ constructor();
1082
+ private getCurrencySelection;
1083
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1084
+ }
1085
+
1086
+ declare class Curio<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1087
+ constructor();
1088
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1089
+ }
1090
+
1091
+ declare class Darwinia<TApi, TRes> extends ParachainNode<TApi, TRes> {
1092
+ constructor();
1093
+ transferRelayToPara(): TSerializedApiCall;
1094
+ }
1095
+
1096
+ declare class Encointer<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1097
+ constructor();
1098
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1099
+ getRelayToParaOverrides(): TRelayToParaOverrides;
1100
+ }
1101
+
1102
+ declare class Heima<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1103
+ constructor();
1104
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1105
+ }
1300
1106
 
1301
- interface IPolkadotApi<TApi, TRes> {
1302
- setApi(api?: TApiOrUrl<TApi>): void;
1303
- getApi(): TApi;
1304
- getApiOrUrl(): TApiOrUrl<TApi> | undefined;
1305
- init(node: TNodeWithRelayChains): Promise<void>;
1306
- createApiInstance: (wsUrl: string | string[]) => Promise<TApi>;
1307
- accountToHex(address: string, isPrefixed?: boolean): string;
1308
- callTxMethod(serializedCall: TSerializedApiCall): TRes;
1309
- callBatchMethod(calls: TRes[], mode: BatchMode): TRes;
1310
- objectToHex(obj: unknown, typeName: string): Promise<string>;
1311
- hexToUint8a(hex: string): Uint8Array;
1312
- stringToUint8a(str: string): Uint8Array;
1313
- calculateTransactionFee(tx: TRes, address: string): Promise<bigint>;
1314
- quoteAhPrice(fromMl: TMultiLocation, toMl: TMultiLocation, amountIn: bigint, includeFee?: boolean): Promise<bigint | undefined>;
1315
- getBalanceNative(address: string): Promise<bigint>;
1316
- getBalanceNativeAcala(address: string, symbol: string): Promise<bigint>;
1317
- getBalanceForeignPolkadotXcm(address: string, id?: string): Promise<bigint>;
1318
- getMythosForeignBalance(address: string): Promise<bigint>;
1319
- getAssetHubForeignBalance(address: string, multiLocation: TMultiLocation): Promise<bigint>;
1320
- getForeignAssetsByIdBalance(address: string, assetId: string): Promise<bigint>;
1321
- getBalanceForeignXTokens(node: TNodePolkadotKusama, address: string, asset: TAsset): Promise<bigint>;
1322
- getBalanceForeignBifrost(address: string, asset: TAsset): Promise<bigint>;
1323
- getBalanceForeignAssetsAccount(address: string, assetId: bigint | number): Promise<bigint>;
1324
- getFromRpc(module: string, method: string, key: string): Promise<string>;
1325
- blake2AsHex(data: Uint8Array): string;
1326
- clone(): IPolkadotApi<TApi, TRes>;
1327
- createApiForNode(node: TNodeWithRelayChains): Promise<IPolkadotApi<TApi, TRes>>;
1328
- getDryRun(options: TDryRunBaseOptions<TRes>): Promise<TDryRunResult>;
1329
- setDisconnectAllowed(allowed: boolean): void;
1330
- getDisconnectAllowed(): boolean;
1331
- disconnect(force?: boolean): Promise<void>;
1107
+ declare class Hydration<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer, IPolkadotXCMTransfer {
1108
+ private static NATIVE_ASSET_ID;
1109
+ constructor();
1110
+ transferToAssetHub<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
1111
+ transferToPolimec<TApi, TRes>(options: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
1112
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1113
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1114
+ protected canUseXTokens({ to: destination, asset }: TSendInternalOptions<TApi, TRes>): boolean;
1332
1115
  }
1333
1116
 
1334
- /**
1335
- * Builder class for constructing asset claim transactions.
1336
- */
1337
- declare class AssetClaimBuilder<TApi, TRes, T extends Partial<TAssetClaimOptionsBase> = object> {
1338
- readonly api: IPolkadotApi<TApi, TRes>;
1339
- readonly _options: T;
1340
- constructor(api: IPolkadotApi<TApi, TRes>, options?: T);
1341
- /**
1342
- * Specifies the assets to be claimed.
1343
- *
1344
- * @param multiAssets - An array of assets to claim in a multi-asset format.
1345
- * @returns An instance of Builder
1346
- */
1347
- fungible(multiAssets: TMultiAsset[]): AssetClaimBuilder<TApi, TRes, T & {
1348
- multiAssets: TMultiAsset[];
1349
- }>;
1350
- /**
1351
- * Specifies the account address on which the assets will be claimed.
1352
- *
1353
- * @param address - The destination account address.
1354
- * @returns An instance of Builder
1355
- */
1356
- account(address: TAddress): AssetClaimBuilder<TApi, TRes, T & {
1357
- address: TAddress;
1358
- }>;
1359
- /**
1360
- * Sets the XCM version to be used for the asset claim.
1361
- *
1362
- * @param version - The XCM version.
1363
- * @returns An instance of Builder
1364
- */
1365
- xcmVersion(version: TVersionClaimAssets): AssetClaimBuilder<TApi, TRes, T & {
1366
- version: TVersionClaimAssets;
1367
- }>;
1368
- /**
1369
- * Builds and returns the asset claim extrinsic.
1370
- *
1371
- * @returns A Promise that resolves to the asset claim extrinsic.
1372
- */
1373
- build(this: AssetClaimBuilder<TApi, TRes, TAssetClaimOptionsBase>): Promise<TRes>;
1374
- /**
1375
- * Returns the API instance used by the builder.
1376
- *
1377
- * @returns The API instance.
1378
- */
1379
- getApi(): TApi;
1380
- /**
1381
- * Disconnects the API.
1382
- *
1383
- * @returns A Promise that resolves when the API is disconnected.
1384
- */
1385
- disconnect(): Promise<void>;
1117
+ declare class Imbue<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1118
+ constructor();
1119
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1386
1120
  }
1387
1121
 
1388
- declare class BatchTransactionManager<TApi, TRes> {
1389
- transactionOptions: TSendOptions<TApi, TRes>[];
1390
- addTransaction(options: TSendOptions<TApi, TRes>): void;
1391
- isEmpty(): boolean;
1392
- buildBatch(api: IPolkadotApi<TApi, TRes>, from: TNodeDotKsmWithRelayChains, options?: TBatchOptions): Promise<TRes>;
1122
+ declare class Interlay<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1123
+ constructor();
1124
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1393
1125
  }
1394
1126
 
1395
- /**
1396
- * A builder class for constructing Para-to-Para, Para-to-Relay, Relay-to-Para transactions and asset claims.
1397
- */
1398
- declare class GeneralBuilder<TApi, TRes, T extends Partial<TSendBaseOptions> = object> {
1399
- readonly batchManager: BatchTransactionManager<TApi, TRes>;
1400
- readonly api: IPolkadotApi<TApi, TRes>;
1401
- readonly _options: T;
1402
- constructor(api: IPolkadotApi<TApi, TRes>, batchManager: BatchTransactionManager<TApi, TRes>, options?: T);
1403
- /**
1404
- * Specifies the origin node for the transaction.
1405
- *
1406
- * @param node - The node from which the transaction originates.
1407
- * @returns An instance of Builder
1408
- */
1409
- from(node: TNodeDotKsmWithRelayChains): GeneralBuilder<TApi, TRes, T & {
1410
- from: TNodeDotKsmWithRelayChains;
1411
- }>;
1412
- /**
1413
- * Specifies the destination node for the transaction.
1414
- *
1415
- * @param node - The node to which the transaction is sent.
1416
- * @param paraIdTo - (Optional) The parachain ID of the destination node.
1417
- * @returns An instance of Builder
1418
- */
1419
- to(node: TDestination, paraIdTo?: number): GeneralBuilder<TApi, TRes, T & {
1420
- to: TDestination;
1421
- }>;
1422
- /**
1423
- * Initiates the process to claim assets from a specified node.
1424
- *
1425
- * @param node - The node from which to claim assets.
1426
- * @returns An instance of Builder
1427
- */
1428
- claimFrom(node: TNodeWithRelayChains): AssetClaimBuilder<TApi, TRes, {
1429
- node: TNodeWithRelayChains;
1430
- }>;
1431
- /**
1432
- * Specifies the currency to be used in the transaction. Symbol, ID, multi-location or multi-asset.
1433
- *
1434
- * @param currency - The currency to be transferred.
1435
- * @returns An instance of Builder
1436
- */
1437
- currency(currency: TCurrencyInputWithAmount): GeneralBuilder<TApi, TRes, T & {
1438
- currency: TCurrencyInputWithAmount;
1439
- }>;
1440
- /**
1441
- * Sets the recipient address.
1442
- *
1443
- * @param address - The destination address.
1444
- * @returns An instance of Builder
1445
- */
1446
- address(address: TAddress, senderAddress?: string): GeneralBuilder<TApi, TRes, T & {
1447
- address: TAddress;
1448
- }>;
1449
- /**
1450
- * Sets the XCM version to be used for the transfer.
1451
- *
1452
- * @param version - The XCM version.
1453
- * @returns An instance of Builder
1454
- */
1455
- xcmVersion(version: Version): GeneralBuilder<TApi, TRes, T & {
1456
- version: Version;
1457
- }>;
1458
- /**
1459
- * Sets a custom pallet for the transaction.
1460
- *
1461
- * @param palletName - The name of the custom pallet to be used.
1462
- * @returns An instance of the Builder.
1463
- */
1464
- customPallet(pallet: string, method: string): GeneralBuilder<TApi, TRes, T & {
1465
- pallet: string;
1466
- method: string;
1467
- }>;
1468
- /**
1469
- * Optional fee asset for the transaction.
1470
- *
1471
- * @param currency - The currency to be used for the fee.
1472
- * @returns An instance of the Builder
1473
- */
1474
- feeAsset(currency: TCurrencyInput | undefined): GeneralBuilder<TApi, TRes, T & {
1475
- feeAsset: TCurrencyInput | undefined;
1476
- }>;
1477
- /**
1478
- * Adds the transfer transaction to the batch.
1479
- *
1480
- * @returns An instance of Builder
1481
- */
1482
- addToBatch(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>): GeneralBuilder<TApi, TRes, T & {
1483
- from: TNodeDotKsmWithRelayChains;
1484
- }>;
1485
- /**
1486
- * Builds and returns the batched transaction based on the configured parameters.
1487
- *
1488
- * @param options - (Optional) Options to customize the batch transaction.
1489
- * @returns A Extrinsic representing the batched transactions.
1490
- */
1491
- buildBatch(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>, options?: TBatchOptions): Promise<TRes>;
1492
- /**
1493
- * Builds and returns the transfer extrinsic.
1494
- *
1495
- * @returns A Promise that resolves to the transfer extrinsic.
1496
- */
1497
- build(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>): Promise<TRes>;
1498
- dryRun(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>, senderAddress: string): Promise<TDryRunResult>;
1499
- /**
1500
- * Returns the API instance used by the builder.
1501
- *
1502
- * @returns The API instance.
1503
- */
1504
- getApi(): TApi;
1505
- /**
1506
- * Disconnects the API.
1507
- *
1508
- * @returns A Promise that resolves when the API is disconnected.
1509
- */
1510
- disconnect(): Promise<void>;
1127
+ declare class InvArchTinker<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1128
+ constructor();
1129
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1130
+ }
1131
+
1132
+ declare class Karura<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1133
+ constructor();
1134
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1135
+ }
1136
+
1137
+ declare class KiltSpiritnet<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1138
+ constructor();
1139
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1140
+ transferRelayToPara(): TSerializedApiCall;
1141
+ }
1142
+
1143
+ declare class Kintsugi<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1144
+ constructor();
1145
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1146
+ }
1147
+
1148
+ declare class Manta<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1149
+ constructor();
1150
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1151
+ }
1152
+
1153
+ declare class Moonbeam<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1154
+ constructor();
1155
+ private getMultiLocation;
1156
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1157
+ getRelayToParaOverrides(): TRelayToParaOverrides;
1158
+ }
1159
+
1160
+ declare class Moonriver<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1161
+ constructor();
1162
+ private getMultiLocation;
1163
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1164
+ getRelayToParaOverrides(): TRelayToParaOverrides;
1511
1165
  }
1512
- /**
1513
- * Creates a new Builder instance.
1514
- *
1515
- * @param api - The API instance to use for building transactions. If not provided, a new instance will be created.
1516
- * @returns A new Builder instance.
1517
- */
1518
- declare const Builder: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>) => GeneralBuilder<TApi, TRes, object>;
1519
1166
 
1520
- /**
1521
- * Error thrown when multiple assets with the same symbol are found.
1522
- */
1523
- declare class DuplicateAssetError extends Error {
1524
- /**
1525
- * Constructs a new DuplicateAssetError.
1526
- *
1527
- * @param symbol - The symbol of the asset causing the duplication error.
1528
- */
1529
- constructor(msg: string);
1167
+ declare class Mythos<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1168
+ constructor();
1169
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1170
+ transferRelayToPara(): TSerializedApiCall;
1530
1171
  }
1531
1172
 
1532
- /**
1533
- * Error thrown when multiple assets with the same symbol are found.
1534
- */
1535
- declare class DuplicateAssetIdError extends Error {
1536
- /**
1537
- * Constructs a new DuplicateAssetError.
1538
- *
1539
- * @param symbol - The symbol of the asset causing the duplication error.
1540
- */
1541
- constructor(id: string);
1173
+ declare class NeuroWeb<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1174
+ constructor();
1175
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1176
+ }
1177
+
1178
+ declare class Nodle<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1179
+ constructor();
1180
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1181
+ transferRelayToPara(): TSerializedApiCall;
1182
+ }
1183
+
1184
+ declare class Parallel<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1185
+ constructor();
1186
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1187
+ }
1188
+
1189
+ declare class ParallelHeiko<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1190
+ constructor();
1191
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1192
+ }
1193
+
1194
+ declare class Peaq<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1195
+ constructor();
1196
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1197
+ transferRelayToPara(): TSerializedApiCall;
1198
+ }
1199
+
1200
+ declare class Pendulum<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1201
+ constructor();
1202
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1203
+ transferRelayToPara(): TSerializedApiCall;
1204
+ }
1205
+
1206
+ declare class PeopleKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1207
+ constructor();
1208
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1209
+ getRelayToParaOverrides(): TRelayToParaOverrides;
1210
+ }
1211
+
1212
+ declare class PeoplePolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1213
+ constructor();
1214
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1215
+ getRelayToParaOverrides(): TRelayToParaOverrides;
1542
1216
  }
1543
1217
 
1218
+ declare class Phala<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTransferTransfer {
1219
+ constructor();
1220
+ transferXTransfer<TApi, TRes>(input: TXTransferTransferOptions<TApi, TRes>): TRes;
1221
+ }
1222
+
1223
+ declare class Picasso<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1224
+ constructor();
1225
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1226
+ }
1227
+
1228
+ declare class Polimec<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1229
+ constructor();
1230
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1231
+ transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCall;
1232
+ }
1233
+
1234
+ declare class Quartz<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1235
+ private static NATIVE_ASSET_ID;
1236
+ constructor();
1237
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1238
+ }
1239
+
1240
+ declare class RobonomicsKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1241
+ constructor();
1242
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1243
+ }
1244
+
1245
+ declare class RobonomicsPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1246
+ constructor();
1247
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1248
+ }
1249
+
1250
+ declare class Shiden<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer, IXTokensTransfer {
1251
+ constructor();
1252
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1253
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1254
+ protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
1255
+ }
1256
+
1257
+ declare class Subsocial<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1258
+ constructor();
1259
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1260
+ }
1261
+
1262
+ declare class Turing<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1263
+ constructor();
1264
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1265
+ }
1266
+
1267
+ declare class Unique<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1268
+ private static NATIVE_ASSET_ID;
1269
+ constructor();
1270
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1271
+ }
1272
+
1273
+ declare class Zeitgeist<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1274
+ constructor();
1275
+ private getCurrencySelection;
1276
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1277
+ }
1278
+
1279
+ declare const nodes: <TApi, TRes>() => {
1280
+ AssetHubPolkadot: AssetHubPolkadot<TApi, TRes>;
1281
+ Acala: Acala<TApi, TRes>;
1282
+ Astar: Astar<TApi, TRes>;
1283
+ Unique: Unique<TApi, TRes>;
1284
+ Crust: Crust<TApi, TRes>;
1285
+ BifrostPolkadot: BifrostPolkadot<TApi, TRes>;
1286
+ BridgeHubPolkadot: BridgeHubPolkadot<TApi, TRes>;
1287
+ BridgeHubKusama: BridgeHubKusama<TApi, TRes>;
1288
+ Bitgreen: Bitgreen<TApi, TRes>;
1289
+ Centrifuge: Centrifuge<TApi, TRes>;
1290
+ ComposableFinance: ComposableFinance<TApi, TRes>;
1291
+ Darwinia: Darwinia<TApi, TRes>;
1292
+ Hydration: Hydration<TApi, TRes>;
1293
+ Interlay: Interlay<TApi, TRes>;
1294
+ Heima: Heima<TApi, TRes>;
1295
+ Moonbeam: Moonbeam<TApi, TRes>;
1296
+ Parallel: Parallel<TApi, TRes>;
1297
+ AssetHubKusama: AssetHubKusama<TApi, TRes>;
1298
+ CoretimeKusama: CoretimeKusama<TApi, TRes>;
1299
+ CoretimePolkadot: CoretimePolkadot<TApi, TRes>;
1300
+ Encointer: Encointer<TApi, TRes>;
1301
+ Altair: Altair<TApi, TRes>;
1302
+ Amplitude: Amplitude<TApi, TRes>;
1303
+ Bajun: Bajun<TApi, TRes>;
1304
+ Basilisk: Basilisk<TApi, TRes>;
1305
+ BifrostKusama: BifrostKusama<TApi, TRes>;
1306
+ Calamari: Calamari<TApi, TRes>;
1307
+ CrustShadow: CrustShadow<TApi, TRes>;
1308
+ Crab: Crab<TApi, TRes>;
1309
+ Imbue: Imbue<TApi, TRes>;
1310
+ InvArchTinker: InvArchTinker<TApi, TRes>;
1311
+ Karura: Karura<TApi, TRes>;
1312
+ Kintsugi: Kintsugi<TApi, TRes>;
1313
+ Moonriver: Moonriver<TApi, TRes>;
1314
+ ParallelHeiko: ParallelHeiko<TApi, TRes>;
1315
+ Picasso: Picasso<TApi, TRes>;
1316
+ Quartz: Quartz<TApi, TRes>;
1317
+ RobonomicsKusama: RobonomicsKusama<TApi, TRes>;
1318
+ RobonomicsPolkadot: RobonomicsPolkadot<TApi, TRes>;
1319
+ PeoplePolkadot: PeoplePolkadot<TApi, TRes>;
1320
+ PeopleKusama: PeopleKusama<TApi, TRes>;
1321
+ Shiden: Shiden<TApi, TRes>;
1322
+ Turing: Turing<TApi, TRes>;
1323
+ Manta: Manta<TApi, TRes>;
1324
+ Nodle: Nodle<TApi, TRes>;
1325
+ NeuroWeb: NeuroWeb<TApi, TRes>;
1326
+ Pendulum: Pendulum<TApi, TRes>;
1327
+ Zeitgeist: Zeitgeist<TApi, TRes>;
1328
+ Collectives: Collectives<TApi, TRes>;
1329
+ Phala: Phala<TApi, TRes>;
1330
+ Subsocial: Subsocial<TApi, TRes>;
1331
+ KiltSpiritnet: KiltSpiritnet<TApi, TRes>;
1332
+ Curio: Curio<TApi, TRes>;
1333
+ Mythos: Mythos<TApi, TRes>;
1334
+ Peaq: Peaq<TApi, TRes>;
1335
+ Polimec: Polimec<TApi, TRes>;
1336
+ };
1337
+
1544
1338
  /**
1545
1339
  * Error thrown when nodes from different relay chains are incompatible.
1546
1340
  */
@@ -1565,18 +1359,6 @@ declare class InvalidAddressError extends Error {
1565
1359
  constructor(message: string);
1566
1360
  }
1567
1361
 
1568
- /**
1569
- * Used to inform user, that currency they wish to use is not registered on either origin or destination Parachain
1570
- */
1571
- declare class InvalidCurrencyError extends Error {
1572
- /**
1573
- * Constructs a new InvalidCurrencyError.
1574
- *
1575
- * @param message - The error message.
1576
- */
1577
- constructor(message: string);
1578
- }
1579
-
1580
1362
  /**
1581
1363
  * Used to inform user, that Parachain they wish to use is not supported yet
1582
1364
  */
@@ -1627,92 +1409,6 @@ declare const getNodeProviders: (node: TNodeDotKsmWithRelayChains) => string[];
1627
1409
  */
1628
1410
  declare const getParaId: (node: TNodeWithRelayChains) => number;
1629
1411
 
1630
- declare const claimAssets: <TApi, TRes>(options: TAssetClaimOptions<TApi, TRes>) => Promise<TRes>;
1631
-
1632
- declare const getAssetMultiLocation: (node: TNodeWithRelayChains, currency: TCurrencyInput) => TMultiLocation | null;
1633
-
1634
- /**
1635
- * Retrieves the existential deposit value for a given node.
1636
- *
1637
- * @param node - The node for which to get the existential deposit.
1638
- * @returns The existential deposit as a string if available; otherwise, null.
1639
- */
1640
- declare const getExistentialDeposit: (node: TNodeWithRelayChains, currency?: TCurrencyCore) => string | null;
1641
-
1642
- /**
1643
- * Retrieves the assets object for a given node containing the native and foreign assets.
1644
- *
1645
- * @param node - The node for which to retrieve the assets object.
1646
- * @returns The assets object associated with the given node.
1647
- */
1648
- declare const getAssetsObject: (node: TNodeWithRelayChains) => TNodeAssets;
1649
- declare const isNodeEvm: (node: TNodeWithRelayChains) => boolean;
1650
- /**
1651
- * Retrieves the asset ID for a given symbol on a specified node.
1652
- *
1653
- * @param node - The node to search for the asset.
1654
- * @param symbol - The symbol of the asset.
1655
- * @returns The asset ID if found; otherwise, null.
1656
- */
1657
- declare const getAssetId: (node: TNodeWithRelayChains, symbol: string) => string | null;
1658
- /**
1659
- * Retrieves the relay chain asset symbol for a specified node.
1660
- *
1661
- * @param node - The node for which to get the relay chain symbol.
1662
- * @returns The relay chain asset symbol.
1663
- */
1664
- declare const getRelayChainSymbol: (node: TNodeWithRelayChains) => TRelayChainSymbol;
1665
- /**
1666
- * Retrieves the list of native assets for a specified node.
1667
- *
1668
- * @param node - The node for which to get native assets.
1669
- * @returns An array of native asset details.
1670
- */
1671
- declare const getNativeAssets: (node: TNodeWithRelayChains) => TNativeAsset[];
1672
- /**
1673
- * Retrieves the list of other (non-native) assets for a specified node.
1674
- *
1675
- * @param node - The node for which to get other assets.
1676
- * @returns An array of other asset details.
1677
- */
1678
- declare const getOtherAssets: (node: TNodeWithRelayChains) => TForeignAsset[];
1679
- /**
1680
- * Retrieves the complete list of assets for a specified node, including relay chain asset, native, and other assets.
1681
- *
1682
- * @param node - The node for which to get the assets.
1683
- * @returns An array of objects of all assets associated with the node.
1684
- */
1685
- declare const getAssets: (node: TNodeWithRelayChains) => TAsset[];
1686
- /**
1687
- * Retrieves the symbols of all assets (relay chain, native, and other assets) for a specified node.
1688
- *
1689
- * @param node - The node for which to get asset symbols.
1690
- * @returns An array of asset symbols.
1691
- */
1692
- declare const getAllAssetsSymbols: (node: TNodeWithRelayChains) => string[];
1693
- /**
1694
- * Retrieves the symbol of the native asset for a specified node.
1695
- *
1696
- * @param node - The node for which to get the native asset symbol.
1697
- * @returns The symbol of the native asset.
1698
- */
1699
- declare const getNativeAssetSymbol: (node: TNodeWithRelayChains) => string;
1700
- /**
1701
- * Determines whether a specified node supports an asset with the given symbol.
1702
- *
1703
- * @param node - The node to check for asset support.
1704
- * @param symbol - The symbol of the asset to check.
1705
- * @returns True if the asset is supported; otherwise, false.
1706
- */
1707
- declare const hasSupportForAsset: (node: TNodeWithRelayChains, symbol: string) => boolean;
1708
- /**
1709
- * Retrieves the number of decimals for an asset with the given symbol on a specified node.
1710
- *
1711
- * @param node - The node where the asset is located.
1712
- * @param symbol - The symbol of the asset.
1713
- * @returns The number of decimals if the asset is found; otherwise, null.
1714
- */
1715
- declare const getAssetDecimals: (node: TNodeWithRelayChains, symbol: string) => number | null;
1716
1412
  /**
1717
1413
  * Retrieves the node name corresponding to a specified parachain ID.
1718
1414
  *
@@ -1720,18 +1416,8 @@ declare const getAssetDecimals: (node: TNodeWithRelayChains, symbol: string) =>
1720
1416
  * @returns The node name if found; otherwise, null.
1721
1417
  */
1722
1418
  declare const getTNode: (paraId: number, ecosystem: TEcosystemType) => TNodeWithRelayChains | null;
1723
- declare const hasDryRunSupport: (node: TNodeWithRelayChains) => boolean;
1724
1419
 
1725
- declare const Native: (symbol: string) => TSymbolSpecifier;
1726
- declare const Foreign: (symbol: string) => TSymbolSpecifier;
1727
- declare const ForeignAbstract: (symbol: string) => TSymbolSpecifier;
1728
-
1729
- declare const findBestMatches: <T extends {
1730
- symbol: string;
1731
- alias?: string;
1732
- }>(assets: T[], value: string, property?: "symbol" | "alias") => T[];
1733
- declare const findAssetBySymbol: (node: TNodeWithRelayChains, destination: TNodeWithRelayChains | null, otherAssets: TForeignAsset[], nativeAssets: TNativeAsset[], symbol: TCurrencySymbolValue) => TAsset | undefined;
1734
- declare const findAssetById: (assets: TForeignAsset[], assetId: TCurrency) => TForeignAsset | undefined;
1420
+ declare const claimAssets: <TApi, TRes>(options: TAssetClaimOptions<TApi, TRes>) => Promise<TRes>;
1735
1421
 
1736
1422
  declare const getAssetBalanceInternal: <TApi, TRes>({ address, node, currency, api }: TGetAssetBalanceOptions<TApi, TRes>) => Promise<bigint>;
1737
1423
  declare const getAssetBalance: <TApi, TRes>(options: TGetAssetBalanceOptions<TApi, TRes>) => Promise<bigint>;
@@ -1742,55 +1428,17 @@ declare const getBalanceForeign: <TApi, TRes>(options: TGetBalanceForeignOptions
1742
1428
  declare const getBalanceNativeInternal: <TApi, TRes>({ address, node, api, currency }: TGetBalanceNativeOptions<TApi, TRes>) => Promise<bigint>;
1743
1429
  declare const getBalanceNative: <TApi, TRes>(options: TGetBalanceNativeOptions<TApi, TRes>) => Promise<bigint>;
1744
1430
 
1745
- declare const findAssetByMultiLocation: (foreignAssets: TForeignAsset[], multiLocation: string | TMultiLocation) => TForeignAsset | undefined;
1746
-
1747
- declare const getAssetBySymbolOrId: (node: TNodeWithRelayChains, currency: TCurrencyInput, destination: TNodeWithRelayChains | null) => TAsset | null;
1748
-
1749
1431
  declare const getOriginFeeDetailsInternal: <TApi, TRes>({ api, account, accountDestination, currency, origin, destination, feeMarginPercentage }: TGetOriginFeeDetailsOptions<TApi, TRes>) => Promise<TOriginFeeDetails>;
1750
1432
  declare const getOriginFeeDetails: <TApi, TRes>(options: TGetOriginFeeDetailsOptions<TApi, TRes>) => Promise<TOriginFeeDetails>;
1751
1433
 
1752
- /**
1753
- * Normalizes an asset symbol by stripping the 'xc' prefix (if present) and converting it to lowercase.
1754
- *
1755
- * @param symbol - The symbol to normalize.
1756
- * @returns The normalized symbol.
1757
- */
1758
- declare const normalizeSymbol: (symbol: string | undefined) => string;
1759
- /**
1760
- * Retrieves the list of assets that are supported for transfers between two specified nodes.
1761
- *
1762
- * @param origin - The origin node.
1763
- * @param destination - The destination node.
1764
- * @returns An array of assets supported between the origin and destination nodes.
1765
- */
1766
- declare const getSupportedAssets: (origin: TNodeWithRelayChains, destination: TNodeWithRelayChains) => TAsset[];
1767
-
1768
1434
  declare const getMaxNativeTransferableAmount: <TApi, TRes>({ api, address, node, currency }: TGetMaxNativeTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
1769
1435
  declare const getMaxForeignTransferableAmount: <TApi, TRes>({ api, address, node, currency }: TGetMaxForeignTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
1770
1436
  declare const getTransferableAmount: <TApi, TRes>({ api, address, node, currency }: TGetTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
1771
1437
 
1772
- declare const Override: (multiLocation: TMultiLocation) => TOverrideMultiLocationSpecifier;
1773
-
1774
1438
  declare const getTransferInfo: <TApi, TRes>({ origin, destination, accountOrigin, accountDestination, currency, api }: TGetTransferInfoOptions<TApi, TRes>) => Promise<TTransferInfo>;
1775
1439
 
1776
1440
  declare const verifyEdOnDestination: <TApi, TRes>(options: TVerifyEdOnDestinationOptions<TApi, TRes>) => Promise<boolean>;
1777
1441
 
1778
- /**
1779
- * Retrieves the default pallet for a specified node.
1780
- *
1781
- * @param node - The node for which to get the default pallet.
1782
- * @returns The default pallet associated with the node.
1783
- */
1784
- declare const getDefaultPallet: (node: TNodeDotKsmWithRelayChains) => TPallet;
1785
- /**
1786
- * Retrieves the list of supported pallets for a specified node.
1787
- *
1788
- * @param node - The node for which to get supported pallets.
1789
- * @returns An array of pallets supported by the node.
1790
- */
1791
- declare const getSupportedPallets: (node: TNodeDotKsmWithRelayChains) => TPallet[];
1792
- declare const getSupportedPalletsDetails: (node: TNodeDotKsmWithRelayChains) => TPalletDetails[];
1793
-
1794
1442
  declare const getParaEthTransferFees: <TApi, TRes>(ahApi: IPolkadotApi<TApi, TRes>) => Promise<[bigint, bigint]>;
1795
1443
 
1796
1444
  declare const transferMoonbeamEvm: <TApi, TRes>({ api, from, to, signer, address, currency }: TEvmBuilderOptions<TApi, TRes>) => Promise<string>;
@@ -1806,17 +1454,11 @@ declare const send: <TApi, TRes>(options: TSendOptions<TApi, TRes>) => Promise<T
1806
1454
 
1807
1455
  declare const transferRelayToPara: <TApi, TRes>(options: TRelayToParaOptions<TApi, TRes>) => Promise<TRes>;
1808
1456
 
1809
- declare const isAssetEqual: (asset1: TAsset, asset2: TAsset) => boolean;
1810
-
1811
- declare const isForeignAsset: (asset: TAsset) => asset is TForeignAsset;
1812
-
1813
- declare const isSymbolSpecifier: (currencySymbolValue: TCurrencySymbolValue) => currencySymbolValue is TSymbolSpecifier;
1814
-
1815
1457
  declare const createApiInstanceForNode: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>, node: TNodeDotKsmWithRelayChains) => Promise<TApi>;
1816
1458
 
1817
- declare const createX1Payload: (version: Version, junction: TJunction) => TJunctions;
1459
+ declare const createVersionedBeneficiary: <TApi, TRes>(options: TCreateBeneficiaryOptions<TApi, TRes>) => OneKey<Version, _paraspell_sdk_common.TMultiLocation>;
1818
1460
 
1819
- declare const deepEqual: (obj1: unknown, obj2: unknown) => boolean;
1461
+ declare const createX1Payload: (version: Version, junction: TJunction) => TJunctions;
1820
1462
 
1821
1463
  declare const computeFeeFromDryRun: (dryRun: any, node: TNodeDotKsmWithRelayChains, executionFee: bigint) => bigint;
1822
1464
 
@@ -1826,8 +1468,6 @@ declare const resolveModuleError: (node: TNodeDotKsmWithRelayChains, error: TMod
1826
1468
 
1827
1469
  declare const generateAddressMultiLocationV4: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>, address: TAddress) => TXcmVersioned<TMultiLocation>;
1828
1470
 
1829
- declare const generateAddressPayload: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>, scenario: TScenario, pallet: TPallet | null, recipientAddress: TAddress, version: Version, nodeId: number | undefined) => TXcmVersioned<TMultiLocation>;
1830
-
1831
1471
  declare const getFees: (scenario: TScenario) => number;
1832
1472
 
1833
1473
  /**
@@ -1838,9 +1478,7 @@ declare const getFees: (scenario: TScenario) => number;
1838
1478
  */
1839
1479
  declare const getNode: <TApi, TRes, T extends keyof ReturnType<typeof nodes>>(node: T) => ReturnType<typeof nodes<TApi, TRes>>[T];
1840
1480
 
1841
- declare const extractMultiAssetLoc: (multiAsset: TMultiAsset) => TMultiLocation;
1842
-
1843
- declare const isOverrideMultiLocationSpecifier: (multiLocationSpecifier: TMultiLocationValueWithOverride) => multiLocationSpecifier is TOverrideMultiLocationSpecifier;
1481
+ declare const createBeneficiaryMultiLocation: <TApi, TRes>({ api, scenario, pallet, recipientAddress, version, paraId }: TCreateBeneficiaryOptions<TApi, TRes>) => TMultiLocation;
1844
1482
 
1845
1483
  declare const transformMultiLocation: (multiLocation: TMultiLocation) => TMultiLocation;
1846
1484
 
@@ -1863,4 +1501,4 @@ declare const determineRelayChain: (node: TNodeWithRelayChains) => TRelaychain;
1863
1501
  */
1864
1502
  declare const isRelayChain: (node: TNodeWithRelayChains) => node is "Polkadot" | "Kusama";
1865
1503
 
1866
- export { AssetClaimBuilder, BatchMode, Builder, DuplicateAssetError, DuplicateAssetIdError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, Foreign, ForeignAbstract, GeneralBuilder, type IPolkadotApi, type IPolkadotXCMTransfer, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidAddressError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Native, NoXCMSupportImplementedError, NodeNotSupportedError, type OneKey, Override, Parents, PolkadotXcmError, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TApiOrUrl, type TAsset, type TAssetClaimOptions, type TAssetClaimOptionsBase, type TAssetJsonMap, type TBalanceResponse, type TBatchOptions, type TBifrostToken, type TCurrency, type TCurrencyCore, type TCurrencyInput, type TCurrencyInputWithAmount, type TCurrencySymbol, type TCurrencySymbolValue, type TDestWeight, type TDestination, type TDryRunBaseOptions, type TDryRunOptions, type TDryRunResult, type TEcosystemType, type TEdJsonMap, type TEvmBuilderOptions, type TEvmBuilderOptionsBase, type TEvmNodeFrom, type TForeignAsset, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TGetAssetBalanceOptions, type TGetAssetBalanceOptionsBase, type TGetBalanceForeignOptions, type TGetBalanceForeignOptionsBase, type TGetBalanceNativeOptions, type TGetBalanceNativeOptionsBase, type TGetMaxForeignTransferableAmountOptions, type TGetMaxForeignTransferableAmountOptionsBase, type TGetMaxNativeTransferableAmountOptions, type TGetMaxNativeTransferableAmountOptionsBase, type TGetOriginFeeDetailsOptions, type TGetOriginFeeDetailsOptionsBase, type TGetTransferInfoOptions, type TGetTransferInfoOptionsBase, type TGetTransferableAmountOptions, type TGetTransferableAmountOptionsBase, type TJunction, type TJunctionGeneralIndex, type TJunctionParachain, type TJunctionType, type TJunctions, type TMantaAsset, type TModuleError, type TMultiAsset, type TMultiAssetV3, type TMultiAssetV4, type TMultiAssetWithFee, type TMultiLocation, type TMultiLocationValue, type TMultiLocationValueWithOverride, type TNativeAsset, type TNativeTokenAsset, type TNode, type TNodeAssets, type TNodeConfig, type TNodeConfigMap, type TNodeDotKsmWithRelayChains, type TNodePolkadotKusama, type TNodeWithRelayChains, type TNodleAsset, type TOriginFeeDetails, type TOtherReserveAsset, type TOverrideMultiLocationSpecifier, type TPallet, type TPalletDetails, type TPalletJsonMap, type TPalletMap, type TPolkadotXCMTransferOptions, type TPolkadotXcmSection, type TProviderEntry, type TRelayChainSymbol, type TRelayToParaDestination, type TRelayToParaOptions, type TRelayToParaOverrides, type TRelaychain, type TReserveAsset, type TScenario, type TSelfReserveAsset, type TSendBaseOptions, type TSendInternalOptions, type TSendOptions, type TSerializeEthTransferOptions, type TSerializedApiCall, type TSerializedEthTransfer, type TSymbolSpecifier, type TTransferInfo, type TVerifyEdOnDestinationOptions, type TVerifyEdOnDestinationOptionsBase, type TVersionClaimAssets, type TWeight, type TXTokensCurrencySelection, type TXTokensSection, type TXTokensTransferOptions, type TXTransferSection, type TXTransferTransferOptions, type TXcmAsset, type TXcmForeignAsset, type TXcmPalletSection, type TXcmVersioned, type TZeitgeistAsset, Version, type WithAmount, type WithApi, XTokensError, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, createApiInstanceForNode, createX1Payload, deepEqual, determineRelayChain, extractMultiAssetLoc, findAssetById, findAssetByMultiLocation, findAssetBySymbol, findBestMatches, generateAddressMultiLocationV4, generateAddressPayload, getAllAssetsSymbols, getAssetBalance, getAssetBalanceInternal, getAssetBySymbolOrId, getAssetDecimals, getAssetId, getAssetMultiLocation, getAssets, getAssetsObject, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getDefaultPallet, getDryRun, getExistentialDeposit, getFees, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getNativeAssetSymbol, getNativeAssets, getNode, getNodeConfig, getNodeProviders, getOriginFeeDetails, getOriginFeeDetailsInternal, getOtherAssets, getParaEthTransferFees, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getSupportedPalletsDetails, getTNode, getTransferInfo, getTransferableAmount, hasDryRunSupport, hasSupportForAsset, isAssetEqual, isEthersContract, isEthersSigner, isForeignAsset, isNodeEvm, isOverrideMultiLocationSpecifier, isRelayChain, isSymbolSpecifier, normalizeSymbol, resolveModuleError, resolveParaId, send, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, transformMultiLocation, validateAddress, verifyEdOnDestination };
1504
+ export { AssetClaimBuilder, BatchMode, Builder, ETHEREUM_JUNCTION, ETH_CHAIN_ID, GeneralBuilder, type IPolkadotApi, type IPolkadotXCMTransfer, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidAddressError, NoXCMSupportImplementedError, NodeNotSupportedError, type OneKey, PolkadotXcmError, ScenarioNotSupportedError, type TAddress, type TApiOrUrl, type TAssetClaimOptions, type TAssetClaimOptionsBase, type TBalanceResponse, type TBatchOptions, type TBifrostToken, type TCreateBeneficiaryOptions, type TDestWeight, type TDestination, type TDryRunBaseOptions, type TDryRunOptions, type TDryRunResult, type TEdJsonMap, type TEvmBuilderOptions, type TEvmBuilderOptionsBase, type TEvmNodeFrom, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TGetAssetBalanceOptions, type TGetAssetBalanceOptionsBase, type TGetBalanceForeignOptions, type TGetBalanceForeignOptionsBase, type TGetBalanceNativeOptions, type TGetBalanceNativeOptionsBase, type TGetMaxForeignTransferableAmountOptions, type TGetMaxForeignTransferableAmountOptionsBase, type TGetMaxNativeTransferableAmountOptions, type TGetMaxNativeTransferableAmountOptionsBase, type TGetOriginFeeDetailsOptions, type TGetOriginFeeDetailsOptionsBase, type TGetTransferInfoOptions, type TGetTransferInfoOptionsBase, type TGetTransferableAmountOptions, type TGetTransferableAmountOptionsBase, type TMantaAsset, type TModuleError, type TNativeTokenAsset, type TNodeConfig, type TNodeConfigMap, type TNodleAsset, type TOriginFeeDetails, type TOtherReserveAsset, type TPolkadotXCMTransferOptions, type TPolkadotXcmSection, type TProviderEntry, type TRelayToParaDestination, type TRelayToParaOptions, type TRelayToParaOverrides, type TRelaychain, type TReserveAsset, type TScenario, type TSelfReserveAsset, type TSendBaseOptions, type TSendInternalOptions, type TSendOptions, type TSerializeEthTransferOptions, type TSerializedApiCall, type TSerializedEthTransfer, type TTransferInfo, type TVerifyEdOnDestinationOptions, type TVerifyEdOnDestinationOptionsBase, type TVersionClaimAssets, type TWeight, type TXTokensCurrencySelection, type TXTokensSection, type TXTokensTransferOptions, type TXTransferSection, type TXTransferTransferOptions, type TXcmAsset, type TXcmForeignAsset, type TXcmPalletSection, type TXcmVersioned, type TZeitgeistAsset, Version, type WithApi, XTokensError, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, createApiInstanceForNode, createBeneficiaryMultiLocation, createVersionedBeneficiary, createX1Payload, determineRelayChain, generateAddressMultiLocationV4, getAssetBalance, getAssetBalanceInternal, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getDryRun, getFees, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getNode, getNodeConfig, getNodeProviders, getOriginFeeDetails, getOriginFeeDetailsInternal, getParaEthTransferFees, getParaId, getTNode, getTransferInfo, getTransferableAmount, isEthersContract, isEthersSigner, isRelayChain, resolveModuleError, resolveParaId, send, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, transformMultiLocation, validateAddress, verifyEdOnDestination };