@paraspell/sdk 0.0.11 → 0.0.14

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,42 +1,75 @@
1
1
  import { ApiPromise } from '@polkadot/api';
2
2
  import { SubmittableExtrinsic } from '@polkadot/api/types';
3
3
 
4
- declare type Extrinsic = SubmittableExtrinsic<'promise'>;
4
+ declare const nodeNames: readonly ["Statemint", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "Centrifuge", "Clover", "ComposableFinance", "Darwinia", "HydraDX", "Interlay", "Kylin", "Litentry", "Moonbeam", "Parallel", "Statemine", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Pioneer", "Calamari", "CrustShadow", "Crab", "Dorafactory", "Imbue", "Integritee", "InvArchTinker", "Karura", "Kico", "Kintsugi", "Listen", "Litmus", "Mangata", "Moonriver", "ParallelHeiko", "Picasso", "Pichiu", "Quartz", "Robonomics", "Shiden", "Turing"];
5
5
 
6
- declare function transferParaToRelay(api: ApiPromise, origin: string, currency: string, amount: any, to: string): Extrinsic;
7
- declare function transferRelayToPara(api: ApiPromise, destination: number, amount: any, to: string): Extrinsic;
8
- declare function limitedTransferRelayToPara(api: ApiPromise, destination: number, amount: any, to: string, limit: number, isLimited: boolean): Extrinsic;
9
- declare function transferParaToPara(api: ApiPromise, origin: string, destination: number, currency: string, amount: any, to: string): Extrinsic;
6
+ type Extrinsic = SubmittableExtrinsic<'promise'>;
7
+ type TNode = typeof nodeNames[number];
8
+ type TAssetDetails = {
9
+ assetId: string;
10
+ symbol: string;
11
+ };
12
+ type TNodeAssets = {
13
+ relayChainAssetSymbol: 'KSM' | 'DOT';
14
+ nativeAssets: string[];
15
+ otherAssets: TAssetDetails[];
16
+ };
10
17
 
11
- declare const index$2_transferParaToPara: typeof transferParaToPara;
12
- declare const index$2_transferParaToRelay: typeof transferParaToRelay;
13
- declare const index$2_transferRelayToPara: typeof transferRelayToPara;
14
- declare const index$2_limitedTransferRelayToPara: typeof limitedTransferRelayToPara;
15
- declare namespace index$2 {
18
+ declare function send(api: ApiPromise, origin: TNode, currency: string, currencyID: number, amount: any, to: string, destination?: number): Extrinsic;
19
+ declare function transferRelayToPara(api: ApiPromise, destination: number, amount: any, to: string): Extrinsic | never;
20
+
21
+ declare const index$3_send: typeof send;
22
+ declare const index$3_transferRelayToPara: typeof transferRelayToPara;
23
+ declare namespace index$3 {
16
24
  export {
17
- index$2_transferParaToPara as transferParaToPara,
18
- index$2_transferParaToRelay as transferParaToRelay,
19
- index$2_transferRelayToPara as transferRelayToPara,
20
- index$2_limitedTransferRelayToPara as limitedTransferRelayToPara,
25
+ index$3_send as send,
26
+ index$3_transferRelayToPara as transferRelayToPara,
21
27
  };
22
28
  }
23
29
 
24
30
  declare function openChannel(api: ApiPromise, origin: number, destination: number, maxSize: number, maxMessageSize: number): Extrinsic;
25
31
 
26
- declare const index$1_openChannel: typeof openChannel;
27
- declare namespace index$1 {
32
+ declare const index$2_openChannel: typeof openChannel;
33
+ declare namespace index$2 {
28
34
  export {
29
- index$1_openChannel as openChannel,
35
+ index$2_openChannel as openChannel,
30
36
  };
31
37
  }
32
38
 
33
39
  declare function closeChannel(api: ApiPromise, origin: number, inbound: number, outbound: number): Extrinsic;
34
40
 
35
- declare const index_closeChannel: typeof closeChannel;
41
+ declare const index$1_closeChannel: typeof closeChannel;
42
+ declare namespace index$1 {
43
+ export {
44
+ index$1_closeChannel as closeChannel,
45
+ };
46
+ }
47
+
48
+ declare function getAssetsObject(node: TNode): TNodeAssets | null;
49
+ declare function getAssetId(node: TNode, symbol: string): string | null;
50
+ declare function getRelayChainSymbol(node: TNode): "KSM" | "DOT" | null;
51
+ declare function getNativeAssets(node: TNode): string[];
52
+ declare function getOtherAssets(node: TNode): TAssetDetails[];
53
+ declare function getAllAssetsSymbols(node: TNode): string[];
54
+ declare function hasSupportForAsset(node: TNode, symbol: string): boolean;
55
+
56
+ declare const index_getAssetsObject: typeof getAssetsObject;
57
+ declare const index_getAssetId: typeof getAssetId;
58
+ declare const index_getRelayChainSymbol: typeof getRelayChainSymbol;
59
+ declare const index_getNativeAssets: typeof getNativeAssets;
60
+ declare const index_getOtherAssets: typeof getOtherAssets;
61
+ declare const index_getAllAssetsSymbols: typeof getAllAssetsSymbols;
62
+ declare const index_hasSupportForAsset: typeof hasSupportForAsset;
36
63
  declare namespace index {
37
64
  export {
38
- index_closeChannel as closeChannel,
65
+ index_getAssetsObject as getAssetsObject,
66
+ index_getAssetId as getAssetId,
67
+ index_getRelayChainSymbol as getRelayChainSymbol,
68
+ index_getNativeAssets as getNativeAssets,
69
+ index_getOtherAssets as getOtherAssets,
70
+ index_getAllAssetsSymbols as getAllAssetsSymbols,
71
+ index_hasSupportForAsset as hasSupportForAsset,
39
72
  };
40
73
  }
41
74
 
42
- export { index as closeChannels, index$1 as openChannels, index$2 as xTokens };
75
+ export { index as assets, index$1 as closeChannels, index$2 as openChannels, index$3 as xcmPallet };