@paraspell/sdk 3.0.4 → 3.0.6

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.d.ts CHANGED
@@ -1,18 +1,20 @@
1
1
  import { ApiPromise } from '@polkadot/api';
2
2
  import { SubmittableExtrinsic } from '@polkadot/api/types';
3
- import * as _polkadot_apps_config_endpoints_types from '@polkadot/apps-config/endpoints/types';
4
3
 
5
4
  declare abstract class ParachainNode {
6
- private _node;
7
- private _name;
8
- private _type;
9
- private _version;
5
+ private readonly _node;
6
+ private readonly _name;
7
+ private readonly _type;
8
+ private readonly _version;
9
+ protected _assetCheckEnabled: boolean;
10
10
  constructor(node: TNode, name: string, type: TRelayChainType, version: Version);
11
11
  get name(): string;
12
12
  get type(): TRelayChainType;
13
- get node(): "AssetHubPolkadot" | "Acala" | "Astar" | "BifrostPolkadot" | "Bitgreen" | "Centrifuge" | "Clover" | "ComposableFinance" | "Darwinia" | "HydraDX" | "Interlay" | "Kylin" | "Litentry" | "Moonbeam" | "Parallel" | "AssetHubKusama" | "Encointer" | "Altair" | "Amplitude" | "Bajun" | "Basilisk" | "BifrostKusama" | "Pioneer" | "Calamari" | "CrustShadow" | "Crab" | "Imbue" | "Integritee" | "InvArchTinker" | "Karura" | "Kintsugi" | "Litmus" | "Mangata" | "Moonriver" | "ParallelHeiko" | "Picasso" | "Quartz" | "Robonomics" | "Shiden" | "Turing" | "Equilibrium" | "Unique" | "Crust" | "Manta" | "Genshiro" | "Nodle" | "OriginTrail" | "Pendulum" | "Polkadex" | "Zeitgeist";
13
+ get node(): TNode;
14
14
  get version(): Version;
15
- transfer(api: ApiPromise, currencySymbol: string | undefined, currencyId: string | undefined, amount: any, to: string, destination?: TNode, serializedApiCallEnabled?: boolean): Extrinsic | TSerializedApiCall;
15
+ get assetCheckEnabled(): boolean;
16
+ transfer(api: ApiPromise, currencySymbol: string | undefined, currencyId: string | undefined, amount: string, to: string, destination?: TNode, serializedApiCallEnabled?: boolean): Extrinsic | TSerializedApiCall;
17
+ transferRelayToPara(options: TTransferRelayToParaOptions): TSerializedApiCall;
16
18
  }
17
19
 
18
20
  declare const NODE_NAMES: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "Centrifuge", "Clover", "ComposableFinance", "Darwinia", "HydraDX", "Interlay", "Kylin", "Litentry", "Moonbeam", "Parallel", "AssetHubKusama", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Pioneer", "Calamari", "CrustShadow", "Crab", "Imbue", "Integritee", "InvArchTinker", "Karura", "Kintsugi", "Litmus", "Mangata", "Moonriver", "ParallelHeiko", "Picasso", "Quartz", "Robonomics", "Shiden", "Turing", "Equilibrium", "Unique", "Crust", "Manta", "Genshiro", "Nodle", "OriginTrail", "Pendulum", "Polkadex", "Zeitgeist"];
@@ -22,51 +24,52 @@ type UpdateFunction = (name: string, index: number) => string;
22
24
  type Extrinsic = SubmittableExtrinsic<'promise'>;
23
25
  type ExtrinsicFunction<T> = (arg: T) => Extrinsic;
24
26
  type TRelayChainType = 'polkadot' | 'kusama';
27
+ type TRelayChainSymbol = 'DOT' | 'KSM';
25
28
  type TNode = (typeof NODE_NAMES)[number];
26
- type TAssetDetails = {
29
+ interface TAssetDetails {
27
30
  assetId: string;
28
31
  symbol?: string;
29
32
  decimals?: number;
30
- };
31
- type TNativeAssetDetails = {
33
+ }
34
+ interface TNativeAssetDetails {
32
35
  assetId?: string;
33
36
  symbol: string;
34
37
  decimals: number;
35
- };
36
- type TNodeAssets = {
38
+ }
39
+ interface TNodeAssets {
37
40
  paraId: number;
38
- relayChainAssetSymbol: 'KSM' | 'DOT';
41
+ relayChainAssetSymbol: TRelayChainSymbol;
39
42
  nativeAssets: TNativeAssetDetails[];
40
43
  otherAssets: TAssetDetails[];
41
- };
44
+ }
42
45
  type TAssetJsonMap = Record<TNode, TNodeAssets>;
43
46
  type TScenario = 'ParaToRelay' | 'ParaToPara' | 'RelayToPara';
44
47
  type Bool = 'Yes' | 'No';
45
48
  type TPallet = (typeof SUPPORTED_PALLETS)[number];
46
- type TPalletMap = {
49
+ interface TPalletMap {
47
50
  defaultPallet: TPallet;
48
51
  supportedPallets: TPallet[];
49
- };
52
+ }
50
53
  type TPalletJsonMap = Record<TNode, TPalletMap>;
51
- type TSerializedApiCall = {
54
+ interface TSerializedApiCall {
52
55
  module: string;
53
56
  section: string;
54
57
  parameters: any[];
55
- };
56
- type XTokensTransferInput = {
58
+ }
59
+ interface XTokensTransferInput {
57
60
  api: ApiPromise;
58
61
  currency: string | undefined;
59
62
  currencyID: string | undefined;
60
- amount: any;
63
+ amount: string;
61
64
  addressSelection: any;
62
65
  fees: number;
63
66
  scenario: TScenario;
64
67
  serializedApiCallEnabled?: boolean;
65
- };
68
+ }
66
69
  interface IXTokensTransfer {
67
- transferXTokens(input: XTokensTransferInput): Extrinsic | TSerializedApiCall;
70
+ transferXTokens: (input: XTokensTransferInput) => Extrinsic | TSerializedApiCall;
68
71
  }
69
- type PolkadotXCMTransferInput = {
72
+ interface PolkadotXCMTransferInput {
70
73
  api: ApiPromise;
71
74
  header: any;
72
75
  addressSelection: any;
@@ -74,20 +77,26 @@ type PolkadotXCMTransferInput = {
74
77
  scenario: TScenario;
75
78
  currencySymbol: string | undefined;
76
79
  serializedApiCallEnabled?: boolean;
77
- };
80
+ }
81
+ interface TTransferRelayToParaOptions {
82
+ api: ApiPromise;
83
+ destination: TNode;
84
+ address: string;
85
+ amount: string;
86
+ }
78
87
  interface IPolkadotXCMTransfer {
79
- transferPolkadotXCM(input: PolkadotXCMTransferInput): Extrinsic | TSerializedApiCall;
88
+ transferPolkadotXCM: (input: PolkadotXCMTransferInput) => Extrinsic | TSerializedApiCall;
80
89
  }
81
90
  declare enum Version {
82
91
  V1 = "V1",
83
92
  V3 = "V3"
84
93
  }
85
94
 
86
- declare const sendSerializedApiCall: (api: ApiPromise, origin: TNode, currencySymbolOrId: string | number | bigint, amount: any, to: string, destination?: TNode) => TSerializedApiCall;
87
- declare function send(api: ApiPromise, origin: TNode, currencySymbolOrId: string | number | bigint, amount: any, to: string, destination?: TNode): Extrinsic;
88
- declare const transferRelayToParaCommon: (api: ApiPromise, destination: TNode, amount: any, to: string, serializedApiCallEnabled?: boolean) => Extrinsic | TSerializedApiCall | never;
89
- declare function transferRelayToPara(api: ApiPromise, destination: TNode, amount: any, to: string): Extrinsic | never;
90
- declare const transferRelayToParaSerializedApiCall: (api: ApiPromise, destination: TNode, amount: any, to: string) => TSerializedApiCall;
95
+ declare const sendSerializedApiCall: (api: ApiPromise, origin: TNode, currencySymbolOrId: string | number | bigint, amount: string | number | bigint, to: string, destination?: TNode) => TSerializedApiCall;
96
+ declare function send(api: ApiPromise, origin: TNode, currencySymbolOrId: string | number | bigint, amount: string | number | bigint, to: string, destination?: TNode): Extrinsic;
97
+ declare const transferRelayToParaCommon: (api: ApiPromise, destination: TNode, amount: string, address: string, serializedApiCallEnabled?: boolean) => Extrinsic | TSerializedApiCall | never;
98
+ declare function transferRelayToPara(api: ApiPromise, destination: TNode, amount: string | number | bigint, to: string): Extrinsic | never;
99
+ declare const transferRelayToParaSerializedApiCall: (api: ApiPromise, destination: TNode, amount: string | number | bigint, to: string) => TSerializedApiCall;
91
100
 
92
101
  declare const index$4_send: typeof send;
93
102
  declare const index$4_sendSerializedApiCall: typeof sendSerializedApiCall;
@@ -95,13 +104,7 @@ declare const index$4_transferRelayToPara: typeof transferRelayToPara;
95
104
  declare const index$4_transferRelayToParaCommon: typeof transferRelayToParaCommon;
96
105
  declare const index$4_transferRelayToParaSerializedApiCall: typeof transferRelayToParaSerializedApiCall;
97
106
  declare namespace index$4 {
98
- export {
99
- index$4_send as send,
100
- index$4_sendSerializedApiCall as sendSerializedApiCall,
101
- index$4_transferRelayToPara as transferRelayToPara,
102
- index$4_transferRelayToParaCommon as transferRelayToParaCommon,
103
- index$4_transferRelayToParaSerializedApiCall as transferRelayToParaSerializedApiCall,
104
- };
107
+ export { index$4_send as send, index$4_sendSerializedApiCall as sendSerializedApiCall, index$4_transferRelayToPara as transferRelayToPara, index$4_transferRelayToParaCommon as transferRelayToParaCommon, index$4_transferRelayToParaSerializedApiCall as transferRelayToParaSerializedApiCall };
105
108
  }
106
109
 
107
110
  declare function addLiquidity(api: ApiPromise, assetA: number, assetB: number, amountA: any, amountBMaxLimit: any): Extrinsic;
@@ -116,13 +119,7 @@ declare const index$3_createPool: typeof createPool;
116
119
  declare const index$3_removeLiquidity: typeof removeLiquidity;
117
120
  declare const index$3_sell: typeof sell;
118
121
  declare namespace index$3 {
119
- export {
120
- index$3_addLiquidity as addLiquidity,
121
- index$3_buy as buy,
122
- index$3_createPool as createPool,
123
- index$3_removeLiquidity as removeLiquidity,
124
- index$3_sell as sell,
125
- };
122
+ export { index$3_addLiquidity as addLiquidity, index$3_buy as buy, index$3_createPool as createPool, index$3_removeLiquidity as removeLiquidity, index$3_sell as sell };
126
123
  }
127
124
 
128
125
  declare function openChannel(api: ApiPromise, origin: TNode, destination: TNode, maxSize: number, maxMessageSize: number): Extrinsic;
@@ -131,10 +128,7 @@ declare function openChannelSerializedApiCall(api: ApiPromise, origin: TNode, de
131
128
  declare const index$2_openChannel: typeof openChannel;
132
129
  declare const index$2_openChannelSerializedApiCall: typeof openChannelSerializedApiCall;
133
130
  declare namespace index$2 {
134
- export {
135
- index$2_openChannel as openChannel,
136
- index$2_openChannelSerializedApiCall as openChannelSerializedApiCall,
137
- };
131
+ export { index$2_openChannel as openChannel, index$2_openChannelSerializedApiCall as openChannelSerializedApiCall };
138
132
  }
139
133
 
140
134
  declare function closeChannel(api: ApiPromise, origin: TNode, inbound: number, outbound: number): Extrinsic;
@@ -143,22 +137,19 @@ declare function closeChannelSerializedApiCall(api: ApiPromise, origin: TNode, i
143
137
  declare const index$1_closeChannel: typeof closeChannel;
144
138
  declare const index$1_closeChannelSerializedApiCall: typeof closeChannelSerializedApiCall;
145
139
  declare namespace index$1 {
146
- export {
147
- index$1_closeChannel as closeChannel,
148
- index$1_closeChannelSerializedApiCall as closeChannelSerializedApiCall,
149
- };
140
+ export { index$1_closeChannel as closeChannel, index$1_closeChannelSerializedApiCall as closeChannelSerializedApiCall };
150
141
  }
151
142
 
152
- declare function getAssetsObject(node: TNode): TNodeAssets;
153
- declare function getAssetId(node: TNode, symbol: string): string | null;
154
- declare function getRelayChainSymbol(node: TNode): "DOT" | "KSM";
155
- declare function getNativeAssets(node: TNode): TNativeAssetDetails[];
156
- declare function getOtherAssets(node: TNode): TAssetDetails[];
157
- declare function getAllAssetsSymbols(node: TNode): (string | undefined)[];
158
- declare function hasSupportForAsset(node: TNode, symbol: string): boolean;
159
- declare function getAssetDecimals(node: TNode, symbol: string): number | null | undefined;
160
- declare function getParaId(node: TNode): number;
161
- declare function getTNode(nodeID: number): "AssetHubPolkadot" | "Acala" | "Astar" | "BifrostPolkadot" | "Bitgreen" | "Centrifuge" | "Clover" | "ComposableFinance" | "Darwinia" | "HydraDX" | "Interlay" | "Kylin" | "Litentry" | "Moonbeam" | "Parallel" | "AssetHubKusama" | "Encointer" | "Altair" | "Amplitude" | "Bajun" | "Basilisk" | "BifrostKusama" | "Pioneer" | "Calamari" | "CrustShadow" | "Crab" | "Imbue" | "Integritee" | "InvArchTinker" | "Karura" | "Kintsugi" | "Litmus" | "Mangata" | "Moonriver" | "ParallelHeiko" | "Picasso" | "Quartz" | "Robonomics" | "Shiden" | "Turing" | "Equilibrium" | "Unique" | "Crust" | "Manta" | "Genshiro" | "Nodle" | "OriginTrail" | "Pendulum" | "Polkadex" | "Zeitgeist" | undefined;
143
+ declare const getAssetsObject: (node: TNode) => TNodeAssets;
144
+ declare const getAssetId: (node: TNode, symbol: string) => string | null;
145
+ declare const getRelayChainSymbol: (node: TNode) => TRelayChainSymbol;
146
+ declare const getNativeAssets: (node: TNode) => TNativeAssetDetails[];
147
+ declare const getOtherAssets: (node: TNode) => TAssetDetails[];
148
+ declare const getAllAssetsSymbols: (node: TNode) => string[];
149
+ declare const hasSupportForAsset: (node: TNode, symbol: string) => boolean;
150
+ declare const getAssetDecimals: (node: TNode, symbol: string) => number | null;
151
+ declare const getParaId: (node: TNode) => number;
152
+ declare const getTNode: (nodeID: number) => TNode | null;
162
153
 
163
154
  declare const index_getAllAssetsSymbols: typeof getAllAssetsSymbols;
164
155
  declare const index_getAssetDecimals: typeof getAssetDecimals;
@@ -171,135 +162,124 @@ declare const index_getRelayChainSymbol: typeof getRelayChainSymbol;
171
162
  declare const index_getTNode: typeof getTNode;
172
163
  declare const index_hasSupportForAsset: typeof hasSupportForAsset;
173
164
  declare namespace index {
174
- export {
175
- index_getAllAssetsSymbols as getAllAssetsSymbols,
176
- index_getAssetDecimals as getAssetDecimals,
177
- index_getAssetId as getAssetId,
178
- index_getAssetsObject as getAssetsObject,
179
- index_getNativeAssets as getNativeAssets,
180
- index_getOtherAssets as getOtherAssets,
181
- index_getParaId as getParaId,
182
- index_getRelayChainSymbol as getRelayChainSymbol,
183
- index_getTNode as getTNode,
184
- index_hasSupportForAsset as hasSupportForAsset,
185
- };
165
+ export { index_getAllAssetsSymbols as getAllAssetsSymbols, index_getAssetDecimals as getAssetDecimals, index_getAssetId as getAssetId, index_getAssetsObject as getAssetsObject, index_getNativeAssets as getNativeAssets, index_getOtherAssets as getOtherAssets, index_getParaId as getParaId, index_getRelayChainSymbol as getRelayChainSymbol, index_getTNode as getTNode, index_hasSupportForAsset as hasSupportForAsset };
186
166
  }
187
167
 
188
- interface FinalCreatePoolBuilder {
189
- build(): Extrinsic;
168
+ interface FinalAddLiquidityBuilder {
169
+ build: () => Extrinsic;
190
170
  }
191
- interface AmountBCreatePoolBuilder {
192
- amountB(amountB: number): FinalCreatePoolBuilder;
171
+ interface AmountBMaxLimitAddLiquidityBuilder {
172
+ amountBMaxLimit: (amountBMaxLimit: number) => FinalAddLiquidityBuilder;
193
173
  }
194
- interface AssetBCreatePoolBuilder {
195
- assetB(assetB: number): AmountBCreatePoolBuilder;
174
+ interface AmountAAddLiquidityBuilder {
175
+ amountA: (amountA: number) => AmountBMaxLimitAddLiquidityBuilder;
196
176
  }
197
- interface AmountACreatePoolBuilder {
198
- amountA(amountA: number): AssetBCreatePoolBuilder;
177
+ interface AssetBAddLiquidityBuilder {
178
+ assetB: (assetB: number) => AmountAAddLiquidityBuilder;
199
179
  }
200
- interface AssetACreatePoolBuilder {
201
- assetA(assetA: number): AmountACreatePoolBuilder;
180
+ interface AssetAAddLiquidityBuilder {
181
+ assetA: (assetA: number) => AssetBAddLiquidityBuilder;
202
182
  }
203
183
 
204
- interface FinalSellBuilder {
205
- build(): Extrinsic;
184
+ interface FinalBuyBuilder {
185
+ build: () => Extrinsic;
206
186
  }
207
- interface DiscountSellBuilder {
208
- discount(discount: Bool): FinalSellBuilder;
187
+ interface DiscountBuyBuilder {
188
+ discount: (discount: Bool) => FinalBuyBuilder;
209
189
  }
210
- interface MaxLimitSellBuilder {
211
- maxLimit(maxLimit: number): DiscountSellBuilder;
190
+ interface MaxLimitBuyBuilder {
191
+ maxLimit: (maxLimit: number) => DiscountBuyBuilder;
212
192
  }
213
- interface AmountSellBuilder {
214
- amount(amount: number): MaxLimitSellBuilder;
193
+ interface AmountBuyBuilder {
194
+ amount: (amount: number) => MaxLimitBuyBuilder;
215
195
  }
216
- interface AssetOutSellBuilder {
217
- assetOut(assetOut: number): AmountSellBuilder;
196
+ interface AssetInBuyBuilder {
197
+ assetIn: (assetIn: number) => AmountBuyBuilder;
218
198
  }
219
- interface AssetInSellBuilder {
220
- assetIn(assetIn: number): AssetOutSellBuilder;
199
+ interface AssetOutBuyBuilder {
200
+ assetOut: (assetOut: number) => AssetInBuyBuilder;
221
201
  }
222
202
 
223
- interface FinalBuyBuilder {
224
- build(): Extrinsic;
203
+ interface OutboundCloseChannelBuilder {
204
+ outbound: (inbound: number) => FinalBuilder;
225
205
  }
226
- interface DiscountBuyBuilder {
227
- discount(discount: Bool): FinalBuyBuilder;
206
+ interface InboundCloseChannelBuilder {
207
+ inbound: (inbound: number) => OutboundCloseChannelBuilder;
228
208
  }
229
- interface MaxLimitBuyBuilder {
230
- maxLimit(maxLimit: number): DiscountBuyBuilder;
209
+
210
+ interface FinalCreatePoolBuilder {
211
+ build: () => Extrinsic;
231
212
  }
232
- interface AmountBuyBuilder {
233
- amount(amount: number): MaxLimitBuyBuilder;
213
+ interface AmountBCreatePoolBuilder {
214
+ amountB: (amountB: number) => FinalCreatePoolBuilder;
234
215
  }
235
- interface AssetInBuyBuilder {
236
- assetIn(assetIn: number): AmountBuyBuilder;
216
+ interface AssetBCreatePoolBuilder {
217
+ assetB: (assetB: number) => AmountBCreatePoolBuilder;
237
218
  }
238
- interface AssetOutBuyBuilder {
239
- assetOut(assetOut: number): AssetInBuyBuilder;
219
+ interface AmountACreatePoolBuilder {
220
+ amountA: (amountA: number) => AssetBCreatePoolBuilder;
221
+ }
222
+ interface AssetACreatePoolBuilder {
223
+ assetA: (assetA: number) => AmountACreatePoolBuilder;
224
+ }
225
+
226
+ interface MaxMessageSizeOpenChannelBuilder {
227
+ maxMessageSize: (size: number) => FinalBuilder;
228
+ }
229
+ interface MaxSizeOpenChannelBuilder {
230
+ maxSize: (size: number) => MaxMessageSizeOpenChannelBuilder;
240
231
  }
241
232
 
242
233
  interface FinalRemoveLiquidityBuilder {
243
- build(): Extrinsic;
234
+ build: () => Extrinsic;
244
235
  }
245
236
  interface LiquidityAmountRemoveLiquidityBuilder {
246
- liquidityAmount(liquidityAmount: number): FinalRemoveLiquidityBuilder;
237
+ liquidityAmount: (liquidityAmount: number) => FinalRemoveLiquidityBuilder;
247
238
  }
248
239
  interface AssetBRemoveLiquidityBuilder {
249
- assetB(assetB: number): LiquidityAmountRemoveLiquidityBuilder;
240
+ assetB: (assetB: number) => LiquidityAmountRemoveLiquidityBuilder;
250
241
  }
251
242
  interface AssetARemoveLiquidityBuilder {
252
- assetA(assetA: number): AssetBRemoveLiquidityBuilder;
243
+ assetA: (assetA: number) => AssetBRemoveLiquidityBuilder;
253
244
  }
254
245
 
255
- interface FinalAddLiquidityBuilder {
256
- build(): Extrinsic;
257
- }
258
- interface AmountBMaxLimitAddLiquidityBuilder {
259
- amountBMaxLimit(amountBMaxLimit: number): FinalAddLiquidityBuilder;
260
- }
261
- interface AmountAAddLiquidityBuilder {
262
- amountA(amountA: number): AmountBMaxLimitAddLiquidityBuilder;
263
- }
264
- interface AssetBAddLiquidityBuilder {
265
- assetB(assetB: number): AmountAAddLiquidityBuilder;
246
+ interface FinalSellBuilder {
247
+ build: () => Extrinsic;
266
248
  }
267
- interface AssetAAddLiquidityBuilder {
268
- assetA(assetA: number): AssetBAddLiquidityBuilder;
249
+ interface DiscountSellBuilder {
250
+ discount: (discount: Bool) => FinalSellBuilder;
269
251
  }
270
-
271
- interface OutboundCloseChannelBuilder {
272
- outbound(inbound: number): FinalBuilder;
252
+ interface MaxLimitSellBuilder {
253
+ maxLimit: (maxLimit: number) => DiscountSellBuilder;
273
254
  }
274
- interface InboundCloseChannelBuilder {
275
- inbound(inbound: number): OutboundCloseChannelBuilder;
255
+ interface AmountSellBuilder {
256
+ amount: (amount: number) => MaxLimitSellBuilder;
276
257
  }
277
-
278
- interface MaxMessageSizeOpenChannelBuilder {
279
- maxMessageSize(size: number): FinalBuilder;
258
+ interface AssetOutSellBuilder {
259
+ assetOut: (assetOut: number) => AmountSellBuilder;
280
260
  }
281
- interface MaxSizeOpenChannelBuilder {
282
- maxSize(size: number): MaxMessageSizeOpenChannelBuilder;
261
+ interface AssetInSellBuilder {
262
+ assetIn: (assetIn: number) => AssetOutSellBuilder;
283
263
  }
284
264
 
285
265
  declare class ToGeneralBuilder {
286
- private api;
287
- private from;
288
- private to;
266
+ private readonly api;
267
+ private readonly from;
268
+ private readonly to;
289
269
  constructor(api: ApiPromise, from: TNode, to: TNode);
290
270
  currency(currency: string | number | bigint): AmountBuilder;
291
271
  openChannel(): MaxSizeOpenChannelBuilder;
292
272
  }
293
273
  declare class FromGeneralBuilder {
294
- private api;
295
- private from;
274
+ private readonly api;
275
+ private readonly from;
296
276
  constructor(api: ApiPromise, from: TNode);
297
277
  to(node: TNode): ToGeneralBuilder;
298
- amount(amount: any): AddressBuilder;
278
+ amount(amount: string | number | bigint): AddressBuilder;
299
279
  closeChannel(): InboundCloseChannelBuilder;
300
280
  }
301
281
  declare class GeneralBuilder {
302
- private api;
282
+ private readonly api;
303
283
  constructor(api: ApiPromise);
304
284
  from(node: TNode): FromGeneralBuilder;
305
285
  to(node: TNode): AmountBuilder;
@@ -309,48 +289,32 @@ declare class GeneralBuilder {
309
289
  sell(): AssetInSellBuilder;
310
290
  createPool(): AssetACreatePoolBuilder;
311
291
  }
312
- declare function Builder(api: ApiPromise): GeneralBuilder;
292
+ declare const Builder: (api: ApiPromise) => GeneralBuilder;
313
293
  interface FinalBuilder {
314
- build(): Extrinsic | never;
315
- buildSerializedApiCall(): TSerializedApiCall;
294
+ build: () => Extrinsic | never;
295
+ buildSerializedApiCall: () => TSerializedApiCall;
316
296
  }
317
297
  interface AddressBuilder {
318
- address(address: string): FinalBuilder;
298
+ address: (address: string) => FinalBuilder;
319
299
  }
320
300
  interface AmountBuilder {
321
- amount(amount: any): AddressBuilder;
301
+ amount: (amount: string | number | bigint) => AddressBuilder;
322
302
  }
323
303
 
324
304
  declare const getDefaultPallet: (node: TNode) => TPallet;
325
305
  declare const getSupportedPallets: (node: TNode) => TPallet[];
326
306
 
327
307
  declare const getNode: (node: TNode) => ParachainNode;
328
- declare const getNodeEndpointOption: (node: TNode) => _polkadot_apps_config_endpoints_types.EndpointOption | {
329
- info: string;
330
- paraId: number;
331
- providers: {
332
- 'Imbue Network 0': string;
333
- Dwellir?: undefined;
334
- OnFinality?: undefined;
335
- RadiumBlock?: undefined;
336
- };
337
- } | {
338
- info: string;
339
- paraId: number;
340
- providers: {
341
- Dwellir: string;
342
- OnFinality: string;
343
- RadiumBlock: string;
344
- 'Imbue Network 0'?: undefined;
345
- };
346
- } | undefined;
308
+ declare const getNodeEndpointOption: (node: TNode) => any;
309
+ declare const getAllNodeProviders: (node: TNode) => string[];
310
+ declare const getNodeProvider: (node: TNode) => string | null;
347
311
 
348
312
  declare class InvalidCurrencyError extends Error {
349
313
  constructor(message: string);
350
314
  }
351
315
 
352
316
  declare class NodeNotSupportedError extends Error {
353
- constructor(message: string);
317
+ constructor(message?: string);
354
318
  }
355
319
 
356
320
  declare class NoXCMSupportImplementedError extends Error {
@@ -365,4 +329,4 @@ declare class IncompatibleNodesError extends Error {
365
329
  constructor();
366
330
  }
367
331
 
368
- export { Bool, Builder, Extrinsic, ExtrinsicFunction, IPolkadotXCMTransfer, IXTokensTransfer, IncompatibleNodesError, InvalidCurrencyError, NODE_NAMES, NoXCMSupportImplementedError, NodeNotSupportedError, PolkadotXCMTransferInput, SUPPORTED_PALLETS, ScenarioNotSupportedError, TAssetDetails, TAssetJsonMap, TNativeAssetDetails, TNode, TNodeAssets, TPallet, TPalletJsonMap, TPalletMap, TRelayChainType, TScenario, TSerializedApiCall, UpdateFunction, Version, XTokensTransferInput, index as assets, index$1 as closeChannels, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetsObject, getDefaultPallet, getNativeAssets, getNode, getNodeEndpointOption, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedPallets, getTNode, hasSupportForAsset, index$2 as openChannels, index$4 as xcmPallet, index$3 as xyk };
332
+ export { type Bool, Builder, type Extrinsic, type ExtrinsicFunction, type IPolkadotXCMTransfer, type IXTokensTransfer, IncompatibleNodesError, InvalidCurrencyError, NODE_NAMES, NoXCMSupportImplementedError, NodeNotSupportedError, type PolkadotXCMTransferInput, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAssetDetails, type TAssetJsonMap, type TNativeAssetDetails, type TNode, type TNodeAssets, type TPallet, type TPalletJsonMap, type TPalletMap, type TRelayChainSymbol, type TRelayChainType, type TScenario, type TSerializedApiCall, type TTransferRelayToParaOptions, type UpdateFunction, Version, type XTokensTransferInput, index as assets, index$1 as closeChannels, getAllAssetsSymbols, getAllNodeProviders, getAssetDecimals, getAssetId, getAssetsObject, getDefaultPallet, getNativeAssets, getNode, getNodeEndpointOption, getNodeProvider, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedPallets, getTNode, hasSupportForAsset, index$2 as openChannels, index$4 as xcmPallet, index$3 as xyk };