@chainflip/utils 2.1.2-beta.0 → 2.1.2-beta.1
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/chainflip.cjs +12 -0
- package/dist/chainflip.d.cts +4 -1
- package/dist/chainflip.d.mts +4 -1
- package/dist/chainflip.mjs +10 -1
- package/package.json +1 -1
package/dist/chainflip.cjs
CHANGED
|
@@ -405,6 +405,15 @@ const chainflipAssetToPriceAssetMap = {
|
|
|
405
405
|
HubDot: null,
|
|
406
406
|
Wbtc: "Btc"
|
|
407
407
|
};
|
|
408
|
+
function isChainflipAsset(asset) {
|
|
409
|
+
return chainflipAssets.includes(asset);
|
|
410
|
+
}
|
|
411
|
+
function isLegacyChainflipAsset(asset) {
|
|
412
|
+
return legacyChainflipAssets.includes(asset);
|
|
413
|
+
}
|
|
414
|
+
function isAnyChainflipAsset(asset) {
|
|
415
|
+
return isChainflipAsset(asset) || isLegacyChainflipAsset(asset);
|
|
416
|
+
}
|
|
408
417
|
|
|
409
418
|
//#endregion
|
|
410
419
|
exports.addressTypes = addressTypes;
|
|
@@ -425,6 +434,9 @@ exports.getAnyInternalAsset = getAnyInternalAsset;
|
|
|
425
434
|
exports.getInternalAsset = getInternalAsset;
|
|
426
435
|
exports.getInternalAssets = getInternalAssets;
|
|
427
436
|
exports.internalAssetToRpcAsset = internalAssetToRpcAsset;
|
|
437
|
+
exports.isAnyChainflipAsset = isAnyChainflipAsset;
|
|
438
|
+
exports.isChainflipAsset = isChainflipAsset;
|
|
439
|
+
exports.isLegacyChainflipAsset = isLegacyChainflipAsset;
|
|
428
440
|
exports.isValidAssetAndChain = isValidAssetAndChain;
|
|
429
441
|
exports.legacyAddressTypes = legacyAddressTypes;
|
|
430
442
|
exports.legacyChainflipAssets = legacyChainflipAssets;
|
package/dist/chainflip.d.cts
CHANGED
|
@@ -317,5 +317,8 @@ declare function getInternalAssets(data: {
|
|
|
317
317
|
destAsset: ChainflipAsset | null;
|
|
318
318
|
};
|
|
319
319
|
declare const chainflipAssetToPriceAssetMap: Record<ChainflipAsset, Exclude<PriceAsset, 'Usd'> | null>;
|
|
320
|
+
declare function isChainflipAsset(asset: string): asset is ChainflipAsset;
|
|
321
|
+
declare function isLegacyChainflipAsset(asset: string): asset is LegacyChainflipAsset;
|
|
322
|
+
declare function isAnyChainflipAsset(asset: string): asset is AnyChainflipAsset;
|
|
320
323
|
//#endregion
|
|
321
|
-
export { AddressType, AnyAddressType, AnyAssetAndChain, AnyAssetOfChain, AnyBaseAssetAndChain, AnyBaseChainAssetMap, AnyBaseChainflipAsset, AnyChainAssetMap, AnyChainMap, AnyChainflipAsset, AnyChainflipChain, AnyInternalAssetMap, AnyUncheckedAssetAndChain, AssetAndChain, AssetOfChain, AssetSymbol, BaseAssetAndChain, BaseChainAssetMap, BaseChainflipAsset, ChainAssetMap, ChainMap, ChainflipAsset, ChainflipChain, ChainflipEvmChain, ChainflipNetwork, InternalAssetMap, LegacyAddressType, LegacyChainflipAsset, LegacyChainflipChain, NonDeprecatedBaseChainflipAsset, PriceAsset, UncheckedAssetAndChain, addressTypes, anyAssetConstants, anyInternalAssetToRpcAsset, assetConstants, assetContractId, assetSymbols, baseChainflipAssets, chainConstants, chainContractId, chainflipAssetToPriceAssetMap, chainflipAssets, chainflipChains, chainflipEvmChains, chainflipNetworks, getAnyInternalAsset, getInternalAsset, getInternalAssets, internalAssetToRpcAsset, isValidAssetAndChain, legacyAddressTypes, legacyChainflipAssets, legacyChainflipChains, priceAssets, readAssetValue };
|
|
324
|
+
export { AddressType, AnyAddressType, AnyAssetAndChain, AnyAssetOfChain, AnyBaseAssetAndChain, AnyBaseChainAssetMap, AnyBaseChainflipAsset, AnyChainAssetMap, AnyChainMap, AnyChainflipAsset, AnyChainflipChain, AnyInternalAssetMap, AnyUncheckedAssetAndChain, AssetAndChain, AssetOfChain, AssetSymbol, BaseAssetAndChain, BaseChainAssetMap, BaseChainflipAsset, ChainAssetMap, ChainMap, ChainflipAsset, ChainflipChain, ChainflipEvmChain, ChainflipNetwork, InternalAssetMap, LegacyAddressType, LegacyChainflipAsset, LegacyChainflipChain, NonDeprecatedBaseChainflipAsset, PriceAsset, UncheckedAssetAndChain, addressTypes, anyAssetConstants, anyInternalAssetToRpcAsset, assetConstants, assetContractId, assetSymbols, baseChainflipAssets, chainConstants, chainContractId, chainflipAssetToPriceAssetMap, chainflipAssets, chainflipChains, chainflipEvmChains, chainflipNetworks, getAnyInternalAsset, getInternalAsset, getInternalAssets, internalAssetToRpcAsset, isAnyChainflipAsset, isChainflipAsset, isLegacyChainflipAsset, isValidAssetAndChain, legacyAddressTypes, legacyChainflipAssets, legacyChainflipChains, priceAssets, readAssetValue };
|
package/dist/chainflip.d.mts
CHANGED
|
@@ -317,5 +317,8 @@ declare function getInternalAssets(data: {
|
|
|
317
317
|
destAsset: ChainflipAsset | null;
|
|
318
318
|
};
|
|
319
319
|
declare const chainflipAssetToPriceAssetMap: Record<ChainflipAsset, Exclude<PriceAsset, 'Usd'> | null>;
|
|
320
|
+
declare function isChainflipAsset(asset: string): asset is ChainflipAsset;
|
|
321
|
+
declare function isLegacyChainflipAsset(asset: string): asset is LegacyChainflipAsset;
|
|
322
|
+
declare function isAnyChainflipAsset(asset: string): asset is AnyChainflipAsset;
|
|
320
323
|
//#endregion
|
|
321
|
-
export { AddressType, AnyAddressType, AnyAssetAndChain, AnyAssetOfChain, AnyBaseAssetAndChain, AnyBaseChainAssetMap, AnyBaseChainflipAsset, AnyChainAssetMap, AnyChainMap, AnyChainflipAsset, AnyChainflipChain, AnyInternalAssetMap, AnyUncheckedAssetAndChain, AssetAndChain, AssetOfChain, AssetSymbol, BaseAssetAndChain, BaseChainAssetMap, BaseChainflipAsset, ChainAssetMap, ChainMap, ChainflipAsset, ChainflipChain, ChainflipEvmChain, ChainflipNetwork, InternalAssetMap, LegacyAddressType, LegacyChainflipAsset, LegacyChainflipChain, NonDeprecatedBaseChainflipAsset, PriceAsset, UncheckedAssetAndChain, addressTypes, anyAssetConstants, anyInternalAssetToRpcAsset, assetConstants, assetContractId, assetSymbols, baseChainflipAssets, chainConstants, chainContractId, chainflipAssetToPriceAssetMap, chainflipAssets, chainflipChains, chainflipEvmChains, chainflipNetworks, getAnyInternalAsset, getInternalAsset, getInternalAssets, internalAssetToRpcAsset, isValidAssetAndChain, legacyAddressTypes, legacyChainflipAssets, legacyChainflipChains, priceAssets, readAssetValue };
|
|
324
|
+
export { AddressType, AnyAddressType, AnyAssetAndChain, AnyAssetOfChain, AnyBaseAssetAndChain, AnyBaseChainAssetMap, AnyBaseChainflipAsset, AnyChainAssetMap, AnyChainMap, AnyChainflipAsset, AnyChainflipChain, AnyInternalAssetMap, AnyUncheckedAssetAndChain, AssetAndChain, AssetOfChain, AssetSymbol, BaseAssetAndChain, BaseChainAssetMap, BaseChainflipAsset, ChainAssetMap, ChainMap, ChainflipAsset, ChainflipChain, ChainflipEvmChain, ChainflipNetwork, InternalAssetMap, LegacyAddressType, LegacyChainflipAsset, LegacyChainflipChain, NonDeprecatedBaseChainflipAsset, PriceAsset, UncheckedAssetAndChain, addressTypes, anyAssetConstants, anyInternalAssetToRpcAsset, assetConstants, assetContractId, assetSymbols, baseChainflipAssets, chainConstants, chainContractId, chainflipAssetToPriceAssetMap, chainflipAssets, chainflipChains, chainflipEvmChains, chainflipNetworks, getAnyInternalAsset, getInternalAsset, getInternalAssets, internalAssetToRpcAsset, isAnyChainflipAsset, isChainflipAsset, isLegacyChainflipAsset, isValidAssetAndChain, legacyAddressTypes, legacyChainflipAssets, legacyChainflipChains, priceAssets, readAssetValue };
|
package/dist/chainflip.mjs
CHANGED
|
@@ -403,6 +403,15 @@ const chainflipAssetToPriceAssetMap = {
|
|
|
403
403
|
HubDot: null,
|
|
404
404
|
Wbtc: "Btc"
|
|
405
405
|
};
|
|
406
|
+
function isChainflipAsset(asset) {
|
|
407
|
+
return chainflipAssets.includes(asset);
|
|
408
|
+
}
|
|
409
|
+
function isLegacyChainflipAsset(asset) {
|
|
410
|
+
return legacyChainflipAssets.includes(asset);
|
|
411
|
+
}
|
|
412
|
+
function isAnyChainflipAsset(asset) {
|
|
413
|
+
return isChainflipAsset(asset) || isLegacyChainflipAsset(asset);
|
|
414
|
+
}
|
|
406
415
|
|
|
407
416
|
//#endregion
|
|
408
|
-
export { addressTypes, anyAssetConstants, anyInternalAssetToRpcAsset, assetConstants, assetContractId, assetSymbols, baseChainflipAssets, chainConstants, chainContractId, chainflipAssetToPriceAssetMap, chainflipAssets, chainflipChains, chainflipEvmChains, chainflipNetworks, getAnyInternalAsset, getInternalAsset, getInternalAssets, internalAssetToRpcAsset, isValidAssetAndChain, legacyAddressTypes, legacyChainflipAssets, legacyChainflipChains, priceAssets, readAssetValue };
|
|
417
|
+
export { addressTypes, anyAssetConstants, anyInternalAssetToRpcAsset, assetConstants, assetContractId, assetSymbols, baseChainflipAssets, chainConstants, chainContractId, chainflipAssetToPriceAssetMap, chainflipAssets, chainflipChains, chainflipEvmChains, chainflipNetworks, getAnyInternalAsset, getInternalAsset, getInternalAssets, internalAssetToRpcAsset, isAnyChainflipAsset, isChainflipAsset, isLegacyChainflipAsset, isValidAssetAndChain, legacyAddressTypes, legacyChainflipAssets, legacyChainflipChains, priceAssets, readAssetValue };
|