@paraspell/sdk-common 11.3.1 → 11.4.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 +12 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.mjs +12 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -141,6 +141,15 @@ exports.Version = void 0;
|
|
|
141
141
|
var isRelayChain = function isRelayChain(chain) {
|
|
142
142
|
return RELAYCHAINS.includes(chain);
|
|
143
143
|
};
|
|
144
|
+
/**
|
|
145
|
+
* Determines whether a given chain is an external chain.
|
|
146
|
+
*
|
|
147
|
+
* @param chain - The chain to check.
|
|
148
|
+
* @returns True if the chain is an external chain; otherwise, false.
|
|
149
|
+
*/
|
|
150
|
+
var isExternalChain = function isExternalChain(chain) {
|
|
151
|
+
return EXTERNAL_CHAINS.includes(chain);
|
|
152
|
+
};
|
|
144
153
|
/**
|
|
145
154
|
* Checks if a given chain is a system chain.
|
|
146
155
|
*
|
|
@@ -152,8 +161,9 @@ var isSystemChain = function isSystemChain(chain) {
|
|
|
152
161
|
return systemChains.includes(chain) || isRelayChain(chain);
|
|
153
162
|
};
|
|
154
163
|
var isTrustedChain = function isTrustedChain(chain) {
|
|
164
|
+
var trusted = ['Mythos', 'Encointer'];
|
|
155
165
|
var isTrustedByAh = function isTrustedByAh(chain) {
|
|
156
|
-
return
|
|
166
|
+
return trusted.includes(chain);
|
|
157
167
|
};
|
|
158
168
|
return isTrustedByAh(chain) || isSystemChain(chain);
|
|
159
169
|
};
|
|
@@ -284,6 +294,7 @@ exports.deepEqual = _deepEqual;
|
|
|
284
294
|
exports.getJunctionValue = getJunctionValue;
|
|
285
295
|
exports.hasJunction = hasJunction;
|
|
286
296
|
exports.isDotKsmBridge = isDotKsmBridge;
|
|
297
|
+
exports.isExternalChain = isExternalChain;
|
|
287
298
|
exports.isPrimitive = isPrimitive;
|
|
288
299
|
exports.isRelayChain = isRelayChain;
|
|
289
300
|
exports.isSystemChain = isSystemChain;
|
package/dist/index.d.ts
CHANGED
|
@@ -125,6 +125,13 @@ declare const isTLocation: (value: unknown) => value is TLocation;
|
|
|
125
125
|
* @returns True if the chain is a relaychain; otherwise, false.
|
|
126
126
|
*/
|
|
127
127
|
declare const isRelayChain: (chain: TChain) => chain is TRelaychain;
|
|
128
|
+
/**
|
|
129
|
+
* Determines whether a given chain is an external chain.
|
|
130
|
+
*
|
|
131
|
+
* @param chain - The chain to check.
|
|
132
|
+
* @returns True if the chain is an external chain; otherwise, false.
|
|
133
|
+
*/
|
|
134
|
+
declare const isExternalChain: (chain: TChain) => chain is TExternalChain;
|
|
128
135
|
/**
|
|
129
136
|
* Checks if a given chain is a system chain.
|
|
130
137
|
*
|
|
@@ -144,5 +151,5 @@ declare const hasJunction: (location: TLocation, junctionType: TJunctionType, ju
|
|
|
144
151
|
|
|
145
152
|
declare const replaceBigInt: (_key: string, value: unknown) => unknown;
|
|
146
153
|
|
|
147
|
-
export { CHAINS, EXTERNAL_CHAINS, PARACHAINS, Parents, RELAYCHAINS, SUBSTRATE_CHAINS, Version, deepEqual, getJunctionValue, hasJunction, isDotKsmBridge, isPrimitive, isRelayChain, isSystemChain, isTLocation, isTrustedChain, replaceBigInt };
|
|
154
|
+
export { CHAINS, EXTERNAL_CHAINS, PARACHAINS, Parents, RELAYCHAINS, SUBSTRATE_CHAINS, Version, deepEqual, getJunctionValue, hasJunction, isDotKsmBridge, isExternalChain, isPrimitive, isRelayChain, isSystemChain, isTLocation, isTrustedChain, replaceBigInt };
|
|
148
155
|
export type { TChain, TExternalChain, TJunction, TJunctionGeneralIndex, TJunctionParachain, TJunctionType, TJunctions, TLocation, TNode, TNodeDotKsmWithRelayChains, TNodePolkadotKusama, TNodeWithRelayChains, TParachain, TRelaychain, TSubstrateChain };
|
package/dist/index.mjs
CHANGED
|
@@ -139,6 +139,15 @@ var Version;
|
|
|
139
139
|
var isRelayChain = function isRelayChain(chain) {
|
|
140
140
|
return RELAYCHAINS.includes(chain);
|
|
141
141
|
};
|
|
142
|
+
/**
|
|
143
|
+
* Determines whether a given chain is an external chain.
|
|
144
|
+
*
|
|
145
|
+
* @param chain - The chain to check.
|
|
146
|
+
* @returns True if the chain is an external chain; otherwise, false.
|
|
147
|
+
*/
|
|
148
|
+
var isExternalChain = function isExternalChain(chain) {
|
|
149
|
+
return EXTERNAL_CHAINS.includes(chain);
|
|
150
|
+
};
|
|
142
151
|
/**
|
|
143
152
|
* Checks if a given chain is a system chain.
|
|
144
153
|
*
|
|
@@ -150,8 +159,9 @@ var isSystemChain = function isSystemChain(chain) {
|
|
|
150
159
|
return systemChains.includes(chain) || isRelayChain(chain);
|
|
151
160
|
};
|
|
152
161
|
var isTrustedChain = function isTrustedChain(chain) {
|
|
162
|
+
var trusted = ['Mythos', 'Encointer'];
|
|
153
163
|
var isTrustedByAh = function isTrustedByAh(chain) {
|
|
154
|
-
return
|
|
164
|
+
return trusted.includes(chain);
|
|
155
165
|
};
|
|
156
166
|
return isTrustedByAh(chain) || isSystemChain(chain);
|
|
157
167
|
};
|
|
@@ -273,4 +283,4 @@ var replaceBigInt = function replaceBigInt(_key, value) {
|
|
|
273
283
|
return typeof value === 'bigint' ? value.toString() : value;
|
|
274
284
|
};
|
|
275
285
|
|
|
276
|
-
export { CHAINS, EXTERNAL_CHAINS, PARACHAINS, Parents, RELAYCHAINS, SUBSTRATE_CHAINS, Version, _deepEqual as deepEqual, getJunctionValue, hasJunction, isDotKsmBridge, isPrimitive, isRelayChain, isSystemChain, isTLocation, isTrustedChain, replaceBigInt };
|
|
286
|
+
export { CHAINS, EXTERNAL_CHAINS, PARACHAINS, Parents, RELAYCHAINS, SUBSTRATE_CHAINS, Version, _deepEqual as deepEqual, getJunctionValue, hasJunction, isDotKsmBridge, isExternalChain, isPrimitive, isRelayChain, isSystemChain, isTLocation, isTrustedChain, replaceBigInt };
|