@paraspell/sdk 0.0.21 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -1
- package/dist/index.cjs +680 -208
- package/dist/index.d.ts +9 -3
- package/dist/index.mjs +680 -209
- package/package.json +10 -4
package/dist/index.d.ts
CHANGED
|
@@ -2,17 +2,17 @@ import { ApiPromise } from '@polkadot/api';
|
|
|
2
2
|
import { SubmittableExtrinsic } from '@polkadot/api/types';
|
|
3
3
|
|
|
4
4
|
declare const NODE_NAMES: 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
|
+
declare const SUPPORTED_PALLETS: readonly ["XTokens", "OrmlXTokens", "PolkadotXcm", "RelayerXcm"];
|
|
5
6
|
|
|
6
7
|
type UpdateFunction = (name: string, index: number) => string;
|
|
7
8
|
type Extrinsic = SubmittableExtrinsic<'promise'>;
|
|
8
9
|
type ExtrinsicFunction<T> = (arg: T) => Extrinsic;
|
|
9
|
-
type TPalletType = 'xTokens' | 'polkadotXCM' | 'ormlXTokens' | 'relayerXcm';
|
|
10
10
|
type TRelayChainType = 'polkadot' | 'kusama';
|
|
11
11
|
type TNodeDetails = {
|
|
12
12
|
name: string;
|
|
13
13
|
type: TRelayChainType;
|
|
14
14
|
};
|
|
15
|
-
type TNode = typeof NODE_NAMES[number];
|
|
15
|
+
type TNode = (typeof NODE_NAMES)[number];
|
|
16
16
|
type TAssetDetails = {
|
|
17
17
|
assetId: string;
|
|
18
18
|
symbol: string;
|
|
@@ -28,6 +28,12 @@ type TNodeAssets = {
|
|
|
28
28
|
type TAssetJsonMap = Record<TNode, TNodeAssets>;
|
|
29
29
|
type TScenario = 'ParaToRelay' | 'ParaToPara' | 'RelayToPara';
|
|
30
30
|
type Bool = 'Yes' | 'No';
|
|
31
|
+
type TPallet = (typeof SUPPORTED_PALLETS)[number];
|
|
32
|
+
type TPalletMap = {
|
|
33
|
+
defaultPallet: TPallet;
|
|
34
|
+
supportedPallets: TPallet[];
|
|
35
|
+
};
|
|
36
|
+
type TPalletJsonMap = Record<TNode, TPalletMap>;
|
|
31
37
|
|
|
32
38
|
declare function send(api: ApiPromise, origin: TNode, currency: string, currencyID: number, amount: any, to: string, destination?: TNode): Extrinsic;
|
|
33
39
|
declare function transferRelayToPara(api: ApiPromise, destination: TNode, amount: any, to: string): Extrinsic | never;
|
|
@@ -268,4 +274,4 @@ declare class GeneralBuilder {
|
|
|
268
274
|
}
|
|
269
275
|
declare function Builder(api: ApiPromise): GeneralBuilder;
|
|
270
276
|
|
|
271
|
-
export { Bool, Builder, Extrinsic, ExtrinsicFunction, NODE_NAMES, TAssetDetails, TAssetJsonMap, TNativeAssetDetails, TNode, TNodeAssets, TNodeDetails,
|
|
277
|
+
export { Bool, Builder, Extrinsic, ExtrinsicFunction, NODE_NAMES, SUPPORTED_PALLETS, TAssetDetails, TAssetJsonMap, TNativeAssetDetails, TNode, TNodeAssets, TNodeDetails, TPallet, TPalletJsonMap, TPalletMap, TRelayChainType, TScenario, UpdateFunction, index as assets, index$1 as closeChannels, index$2 as openChannels, index$4 as xcmPallet, index$3 as xyk };
|