@paraspell/assets 10.5.2 → 10.7.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 +42 -8
- package/dist/index.d.ts +4 -1
- package/dist/index.mjs +42 -8
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -6063,7 +6063,8 @@ var AssetHubPolkadot = {
|
|
|
6063
6063
|
]
|
|
6064
6064
|
}
|
|
6065
6065
|
},
|
|
6066
|
-
existentialDeposit: "10000"
|
|
6066
|
+
existentialDeposit: "10000",
|
|
6067
|
+
isFeeAsset: true
|
|
6067
6068
|
},
|
|
6068
6069
|
{
|
|
6069
6070
|
assetId: "1984",
|
|
@@ -6085,7 +6086,8 @@ var AssetHubPolkadot = {
|
|
|
6085
6086
|
]
|
|
6086
6087
|
}
|
|
6087
6088
|
},
|
|
6088
|
-
existentialDeposit: "10000"
|
|
6089
|
+
existentialDeposit: "10000",
|
|
6090
|
+
isFeeAsset: true
|
|
6089
6091
|
},
|
|
6090
6092
|
{
|
|
6091
6093
|
assetId: "21",
|
|
@@ -6151,7 +6153,8 @@ var AssetHubPolkadot = {
|
|
|
6151
6153
|
]
|
|
6152
6154
|
}
|
|
6153
6155
|
},
|
|
6154
|
-
existentialDeposit: "1"
|
|
6156
|
+
existentialDeposit: "1",
|
|
6157
|
+
isFeeAsset: true
|
|
6155
6158
|
},
|
|
6156
6159
|
{
|
|
6157
6160
|
assetId: "30",
|
|
@@ -6173,7 +6176,8 @@ var AssetHubPolkadot = {
|
|
|
6173
6176
|
]
|
|
6174
6177
|
}
|
|
6175
6178
|
},
|
|
6176
|
-
existentialDeposit: "1"
|
|
6179
|
+
existentialDeposit: "1",
|
|
6180
|
+
isFeeAsset: true
|
|
6177
6181
|
},
|
|
6178
6182
|
{
|
|
6179
6183
|
assetId: "31337",
|
|
@@ -11640,6 +11644,31 @@ var Ethereum = {
|
|
|
11640
11644
|
]
|
|
11641
11645
|
}
|
|
11642
11646
|
}
|
|
11647
|
+
},
|
|
11648
|
+
{
|
|
11649
|
+
symbol: "MYTH",
|
|
11650
|
+
assetId: "0xba41ddf06b7ffd89d1267b5a93bfef2424eb2003",
|
|
11651
|
+
existentialDeposit: "1",
|
|
11652
|
+
multiLocation: {
|
|
11653
|
+
parents: 2,
|
|
11654
|
+
interior: {
|
|
11655
|
+
X2: [
|
|
11656
|
+
{
|
|
11657
|
+
GlobalConsensus: {
|
|
11658
|
+
Ethereum: {
|
|
11659
|
+
chainId: 1
|
|
11660
|
+
}
|
|
11661
|
+
}
|
|
11662
|
+
},
|
|
11663
|
+
{
|
|
11664
|
+
AccountKey20: {
|
|
11665
|
+
network: null,
|
|
11666
|
+
key: "0xba41ddf06b7ffd89d1267b5a93bfef2424eb2003"
|
|
11667
|
+
}
|
|
11668
|
+
}
|
|
11669
|
+
]
|
|
11670
|
+
}
|
|
11671
|
+
}
|
|
11643
11672
|
}
|
|
11644
11673
|
]
|
|
11645
11674
|
};
|
|
@@ -12473,6 +12502,10 @@ var normalizeSymbol = function normalizeSymbol(symbol) {
|
|
|
12473
12502
|
return lowerSymbol.startsWith('xc') ? lowerSymbol.substring(2) : lowerSymbol;
|
|
12474
12503
|
};
|
|
12475
12504
|
|
|
12505
|
+
var isSymbolMatch = function isSymbolMatch(symbolA, symbolB) {
|
|
12506
|
+
return normalizeSymbol(symbolA) === normalizeSymbol(symbolB);
|
|
12507
|
+
};
|
|
12508
|
+
|
|
12476
12509
|
/**
|
|
12477
12510
|
* Retrieves the list of assets that are supported for transfers between two specified nodes.
|
|
12478
12511
|
*
|
|
@@ -12490,6 +12523,11 @@ var getSupportedAssets = function getSupportedAssets(origin, destination) {
|
|
|
12490
12523
|
if (origin === 'Moonbeam') {
|
|
12491
12524
|
return ethereumCompatibleAssets;
|
|
12492
12525
|
}
|
|
12526
|
+
if (origin === 'Mythos') {
|
|
12527
|
+
return ethereumAssets.filter(function (asset) {
|
|
12528
|
+
return isSymbolMatch(asset.symbol, getNativeAssetSymbol(origin));
|
|
12529
|
+
});
|
|
12530
|
+
}
|
|
12493
12531
|
return [].concat(_toConsumableArray(ethereumCompatibleAssets), _toConsumableArray(ethereumAssets));
|
|
12494
12532
|
}
|
|
12495
12533
|
if (origin === 'AssetHubPolkadot' && destination === 'AssetHubKusama' || origin === 'AssetHubKusama' && destination === 'AssetHubPolkadot') {
|
|
@@ -12548,10 +12586,6 @@ var isAssetEqual = function isAssetEqual(asset1, asset2) {
|
|
|
12548
12586
|
return asset1.symbol.toLowerCase() === asset2.symbol.toLowerCase();
|
|
12549
12587
|
};
|
|
12550
12588
|
|
|
12551
|
-
var isSymbolMatch = function isSymbolMatch(symbolA, symbolB) {
|
|
12552
|
-
return normalizeSymbol(symbolA) === normalizeSymbol(symbolB);
|
|
12553
|
-
};
|
|
12554
|
-
|
|
12555
12589
|
var extractMultiAssetLoc = function extractMultiAssetLoc(multiAsset) {
|
|
12556
12590
|
return 'Concrete' in multiAsset.id ? multiAsset.id.Concrete : multiAsset.id;
|
|
12557
12591
|
};
|
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;
|
|
@@ -288,4 +291,4 @@ declare const extractMultiAssetLoc: (multiAsset: TMultiAsset) => TMultiLocation;
|
|
|
288
291
|
declare const getAssetMultiLocation: (node: TNodeWithRelayChains, currency: TCurrencyInput) => TMultiLocation | null;
|
|
289
292
|
|
|
290
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 };
|
|
291
|
-
export type { TAmount, TAsset, TAssetJsonMap, TCurrency, TCurrencyCore, TCurrencyInput, TCurrencyInputWithAmount, TCurrencySymbol, TCurrencySymbolValue, TForeignAsset, TMultiAsset, TMultiAssetV3, TMultiAssetV4, TMultiAssetWithFee, TMultiLocationValue, TMultiLocationValueWithOverride, TNativeAsset, TNodeAssets, TOverrideMultiLocationSpecifier, TSymbolSpecifier, WithAmount };
|
|
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
|
@@ -6061,7 +6061,8 @@ var AssetHubPolkadot = {
|
|
|
6061
6061
|
]
|
|
6062
6062
|
}
|
|
6063
6063
|
},
|
|
6064
|
-
existentialDeposit: "10000"
|
|
6064
|
+
existentialDeposit: "10000",
|
|
6065
|
+
isFeeAsset: true
|
|
6065
6066
|
},
|
|
6066
6067
|
{
|
|
6067
6068
|
assetId: "1984",
|
|
@@ -6083,7 +6084,8 @@ var AssetHubPolkadot = {
|
|
|
6083
6084
|
]
|
|
6084
6085
|
}
|
|
6085
6086
|
},
|
|
6086
|
-
existentialDeposit: "10000"
|
|
6087
|
+
existentialDeposit: "10000",
|
|
6088
|
+
isFeeAsset: true
|
|
6087
6089
|
},
|
|
6088
6090
|
{
|
|
6089
6091
|
assetId: "21",
|
|
@@ -6149,7 +6151,8 @@ var AssetHubPolkadot = {
|
|
|
6149
6151
|
]
|
|
6150
6152
|
}
|
|
6151
6153
|
},
|
|
6152
|
-
existentialDeposit: "1"
|
|
6154
|
+
existentialDeposit: "1",
|
|
6155
|
+
isFeeAsset: true
|
|
6153
6156
|
},
|
|
6154
6157
|
{
|
|
6155
6158
|
assetId: "30",
|
|
@@ -6171,7 +6174,8 @@ var AssetHubPolkadot = {
|
|
|
6171
6174
|
]
|
|
6172
6175
|
}
|
|
6173
6176
|
},
|
|
6174
|
-
existentialDeposit: "1"
|
|
6177
|
+
existentialDeposit: "1",
|
|
6178
|
+
isFeeAsset: true
|
|
6175
6179
|
},
|
|
6176
6180
|
{
|
|
6177
6181
|
assetId: "31337",
|
|
@@ -11638,6 +11642,31 @@ var Ethereum = {
|
|
|
11638
11642
|
]
|
|
11639
11643
|
}
|
|
11640
11644
|
}
|
|
11645
|
+
},
|
|
11646
|
+
{
|
|
11647
|
+
symbol: "MYTH",
|
|
11648
|
+
assetId: "0xba41ddf06b7ffd89d1267b5a93bfef2424eb2003",
|
|
11649
|
+
existentialDeposit: "1",
|
|
11650
|
+
multiLocation: {
|
|
11651
|
+
parents: 2,
|
|
11652
|
+
interior: {
|
|
11653
|
+
X2: [
|
|
11654
|
+
{
|
|
11655
|
+
GlobalConsensus: {
|
|
11656
|
+
Ethereum: {
|
|
11657
|
+
chainId: 1
|
|
11658
|
+
}
|
|
11659
|
+
}
|
|
11660
|
+
},
|
|
11661
|
+
{
|
|
11662
|
+
AccountKey20: {
|
|
11663
|
+
network: null,
|
|
11664
|
+
key: "0xba41ddf06b7ffd89d1267b5a93bfef2424eb2003"
|
|
11665
|
+
}
|
|
11666
|
+
}
|
|
11667
|
+
]
|
|
11668
|
+
}
|
|
11669
|
+
}
|
|
11641
11670
|
}
|
|
11642
11671
|
]
|
|
11643
11672
|
};
|
|
@@ -12471,6 +12500,10 @@ var normalizeSymbol = function normalizeSymbol(symbol) {
|
|
|
12471
12500
|
return lowerSymbol.startsWith('xc') ? lowerSymbol.substring(2) : lowerSymbol;
|
|
12472
12501
|
};
|
|
12473
12502
|
|
|
12503
|
+
var isSymbolMatch = function isSymbolMatch(symbolA, symbolB) {
|
|
12504
|
+
return normalizeSymbol(symbolA) === normalizeSymbol(symbolB);
|
|
12505
|
+
};
|
|
12506
|
+
|
|
12474
12507
|
/**
|
|
12475
12508
|
* Retrieves the list of assets that are supported for transfers between two specified nodes.
|
|
12476
12509
|
*
|
|
@@ -12488,6 +12521,11 @@ var getSupportedAssets = function getSupportedAssets(origin, destination) {
|
|
|
12488
12521
|
if (origin === 'Moonbeam') {
|
|
12489
12522
|
return ethereumCompatibleAssets;
|
|
12490
12523
|
}
|
|
12524
|
+
if (origin === 'Mythos') {
|
|
12525
|
+
return ethereumAssets.filter(function (asset) {
|
|
12526
|
+
return isSymbolMatch(asset.symbol, getNativeAssetSymbol(origin));
|
|
12527
|
+
});
|
|
12528
|
+
}
|
|
12491
12529
|
return [].concat(_toConsumableArray(ethereumCompatibleAssets), _toConsumableArray(ethereumAssets));
|
|
12492
12530
|
}
|
|
12493
12531
|
if (origin === 'AssetHubPolkadot' && destination === 'AssetHubKusama' || origin === 'AssetHubKusama' && destination === 'AssetHubPolkadot') {
|
|
@@ -12546,10 +12584,6 @@ var isAssetEqual = function isAssetEqual(asset1, asset2) {
|
|
|
12546
12584
|
return asset1.symbol.toLowerCase() === asset2.symbol.toLowerCase();
|
|
12547
12585
|
};
|
|
12548
12586
|
|
|
12549
|
-
var isSymbolMatch = function isSymbolMatch(symbolA, symbolB) {
|
|
12550
|
-
return normalizeSymbol(symbolA) === normalizeSymbol(symbolB);
|
|
12551
|
-
};
|
|
12552
|
-
|
|
12553
12587
|
var extractMultiAssetLoc = function extractMultiAssetLoc(multiAsset) {
|
|
12554
12588
|
return 'Concrete' in multiAsset.id ? multiAsset.id.Concrete : multiAsset.id;
|
|
12555
12589
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/assets",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.7.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.
|
|
26
|
+
"@paraspell/sdk-common": "10.7.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/plugin-syntax-import-attributes": "^7.27.1",
|