@paraspell/pallets 10.11.10 → 11.0.0
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 +3 -3
- package/dist/index.cjs +16 -16
- package/dist/index.d.ts +12 -12
- package/dist/index.mjs +16 -16
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -45,21 +45,21 @@ import { getDefaultPallet, getSupportedPallets, getPalletIndex, SUPPORTED_PALLET
|
|
|
45
45
|
|
|
46
46
|
The function returns the default XCM pallet for selected compatible Parachain.
|
|
47
47
|
```ts
|
|
48
|
-
getDefaultPallet(
|
|
48
|
+
getDefaultPallet(chain: TChain)
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
### Get all supported XCM pallets
|
|
52
52
|
|
|
53
53
|
The function returns all supported XCM pallets for selected compatible Parachain.
|
|
54
54
|
```ts
|
|
55
|
-
getSupportedPallets(
|
|
55
|
+
getSupportedPallets(chain: TChain)
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
### Get index of XCM Pallet
|
|
59
59
|
|
|
60
60
|
The function returns all index of XCM Pallet for selected Parachain.
|
|
61
61
|
```ts
|
|
62
|
-
getPalletIndex(
|
|
62
|
+
getPalletIndex(chain: TChain)
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
### Print all supported XCM pallets
|
package/dist/index.cjs
CHANGED
|
@@ -1010,33 +1010,33 @@ var palletsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
1010
1010
|
// Script that pulls XCM Pallets for selected Parachain
|
|
1011
1011
|
var palletsMap = palletsMapJson;
|
|
1012
1012
|
/**
|
|
1013
|
-
* Retrieves the default pallet for a specified
|
|
1013
|
+
* Retrieves the default pallet for a specified chain.
|
|
1014
1014
|
*
|
|
1015
|
-
* @param
|
|
1016
|
-
* @returns The default pallet associated with the
|
|
1015
|
+
* @param chain - The chain for which to get the default pallet.
|
|
1016
|
+
* @returns The default pallet associated with the chain.
|
|
1017
1017
|
*/
|
|
1018
|
-
var getDefaultPallet = function getDefaultPallet(
|
|
1019
|
-
return palletsMap[
|
|
1018
|
+
var getDefaultPallet = function getDefaultPallet(chain) {
|
|
1019
|
+
return palletsMap[chain].defaultPallet;
|
|
1020
1020
|
};
|
|
1021
1021
|
/**
|
|
1022
|
-
* Retrieves the list of supported pallets for a specified
|
|
1022
|
+
* Retrieves the list of supported pallets for a specified chain.
|
|
1023
1023
|
*
|
|
1024
|
-
* @param
|
|
1025
|
-
* @returns An array of pallets supported by the
|
|
1024
|
+
* @param chain - The chain for which to get supported pallets.
|
|
1025
|
+
* @returns An array of pallets supported by the chain.
|
|
1026
1026
|
*/
|
|
1027
|
-
var getSupportedPallets = function getSupportedPallets(
|
|
1028
|
-
return palletsMap[
|
|
1027
|
+
var getSupportedPallets = function getSupportedPallets(chain) {
|
|
1028
|
+
return palletsMap[chain].supportedPallets.map(function (pallet) {
|
|
1029
1029
|
return pallet.name;
|
|
1030
1030
|
});
|
|
1031
1031
|
};
|
|
1032
|
-
var getSupportedPalletsDetails = function getSupportedPalletsDetails(
|
|
1033
|
-
return palletsMap[
|
|
1032
|
+
var getSupportedPalletsDetails = function getSupportedPalletsDetails(chain) {
|
|
1033
|
+
return palletsMap[chain].supportedPallets;
|
|
1034
1034
|
};
|
|
1035
|
-
var getPalletIndex = function getPalletIndex(
|
|
1036
|
-
var _palletsMap$
|
|
1037
|
-
return (_palletsMap$
|
|
1035
|
+
var getPalletIndex = function getPalletIndex(chain, pallet) {
|
|
1036
|
+
var _palletsMap$chain$sup;
|
|
1037
|
+
return (_palletsMap$chain$sup = palletsMap[chain].supportedPallets.find(function (p) {
|
|
1038
1038
|
return p.name === pallet;
|
|
1039
|
-
})) === null || _palletsMap$
|
|
1039
|
+
})) === null || _palletsMap$chain$sup === void 0 ? void 0 : _palletsMap$chain$sup.index;
|
|
1040
1040
|
};
|
|
1041
1041
|
|
|
1042
1042
|
exports.SUPPORTED_PALLETS = SUPPORTED_PALLETS;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TSubstrateChain } from '@paraspell/sdk-common';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Supported XCM pallets.
|
|
@@ -14,24 +14,24 @@ interface TPalletMap {
|
|
|
14
14
|
defaultPallet: TPallet;
|
|
15
15
|
supportedPallets: TPalletDetails[];
|
|
16
16
|
}
|
|
17
|
-
type TPalletJsonMap = Record<
|
|
17
|
+
type TPalletJsonMap = Record<TSubstrateChain, TPalletMap>;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* Retrieves the default pallet for a specified
|
|
20
|
+
* Retrieves the default pallet for a specified chain.
|
|
21
21
|
*
|
|
22
|
-
* @param
|
|
23
|
-
* @returns The default pallet associated with the
|
|
22
|
+
* @param chain - The chain for which to get the default pallet.
|
|
23
|
+
* @returns The default pallet associated with the chain.
|
|
24
24
|
*/
|
|
25
|
-
declare const getDefaultPallet: (
|
|
25
|
+
declare const getDefaultPallet: (chain: TSubstrateChain) => TPallet;
|
|
26
26
|
/**
|
|
27
|
-
* Retrieves the list of supported pallets for a specified
|
|
27
|
+
* Retrieves the list of supported pallets for a specified chain.
|
|
28
28
|
*
|
|
29
|
-
* @param
|
|
30
|
-
* @returns An array of pallets supported by the
|
|
29
|
+
* @param chain - The chain for which to get supported pallets.
|
|
30
|
+
* @returns An array of pallets supported by the chain.
|
|
31
31
|
*/
|
|
32
|
-
declare const getSupportedPallets: (
|
|
33
|
-
declare const getSupportedPalletsDetails: (
|
|
34
|
-
declare const getPalletIndex: (
|
|
32
|
+
declare const getSupportedPallets: (chain: TSubstrateChain) => TPallet[];
|
|
33
|
+
declare const getSupportedPalletsDetails: (chain: TSubstrateChain) => TPalletDetails[];
|
|
34
|
+
declare const getPalletIndex: (chain: TSubstrateChain, pallet: TPallet) => number | undefined;
|
|
35
35
|
|
|
36
36
|
export { SUPPORTED_PALLETS, getDefaultPallet, getPalletIndex, getSupportedPallets, getSupportedPalletsDetails };
|
|
37
37
|
export type { TPallet, TPalletDetails, TPalletJsonMap, TPalletMap };
|
package/dist/index.mjs
CHANGED
|
@@ -1008,33 +1008,33 @@ var palletsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
1008
1008
|
// Script that pulls XCM Pallets for selected Parachain
|
|
1009
1009
|
var palletsMap = palletsMapJson;
|
|
1010
1010
|
/**
|
|
1011
|
-
* Retrieves the default pallet for a specified
|
|
1011
|
+
* Retrieves the default pallet for a specified chain.
|
|
1012
1012
|
*
|
|
1013
|
-
* @param
|
|
1014
|
-
* @returns The default pallet associated with the
|
|
1013
|
+
* @param chain - The chain for which to get the default pallet.
|
|
1014
|
+
* @returns The default pallet associated with the chain.
|
|
1015
1015
|
*/
|
|
1016
|
-
var getDefaultPallet = function getDefaultPallet(
|
|
1017
|
-
return palletsMap[
|
|
1016
|
+
var getDefaultPallet = function getDefaultPallet(chain) {
|
|
1017
|
+
return palletsMap[chain].defaultPallet;
|
|
1018
1018
|
};
|
|
1019
1019
|
/**
|
|
1020
|
-
* Retrieves the list of supported pallets for a specified
|
|
1020
|
+
* Retrieves the list of supported pallets for a specified chain.
|
|
1021
1021
|
*
|
|
1022
|
-
* @param
|
|
1023
|
-
* @returns An array of pallets supported by the
|
|
1022
|
+
* @param chain - The chain for which to get supported pallets.
|
|
1023
|
+
* @returns An array of pallets supported by the chain.
|
|
1024
1024
|
*/
|
|
1025
|
-
var getSupportedPallets = function getSupportedPallets(
|
|
1026
|
-
return palletsMap[
|
|
1025
|
+
var getSupportedPallets = function getSupportedPallets(chain) {
|
|
1026
|
+
return palletsMap[chain].supportedPallets.map(function (pallet) {
|
|
1027
1027
|
return pallet.name;
|
|
1028
1028
|
});
|
|
1029
1029
|
};
|
|
1030
|
-
var getSupportedPalletsDetails = function getSupportedPalletsDetails(
|
|
1031
|
-
return palletsMap[
|
|
1030
|
+
var getSupportedPalletsDetails = function getSupportedPalletsDetails(chain) {
|
|
1031
|
+
return palletsMap[chain].supportedPallets;
|
|
1032
1032
|
};
|
|
1033
|
-
var getPalletIndex = function getPalletIndex(
|
|
1034
|
-
var _palletsMap$
|
|
1035
|
-
return (_palletsMap$
|
|
1033
|
+
var getPalletIndex = function getPalletIndex(chain, pallet) {
|
|
1034
|
+
var _palletsMap$chain$sup;
|
|
1035
|
+
return (_palletsMap$chain$sup = palletsMap[chain].supportedPallets.find(function (p) {
|
|
1036
1036
|
return p.name === pallet;
|
|
1037
|
-
})) === null || _palletsMap$
|
|
1037
|
+
})) === null || _palletsMap$chain$sup === void 0 ? void 0 : _palletsMap$chain$sup.index;
|
|
1038
1038
|
};
|
|
1039
1039
|
|
|
1040
1040
|
export { SUPPORTED_PALLETS, getDefaultPallet, getPalletIndex, getSupportedPallets, getSupportedPalletsDetails };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/pallets",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"description": "Pallets for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@paraspell/sdk-common": "
|
|
26
|
+
"@paraspell/sdk-common": "11.0.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/plugin-syntax-import-attributes": "^7.27.1",
|