@paraspell/sdk-common 10.9.0 → 10.10.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/dist/index.cjs +14 -5
- package/dist/index.d.ts +14 -9
- package/dist/index.mjs +14 -6
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -85,19 +85,27 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
85
85
|
/**
|
|
86
86
|
* Supported nodes excluding relay chains and Ethereum.
|
|
87
87
|
*/
|
|
88
|
-
var NODE_NAMES_DOT_KSM = ['AssetHubPolkadot', 'Acala', 'Ajuna', 'Astar', 'BifrostPolkadot', 'BridgeHubPolkadot', 'BridgeHubKusama', 'Centrifuge', 'ComposableFinance', 'Darwinia', 'Hydration', 'Interlay', 'Heima', 'Jamton', 'Moonbeam', 'AssetHubKusama', 'CoretimeKusama', 'CoretimePolkadot', 'Encointer', 'Altair', 'Amplitude', 'Basilisk', 'BifrostKusama', 'CrustShadow', 'Crab', 'Karura', 'Kintsugi', 'Moonriver', 'Laos', 'Quartz', 'RobonomicsKusama', 'RobonomicsPolkadot', 'PeoplePolkadot', 'PeopleKusama', 'Shiden', 'Unique', 'Crust', 'Manta', 'Nodle', 'NeuroWeb', 'Pendulum', 'Zeitgeist', 'Collectives', 'Phala', 'Subsocial', 'KiltSpiritnet', 'Curio', 'Mythos', 'Peaq', 'Polimec'
|
|
88
|
+
var NODE_NAMES_DOT_KSM = ['AssetHubPolkadot', 'Acala', 'Ajuna', 'Astar', 'BifrostPolkadot', 'BridgeHubPolkadot', 'BridgeHubKusama', 'Centrifuge', 'ComposableFinance', 'Darwinia', 'Hydration', 'Interlay', 'Heima', 'Jamton', 'Moonbeam', 'AssetHubKusama', 'CoretimeKusama', 'CoretimePolkadot', 'Encointer', 'Altair', 'Amplitude', 'Basilisk', 'BifrostKusama', 'CrustShadow', 'Crab', 'Karura', 'Kintsugi', 'Moonriver', 'Laos', 'Quartz', 'RobonomicsKusama', 'RobonomicsPolkadot', 'PeoplePolkadot', 'PeopleKusama', 'Shiden', 'Unique', 'Crust', 'Manta', 'Nodle', 'NeuroWeb', 'Pendulum', 'Zeitgeist', 'Collectives', 'Phala', 'Subsocial', 'KiltSpiritnet', 'Curio', 'Mythos', 'Peaq', 'Polimec',
|
|
89
|
+
// Westend testnet chains
|
|
90
|
+
'AssetHubWestend', 'BridgeHubWestend', 'CollectivesWestend', 'CoretimeWestend', 'PeopleWestend', 'Penpal',
|
|
91
|
+
// Paseo testnet chains
|
|
92
|
+
'AssetHubPaseo', 'BridgeHubPaseo', 'CoretimePaseo', 'PAssetHub', 'PeoplePaseo', 'AjunaPaseo', 'BifrostPaseo', 'HeimaPaseo', 'HydrationPaseo', 'KiltPaseo', 'LaosPaseo', 'NeuroWebPaseo', 'NodlePaseo', 'ZeitgeistPaseo'];
|
|
89
93
|
/**
|
|
90
94
|
* Supported nodes including Ethereum.
|
|
91
95
|
*/
|
|
92
96
|
var NODE_NAMES = [].concat(NODE_NAMES_DOT_KSM, ['Ethereum']);
|
|
97
|
+
/**
|
|
98
|
+
* Relay chains.
|
|
99
|
+
*/
|
|
100
|
+
var RELAY_CHAINS = ['Polkadot', 'Kusama', 'Westend', 'Paseo'];
|
|
93
101
|
/**
|
|
94
102
|
* Supported nodes including relay chains and Ethereum.
|
|
95
103
|
*/
|
|
96
|
-
var NODES_WITH_RELAY_CHAINS = [].concat(_toConsumableArray(NODE_NAMES),
|
|
104
|
+
var NODES_WITH_RELAY_CHAINS = [].concat(_toConsumableArray(NODE_NAMES), RELAY_CHAINS);
|
|
97
105
|
/**
|
|
98
106
|
* Supported nodes including relay chains and excluding Ethereum.
|
|
99
107
|
*/
|
|
100
|
-
var NODES_WITH_RELAY_CHAINS_DOT_KSM = [].concat(NODE_NAMES_DOT_KSM,
|
|
108
|
+
var NODES_WITH_RELAY_CHAINS_DOT_KSM = [].concat(NODE_NAMES_DOT_KSM, RELAY_CHAINS);
|
|
101
109
|
|
|
102
110
|
var isTMultiLocation = function isTMultiLocation(value) {
|
|
103
111
|
return _typeof(value) === 'object' && value !== null && 'parents' in value && 'interior' in value;
|
|
@@ -127,7 +135,7 @@ exports.Version = void 0;
|
|
|
127
135
|
* @returns True if the node is 'Polkadot' or 'Kusama'; otherwise, false.
|
|
128
136
|
*/
|
|
129
137
|
var isRelayChain = function isRelayChain(node) {
|
|
130
|
-
return node
|
|
138
|
+
return RELAY_CHAINS.includes(node);
|
|
131
139
|
};
|
|
132
140
|
/**
|
|
133
141
|
* Checks if a given node is a system chain.
|
|
@@ -136,7 +144,7 @@ var isRelayChain = function isRelayChain(node) {
|
|
|
136
144
|
* @returns True if the node is a system chain; otherwise, false.
|
|
137
145
|
*/
|
|
138
146
|
var isSystemChain = function isSystemChain(node) {
|
|
139
|
-
var systemChains = ['AssetHubPolkadot', 'AssetHubKusama', 'BridgeHubPolkadot', 'BridgeHubKusama', 'PeoplePolkadot', 'PeopleKusama', 'CoretimePolkadot', 'CoretimeKusama', 'Collectives', 'Mythos'];
|
|
147
|
+
var systemChains = ['AssetHubPolkadot', 'AssetHubKusama', 'AssetHubWestend', 'AssetHubPaseo', 'BridgeHubPolkadot', 'BridgeHubKusama', 'BridgeHubWestend', 'BridgeHubPaseo', 'PeoplePolkadot', 'PeopleKusama', 'PeopleWestend', 'PeoplePaseo', 'CoretimePolkadot', 'CoretimeKusama', 'CoretimeWestend', 'CoretimePaseo', 'Collectives', 'CollectivesWestend', 'Mythos'];
|
|
140
148
|
return systemChains.includes(node) || isRelayChain(node);
|
|
141
149
|
};
|
|
142
150
|
|
|
@@ -261,6 +269,7 @@ exports.NODES_WITH_RELAY_CHAINS = NODES_WITH_RELAY_CHAINS;
|
|
|
261
269
|
exports.NODES_WITH_RELAY_CHAINS_DOT_KSM = NODES_WITH_RELAY_CHAINS_DOT_KSM;
|
|
262
270
|
exports.NODE_NAMES = NODE_NAMES;
|
|
263
271
|
exports.NODE_NAMES_DOT_KSM = NODE_NAMES_DOT_KSM;
|
|
272
|
+
exports.RELAY_CHAINS = RELAY_CHAINS;
|
|
264
273
|
exports.deepEqual = _deepEqual;
|
|
265
274
|
exports.getJunctionValue = getJunctionValue;
|
|
266
275
|
exports.hasJunction = hasJunction;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Supported nodes excluding relay chains and Ethereum.
|
|
3
3
|
*/
|
|
4
|
-
declare const NODE_NAMES_DOT_KSM: readonly ["AssetHubPolkadot", "Acala", "Ajuna", "Astar", "BifrostPolkadot", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Heima", "Jamton", "Moonbeam", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Basilisk", "BifrostKusama", "CrustShadow", "Crab", "Karura", "Kintsugi", "Moonriver", "Laos", "Quartz", "RobonomicsKusama", "RobonomicsPolkadot", "PeoplePolkadot", "PeopleKusama", "Shiden", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Zeitgeist", "Collectives", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec"];
|
|
4
|
+
declare const NODE_NAMES_DOT_KSM: readonly ["AssetHubPolkadot", "Acala", "Ajuna", "Astar", "BifrostPolkadot", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Heima", "Jamton", "Moonbeam", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Basilisk", "BifrostKusama", "CrustShadow", "Crab", "Karura", "Kintsugi", "Moonriver", "Laos", "Quartz", "RobonomicsKusama", "RobonomicsPolkadot", "PeoplePolkadot", "PeopleKusama", "Shiden", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Zeitgeist", "Collectives", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec", "AssetHubWestend", "BridgeHubWestend", "CollectivesWestend", "CoretimeWestend", "PeopleWestend", "Penpal", "AssetHubPaseo", "BridgeHubPaseo", "CoretimePaseo", "PAssetHub", "PeoplePaseo", "AjunaPaseo", "BifrostPaseo", "HeimaPaseo", "HydrationPaseo", "KiltPaseo", "LaosPaseo", "NeuroWebPaseo", "NodlePaseo", "ZeitgeistPaseo"];
|
|
5
5
|
/**
|
|
6
6
|
* Supported nodes including Ethereum.
|
|
7
7
|
*/
|
|
8
|
-
declare const NODE_NAMES: readonly ["AssetHubPolkadot", "Acala", "Ajuna", "Astar", "BifrostPolkadot", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Heima", "Jamton", "Moonbeam", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Basilisk", "BifrostKusama", "CrustShadow", "Crab", "Karura", "Kintsugi", "Moonriver", "Laos", "Quartz", "RobonomicsKusama", "RobonomicsPolkadot", "PeoplePolkadot", "PeopleKusama", "Shiden", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Zeitgeist", "Collectives", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec", "Ethereum"];
|
|
8
|
+
declare const NODE_NAMES: readonly ["AssetHubPolkadot", "Acala", "Ajuna", "Astar", "BifrostPolkadot", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Heima", "Jamton", "Moonbeam", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Basilisk", "BifrostKusama", "CrustShadow", "Crab", "Karura", "Kintsugi", "Moonriver", "Laos", "Quartz", "RobonomicsKusama", "RobonomicsPolkadot", "PeoplePolkadot", "PeopleKusama", "Shiden", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Zeitgeist", "Collectives", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec", "AssetHubWestend", "BridgeHubWestend", "CollectivesWestend", "CoretimeWestend", "PeopleWestend", "Penpal", "AssetHubPaseo", "BridgeHubPaseo", "CoretimePaseo", "PAssetHub", "PeoplePaseo", "AjunaPaseo", "BifrostPaseo", "HeimaPaseo", "HydrationPaseo", "KiltPaseo", "LaosPaseo", "NeuroWebPaseo", "NodlePaseo", "ZeitgeistPaseo", "Ethereum"];
|
|
9
|
+
/**
|
|
10
|
+
* Relay chains.
|
|
11
|
+
*/
|
|
12
|
+
declare const RELAY_CHAINS: readonly ["Polkadot", "Kusama", "Westend", "Paseo"];
|
|
9
13
|
/**
|
|
10
14
|
* Supported nodes including relay chains and Ethereum.
|
|
11
15
|
*/
|
|
12
|
-
declare const NODES_WITH_RELAY_CHAINS: readonly ["AssetHubPolkadot", "Acala", "Ajuna", "Astar", "BifrostPolkadot", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Heima", "Jamton", "Moonbeam", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Basilisk", "BifrostKusama", "CrustShadow", "Crab", "Karura", "Kintsugi", "Moonriver", "Laos", "Quartz", "RobonomicsKusama", "RobonomicsPolkadot", "PeoplePolkadot", "PeopleKusama", "Shiden", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Zeitgeist", "Collectives", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec", "Ethereum", "Polkadot", "Kusama"];
|
|
16
|
+
declare const NODES_WITH_RELAY_CHAINS: readonly ["AssetHubPolkadot", "Acala", "Ajuna", "Astar", "BifrostPolkadot", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Heima", "Jamton", "Moonbeam", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Basilisk", "BifrostKusama", "CrustShadow", "Crab", "Karura", "Kintsugi", "Moonriver", "Laos", "Quartz", "RobonomicsKusama", "RobonomicsPolkadot", "PeoplePolkadot", "PeopleKusama", "Shiden", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Zeitgeist", "Collectives", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec", "AssetHubWestend", "BridgeHubWestend", "CollectivesWestend", "CoretimeWestend", "PeopleWestend", "Penpal", "AssetHubPaseo", "BridgeHubPaseo", "CoretimePaseo", "PAssetHub", "PeoplePaseo", "AjunaPaseo", "BifrostPaseo", "HeimaPaseo", "HydrationPaseo", "KiltPaseo", "LaosPaseo", "NeuroWebPaseo", "NodlePaseo", "ZeitgeistPaseo", "Ethereum", "Polkadot", "Kusama", "Westend", "Paseo"];
|
|
13
17
|
/**
|
|
14
18
|
* Supported nodes including relay chains and excluding Ethereum.
|
|
15
19
|
*/
|
|
16
|
-
declare const NODES_WITH_RELAY_CHAINS_DOT_KSM: readonly ["AssetHubPolkadot", "Acala", "Ajuna", "Astar", "BifrostPolkadot", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Heima", "Jamton", "Moonbeam", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Basilisk", "BifrostKusama", "CrustShadow", "Crab", "Karura", "Kintsugi", "Moonriver", "Laos", "Quartz", "RobonomicsKusama", "RobonomicsPolkadot", "PeoplePolkadot", "PeopleKusama", "Shiden", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Zeitgeist", "Collectives", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec", "Polkadot", "Kusama"];
|
|
20
|
+
declare const NODES_WITH_RELAY_CHAINS_DOT_KSM: readonly ["AssetHubPolkadot", "Acala", "Ajuna", "Astar", "BifrostPolkadot", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Heima", "Jamton", "Moonbeam", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Basilisk", "BifrostKusama", "CrustShadow", "Crab", "Karura", "Kintsugi", "Moonriver", "Laos", "Quartz", "RobonomicsKusama", "RobonomicsPolkadot", "PeoplePolkadot", "PeopleKusama", "Shiden", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Zeitgeist", "Collectives", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec", "AssetHubWestend", "BridgeHubWestend", "CollectivesWestend", "CoretimeWestend", "PeopleWestend", "Penpal", "AssetHubPaseo", "BridgeHubPaseo", "CoretimePaseo", "PAssetHub", "PeoplePaseo", "AjunaPaseo", "BifrostPaseo", "HeimaPaseo", "HydrationPaseo", "KiltPaseo", "LaosPaseo", "NeuroWebPaseo", "NodlePaseo", "ZeitgeistPaseo", "Polkadot", "Kusama", "Westend", "Paseo"];
|
|
17
21
|
|
|
18
22
|
declare enum Parents {
|
|
19
23
|
ZERO = 0,
|
|
@@ -90,12 +94,13 @@ interface TMultiLocation {
|
|
|
90
94
|
}
|
|
91
95
|
|
|
92
96
|
type TNode = (typeof NODE_NAMES)[number];
|
|
97
|
+
type TRelayChain = (typeof RELAY_CHAINS)[number];
|
|
93
98
|
type TNodePolkadotKusama = Exclude<TNode, 'Ethereum'>;
|
|
94
99
|
type TNodeWithRelayChains = (typeof NODES_WITH_RELAY_CHAINS)[number];
|
|
95
100
|
type TNodeDotKsmWithRelayChains = Exclude<TNodeWithRelayChains, 'Ethereum'>;
|
|
96
101
|
|
|
97
|
-
type TEcosystemType = 'polkadot' | 'kusama' | 'ethereum';
|
|
98
|
-
type TRelayChainSymbol = 'DOT' | 'KSM';
|
|
102
|
+
type TEcosystemType = 'polkadot' | 'kusama' | 'westend' | 'paseo' | 'ethereum';
|
|
103
|
+
type TRelayChainSymbol = 'DOT' | 'KSM' | 'WND' | 'PAS';
|
|
99
104
|
|
|
100
105
|
/**
|
|
101
106
|
* The XCM version.
|
|
@@ -114,7 +119,7 @@ declare const isTMultiLocation: (value: unknown) => value is TMultiLocation;
|
|
|
114
119
|
* @param node - The node to check.
|
|
115
120
|
* @returns True if the node is 'Polkadot' or 'Kusama'; otherwise, false.
|
|
116
121
|
*/
|
|
117
|
-
declare const isRelayChain: (node: TNodeWithRelayChains) => node is
|
|
122
|
+
declare const isRelayChain: (node: TNodeWithRelayChains) => node is TRelayChain;
|
|
118
123
|
/**
|
|
119
124
|
* Checks if a given node is a system chain.
|
|
120
125
|
*
|
|
@@ -133,5 +138,5 @@ declare const hasJunction: (multiLocation: TMultiLocation, junctionType: TJuncti
|
|
|
133
138
|
|
|
134
139
|
declare const replaceBigInt: (_key: string, value: unknown) => unknown;
|
|
135
140
|
|
|
136
|
-
export { NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Parents, Version, deepEqual, getJunctionValue, hasJunction, isDotKsmBridge, isPrimitive, isRelayChain, isSystemChain, isTMultiLocation, replaceBigInt };
|
|
137
|
-
export type { TEcosystemType, TJunction, TJunctionGeneralIndex, TJunctionParachain, TJunctionType, TJunctions, TMultiLocation, TNode, TNodeDotKsmWithRelayChains, TNodePolkadotKusama, TNodeWithRelayChains, TRelayChainSymbol };
|
|
141
|
+
export { NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Parents, RELAY_CHAINS, Version, deepEqual, getJunctionValue, hasJunction, isDotKsmBridge, isPrimitive, isRelayChain, isSystemChain, isTMultiLocation, replaceBigInt };
|
|
142
|
+
export type { TEcosystemType, TJunction, TJunctionGeneralIndex, TJunctionParachain, TJunctionType, TJunctions, TMultiLocation, TNode, TNodeDotKsmWithRelayChains, TNodePolkadotKusama, TNodeWithRelayChains, TRelayChain, TRelayChainSymbol };
|
package/dist/index.mjs
CHANGED
|
@@ -83,19 +83,27 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
83
83
|
/**
|
|
84
84
|
* Supported nodes excluding relay chains and Ethereum.
|
|
85
85
|
*/
|
|
86
|
-
var NODE_NAMES_DOT_KSM = ['AssetHubPolkadot', 'Acala', 'Ajuna', 'Astar', 'BifrostPolkadot', 'BridgeHubPolkadot', 'BridgeHubKusama', 'Centrifuge', 'ComposableFinance', 'Darwinia', 'Hydration', 'Interlay', 'Heima', 'Jamton', 'Moonbeam', 'AssetHubKusama', 'CoretimeKusama', 'CoretimePolkadot', 'Encointer', 'Altair', 'Amplitude', 'Basilisk', 'BifrostKusama', 'CrustShadow', 'Crab', 'Karura', 'Kintsugi', 'Moonriver', 'Laos', 'Quartz', 'RobonomicsKusama', 'RobonomicsPolkadot', 'PeoplePolkadot', 'PeopleKusama', 'Shiden', 'Unique', 'Crust', 'Manta', 'Nodle', 'NeuroWeb', 'Pendulum', 'Zeitgeist', 'Collectives', 'Phala', 'Subsocial', 'KiltSpiritnet', 'Curio', 'Mythos', 'Peaq', 'Polimec'
|
|
86
|
+
var NODE_NAMES_DOT_KSM = ['AssetHubPolkadot', 'Acala', 'Ajuna', 'Astar', 'BifrostPolkadot', 'BridgeHubPolkadot', 'BridgeHubKusama', 'Centrifuge', 'ComposableFinance', 'Darwinia', 'Hydration', 'Interlay', 'Heima', 'Jamton', 'Moonbeam', 'AssetHubKusama', 'CoretimeKusama', 'CoretimePolkadot', 'Encointer', 'Altair', 'Amplitude', 'Basilisk', 'BifrostKusama', 'CrustShadow', 'Crab', 'Karura', 'Kintsugi', 'Moonriver', 'Laos', 'Quartz', 'RobonomicsKusama', 'RobonomicsPolkadot', 'PeoplePolkadot', 'PeopleKusama', 'Shiden', 'Unique', 'Crust', 'Manta', 'Nodle', 'NeuroWeb', 'Pendulum', 'Zeitgeist', 'Collectives', 'Phala', 'Subsocial', 'KiltSpiritnet', 'Curio', 'Mythos', 'Peaq', 'Polimec',
|
|
87
|
+
// Westend testnet chains
|
|
88
|
+
'AssetHubWestend', 'BridgeHubWestend', 'CollectivesWestend', 'CoretimeWestend', 'PeopleWestend', 'Penpal',
|
|
89
|
+
// Paseo testnet chains
|
|
90
|
+
'AssetHubPaseo', 'BridgeHubPaseo', 'CoretimePaseo', 'PAssetHub', 'PeoplePaseo', 'AjunaPaseo', 'BifrostPaseo', 'HeimaPaseo', 'HydrationPaseo', 'KiltPaseo', 'LaosPaseo', 'NeuroWebPaseo', 'NodlePaseo', 'ZeitgeistPaseo'];
|
|
87
91
|
/**
|
|
88
92
|
* Supported nodes including Ethereum.
|
|
89
93
|
*/
|
|
90
94
|
var NODE_NAMES = [].concat(NODE_NAMES_DOT_KSM, ['Ethereum']);
|
|
95
|
+
/**
|
|
96
|
+
* Relay chains.
|
|
97
|
+
*/
|
|
98
|
+
var RELAY_CHAINS = ['Polkadot', 'Kusama', 'Westend', 'Paseo'];
|
|
91
99
|
/**
|
|
92
100
|
* Supported nodes including relay chains and Ethereum.
|
|
93
101
|
*/
|
|
94
|
-
var NODES_WITH_RELAY_CHAINS = [].concat(_toConsumableArray(NODE_NAMES),
|
|
102
|
+
var NODES_WITH_RELAY_CHAINS = [].concat(_toConsumableArray(NODE_NAMES), RELAY_CHAINS);
|
|
95
103
|
/**
|
|
96
104
|
* Supported nodes including relay chains and excluding Ethereum.
|
|
97
105
|
*/
|
|
98
|
-
var NODES_WITH_RELAY_CHAINS_DOT_KSM = [].concat(NODE_NAMES_DOT_KSM,
|
|
106
|
+
var NODES_WITH_RELAY_CHAINS_DOT_KSM = [].concat(NODE_NAMES_DOT_KSM, RELAY_CHAINS);
|
|
99
107
|
|
|
100
108
|
var isTMultiLocation = function isTMultiLocation(value) {
|
|
101
109
|
return _typeof(value) === 'object' && value !== null && 'parents' in value && 'interior' in value;
|
|
@@ -125,7 +133,7 @@ var Version;
|
|
|
125
133
|
* @returns True if the node is 'Polkadot' or 'Kusama'; otherwise, false.
|
|
126
134
|
*/
|
|
127
135
|
var isRelayChain = function isRelayChain(node) {
|
|
128
|
-
return node
|
|
136
|
+
return RELAY_CHAINS.includes(node);
|
|
129
137
|
};
|
|
130
138
|
/**
|
|
131
139
|
* Checks if a given node is a system chain.
|
|
@@ -134,7 +142,7 @@ var isRelayChain = function isRelayChain(node) {
|
|
|
134
142
|
* @returns True if the node is a system chain; otherwise, false.
|
|
135
143
|
*/
|
|
136
144
|
var isSystemChain = function isSystemChain(node) {
|
|
137
|
-
var systemChains = ['AssetHubPolkadot', 'AssetHubKusama', 'BridgeHubPolkadot', 'BridgeHubKusama', 'PeoplePolkadot', 'PeopleKusama', 'CoretimePolkadot', 'CoretimeKusama', 'Collectives', 'Mythos'];
|
|
145
|
+
var systemChains = ['AssetHubPolkadot', 'AssetHubKusama', 'AssetHubWestend', 'AssetHubPaseo', 'BridgeHubPolkadot', 'BridgeHubKusama', 'BridgeHubWestend', 'BridgeHubPaseo', 'PeoplePolkadot', 'PeopleKusama', 'PeopleWestend', 'PeoplePaseo', 'CoretimePolkadot', 'CoretimeKusama', 'CoretimeWestend', 'CoretimePaseo', 'Collectives', 'CollectivesWestend', 'Mythos'];
|
|
138
146
|
return systemChains.includes(node) || isRelayChain(node);
|
|
139
147
|
};
|
|
140
148
|
|
|
@@ -255,4 +263,4 @@ var replaceBigInt = function replaceBigInt(_key, value) {
|
|
|
255
263
|
return typeof value === 'bigint' ? value.toString() : value;
|
|
256
264
|
};
|
|
257
265
|
|
|
258
|
-
export { NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Parents, Version, _deepEqual as deepEqual, getJunctionValue, hasJunction, isDotKsmBridge, isPrimitive, isRelayChain, isSystemChain, isTMultiLocation, replaceBigInt };
|
|
266
|
+
export { NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Parents, RELAY_CHAINS, Version, _deepEqual as deepEqual, getJunctionValue, hasJunction, isDotKsmBridge, isPrimitive, isRelayChain, isSystemChain, isTMultiLocation, replaceBigInt };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk-common",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.10.0",
|
|
4
4
|
"description": "SDK common code for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"@babel/plugin-syntax-import-attributes": "^7.27.1",
|
|
28
28
|
"@babel/preset-env": "^7.27.2",
|
|
29
29
|
"@codecov/rollup-plugin": "^1.9.1",
|
|
30
|
-
"@polkadot/api": "^16.
|
|
31
|
-
"@polkadot/types": "^16.
|
|
30
|
+
"@polkadot/api": "^16.3.1",
|
|
31
|
+
"@polkadot/types": "^16.3.1",
|
|
32
32
|
"@rollup/plugin-babel": "^6.0.4",
|
|
33
33
|
"@rollup/plugin-json": "^6.1.0",
|
|
34
34
|
"@rollup/plugin-typescript": "^12.1.2",
|