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