@paraspell/assets 10.5.1 → 10.6.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 CHANGED
@@ -11640,6 +11640,31 @@ var Ethereum = {
11640
11640
  ]
11641
11641
  }
11642
11642
  }
11643
+ },
11644
+ {
11645
+ symbol: "MYTH",
11646
+ assetId: "0xba41ddf06b7ffd89d1267b5a93bfef2424eb2003",
11647
+ existentialDeposit: "1",
11648
+ multiLocation: {
11649
+ parents: 2,
11650
+ interior: {
11651
+ X2: [
11652
+ {
11653
+ GlobalConsensus: {
11654
+ Ethereum: {
11655
+ chainId: 1
11656
+ }
11657
+ }
11658
+ },
11659
+ {
11660
+ AccountKey20: {
11661
+ network: null,
11662
+ key: "0xba41ddf06b7ffd89d1267b5a93bfef2424eb2003"
11663
+ }
11664
+ }
11665
+ ]
11666
+ }
11667
+ }
11643
11668
  }
11644
11669
  ]
11645
11670
  };
@@ -12473,6 +12498,10 @@ var normalizeSymbol = function normalizeSymbol(symbol) {
12473
12498
  return lowerSymbol.startsWith('xc') ? lowerSymbol.substring(2) : lowerSymbol;
12474
12499
  };
12475
12500
 
12501
+ var isSymbolMatch = function isSymbolMatch(symbolA, symbolB) {
12502
+ return normalizeSymbol(symbolA) === normalizeSymbol(symbolB);
12503
+ };
12504
+
12476
12505
  /**
12477
12506
  * Retrieves the list of assets that are supported for transfers between two specified nodes.
12478
12507
  *
@@ -12490,6 +12519,11 @@ var getSupportedAssets = function getSupportedAssets(origin, destination) {
12490
12519
  if (origin === 'Moonbeam') {
12491
12520
  return ethereumCompatibleAssets;
12492
12521
  }
12522
+ if (origin === 'Mythos') {
12523
+ return ethereumAssets.filter(function (asset) {
12524
+ return isSymbolMatch(asset.symbol, getNativeAssetSymbol(origin));
12525
+ });
12526
+ }
12493
12527
  return [].concat(_toConsumableArray(ethereumCompatibleAssets), _toConsumableArray(ethereumAssets));
12494
12528
  }
12495
12529
  if (origin === 'AssetHubPolkadot' && destination === 'AssetHubKusama' || origin === 'AssetHubKusama' && destination === 'AssetHubPolkadot') {
@@ -12600,6 +12634,7 @@ exports.isAssetEqual = isAssetEqual;
12600
12634
  exports.isForeignAsset = isForeignAsset;
12601
12635
  exports.isNodeEvm = isNodeEvm;
12602
12636
  exports.isOverrideMultiLocationSpecifier = isOverrideMultiLocationSpecifier;
12637
+ exports.isSymbolMatch = isSymbolMatch;
12603
12638
  exports.isSymbolSpecifier = isSymbolSpecifier;
12604
12639
  exports.isTMultiAsset = isTMultiAsset;
12605
12640
  exports.normalizeMultiLocation = normalizeMultiLocation;
package/dist/index.d.ts CHANGED
@@ -20,6 +20,9 @@ type TForeignAsset = TBaseAsset & AtLeastOne<{
20
20
  multiLocation?: TMultiLocation;
21
21
  }>;
22
22
  type TAsset = TNativeAsset | TForeignAsset;
23
+ type TAssetWithLocation = TAsset & {
24
+ multiLocation: TMultiLocation;
25
+ };
23
26
  type TNodeAssets = {
24
27
  relayChainAssetSymbol: TRelayChainSymbol;
25
28
  nativeAssetSymbol: string;
@@ -198,6 +201,8 @@ declare const getSupportedDestinations: (origin: TNodeWithRelayChains, currency:
198
201
 
199
202
  declare const isAssetEqual: (asset1: TAsset, asset2: TAsset) => boolean;
200
203
 
204
+ declare const isSymbolMatch: (symbolA: string, symbolB: string) => boolean;
205
+
201
206
  /**
202
207
  * Converts a multi-location to a specific XCM version . Defaults to XCM v4.
203
208
  *
@@ -285,5 +290,5 @@ declare const extractMultiAssetLoc: (multiAsset: TMultiAsset) => TMultiLocation;
285
290
 
286
291
  declare const getAssetMultiLocation: (node: TNodeWithRelayChains, currency: TCurrencyInput) => TMultiLocation | null;
287
292
 
288
- export { DuplicateAssetError, DuplicateAssetIdError, Foreign, ForeignAbstract, InvalidCurrencyError, Native, Override, compareMultiLocations, extractMultiAssetLoc, filterEthCompatibleAssets, findAsset, findAssetById, findAssetByMultiLocation, findAssetBySymbol, findAssetForNodeOrThrow, findAssetOnDest, findAssetOnDestOrThrow, findBestMatches, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetMultiLocation, getAssets, getAssetsObject, getExistentialDeposit, getExistentialDepositOrThrow, getFeeAssets, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getSupportedDestinations, hasDryRunSupport, hasSupportForAsset, hasXcmPaymentApiSupport, isAssetEqual, isForeignAsset, isNodeEvm, isOverrideMultiLocationSpecifier, isSymbolSpecifier, isTMultiAsset, normalizeMultiLocation, normalizeSymbol };
289
- export type { TAmount, TAsset, TAssetJsonMap, TCurrency, TCurrencyCore, TCurrencyInput, TCurrencyInputWithAmount, TCurrencySymbol, TCurrencySymbolValue, TForeignAsset, TMultiAsset, TMultiAssetV3, TMultiAssetV4, TMultiAssetWithFee, TMultiLocationValue, TMultiLocationValueWithOverride, TNativeAsset, TNodeAssets, TOverrideMultiLocationSpecifier, TSymbolSpecifier, WithAmount };
293
+ export { DuplicateAssetError, DuplicateAssetIdError, Foreign, ForeignAbstract, InvalidCurrencyError, Native, Override, compareMultiLocations, extractMultiAssetLoc, filterEthCompatibleAssets, findAsset, findAssetById, findAssetByMultiLocation, findAssetBySymbol, findAssetForNodeOrThrow, findAssetOnDest, findAssetOnDestOrThrow, findBestMatches, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetMultiLocation, getAssets, getAssetsObject, getExistentialDeposit, getExistentialDepositOrThrow, getFeeAssets, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getSupportedDestinations, hasDryRunSupport, hasSupportForAsset, hasXcmPaymentApiSupport, isAssetEqual, isForeignAsset, isNodeEvm, isOverrideMultiLocationSpecifier, isSymbolMatch, isSymbolSpecifier, isTMultiAsset, normalizeMultiLocation, normalizeSymbol };
294
+ export type { TAmount, TAsset, TAssetJsonMap, TAssetWithLocation, TCurrency, TCurrencyCore, TCurrencyInput, TCurrencyInputWithAmount, TCurrencySymbol, TCurrencySymbolValue, TForeignAsset, TMultiAsset, TMultiAssetV3, TMultiAssetV4, TMultiAssetWithFee, TMultiLocationValue, TMultiLocationValueWithOverride, TNativeAsset, TNodeAssets, TOverrideMultiLocationSpecifier, TSymbolSpecifier, WithAmount };
package/dist/index.mjs CHANGED
@@ -11638,6 +11638,31 @@ var Ethereum = {
11638
11638
  ]
11639
11639
  }
11640
11640
  }
11641
+ },
11642
+ {
11643
+ symbol: "MYTH",
11644
+ assetId: "0xba41ddf06b7ffd89d1267b5a93bfef2424eb2003",
11645
+ existentialDeposit: "1",
11646
+ multiLocation: {
11647
+ parents: 2,
11648
+ interior: {
11649
+ X2: [
11650
+ {
11651
+ GlobalConsensus: {
11652
+ Ethereum: {
11653
+ chainId: 1
11654
+ }
11655
+ }
11656
+ },
11657
+ {
11658
+ AccountKey20: {
11659
+ network: null,
11660
+ key: "0xba41ddf06b7ffd89d1267b5a93bfef2424eb2003"
11661
+ }
11662
+ }
11663
+ ]
11664
+ }
11665
+ }
11641
11666
  }
11642
11667
  ]
11643
11668
  };
@@ -12471,6 +12496,10 @@ var normalizeSymbol = function normalizeSymbol(symbol) {
12471
12496
  return lowerSymbol.startsWith('xc') ? lowerSymbol.substring(2) : lowerSymbol;
12472
12497
  };
12473
12498
 
12499
+ var isSymbolMatch = function isSymbolMatch(symbolA, symbolB) {
12500
+ return normalizeSymbol(symbolA) === normalizeSymbol(symbolB);
12501
+ };
12502
+
12474
12503
  /**
12475
12504
  * Retrieves the list of assets that are supported for transfers between two specified nodes.
12476
12505
  *
@@ -12488,6 +12517,11 @@ var getSupportedAssets = function getSupportedAssets(origin, destination) {
12488
12517
  if (origin === 'Moonbeam') {
12489
12518
  return ethereumCompatibleAssets;
12490
12519
  }
12520
+ if (origin === 'Mythos') {
12521
+ return ethereumAssets.filter(function (asset) {
12522
+ return isSymbolMatch(asset.symbol, getNativeAssetSymbol(origin));
12523
+ });
12524
+ }
12491
12525
  return [].concat(_toConsumableArray(ethereumCompatibleAssets), _toConsumableArray(ethereumAssets));
12492
12526
  }
12493
12527
  if (origin === 'AssetHubPolkadot' && destination === 'AssetHubKusama' || origin === 'AssetHubKusama' && destination === 'AssetHubPolkadot') {
@@ -12558,4 +12592,4 @@ var getAssetMultiLocation = function getAssetMultiLocation(node, currency) {
12558
12592
  return asset.multiLocation;
12559
12593
  };
12560
12594
 
12561
- export { DuplicateAssetError, DuplicateAssetIdError, Foreign, ForeignAbstract, InvalidCurrencyError, Native, Override, compareMultiLocations, extractMultiAssetLoc, filterEthCompatibleAssets, findAsset, findAssetById, findAssetByMultiLocation, findAssetBySymbol, findAssetForNodeOrThrow, findAssetOnDest, findAssetOnDestOrThrow, findBestMatches, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetMultiLocation, getAssets, getAssetsObject, getExistentialDeposit, getExistentialDepositOrThrow, getFeeAssets, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getSupportedDestinations, hasDryRunSupport, hasSupportForAsset, hasXcmPaymentApiSupport, isAssetEqual, isForeignAsset, isNodeEvm, isOverrideMultiLocationSpecifier, isSymbolSpecifier, isTMultiAsset, normalizeMultiLocation, normalizeSymbol };
12595
+ export { DuplicateAssetError, DuplicateAssetIdError, Foreign, ForeignAbstract, InvalidCurrencyError, Native, Override, compareMultiLocations, extractMultiAssetLoc, filterEthCompatibleAssets, findAsset, findAssetById, findAssetByMultiLocation, findAssetBySymbol, findAssetForNodeOrThrow, findAssetOnDest, findAssetOnDestOrThrow, findBestMatches, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetMultiLocation, getAssets, getAssetsObject, getExistentialDeposit, getExistentialDepositOrThrow, getFeeAssets, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getSupportedDestinations, hasDryRunSupport, hasSupportForAsset, hasXcmPaymentApiSupport, isAssetEqual, isForeignAsset, isNodeEvm, isOverrideMultiLocationSpecifier, isSymbolMatch, isSymbolSpecifier, isTMultiAsset, normalizeMultiLocation, normalizeSymbol };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/assets",
3
- "version": "10.5.1",
3
+ "version": "10.6.0",
4
4
  "description": "Assets 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": "10.5.1"
26
+ "@paraspell/sdk-common": "10.6.0"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@babel/plugin-syntax-import-attributes": "^7.27.1",