@paraspell/sdk-common 8.9.6 → 8.9.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 +11 -0
- package/dist/index.d.ts +9 -1
- package/dist/index.mjs +11 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -163,6 +163,16 @@ var _deepEqual = function deepEqual(obj1, obj2) {
|
|
|
163
163
|
return true;
|
|
164
164
|
};
|
|
165
165
|
|
|
166
|
+
/**
|
|
167
|
+
* Determines whether a given node is a relay chain (Polkadot or Kusama).
|
|
168
|
+
*
|
|
169
|
+
* @param node - The node to check.
|
|
170
|
+
* @returns True if the node is 'Polkadot' or 'Kusama'; otherwise, false.
|
|
171
|
+
*/
|
|
172
|
+
var isRelayChain = function isRelayChain(node) {
|
|
173
|
+
return node === 'Polkadot' || node === 'Kusama';
|
|
174
|
+
};
|
|
175
|
+
|
|
166
176
|
var flattenJunctions = function flattenJunctions(junctions) {
|
|
167
177
|
if (junctions.Here !== undefined) {
|
|
168
178
|
return [];
|
|
@@ -218,4 +228,5 @@ exports.NODE_NAMES_DOT_KSM = NODE_NAMES_DOT_KSM;
|
|
|
218
228
|
exports.deepEqual = _deepEqual;
|
|
219
229
|
exports.hasJunction = hasJunction;
|
|
220
230
|
exports.isPrimitive = isPrimitive;
|
|
231
|
+
exports.isRelayChain = isRelayChain;
|
|
221
232
|
exports.isTMultiLocation = isTMultiLocation;
|
package/dist/index.d.ts
CHANGED
|
@@ -102,7 +102,15 @@ declare const isTMultiLocation: (value: unknown) => value is TMultiLocation;
|
|
|
102
102
|
declare const isPrimitive: (obj: unknown) => boolean;
|
|
103
103
|
declare const deepEqual: (obj1: unknown, obj2: unknown) => boolean;
|
|
104
104
|
|
|
105
|
+
/**
|
|
106
|
+
* Determines whether a given node is a relay chain (Polkadot or Kusama).
|
|
107
|
+
*
|
|
108
|
+
* @param node - The node to check.
|
|
109
|
+
* @returns True if the node is 'Polkadot' or 'Kusama'; otherwise, false.
|
|
110
|
+
*/
|
|
111
|
+
declare const isRelayChain: (node: TNodeWithRelayChains) => node is "Polkadot" | "Kusama";
|
|
112
|
+
|
|
105
113
|
declare const hasJunction: (multiLocation: TMultiLocation, junctionType: TJunctionType, junctionValue?: unknown) => boolean;
|
|
106
114
|
|
|
107
|
-
export { NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Parents, deepEqual, hasJunction, isPrimitive, isTMultiLocation };
|
|
115
|
+
export { NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Parents, deepEqual, hasJunction, isPrimitive, isRelayChain, isTMultiLocation };
|
|
108
116
|
export type { TEcosystemType, TJunction, TJunctionGeneralIndex, TJunctionParachain, TJunctionType, TJunctions, TMultiLocation, TNode, TNodeDotKsmWithRelayChains, TNodePolkadotKusama, TNodeWithRelayChains, TRelayChainSymbol };
|
package/dist/index.mjs
CHANGED
|
@@ -161,6 +161,16 @@ var _deepEqual = function deepEqual(obj1, obj2) {
|
|
|
161
161
|
return true;
|
|
162
162
|
};
|
|
163
163
|
|
|
164
|
+
/**
|
|
165
|
+
* Determines whether a given node is a relay chain (Polkadot or Kusama).
|
|
166
|
+
*
|
|
167
|
+
* @param node - The node to check.
|
|
168
|
+
* @returns True if the node is 'Polkadot' or 'Kusama'; otherwise, false.
|
|
169
|
+
*/
|
|
170
|
+
var isRelayChain = function isRelayChain(node) {
|
|
171
|
+
return node === 'Polkadot' || node === 'Kusama';
|
|
172
|
+
};
|
|
173
|
+
|
|
164
174
|
var flattenJunctions = function flattenJunctions(junctions) {
|
|
165
175
|
if (junctions.Here !== undefined) {
|
|
166
176
|
return [];
|
|
@@ -209,4 +219,4 @@ var hasJunction = function hasJunction(multiLocation, junctionType, junctionValu
|
|
|
209
219
|
});
|
|
210
220
|
};
|
|
211
221
|
|
|
212
|
-
export { NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Parents, _deepEqual as deepEqual, hasJunction, isPrimitive, isTMultiLocation };
|
|
222
|
+
export { NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Parents, _deepEqual as deepEqual, hasJunction, isPrimitive, isRelayChain, isTMultiLocation };
|