@paraspell/sdk 7.0.1 → 7.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -13
- package/dist/index.cjs +543 -185
- package/dist/index.d.ts +74 -57
- package/dist/index.mjs +543 -185
- package/dist/papi/index.cjs +541 -185
- package/dist/papi/index.d.ts +63 -46
- package/dist/papi/index.mjs +541 -185
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import { ApiPromise } from '@polkadot/api';
|
|
2
1
|
import { SubmittableExtrinsic } from '@polkadot/api/types';
|
|
2
|
+
import * as _polkadot_api from '@polkadot/api';
|
|
3
|
+
import { ApiPromise } from '@polkadot/api';
|
|
3
4
|
import { Signer, AbstractProvider } from 'ethers';
|
|
4
5
|
import * as _polkadot_apps_config_endpoints_types from '@polkadot/apps-config/endpoints/types';
|
|
5
6
|
|
|
7
|
+
type WithApi<TBase, TApi, TRes> = TBase & {
|
|
8
|
+
api: IPolkadotApi<TApi, TRes>;
|
|
9
|
+
};
|
|
10
|
+
type TApiOrUrl<TApi> = TApi | string;
|
|
11
|
+
|
|
6
12
|
interface IPolkadotApi<TApi, TRes> {
|
|
7
|
-
setApi(api?: TApi): void;
|
|
13
|
+
setApi(api?: TApiOrUrl<TApi>): void;
|
|
8
14
|
getApi(): TApi;
|
|
9
15
|
init(node: TNodeWithRelayChains): Promise<void>;
|
|
10
16
|
createApiInstance: (wsUrl: string) => Promise<TApi>;
|
|
@@ -17,7 +23,9 @@ interface IPolkadotApi<TApi, TRes> {
|
|
|
17
23
|
getAssetHubForeignBalance(address: string, multiLocation: TMultiLocation): Promise<bigint>;
|
|
18
24
|
getBalanceForeignXTokens(address: string, asset: TAsset): Promise<bigint>;
|
|
19
25
|
getBalanceForeignAssetsAccount(address: string, assetId: bigint | number): Promise<bigint>;
|
|
26
|
+
getFromStorage(key: string): Promise<string>;
|
|
20
27
|
clone(): IPolkadotApi<TApi, TRes>;
|
|
28
|
+
createApiForNode(node: TNodeWithRelayChains): Promise<IPolkadotApi<TApi, TRes>>;
|
|
21
29
|
}
|
|
22
30
|
|
|
23
31
|
declare abstract class ParachainNode<TApi, TRes> {
|
|
@@ -33,11 +41,11 @@ declare abstract class ParachainNode<TApi, TRes> {
|
|
|
33
41
|
get version(): Version;
|
|
34
42
|
get assetCheckEnabled(): boolean;
|
|
35
43
|
protected canUseXTokens(_: TSendInternalOptions<TApi, TRes>): boolean;
|
|
36
|
-
transfer(options: TSendInternalOptions<TApi, TRes>): TTransferReturn<TRes
|
|
44
|
+
transfer(options: TSendInternalOptions<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
37
45
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
38
46
|
getProvider(): string;
|
|
39
47
|
createApiInstance(api: IPolkadotApi<TApi, TRes>): Promise<TApi>;
|
|
40
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version,
|
|
48
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, _currencyId?: string, overridedMultiLocation?: TMultiLocation | TMultiAsset[]): TCurrencySelectionHeaderArr;
|
|
41
49
|
createPolkadotXcmHeader(scenario: TScenario, version: Version, destination?: TDestination, paraId?: number): TMultiLocationHeader;
|
|
42
50
|
getNativeAssetSymbol(): string;
|
|
43
51
|
}
|
|
@@ -63,7 +71,7 @@ declare class BifrostPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> impl
|
|
|
63
71
|
constructor();
|
|
64
72
|
private getCurrencySelection;
|
|
65
73
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
66
|
-
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes
|
|
74
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
67
75
|
protected canUseXTokens({ currencySymbol, destination }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
68
76
|
}
|
|
69
77
|
|
|
@@ -81,9 +89,13 @@ declare class ComposableFinance<TApi, TRes> extends ParachainNode<TApi, TRes> im
|
|
|
81
89
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
82
90
|
}
|
|
83
91
|
|
|
84
|
-
declare class Hydration<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
92
|
+
declare class Hydration<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer, IPolkadotXCMTransfer {
|
|
85
93
|
constructor();
|
|
94
|
+
transferToEthereum<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
95
|
+
transferToAssetHub<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
96
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
86
97
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
98
|
+
protected canUseXTokens({ destination, currencySymbol, currencyId }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
87
99
|
}
|
|
88
100
|
|
|
89
101
|
declare class Interlay<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
@@ -205,14 +217,15 @@ declare class AssetHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> imp
|
|
|
205
217
|
handleBridgeTransfer<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>, targetChain: 'Polkadot' | 'Kusama'): TTransferReturn<TRes>;
|
|
206
218
|
handleEthBridgeTransfer<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
207
219
|
handleMythosTransfer<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
208
|
-
|
|
220
|
+
patchInput<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): PolkadotXCMTransferInput<TApi, TRes>;
|
|
221
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
209
222
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
210
223
|
createCurrencySpec(amount: string, scenario: TScenario, version: Version, currencyId?: string, overridedMultiLocation?: TMultiLocation | TMultiAsset[]): TCurrencySelectionHeaderArr;
|
|
211
224
|
}
|
|
212
225
|
|
|
213
226
|
declare class AssetHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
214
227
|
constructor();
|
|
215
|
-
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes
|
|
228
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
216
229
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
217
230
|
createCurrencySpec(amount: string, scenario: TScenario, version: Version, currencyId?: string, overridedMultiLocation?: TMultiLocation | TMultiAsset[]): TCurrencySelectionHeaderArr;
|
|
218
231
|
}
|
|
@@ -220,48 +233,48 @@ declare class AssetHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> imple
|
|
|
220
233
|
declare class CoretimeKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
221
234
|
constructor();
|
|
222
235
|
_assetCheckEnabled: boolean;
|
|
223
|
-
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes
|
|
236
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
224
237
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
225
238
|
}
|
|
226
239
|
|
|
227
240
|
declare class CoretimePolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
228
241
|
constructor();
|
|
229
242
|
_assetCheckEnabled: boolean;
|
|
230
|
-
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes
|
|
243
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
231
244
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
232
245
|
}
|
|
233
246
|
|
|
234
247
|
declare class Encointer<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
235
248
|
constructor();
|
|
236
|
-
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes
|
|
249
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
237
250
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
238
251
|
}
|
|
239
252
|
|
|
240
253
|
declare class RobonomicsKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
241
254
|
constructor();
|
|
242
|
-
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes
|
|
255
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
243
256
|
}
|
|
244
257
|
|
|
245
258
|
declare class RobonomicsPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
246
259
|
constructor();
|
|
247
|
-
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes
|
|
260
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
248
261
|
}
|
|
249
262
|
|
|
250
263
|
declare class PeoplePolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
251
264
|
constructor();
|
|
252
|
-
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes
|
|
265
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
253
266
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
254
267
|
}
|
|
255
268
|
|
|
256
269
|
declare class PeopleKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
257
270
|
constructor();
|
|
258
|
-
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes
|
|
271
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
259
272
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
260
273
|
}
|
|
261
274
|
|
|
262
275
|
declare class Astar<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer, IXTokensTransfer {
|
|
263
276
|
constructor();
|
|
264
|
-
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes
|
|
277
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
265
278
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
266
279
|
protected canUseXTokens({ currencySymbol, currencyId }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
267
280
|
}
|
|
@@ -360,10 +373,6 @@ interface TPalletMap {
|
|
|
360
373
|
}
|
|
361
374
|
type TPalletJsonMap = Record<TNodePolkadotKusama, TPalletMap>;
|
|
362
375
|
|
|
363
|
-
type WithApi<TBase, TApi, TRes> = TBase & {
|
|
364
|
-
api: IPolkadotApi<TApi, TRes>;
|
|
365
|
-
};
|
|
366
|
-
|
|
367
376
|
type HexString$1 = `0x${string}`;
|
|
368
377
|
type PolkadotXCMTransferInput<TApi, TRes> = {
|
|
369
378
|
api: IPolkadotApi<TApi, TRes>;
|
|
@@ -380,6 +389,8 @@ type PolkadotXCMTransferInput<TApi, TRes> = {
|
|
|
380
389
|
feeAsset?: TCurrency;
|
|
381
390
|
overridedCurrency?: TMultiLocation | TMultiAsset[];
|
|
382
391
|
serializedApiCallEnabled?: boolean;
|
|
392
|
+
version?: Version;
|
|
393
|
+
ahAddress?: string;
|
|
383
394
|
};
|
|
384
395
|
type XTokensTransferInput<TApi, TRes> = {
|
|
385
396
|
api: IPolkadotApi<TApi, TRes>;
|
|
@@ -409,7 +420,7 @@ type XTransferTransferInput<TApi, TRes> = {
|
|
|
409
420
|
serializedApiCallEnabled?: boolean;
|
|
410
421
|
};
|
|
411
422
|
type IPolkadotXCMTransfer = {
|
|
412
|
-
transferPolkadotXCM: <TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>) => TTransferReturn<TRes
|
|
423
|
+
transferPolkadotXCM: <TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>) => Promise<TTransferReturn<TRes>>;
|
|
413
424
|
};
|
|
414
425
|
type IXTokensTransfer = {
|
|
415
426
|
transferXTokens: <TApi, TRes>(input: XTokensTransferInput<TApi, TRes>) => TTransferReturn<TRes>;
|
|
@@ -444,6 +455,10 @@ type TSendBaseOptions<TApi, TRes> = {
|
|
|
444
455
|
* The destination address. A SS58 or H160 format.
|
|
445
456
|
*/
|
|
446
457
|
address: TAddress;
|
|
458
|
+
/**
|
|
459
|
+
* The optional AssetHub address used when transfering to Ethereum
|
|
460
|
+
*/
|
|
461
|
+
ahAddress?: string;
|
|
447
462
|
/**
|
|
448
463
|
* The destination node or multi-location
|
|
449
464
|
*/
|
|
@@ -653,7 +668,7 @@ declare class Darwinia<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
|
653
668
|
|
|
654
669
|
declare class Crab<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
655
670
|
constructor();
|
|
656
|
-
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes
|
|
671
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
657
672
|
transferRelayToPara(): TSerializedApiCallV2;
|
|
658
673
|
createCurrencySpec(amount: string, scenario: TScenario, version: Version, currencyId?: string): TCurrencySelectionHeaderArr;
|
|
659
674
|
}
|
|
@@ -666,7 +681,7 @@ declare class Quartz<TApi, TRes> extends ParachainNode<TApi, TRes> implements IX
|
|
|
666
681
|
|
|
667
682
|
declare class Shiden<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer, IXTokensTransfer {
|
|
668
683
|
constructor();
|
|
669
|
-
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes
|
|
684
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
670
685
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
671
686
|
protected canUseXTokens({ currencySymbol, currencyId }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
672
687
|
}
|
|
@@ -684,7 +699,7 @@ declare class Nodle<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXT
|
|
|
684
699
|
|
|
685
700
|
declare class NeuroWeb<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
686
701
|
constructor();
|
|
687
|
-
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes
|
|
702
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
688
703
|
}
|
|
689
704
|
|
|
690
705
|
declare class Pendulum<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
@@ -705,7 +720,7 @@ declare class Zeitgeist<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
|
705
720
|
|
|
706
721
|
declare class Collectives<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
707
722
|
constructor();
|
|
708
|
-
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes
|
|
723
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
709
724
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
710
725
|
createCurrencySpec(amount: string, scenario: TScenario, version: Version, currencyId?: string): TCurrencySelectionHeaderArr;
|
|
711
726
|
}
|
|
@@ -722,12 +737,12 @@ declare class Phala<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXT
|
|
|
722
737
|
|
|
723
738
|
declare class Subsocial<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
724
739
|
constructor();
|
|
725
|
-
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes
|
|
740
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
726
741
|
}
|
|
727
742
|
|
|
728
743
|
declare class KiltSpiritnet<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
729
744
|
constructor();
|
|
730
|
-
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes
|
|
745
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
731
746
|
transferRelayToPara(): TSerializedApiCallV2;
|
|
732
747
|
getProvider(): string;
|
|
733
748
|
}
|
|
@@ -740,14 +755,14 @@ declare class Curio<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXT
|
|
|
740
755
|
declare class BridgeHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
741
756
|
constructor();
|
|
742
757
|
_assetCheckEnabled: boolean;
|
|
743
|
-
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes
|
|
758
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
744
759
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
745
760
|
}
|
|
746
761
|
|
|
747
762
|
declare class BridgeHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
748
763
|
constructor();
|
|
749
764
|
_assetCheckEnabled: boolean;
|
|
750
|
-
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes
|
|
765
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
751
766
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
752
767
|
}
|
|
753
768
|
|
|
@@ -757,7 +772,7 @@ declare class Ethereum<TApi, TRes> extends ParachainNode<TApi, TRes> {
|
|
|
757
772
|
|
|
758
773
|
declare class Mythos<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
759
774
|
constructor();
|
|
760
|
-
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes
|
|
775
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
761
776
|
transferRelayToPara(): TSerializedApiCallV2;
|
|
762
777
|
}
|
|
763
778
|
|
|
@@ -993,6 +1008,8 @@ type TGetTransferInfoOptionsBase = {
|
|
|
993
1008
|
};
|
|
994
1009
|
type TGetTransferInfoOptions<TApi, TRes> = WithApi<TGetTransferInfoOptionsBase, TApi, TRes>;
|
|
995
1010
|
|
|
1011
|
+
type TPjsApi = ApiPromise;
|
|
1012
|
+
type TPjsApiOrUrl = TApiOrUrl<TPjsApi>;
|
|
996
1013
|
type Extrinsic = SubmittableExtrinsic<'promise'>;
|
|
997
1014
|
|
|
998
1015
|
declare const buildEthTransferOptions: ({ currency, to, address, destAddress, amount }: TSerializeEthTransferOptions) => Promise<TSerializedEthTransfer>;
|
|
@@ -1004,26 +1021,26 @@ declare const buildEthTransferOptions: ({ currency, to, address, destAddress, am
|
|
|
1004
1021
|
*
|
|
1005
1022
|
* @returns An extrinsic to be signed and sent.
|
|
1006
1023
|
*/
|
|
1007
|
-
declare const transferRelayToPara: (options: Omit<TRelayToParaOptions<
|
|
1008
|
-
api:
|
|
1009
|
-
destApiForKeepAlive:
|
|
1024
|
+
declare const transferRelayToPara: (options: Omit<TRelayToParaOptions<TPjsApi, Extrinsic>, "api" | "destApiForKeepAlive"> & {
|
|
1025
|
+
api: TPjsApiOrUrl;
|
|
1026
|
+
destApiForKeepAlive: TPjsApiOrUrl;
|
|
1010
1027
|
}) => Promise<Extrinsic>;
|
|
1011
|
-
declare const transferRelayToParaSerializedApiCall: (options: Omit<TRelayToParaOptions<
|
|
1012
|
-
api:
|
|
1013
|
-
destApiForKeepAlive:
|
|
1028
|
+
declare const transferRelayToParaSerializedApiCall: (options: Omit<TRelayToParaOptions<TPjsApi, Extrinsic>, "api" | "destApiForKeepAlive"> & {
|
|
1029
|
+
api: TPjsApiOrUrl;
|
|
1030
|
+
destApiForKeepAlive: TPjsApiOrUrl;
|
|
1014
1031
|
}) => Promise<TSerializedApiCall>;
|
|
1015
1032
|
/**
|
|
1016
1033
|
* Transfers assets from parachain to another parachain or relay chain.
|
|
1017
1034
|
* @param options - The transfer options.
|
|
1018
1035
|
* @returns An extrinsic to be signed and sent.
|
|
1019
1036
|
*/
|
|
1020
|
-
declare const send: (options: Omit<TSendOptions<
|
|
1021
|
-
api:
|
|
1022
|
-
destApiForKeepAlive:
|
|
1037
|
+
declare const send: (options: Omit<TSendOptions<TPjsApi, Extrinsic>, "api" | "destApiForKeepAlive"> & {
|
|
1038
|
+
api: TPjsApiOrUrl;
|
|
1039
|
+
destApiForKeepAlive: TPjsApiOrUrl;
|
|
1023
1040
|
}) => Promise<Extrinsic>;
|
|
1024
|
-
declare const sendSerializedApiCall: (options: Omit<TSendOptions<
|
|
1025
|
-
api:
|
|
1026
|
-
destApiForKeepAlive:
|
|
1041
|
+
declare const sendSerializedApiCall: (options: Omit<TSendOptions<TPjsApi, Extrinsic>, "api" | "destApiForKeepAlive"> & {
|
|
1042
|
+
api: TPjsApiOrUrl;
|
|
1043
|
+
destApiForKeepAlive: TPjsApiOrUrl;
|
|
1027
1044
|
}) => Promise<TSerializedApiCall>;
|
|
1028
1045
|
|
|
1029
1046
|
declare const transfer_buildEthTransferOptions: typeof buildEthTransferOptions;
|
|
@@ -1225,7 +1242,7 @@ declare const getSupportedAssets: (origin: TNodeWithRelayChains, destination: TN
|
|
|
1225
1242
|
* @returns The native balance as a bigint.
|
|
1226
1243
|
*/
|
|
1227
1244
|
declare const getBalanceNative: (options: TGetBalanceNativeOptionsBase & {
|
|
1228
|
-
api?:
|
|
1245
|
+
api?: TPjsApiOrUrl;
|
|
1229
1246
|
}) => Promise<bigint>;
|
|
1230
1247
|
/**
|
|
1231
1248
|
* Retrieves the balance of a foreign asset for a given account on a specified node.
|
|
@@ -1233,7 +1250,7 @@ declare const getBalanceNative: (options: TGetBalanceNativeOptionsBase & {
|
|
|
1233
1250
|
* @returns The balance of the foreign asset as a bigint, or null if not found.
|
|
1234
1251
|
*/
|
|
1235
1252
|
declare const getBalanceForeign: (options: TGetBalanceForeignOptionsBase & {
|
|
1236
|
-
api?:
|
|
1253
|
+
api?: TPjsApiOrUrl;
|
|
1237
1254
|
}) => Promise<bigint>;
|
|
1238
1255
|
/**
|
|
1239
1256
|
* Retrieves detailed transfer information for a cross-chain transfer.
|
|
@@ -1241,7 +1258,7 @@ declare const getBalanceForeign: (options: TGetBalanceForeignOptionsBase & {
|
|
|
1241
1258
|
* @returns A Promise that resolves to the transfer information.
|
|
1242
1259
|
*/
|
|
1243
1260
|
declare const getTransferInfo: (options: TGetTransferInfoOptionsBase & {
|
|
1244
|
-
api?:
|
|
1261
|
+
api?: TPjsApiOrUrl;
|
|
1245
1262
|
}) => Promise<TTransferInfo>;
|
|
1246
1263
|
/**
|
|
1247
1264
|
* Retrieves the asset balance for a given account on a specified node.
|
|
@@ -1249,7 +1266,7 @@ declare const getTransferInfo: (options: TGetTransferInfoOptionsBase & {
|
|
|
1249
1266
|
* @returns The asset balance as a bigint.
|
|
1250
1267
|
*/
|
|
1251
1268
|
declare const getAssetBalance: (options: TGetAssetBalanceOptionsBase & {
|
|
1252
|
-
api?:
|
|
1269
|
+
api?: TPjsApiOrUrl;
|
|
1253
1270
|
}) => Promise<bigint>;
|
|
1254
1271
|
/**
|
|
1255
1272
|
* Claims assets from a parachain.
|
|
@@ -1257,10 +1274,10 @@ declare const getAssetBalance: (options: TGetAssetBalanceOptionsBase & {
|
|
|
1257
1274
|
* @returns An extrinsic representing the claim transaction.
|
|
1258
1275
|
*/
|
|
1259
1276
|
declare const claimAssets: (options: TAssetClaimOptionsBase & {
|
|
1260
|
-
api?:
|
|
1261
|
-
}) => Promise<
|
|
1277
|
+
api?: TPjsApiOrUrl;
|
|
1278
|
+
}) => Promise<TSerializedApiCall | Extrinsic>;
|
|
1262
1279
|
declare const getOriginFeeDetails: (options: TGetOriginFeeDetailsOptionsBase & {
|
|
1263
|
-
api?:
|
|
1280
|
+
api?: TPjsApiOrUrl;
|
|
1264
1281
|
}) => Promise<TOriginFeeDetails>;
|
|
1265
1282
|
|
|
1266
1283
|
declare const assets_claimAssets: typeof claimAssets;
|
|
@@ -1418,7 +1435,7 @@ interface UseKeepAliveFinalBuilder$1<TApi, TRes> extends IAddToBatchBuilder<TApi
|
|
|
1418
1435
|
buildSerializedApiCall: () => Promise<TSerializedApiCall>;
|
|
1419
1436
|
}
|
|
1420
1437
|
interface AddressBuilder<TApi, TRes> {
|
|
1421
|
-
address: (address: TAddress) => UseKeepAliveFinalBuilder$1<TApi, TRes>;
|
|
1438
|
+
address: (address: TAddress, ahAddress?: string) => UseKeepAliveFinalBuilder$1<TApi, TRes>;
|
|
1422
1439
|
}
|
|
1423
1440
|
interface AmountBuilder<TApi, TRes> {
|
|
1424
1441
|
amount: (amount: TAmount | null) => AddressBuilder<TApi, TRes>;
|
|
@@ -1500,17 +1517,17 @@ declare const EvmBuilder: (provider: AbstractProvider) => EvmBuilderClass;
|
|
|
1500
1517
|
* @param api - The API instance to use for building transactions. If not provided, a new instance will be created.
|
|
1501
1518
|
* @returns A new Builder instance.
|
|
1502
1519
|
*/
|
|
1503
|
-
declare const Builder: (api?:
|
|
1504
|
-
type UseKeepAliveFinalBuilder = UseKeepAliveFinalBuilder$1<
|
|
1520
|
+
declare const Builder: (api?: TPjsApiOrUrl) => GeneralBuilder$1<_polkadot_api.ApiPromise, Extrinsic>;
|
|
1521
|
+
type UseKeepAliveFinalBuilder = UseKeepAliveFinalBuilder$1<TPjsApi, Extrinsic>;
|
|
1505
1522
|
declare const GeneralBuilder: {
|
|
1506
|
-
new (batchManager: BatchTransactionManager<ApiPromise, Extrinsic>, api: IPolkadotApi<ApiPromise, Extrinsic>, _from?: TNode | undefined, _to?: TDestination | undefined): GeneralBuilder$1<ApiPromise, Extrinsic>;
|
|
1523
|
+
new (batchManager: BatchTransactionManager<_polkadot_api.ApiPromise, Extrinsic>, api: IPolkadotApi<_polkadot_api.ApiPromise, Extrinsic>, _from?: TNode | undefined, _to?: TDestination | undefined): GeneralBuilder$1<_polkadot_api.ApiPromise, Extrinsic>;
|
|
1507
1524
|
};
|
|
1508
1525
|
|
|
1509
|
-
declare const createApiInstanceForNode: (node: TNodeWithRelayChains) => Promise<ApiPromise>;
|
|
1526
|
+
declare const createApiInstanceForNode: (node: TNodeWithRelayChains) => Promise<_polkadot_api.ApiPromise>;
|
|
1510
1527
|
declare const createPolkadotJsApiCall: <TArgs extends Record<string, unknown>, TResult>(apiCall: (options: TArgs & {
|
|
1511
|
-
api: IPolkadotApi<
|
|
1528
|
+
api: IPolkadotApi<TPjsApi, Extrinsic>;
|
|
1512
1529
|
}) => Promise<TResult>) => (options: TArgs & {
|
|
1513
|
-
api?:
|
|
1530
|
+
api?: TPjsApiOrUrl;
|
|
1514
1531
|
}) => Promise<TResult>;
|
|
1515
1532
|
|
|
1516
1533
|
/**
|
|
@@ -1647,4 +1664,4 @@ declare class DuplicateAssetIdError extends Error {
|
|
|
1647
1664
|
constructor(id: string);
|
|
1648
1665
|
}
|
|
1649
1666
|
|
|
1650
|
-
export { BatchMode, Builder, type CheckKeepAliveOptions, DuplicateAssetError, DuplicateAssetIdError, EvmBuilder, type Extrinsic, GeneralBuilder, type HexString$1 as HexString, type IPolkadotXCMTransfer, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidCurrencyError, type JunctionParachain, type JunctionType, type Junctions, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, NoXCMSupportImplementedError, NodeNotSupportedError, Parents, type PolkadotXCMTransferInput, type PolkadotXcmSection, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TAsset, type TAssetDetails, type TAssetJsonMap, type TBatchOptions, type TBifrostToken, type TCurrency, type TCurrencyCore, type TCurrencyInput, type TCurrencySelection, type TCurrencySelectionHeader, type TCurrencySelectionHeaderArr, type TCurrencySelectionV4, type TCurrencySymbol, type TDestWeight, type TDestination, type TEdJsonMap, type TEvmBuilderOptions, type TForeignAsset, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TGetTransferInfoOptions, type TGetTransferInfoOptionsBase, type TJunction, type TMantaAsset, type TMultiAsset, type TMultiAssetV3, type TMultiAssetV4, type TMultiLocation, type TMultiLocationHeader, type TNativeAssetDetails, type TNativeTokenAsset, type TNode, type TNodeAssets, type TNodeDotKsmWithRelayChains, type TNodePolkadotKusama, type TNodeWithRelayChains, type TNodleAsset, type TOptionalEvmBuilderOptions, type TOriginFeeDetails, type TOtherReserveAsset, type TPallet, type TPalletJsonMap, type TPalletMap, type TRelayChainSymbol, type TRelayChainType, type TRelayToParaOptions, type TReserveAsset, type TScenario, type TSelfReserveAsset, type TSendBaseOptions, type TSendInternalOptions, type TSendOptions, type TSerializeEthTransferOptions, type TSerializedApiCall, type TSerializedApiCallV2, type TSerializedEthTransfer, type TTransferInfo, type TTransferReturn, type TVersionClaimAssets, type TXTokensCurrencySelection, type TXcmAsset, type TZeitgeistAsset, type UseKeepAliveFinalBuilder, Version, type XTokensSection, type XTokensTransferInput, type XTransferSection, type XTransferTransferInput, assets, buildEthTransferOptions, claimAssets, createApiInstanceForNode, createPolkadotJsApiCall, determineRelayChain, getAllAssetsSymbols, getAllNodeProviders, getAssetBalance, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getBalanceForeign, getBalanceNative, getDefaultPallet, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getNode, getNodeEndpointOption, getNodeProvider, getOriginFeeDetails, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getTNode, getTransferInfo, hasSupportForAsset, isRelayChain, send, sendSerializedApiCall, transferRelayToPara, transferRelayToParaSerializedApiCall, transfer as xcmPallet };
|
|
1667
|
+
export { BatchMode, Builder, type CheckKeepAliveOptions, DuplicateAssetError, DuplicateAssetIdError, EvmBuilder, type Extrinsic, GeneralBuilder, type HexString$1 as HexString, type IPolkadotXCMTransfer, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidCurrencyError, type JunctionParachain, type JunctionType, type Junctions, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, NoXCMSupportImplementedError, NodeNotSupportedError, Parents, type PolkadotXCMTransferInput, type PolkadotXcmSection, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TAsset, type TAssetDetails, type TAssetJsonMap, type TBatchOptions, type TBifrostToken, type TCurrency, type TCurrencyCore, type TCurrencyInput, type TCurrencySelection, type TCurrencySelectionHeader, type TCurrencySelectionHeaderArr, type TCurrencySelectionV4, type TCurrencySymbol, type TDestWeight, type TDestination, type TEdJsonMap, type TEvmBuilderOptions, type TForeignAsset, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TGetTransferInfoOptions, type TGetTransferInfoOptionsBase, type TJunction, type TMantaAsset, type TMultiAsset, type TMultiAssetV3, type TMultiAssetV4, type TMultiLocation, type TMultiLocationHeader, type TNativeAssetDetails, type TNativeTokenAsset, type TNode, type TNodeAssets, type TNodeDotKsmWithRelayChains, type TNodePolkadotKusama, type TNodeWithRelayChains, type TNodleAsset, type TOptionalEvmBuilderOptions, type TOriginFeeDetails, type TOtherReserveAsset, type TPallet, type TPalletJsonMap, type TPalletMap, type TPjsApi, type TPjsApiOrUrl, type TRelayChainSymbol, type TRelayChainType, type TRelayToParaOptions, type TReserveAsset, type TScenario, type TSelfReserveAsset, type TSendBaseOptions, type TSendInternalOptions, type TSendOptions, type TSerializeEthTransferOptions, type TSerializedApiCall, type TSerializedApiCallV2, type TSerializedEthTransfer, type TTransferInfo, type TTransferReturn, type TVersionClaimAssets, type TXTokensCurrencySelection, type TXcmAsset, type TZeitgeistAsset, type UseKeepAliveFinalBuilder, Version, type XTokensSection, type XTokensTransferInput, type XTransferSection, type XTransferTransferInput, assets, buildEthTransferOptions, claimAssets, createApiInstanceForNode, createPolkadotJsApiCall, determineRelayChain, getAllAssetsSymbols, getAllNodeProviders, getAssetBalance, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getBalanceForeign, getBalanceNative, getDefaultPallet, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getNode, getNodeEndpointOption, getNodeProvider, getOriginFeeDetails, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getTNode, getTransferInfo, hasSupportForAsset, isRelayChain, send, sendSerializedApiCall, transferRelayToPara, transferRelayToParaSerializedApiCall, transfer as xcmPallet };
|