@paraspell/sdk 3.0.6 → 3.0.8
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 +584 -104
- package/dist/index.d.ts +7 -2
- package/dist/index.mjs +583 -105
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -15,9 +15,12 @@ declare abstract class ParachainNode {
|
|
|
15
15
|
get assetCheckEnabled(): boolean;
|
|
16
16
|
transfer(api: ApiPromise, currencySymbol: string | undefined, currencyId: string | undefined, amount: string, to: string, destination?: TNode, serializedApiCallEnabled?: boolean): Extrinsic | TSerializedApiCall;
|
|
17
17
|
transferRelayToPara(options: TTransferRelayToParaOptions): TSerializedApiCall;
|
|
18
|
+
getProvider(): string;
|
|
19
|
+
createApiInstance(): Promise<ApiPromise>;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
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"];
|
|
23
|
+
declare const NODES_WITH_RELAY_CHAINS: 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", "Polkadot", "Kusama"];
|
|
21
24
|
declare const SUPPORTED_PALLETS: readonly ["XTokens", "OrmlXTokens", "PolkadotXcm", "RelayerXcm"];
|
|
22
25
|
|
|
23
26
|
type UpdateFunction = (name: string, index: number) => string;
|
|
@@ -26,6 +29,7 @@ type ExtrinsicFunction<T> = (arg: T) => Extrinsic;
|
|
|
26
29
|
type TRelayChainType = 'polkadot' | 'kusama';
|
|
27
30
|
type TRelayChainSymbol = 'DOT' | 'KSM';
|
|
28
31
|
type TNode = (typeof NODE_NAMES)[number];
|
|
32
|
+
type TNodeWithRelayChains = (typeof NODES_WITH_RELAY_CHAINS)[number];
|
|
29
33
|
interface TAssetDetails {
|
|
30
34
|
assetId: string;
|
|
31
35
|
symbol?: string;
|
|
@@ -307,7 +311,8 @@ declare const getSupportedPallets: (node: TNode) => TPallet[];
|
|
|
307
311
|
declare const getNode: (node: TNode) => ParachainNode;
|
|
308
312
|
declare const getNodeEndpointOption: (node: TNode) => any;
|
|
309
313
|
declare const getAllNodeProviders: (node: TNode) => string[];
|
|
310
|
-
declare const getNodeProvider: (node: TNode) => string
|
|
314
|
+
declare const getNodeProvider: (node: TNode) => string;
|
|
315
|
+
declare const createApiInstanceForNode: (node: TNodeWithRelayChains) => Promise<ApiPromise>;
|
|
311
316
|
|
|
312
317
|
declare class InvalidCurrencyError extends Error {
|
|
313
318
|
constructor(message: string);
|
|
@@ -329,4 +334,4 @@ declare class IncompatibleNodesError extends Error {
|
|
|
329
334
|
constructor();
|
|
330
335
|
}
|
|
331
336
|
|
|
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 };
|
|
337
|
+
export { type Bool, Builder, type Extrinsic, type ExtrinsicFunction, type IPolkadotXCMTransfer, type IXTokensTransfer, IncompatibleNodesError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODE_NAMES, NoXCMSupportImplementedError, NodeNotSupportedError, type PolkadotXCMTransferInput, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAssetDetails, type TAssetJsonMap, type TNativeAssetDetails, type TNode, type TNodeAssets, type TNodeWithRelayChains, 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, createApiInstanceForNode, 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 };
|