@paraspell/sdk 7.2.2 → 7.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1694 -1313
- package/dist/index.d.ts +217 -217
- package/dist/index.mjs +1693 -1312
- package/dist/papi/index.cjs +1698 -1302
- package/dist/papi/index.d.ts +191 -186
- package/dist/papi/index.mjs +1697 -1300
- package/package.json +1 -1
package/dist/papi/index.d.ts
CHANGED
|
@@ -10,10 +10,11 @@ type TApiOrUrl<TApi> = TApi | string;
|
|
|
10
10
|
interface IPolkadotApi<TApi, TRes> {
|
|
11
11
|
setApi(api?: TApiOrUrl<TApi>): void;
|
|
12
12
|
getApi(): TApi;
|
|
13
|
+
getApiOrUrl(): TApiOrUrl<TApi> | undefined;
|
|
13
14
|
init(node: TNodeWithRelayChains): Promise<void>;
|
|
14
15
|
createApiInstance: (wsUrl: string) => Promise<TApi>;
|
|
15
|
-
createAccountId(address: string):
|
|
16
|
-
callTxMethod(serializedCall:
|
|
16
|
+
createAccountId(address: string): THexString$1;
|
|
17
|
+
callTxMethod(serializedCall: TSerializedApiCall): TRes;
|
|
17
18
|
calculateTransactionFee(tx: TRes, address: string): Promise<bigint>;
|
|
18
19
|
getBalanceNative(address: string): Promise<bigint>;
|
|
19
20
|
getBalanceForeignPolkadotXcm(address: string, id?: string): Promise<bigint>;
|
|
@@ -44,8 +45,9 @@ declare abstract class ParachainNode<TApi, TRes> {
|
|
|
44
45
|
get version(): Version;
|
|
45
46
|
get assetCheckEnabled(): boolean;
|
|
46
47
|
protected canUseXTokens(_: TSendInternalOptions<TApi, TRes>): boolean;
|
|
47
|
-
transfer(options: TSendInternalOptions<TApi, TRes>): Promise<
|
|
48
|
-
|
|
48
|
+
transfer(options: TSendInternalOptions<TApi, TRes>): Promise<TRes>;
|
|
49
|
+
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
50
|
+
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCall;
|
|
49
51
|
getProvider(): string;
|
|
50
52
|
createApiInstance(api: IPolkadotApi<TApi, TRes>): Promise<TApi>;
|
|
51
53
|
createCurrencySpec(amount: string, scenario: TScenario, version: Version, _asset?: TAsset, overridedMultiLocation?: TMultiLocation | TMultiAsset[]): TCurrencySelectionHeaderArr;
|
|
@@ -55,19 +57,19 @@ declare abstract class ParachainNode<TApi, TRes> {
|
|
|
55
57
|
|
|
56
58
|
declare class Acala<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
57
59
|
constructor();
|
|
58
|
-
transferXTokens<TApi, TRes>(input:
|
|
60
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
59
61
|
getProvider(): string;
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
declare class Unique<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
63
65
|
constructor();
|
|
64
|
-
transferXTokens<TApi, TRes>(input:
|
|
66
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
declare class Crust<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
68
70
|
constructor();
|
|
69
71
|
private getCurrencySelection;
|
|
70
|
-
transferXTokens<TApi, TRes>(input:
|
|
72
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
declare class BifrostPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer, IPolkadotXCMTransfer {
|
|
@@ -115,8 +117,8 @@ declare class BifrostPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> impl
|
|
|
115
117
|
VSToken2?: undefined;
|
|
116
118
|
VToken2?: undefined;
|
|
117
119
|
};
|
|
118
|
-
transferXTokens<TApi, TRes>(input:
|
|
119
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
120
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
121
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
120
122
|
protected canUseXTokens({ asset, destination }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
121
123
|
getProvider(): string;
|
|
122
124
|
}
|
|
@@ -128,209 +130,210 @@ declare class Bitgreen<TApi, TRes> extends ParachainNode<TApi, TRes> {
|
|
|
128
130
|
declare class Centrifuge<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
129
131
|
constructor();
|
|
130
132
|
private getCurrencySelection;
|
|
131
|
-
transferXTokens<TApi, TRes>(input:
|
|
133
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
132
134
|
}
|
|
133
135
|
|
|
134
136
|
declare class ComposableFinance<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
135
137
|
constructor();
|
|
136
|
-
transferXTokens<TApi, TRes>(input:
|
|
138
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
declare class Hydration<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer, IPolkadotXCMTransfer {
|
|
140
142
|
private static NATIVE_ASSET_ID;
|
|
141
143
|
constructor();
|
|
142
|
-
transferToEthereum<TApi, TRes>(input:
|
|
143
|
-
transferToAssetHub<TApi, TRes>(input:
|
|
144
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
145
|
-
transferXTokens<TApi, TRes>(input:
|
|
144
|
+
transferToEthereum<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
145
|
+
transferToAssetHub<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
|
|
146
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
147
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
146
148
|
protected canUseXTokens({ destination, asset }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
147
149
|
getProvider(): string;
|
|
148
150
|
}
|
|
149
151
|
|
|
150
152
|
declare class Interlay<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
151
153
|
constructor();
|
|
152
|
-
transferXTokens<TApi, TRes>(input:
|
|
154
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
153
155
|
}
|
|
154
156
|
|
|
155
157
|
declare class Litentry<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
156
158
|
constructor();
|
|
157
|
-
transferXTokens<TApi, TRes>(input:
|
|
159
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
158
160
|
}
|
|
159
161
|
|
|
160
|
-
declare class Moonbeam<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
162
|
+
declare class Moonbeam<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
161
163
|
constructor();
|
|
162
|
-
private
|
|
163
|
-
|
|
164
|
-
|
|
164
|
+
private getJunctions;
|
|
165
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
166
|
+
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
165
167
|
getProvider(): string;
|
|
166
168
|
}
|
|
167
169
|
|
|
168
170
|
declare class Parallel<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
169
171
|
constructor();
|
|
170
|
-
transferXTokens<TApi, TRes>(input:
|
|
172
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
171
173
|
}
|
|
172
174
|
|
|
173
175
|
declare class Altair<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
174
176
|
constructor();
|
|
175
177
|
private getCurrencySelection;
|
|
176
|
-
transferXTokens<TApi, TRes>(input:
|
|
178
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
177
179
|
}
|
|
178
180
|
|
|
179
181
|
declare class Amplitude<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
180
182
|
constructor();
|
|
181
|
-
transferXTokens<TApi, TRes>(input:
|
|
183
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
182
184
|
}
|
|
183
185
|
|
|
184
186
|
declare class Bajun<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
185
187
|
constructor();
|
|
186
|
-
transferXTokens<TApi, TRes>(input:
|
|
187
|
-
transferRelayToPara():
|
|
188
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
189
|
+
transferRelayToPara(): TSerializedApiCall;
|
|
188
190
|
}
|
|
189
191
|
|
|
190
192
|
declare class Basilisk<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
191
193
|
constructor();
|
|
192
|
-
transferXTokens<TApi, TRes>(input:
|
|
194
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
193
195
|
getProvider(): string;
|
|
194
196
|
}
|
|
195
197
|
|
|
196
198
|
declare class BifrostKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
197
199
|
constructor();
|
|
198
|
-
transferXTokens<TApi, TRes>(input:
|
|
200
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
199
201
|
getProvider(): string;
|
|
200
202
|
}
|
|
201
203
|
|
|
202
204
|
declare class Pioneer<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
203
205
|
constructor();
|
|
204
|
-
transferXTokens<TApi, TRes>(input:
|
|
206
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
205
207
|
}
|
|
206
208
|
|
|
207
209
|
declare class Turing<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
208
210
|
constructor();
|
|
209
|
-
transferXTokens<TApi, TRes>(input:
|
|
211
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
210
212
|
}
|
|
211
213
|
|
|
212
214
|
declare class Picasso<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
213
215
|
constructor();
|
|
214
|
-
transferXTokens<TApi, TRes>(input:
|
|
216
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
215
217
|
}
|
|
216
218
|
|
|
217
219
|
declare class ParallelHeiko<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
218
220
|
constructor();
|
|
219
|
-
transferXTokens<TApi, TRes>(input:
|
|
221
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
220
222
|
}
|
|
221
223
|
|
|
222
|
-
declare class Moonriver<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
224
|
+
declare class Moonriver<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
223
225
|
constructor();
|
|
224
|
-
private
|
|
225
|
-
|
|
226
|
-
|
|
226
|
+
private getJunctions;
|
|
227
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
228
|
+
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
227
229
|
getProvider(): string;
|
|
228
230
|
}
|
|
229
231
|
|
|
230
232
|
declare class Kintsugi<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
231
233
|
constructor();
|
|
232
|
-
transferXTokens<TApi, TRes>(input:
|
|
234
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
233
235
|
}
|
|
234
236
|
|
|
235
237
|
declare class Calamari<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
236
238
|
constructor();
|
|
237
|
-
transferXTokens<TApi, TRes>(input:
|
|
239
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
238
240
|
}
|
|
239
241
|
|
|
240
242
|
declare class CrustShadow<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
241
243
|
constructor();
|
|
242
244
|
private getCurrencySelection;
|
|
243
|
-
transferXTokens<TApi, TRes>(input:
|
|
245
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
244
246
|
}
|
|
245
247
|
|
|
246
248
|
declare class Imbue<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
247
249
|
constructor();
|
|
248
|
-
transferXTokens<TApi, TRes>(input:
|
|
250
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
249
251
|
}
|
|
250
252
|
|
|
251
253
|
declare class Integritee<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
252
254
|
constructor();
|
|
253
|
-
transferXTokens<TApi, TRes>(input:
|
|
254
|
-
transferRelayToPara():
|
|
255
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
256
|
+
transferRelayToPara(): TSerializedApiCall;
|
|
255
257
|
}
|
|
256
258
|
|
|
257
259
|
declare class InvArchTinker<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
258
260
|
constructor();
|
|
259
|
-
transferXTokens<TApi, TRes>(input:
|
|
261
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
260
262
|
}
|
|
261
263
|
|
|
262
264
|
declare class Karura<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
263
265
|
constructor();
|
|
264
|
-
transferXTokens<TApi, TRes>(input:
|
|
266
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
265
267
|
getProvider(): string;
|
|
266
268
|
}
|
|
267
269
|
|
|
268
270
|
declare class AssetHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
269
271
|
constructor();
|
|
270
|
-
handleBridgeTransfer<TApi, TRes>(input:
|
|
271
|
-
handleEthBridgeTransfer<TApi, TRes>(input:
|
|
272
|
-
handleMythosTransfer<TApi, TRes>(input:
|
|
273
|
-
handleBifrostEthTransfer: <TApi_1, TRes_1>(input:
|
|
274
|
-
patchInput<TApi, TRes>(input:
|
|
272
|
+
handleBridgeTransfer<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>, targetChain: 'Polkadot' | 'Kusama'): TRes;
|
|
273
|
+
handleEthBridgeTransfer<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
|
|
274
|
+
handleMythosTransfer<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
|
|
275
|
+
handleBifrostEthTransfer: <TApi_1, TRes_1>(input: TPolkadotXCMTransferOptions<TApi_1, TRes_1>) => TRes_1;
|
|
276
|
+
patchInput<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TPolkadotXCMTransferOptions<TApi, TRes>;
|
|
275
277
|
private getSection;
|
|
276
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
277
|
-
|
|
278
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
279
|
+
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
278
280
|
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset, overridedMultiLocation?: TMultiLocation | TMultiAsset[]): TCurrencySelectionHeaderArr;
|
|
281
|
+
getProvider(): string;
|
|
279
282
|
}
|
|
280
283
|
|
|
281
284
|
declare class AssetHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
282
285
|
constructor();
|
|
283
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
284
|
-
|
|
286
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
287
|
+
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
285
288
|
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset, overridedMultiLocation?: TMultiLocation | TMultiAsset[]): TCurrencySelectionHeaderArr;
|
|
286
289
|
}
|
|
287
290
|
|
|
288
291
|
declare class CoretimeKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
289
292
|
constructor();
|
|
290
293
|
_assetCheckEnabled: boolean;
|
|
291
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
292
|
-
|
|
294
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
295
|
+
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
293
296
|
}
|
|
294
297
|
|
|
295
298
|
declare class CoretimePolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
296
299
|
constructor();
|
|
297
300
|
_assetCheckEnabled: boolean;
|
|
298
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
299
|
-
|
|
301
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
302
|
+
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
300
303
|
}
|
|
301
304
|
|
|
302
305
|
declare class Encointer<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
303
306
|
constructor();
|
|
304
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
305
|
-
|
|
307
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
308
|
+
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
306
309
|
}
|
|
307
310
|
|
|
308
311
|
declare class RobonomicsKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
309
312
|
constructor();
|
|
310
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
313
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
311
314
|
}
|
|
312
315
|
|
|
313
316
|
declare class RobonomicsPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
314
317
|
constructor();
|
|
315
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
318
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
316
319
|
}
|
|
317
320
|
|
|
318
321
|
declare class PeoplePolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
319
322
|
constructor();
|
|
320
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
321
|
-
|
|
323
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
324
|
+
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
322
325
|
}
|
|
323
326
|
|
|
324
327
|
declare class PeopleKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
325
328
|
constructor();
|
|
326
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
327
|
-
|
|
329
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
330
|
+
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
328
331
|
}
|
|
329
332
|
|
|
330
333
|
declare class Astar<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer, IXTokensTransfer {
|
|
331
334
|
constructor();
|
|
332
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
333
|
-
transferXTokens<TApi, TRes>(input:
|
|
335
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
336
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
334
337
|
protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
335
338
|
}
|
|
336
339
|
|
|
@@ -469,13 +472,14 @@ type TAsset = TNativeAsset | TForeignAsset;
|
|
|
469
472
|
type TNodeAssets = {
|
|
470
473
|
relayChainAssetSymbol: TRelayChainSymbol;
|
|
471
474
|
nativeAssetSymbol: string;
|
|
475
|
+
isEVM: boolean;
|
|
472
476
|
nativeAssets: TNativeAsset[];
|
|
473
477
|
otherAssets: TForeignAsset[];
|
|
474
478
|
};
|
|
475
479
|
type TAssetJsonMap = Record<TNodeWithRelayChains, TNodeAssets>;
|
|
476
480
|
|
|
477
|
-
type
|
|
478
|
-
type
|
|
481
|
+
type THexString$1 = `0x${string}`;
|
|
482
|
+
type TPolkadotXCMTransferOptions<TApi, TRes> = {
|
|
479
483
|
api: IPolkadotApi<TApi, TRes>;
|
|
480
484
|
header: TMultiLocationHeader;
|
|
481
485
|
addressSelection: TMultiLocationHeader;
|
|
@@ -488,11 +492,10 @@ type PolkadotXCMTransferInput<TApi, TRes> = {
|
|
|
488
492
|
paraIdTo?: number;
|
|
489
493
|
feeAsset?: TCurrency;
|
|
490
494
|
overridedCurrency?: TMultiLocation | TMultiAsset[];
|
|
491
|
-
serializedApiCallEnabled?: boolean;
|
|
492
495
|
version?: Version;
|
|
493
496
|
ahAddress?: string;
|
|
494
497
|
};
|
|
495
|
-
type
|
|
498
|
+
type TXTokensTransferOptions<TApi, TRes> = {
|
|
496
499
|
api: IPolkadotApi<TApi, TRes>;
|
|
497
500
|
asset: TAsset;
|
|
498
501
|
amount: string;
|
|
@@ -504,9 +507,8 @@ type XTokensTransferInput<TApi, TRes> = {
|
|
|
504
507
|
paraIdTo?: number;
|
|
505
508
|
overridedCurrencyMultiLocation?: TMultiLocation | TMultiAsset[];
|
|
506
509
|
feeAsset?: TCurrency;
|
|
507
|
-
serializedApiCallEnabled?: boolean;
|
|
508
510
|
};
|
|
509
|
-
type
|
|
511
|
+
type TXTransferTransferOptions<TApi, TRes> = {
|
|
510
512
|
api: IPolkadotApi<TApi, TRes>;
|
|
511
513
|
asset: TAsset;
|
|
512
514
|
amount: string;
|
|
@@ -515,17 +517,16 @@ type XTransferTransferInput<TApi, TRes> = {
|
|
|
515
517
|
paraId?: number;
|
|
516
518
|
destination?: TDestination;
|
|
517
519
|
overridedCurrencyMultiLocation?: TMultiLocation | TMultiAsset[];
|
|
518
|
-
serializedApiCallEnabled?: boolean;
|
|
519
|
-
};
|
|
520
|
-
type IPolkadotXCMTransfer = {
|
|
521
|
-
transferPolkadotXCM: <TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>) => Promise<TTransferReturn<TRes>>;
|
|
522
|
-
};
|
|
523
|
-
type IXTokensTransfer = {
|
|
524
|
-
transferXTokens: <TApi, TRes>(input: XTokensTransferInput<TApi, TRes>) => TTransferReturn<TRes>;
|
|
525
|
-
};
|
|
526
|
-
type IXTransferTransfer = {
|
|
527
|
-
transferXTransfer: <TApi, TRes>(input: XTransferTransferInput<TApi, TRes>) => TTransferReturn<TRes>;
|
|
528
520
|
};
|
|
521
|
+
interface IPolkadotXCMTransfer {
|
|
522
|
+
transferPolkadotXCM: <TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>) => Promise<TRes>;
|
|
523
|
+
}
|
|
524
|
+
interface IXTokensTransfer {
|
|
525
|
+
transferXTokens: <TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>) => TRes;
|
|
526
|
+
}
|
|
527
|
+
interface IXTransferTransfer {
|
|
528
|
+
transferXTransfer: <TApi, TRes>(input: TXTransferTransferOptions<TApi, TRes>) => TRes;
|
|
529
|
+
}
|
|
529
530
|
type TScenario = 'ParaToRelay' | 'ParaToPara' | 'RelayToPara';
|
|
530
531
|
/**
|
|
531
532
|
* The XCM version.
|
|
@@ -601,7 +602,6 @@ type TSendInternalOptions<TApi, TRes> = TSendBaseOptions<TApi, TRes> & {
|
|
|
601
602
|
asset: TAsset;
|
|
602
603
|
amount: string;
|
|
603
604
|
overridedCurrencyMultiLocation?: TMultiLocation | TMultiAsset[];
|
|
604
|
-
serializedApiCallEnabled?: boolean;
|
|
605
605
|
};
|
|
606
606
|
type TRelayToParaBaseOptions<TApi, TRes> = {
|
|
607
607
|
/**
|
|
@@ -629,22 +629,20 @@ type TRelayToParaBaseOptions<TApi, TRes> = {
|
|
|
629
629
|
*/
|
|
630
630
|
amount: TAmount;
|
|
631
631
|
};
|
|
632
|
+
type TRelayToParaOverrides = {
|
|
633
|
+
section: TXcmPalletSection;
|
|
634
|
+
includeFee: boolean;
|
|
635
|
+
};
|
|
632
636
|
/**
|
|
633
637
|
* Options for transferring from a relay chain to a parachain
|
|
634
638
|
*/
|
|
635
639
|
type TRelayToParaOptions<TApi, TRes> = WithApi<TRelayToParaBaseOptions<TApi, TRes>, TApi, TRes>;
|
|
636
|
-
type TTransferReturn<TRes> = TRes | TSerializedApiCall;
|
|
637
640
|
type TSerializedApiCall = {
|
|
638
|
-
module: string;
|
|
639
|
-
section: string;
|
|
640
|
-
parameters: unknown[];
|
|
641
|
-
};
|
|
642
|
-
type TSerializedApiCallV2 = {
|
|
643
641
|
module: TPallet | 'Utility';
|
|
644
642
|
section: string;
|
|
645
643
|
parameters: Record<string, unknown>;
|
|
646
644
|
};
|
|
647
|
-
type
|
|
645
|
+
type TCheckKeepAliveOptions<TApi, TRes> = {
|
|
648
646
|
originApi: IPolkadotApi<TApi, TRes>;
|
|
649
647
|
address: string;
|
|
650
648
|
amount: string;
|
|
@@ -657,64 +655,65 @@ type TDestWeight = {
|
|
|
657
655
|
refTime: string;
|
|
658
656
|
proofSize: string;
|
|
659
657
|
};
|
|
660
|
-
type
|
|
661
|
-
type
|
|
662
|
-
type
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
type
|
|
666
|
-
type
|
|
667
|
-
type
|
|
668
|
-
type
|
|
669
|
-
type
|
|
670
|
-
type
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
658
|
+
type TXTransferSection = 'transfer';
|
|
659
|
+
type TXTokensSection = 'transfer' | 'transfer_multiasset' | 'transfer_multiassets';
|
|
660
|
+
type TPolkadotXcmSection = 'limited_teleport_assets' | 'limited_reserve_transfer_assets' | 'reserve_transfer_assets' | 'reserve_withdraw_assets' | 'transfer_assets';
|
|
661
|
+
type TXcmPalletSection = 'limited_teleport_assets' | 'reserve_transfer_assets' | 'limited_reserve_transfer_assets';
|
|
662
|
+
|
|
663
|
+
type TJunctionType = 'Parachain' | 'AccountId32' | 'AccountIndex64' | 'AccountKey20' | 'PalletInstance' | 'GeneralIndex' | 'GeneralKey' | 'OnlyChild' | 'Plurality' | 'GlobalConsensus';
|
|
664
|
+
type TNetworkId = string | null;
|
|
665
|
+
type TBodyId = string | null;
|
|
666
|
+
type TBodyPart = string | null;
|
|
667
|
+
type TStringOrNumber = string | number;
|
|
668
|
+
type TStringOrNumberOrBigInt = TStringOrNumber | bigint;
|
|
669
|
+
type THexString = string;
|
|
670
|
+
type TJunctionParachain = {
|
|
671
|
+
Parachain: TStringOrNumberOrBigInt | undefined;
|
|
672
|
+
};
|
|
673
|
+
type TJunctionAccountId32 = {
|
|
675
674
|
AccountId32: {
|
|
676
|
-
network?:
|
|
677
|
-
id:
|
|
675
|
+
network?: TNetworkId;
|
|
676
|
+
id: THexString;
|
|
678
677
|
};
|
|
679
|
-
}
|
|
680
|
-
|
|
678
|
+
};
|
|
679
|
+
type TJunctionAccountIndex64 = {
|
|
681
680
|
AccountIndex64: {
|
|
682
|
-
network:
|
|
683
|
-
index:
|
|
681
|
+
network: TNetworkId;
|
|
682
|
+
index: TStringOrNumberOrBigInt;
|
|
684
683
|
};
|
|
685
|
-
}
|
|
686
|
-
|
|
684
|
+
};
|
|
685
|
+
type TJunctionAccountKey20 = {
|
|
687
686
|
AccountKey20: {
|
|
688
|
-
network?:
|
|
689
|
-
key:
|
|
687
|
+
network?: TNetworkId;
|
|
688
|
+
key: THexString;
|
|
690
689
|
};
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
PalletInstance:
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
GeneralIndex:
|
|
697
|
-
}
|
|
698
|
-
|
|
690
|
+
};
|
|
691
|
+
type TJunctionPalletInstance = {
|
|
692
|
+
PalletInstance: TStringOrNumberOrBigInt;
|
|
693
|
+
};
|
|
694
|
+
type TJunctionGeneralIndex = {
|
|
695
|
+
GeneralIndex: TStringOrNumberOrBigInt;
|
|
696
|
+
};
|
|
697
|
+
type TJunctionGeneralKey = {
|
|
699
698
|
GeneralKey: {
|
|
700
|
-
length:
|
|
701
|
-
data:
|
|
699
|
+
length: TStringOrNumberOrBigInt;
|
|
700
|
+
data: THexString;
|
|
702
701
|
};
|
|
703
|
-
}
|
|
704
|
-
|
|
702
|
+
};
|
|
703
|
+
type TJunctionOnlyChild = {
|
|
705
704
|
OnlyChild: string;
|
|
706
|
-
}
|
|
707
|
-
|
|
705
|
+
};
|
|
706
|
+
type TJunctionPlurality = {
|
|
708
707
|
Plurality: {
|
|
709
|
-
id:
|
|
710
|
-
part:
|
|
708
|
+
id: TBodyId;
|
|
709
|
+
part: TBodyPart;
|
|
711
710
|
};
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
GlobalConsensus:
|
|
715
|
-
}
|
|
716
|
-
type TJunction =
|
|
717
|
-
interface
|
|
711
|
+
};
|
|
712
|
+
type TJunctionGlobalConsensus = {
|
|
713
|
+
GlobalConsensus: TNetworkId | object;
|
|
714
|
+
};
|
|
715
|
+
type TJunction = TJunctionParachain | TJunctionAccountId32 | TJunctionAccountIndex64 | TJunctionAccountKey20 | TJunctionPalletInstance | TJunctionGeneralIndex | TJunctionGeneralKey | TJunctionOnlyChild | TJunctionPlurality | TJunctionGlobalConsensus;
|
|
716
|
+
interface TJunctions {
|
|
718
717
|
Here?: null;
|
|
719
718
|
X1?: TJunction | [TJunction];
|
|
720
719
|
X2?: [TJunction, TJunction];
|
|
@@ -726,8 +725,8 @@ interface Junctions {
|
|
|
726
725
|
X8?: [TJunction, TJunction, TJunction, TJunction, TJunction, TJunction, TJunction, TJunction];
|
|
727
726
|
}
|
|
728
727
|
interface TMultiLocation {
|
|
729
|
-
parents:
|
|
730
|
-
interior:
|
|
728
|
+
parents: TStringOrNumber;
|
|
729
|
+
interior: TJunctions | 'Here';
|
|
731
730
|
}
|
|
732
731
|
type TMultiLocationHeader = {
|
|
733
732
|
[key in Version]?: TMultiLocation;
|
|
@@ -736,132 +735,132 @@ type TMultiLocationHeader = {
|
|
|
736
735
|
declare class Darwinia<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
737
736
|
constructor();
|
|
738
737
|
private getCurrencySelection;
|
|
739
|
-
transferXTokens<TApi, TRes>(input:
|
|
740
|
-
transferRelayToPara():
|
|
738
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
739
|
+
transferRelayToPara(): TSerializedApiCall;
|
|
741
740
|
createCurrencySpec(amount: string, scenario: TScenario, version: Version, _asset?: TAsset, overridedMultiLocation?: TMultiLocation): TCurrencySelectionHeaderArr;
|
|
742
741
|
getProvider(): string;
|
|
743
742
|
}
|
|
744
743
|
|
|
745
744
|
declare class Crab<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
746
745
|
constructor();
|
|
747
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
748
|
-
transferRelayToPara():
|
|
746
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
747
|
+
transferRelayToPara(): TSerializedApiCall;
|
|
749
748
|
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): TCurrencySelectionHeaderArr;
|
|
750
749
|
}
|
|
751
750
|
|
|
752
751
|
declare class Quartz<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
753
752
|
constructor();
|
|
754
753
|
_assetCheckEnabled: boolean;
|
|
755
|
-
transferXTokens<TApi, TRes>(input:
|
|
754
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
756
755
|
}
|
|
757
756
|
|
|
758
757
|
declare class Shiden<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer, IXTokensTransfer {
|
|
759
758
|
constructor();
|
|
760
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
761
|
-
transferXTokens<TApi, TRes>(input:
|
|
759
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
760
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
762
761
|
protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
763
762
|
}
|
|
764
763
|
|
|
765
764
|
declare class Manta<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
766
765
|
constructor();
|
|
767
|
-
transferXTokens<TApi, TRes>(input:
|
|
766
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
768
767
|
}
|
|
769
768
|
|
|
770
769
|
declare class Nodle<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
771
770
|
constructor();
|
|
772
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
773
|
-
transferRelayToPara():
|
|
771
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
772
|
+
transferRelayToPara(): TSerializedApiCall;
|
|
774
773
|
}
|
|
775
774
|
|
|
776
775
|
declare class NeuroWeb<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
777
776
|
constructor();
|
|
778
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
777
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
779
778
|
}
|
|
780
779
|
|
|
781
780
|
declare class Pendulum<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
782
781
|
constructor();
|
|
783
|
-
transferXTokens<TApi, TRes>(input:
|
|
784
|
-
transferRelayToPara():
|
|
782
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
783
|
+
transferRelayToPara(): TSerializedApiCall;
|
|
785
784
|
}
|
|
786
785
|
|
|
787
786
|
declare class Polkadex<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
788
787
|
constructor();
|
|
789
|
-
transferXTokens<TApi, TRes>(input:
|
|
788
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
790
789
|
getProvider(): string;
|
|
791
790
|
}
|
|
792
791
|
|
|
793
792
|
declare class Zeitgeist<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
794
793
|
constructor();
|
|
795
794
|
private getCurrencySelection;
|
|
796
|
-
transferXTokens<TApi, TRes>(input:
|
|
795
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
797
796
|
}
|
|
798
797
|
|
|
799
798
|
declare class Collectives<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
800
799
|
constructor();
|
|
801
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
802
|
-
|
|
800
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
801
|
+
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
803
802
|
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): TCurrencySelectionHeaderArr;
|
|
804
803
|
}
|
|
805
804
|
|
|
806
805
|
declare class Khala<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTransferTransfer {
|
|
807
806
|
constructor();
|
|
808
|
-
transferXTransfer<TApi, TRes>(input:
|
|
807
|
+
transferXTransfer<TApi, TRes>(input: TXTransferTransferOptions<TApi, TRes>): TRes;
|
|
809
808
|
}
|
|
810
809
|
|
|
811
810
|
declare class Phala<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTransferTransfer {
|
|
812
811
|
constructor();
|
|
813
|
-
transferXTransfer<TApi, TRes>(input:
|
|
812
|
+
transferXTransfer<TApi, TRes>(input: TXTransferTransferOptions<TApi, TRes>): TRes;
|
|
814
813
|
}
|
|
815
814
|
|
|
816
815
|
declare class Subsocial<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
817
816
|
constructor();
|
|
818
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
817
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
819
818
|
}
|
|
820
819
|
|
|
821
820
|
declare class KiltSpiritnet<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
822
821
|
constructor();
|
|
823
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
824
|
-
transferRelayToPara():
|
|
822
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
823
|
+
transferRelayToPara(): TSerializedApiCall;
|
|
825
824
|
getProvider(): string;
|
|
826
825
|
}
|
|
827
826
|
|
|
828
827
|
declare class Curio<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
829
828
|
constructor();
|
|
830
|
-
transferXTokens<TApi, TRes>(input:
|
|
829
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
831
830
|
}
|
|
832
831
|
|
|
833
832
|
declare class BridgeHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
834
833
|
constructor();
|
|
835
834
|
_assetCheckEnabled: boolean;
|
|
836
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
837
|
-
|
|
835
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
836
|
+
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
838
837
|
}
|
|
839
838
|
|
|
840
839
|
declare class BridgeHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
841
840
|
constructor();
|
|
842
841
|
_assetCheckEnabled: boolean;
|
|
843
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
844
|
-
|
|
842
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
843
|
+
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
845
844
|
}
|
|
846
845
|
|
|
847
846
|
declare class Mythos<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
848
847
|
constructor();
|
|
849
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
850
|
-
transferRelayToPara():
|
|
848
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
849
|
+
transferRelayToPara(): TSerializedApiCall;
|
|
851
850
|
}
|
|
852
851
|
|
|
853
852
|
declare class Peaq<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
854
853
|
constructor();
|
|
855
|
-
transferXTokens<TApi, TRes>(input:
|
|
856
|
-
transferRelayToPara():
|
|
854
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
855
|
+
transferRelayToPara(): TSerializedApiCall;
|
|
857
856
|
getProvider(): string;
|
|
858
857
|
}
|
|
859
858
|
|
|
860
859
|
declare class Polimec<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
861
860
|
constructor();
|
|
862
861
|
private getAssetMultiLocation;
|
|
863
|
-
transferPolkadotXCM<TApi, TRes>(input:
|
|
864
|
-
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>):
|
|
862
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
863
|
+
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCall;
|
|
865
864
|
getProvider(): string;
|
|
866
865
|
}
|
|
867
866
|
|
|
@@ -1076,22 +1075,17 @@ type TNodeConfig = {
|
|
|
1076
1075
|
};
|
|
1077
1076
|
type TNodeConfigMap = Record<TNodeDotKsmWithRelayChains, TNodeConfig>;
|
|
1078
1077
|
|
|
1079
|
-
declare const sendSerializedApiCall: <TApi, TRes>(options: TSendOptions<TApi, TRes>) => Promise<TSerializedApiCall>;
|
|
1080
1078
|
declare const send: <TApi, TRes>(options: TSendOptions<TApi, TRes>) => Promise<TRes>;
|
|
1081
|
-
|
|
1079
|
+
|
|
1082
1080
|
declare const transferRelayToPara: <TApi, TRes>(options: TRelayToParaOptions<TApi, TRes>) => Promise<TRes>;
|
|
1083
|
-
declare const transferRelayToParaSerializedApiCall: <TApi, TRes>(options: TRelayToParaOptions<TApi, TRes>) => Promise<TSerializedApiCall>;
|
|
1084
1081
|
|
|
1085
1082
|
declare const buildEthTransferOptions: ({ currency, to, address, destAddress, amount }: TSerializeEthTransferOptions) => Promise<TSerializedEthTransfer>;
|
|
1086
1083
|
|
|
1087
1084
|
declare const index_buildEthTransferOptions: typeof buildEthTransferOptions;
|
|
1088
1085
|
declare const index_send: typeof send;
|
|
1089
|
-
declare const index_sendSerializedApiCall: typeof sendSerializedApiCall;
|
|
1090
1086
|
declare const index_transferRelayToPara: typeof transferRelayToPara;
|
|
1091
|
-
declare const index_transferRelayToParaCommon: typeof transferRelayToParaCommon;
|
|
1092
|
-
declare const index_transferRelayToParaSerializedApiCall: typeof transferRelayToParaSerializedApiCall;
|
|
1093
1087
|
declare namespace index {
|
|
1094
|
-
export { index_buildEthTransferOptions as buildEthTransferOptions, index_send as send,
|
|
1088
|
+
export { index_buildEthTransferOptions as buildEthTransferOptions, index_send as send, index_transferRelayToPara as transferRelayToPara };
|
|
1095
1089
|
}
|
|
1096
1090
|
|
|
1097
1091
|
type TAssetClaimOptionsBase = {
|
|
@@ -1099,7 +1093,6 @@ type TAssetClaimOptionsBase = {
|
|
|
1099
1093
|
multiAssets: TMultiAsset[];
|
|
1100
1094
|
address: TAddress;
|
|
1101
1095
|
version?: TVersionClaimAssets;
|
|
1102
|
-
serializedApiCallEnabled?: boolean;
|
|
1103
1096
|
};
|
|
1104
1097
|
|
|
1105
1098
|
type TPapiApi = PolkadotClient;
|
|
@@ -1188,6 +1181,7 @@ type TGetOriginFeeDetailsOptionsBase = {
|
|
|
1188
1181
|
* @returns The assets object associated with the given node.
|
|
1189
1182
|
*/
|
|
1190
1183
|
declare const getAssetsObject: (node: TNodeWithRelayChains) => TNodeAssets;
|
|
1184
|
+
declare const isNodeEvm: (node: TNodeWithRelayChains) => boolean;
|
|
1191
1185
|
/**
|
|
1192
1186
|
* Retrieves the asset ID for a given symbol on a specified node.
|
|
1193
1187
|
*
|
|
@@ -1324,7 +1318,7 @@ declare const getAssetBalance: (options: TGetAssetBalanceOptionsBase & {
|
|
|
1324
1318
|
*/
|
|
1325
1319
|
declare const claimAssets: (options: TAssetClaimOptionsBase & {
|
|
1326
1320
|
api?: TPapiApiOrUrl;
|
|
1327
|
-
}) => Promise<
|
|
1321
|
+
}) => Promise<TPapiTransaction>;
|
|
1328
1322
|
declare const getOriginFeeDetails: (options: TGetOriginFeeDetailsOptionsBase & {
|
|
1329
1323
|
api?: TPapiApiOrUrl;
|
|
1330
1324
|
}) => Promise<TOriginFeeDetails>;
|
|
@@ -1352,8 +1346,9 @@ declare const assets_getSupportedAssets: typeof getSupportedAssets;
|
|
|
1352
1346
|
declare const assets_getTNode: typeof getTNode;
|
|
1353
1347
|
declare const assets_getTransferInfo: typeof getTransferInfo;
|
|
1354
1348
|
declare const assets_hasSupportForAsset: typeof hasSupportForAsset;
|
|
1349
|
+
declare const assets_isNodeEvm: typeof isNodeEvm;
|
|
1355
1350
|
declare namespace assets {
|
|
1356
|
-
export { assets_Foreign as Foreign, assets_ForeignAbstract as ForeignAbstract, assets_Native as Native, assets_Override as Override, assets_claimAssets as claimAssets, assets_getAllAssetsSymbols as getAllAssetsSymbols, assets_getAssetBalance as getAssetBalance, assets_getAssetDecimals as getAssetDecimals, assets_getAssetId as getAssetId, assets_getAssets as getAssets, assets_getAssetsObject as getAssetsObject, assets_getBalanceForeign as getBalanceForeign, assets_getBalanceNative as getBalanceNative, assets_getExistentialDeposit as getExistentialDeposit, assets_getNativeAssetSymbol as getNativeAssetSymbol, assets_getNativeAssets as getNativeAssets, assets_getOriginFeeDetails as getOriginFeeDetails, assets_getOtherAssets as getOtherAssets, assets_getRelayChainSymbol as getRelayChainSymbol, assets_getSupportedAssets as getSupportedAssets, assets_getTNode as getTNode, assets_getTransferInfo as getTransferInfo, assets_hasSupportForAsset as hasSupportForAsset };
|
|
1351
|
+
export { assets_Foreign as Foreign, assets_ForeignAbstract as ForeignAbstract, assets_Native as Native, assets_Override as Override, assets_claimAssets as claimAssets, assets_getAllAssetsSymbols as getAllAssetsSymbols, assets_getAssetBalance as getAssetBalance, assets_getAssetDecimals as getAssetDecimals, assets_getAssetId as getAssetId, assets_getAssets as getAssets, assets_getAssetsObject as getAssetsObject, assets_getBalanceForeign as getBalanceForeign, assets_getBalanceNative as getBalanceNative, assets_getExistentialDeposit as getExistentialDeposit, assets_getNativeAssetSymbol as getNativeAssetSymbol, assets_getNativeAssets as getNativeAssets, assets_getOriginFeeDetails as getOriginFeeDetails, assets_getOtherAssets as getOtherAssets, assets_getRelayChainSymbol as getRelayChainSymbol, assets_getSupportedAssets as getSupportedAssets, assets_getTNode as getTNode, assets_getTransferInfo as getTransferInfo, assets_hasSupportForAsset as hasSupportForAsset, assets_isNodeEvm as isNodeEvm };
|
|
1357
1352
|
}
|
|
1358
1353
|
|
|
1359
1354
|
/**
|
|
@@ -1478,13 +1473,11 @@ declare class GeneralBuilder$1<TApi, TRes> {
|
|
|
1478
1473
|
}
|
|
1479
1474
|
interface FinalBuilder<TRes> {
|
|
1480
1475
|
build: () => Promise<TRes>;
|
|
1481
|
-
buildSerializedApiCall: () => Promise<TSerializedApiCall>;
|
|
1482
1476
|
}
|
|
1483
1477
|
interface UseKeepAliveFinalBuilder$1<TApi, TRes> extends IAddToBatchBuilder<TApi, TRes> {
|
|
1484
1478
|
useKeepAlive: (destApi: TApi) => this;
|
|
1485
1479
|
xcmVersion: (version: Version) => this;
|
|
1486
1480
|
build: () => Promise<TRes>;
|
|
1487
|
-
buildSerializedApiCall: () => Promise<TSerializedApiCall>;
|
|
1488
1481
|
}
|
|
1489
1482
|
interface AddressBuilder<TApi, TRes> {
|
|
1490
1483
|
address: (address: TAddress, ahAddress?: string) => UseKeepAliveFinalBuilder$1<TApi, TRes>;
|
|
@@ -1693,6 +1686,18 @@ declare class DuplicateAssetIdError extends Error {
|
|
|
1693
1686
|
constructor(id: string);
|
|
1694
1687
|
}
|
|
1695
1688
|
|
|
1689
|
+
/**
|
|
1690
|
+
* Error thrown when an invalid address is provided.
|
|
1691
|
+
*/
|
|
1692
|
+
declare class InvalidAddressError extends Error {
|
|
1693
|
+
/**
|
|
1694
|
+
* Constructs a new InvalidAddressError.
|
|
1695
|
+
*
|
|
1696
|
+
* @param message - The error message.
|
|
1697
|
+
*/
|
|
1698
|
+
constructor(message: string);
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1696
1701
|
declare const getNodeConfig: (node: TNodeDotKsmWithRelayChains) => TNodeConfig;
|
|
1697
1702
|
|
|
1698
1703
|
declare const getNodeProviders: (node: TNodeDotKsmWithRelayChains) => string[];
|
|
@@ -1707,4 +1712,4 @@ declare const getNodeProvider: (node: TNodeDotKsmWithRelayChains) => string;
|
|
|
1707
1712
|
*/
|
|
1708
1713
|
declare const getParaId: (node: TNodeDotKsmWithRelayChains) => number;
|
|
1709
1714
|
|
|
1710
|
-
export { BatchMode, Builder,
|
|
1715
|
+
export { BatchMode, Builder, DuplicateAssetError, DuplicateAssetIdError, EvmBuilder, Foreign, ForeignAbstract, GeneralBuilder, type IPolkadotXCMTransfer, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidAddressError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Native, NoXCMSupportImplementedError, NodeNotSupportedError, Override, Parents, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TAsset, type TAssetJsonMap, type TBatchOptions, type TBifrostToken, type TCheckKeepAliveOptions, type TCurrency, type TCurrencyCore, type TCurrencyCoreV1, type TCurrencyInput, type TCurrencySelection, type TCurrencySelectionHeader, type TCurrencySelectionHeaderArr, type TCurrencySelectionV4, type TCurrencySymbol, type TCurrencySymbolValue, type TDestWeight, type TDestination, type TEdJsonMap, type TEvmBuilderOptions, type TForeignAsset, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TGetTransferInfoOptions, type TGetTransferInfoOptionsBase, type THexString$1 as THexString, type TJunction, type TJunctionParachain, type TJunctionType, type TJunctions, type TMantaAsset, type TMultiAsset, type TMultiAssetV3, type TMultiAssetV4, 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 TPalletJsonMap, type TPalletMap, type TPapiApi, type TPapiApiOrUrl, type TPapiTransaction, type TPolkadotXCMTransferOptions, type TPolkadotXcmSection, type TProviderEntry, type TRelayChainSymbol, type TRelayChainType, type TRelayToParaDestination, type TRelayToParaOptions, type TRelayToParaOverrides, 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, type UseKeepAliveFinalBuilder, Version, assets, buildEthTransferOptions, claimAssets, createApiInstanceForNode, createPapiApiCall, determineRelayChain, getAllAssetsSymbols, getAssetBalance, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getBalanceForeign, getBalanceNative, getDefaultPallet, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getNode, getNodeConfig, getNodeProvider, getNodeProviders, getOriginFeeDetails, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getTNode, getTransferInfo, hasSupportForAsset, isForeignAsset, isNodeEvm, isRelayChain, send, transferRelayToPara, index as xcmPallet };
|