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