@paraspell/assets 11.4.0 → 11.4.2
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 +15 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.mjs +14 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -18007,6 +18007,19 @@ var findAssetOnDestOrThrow = function findAssetOnDestOrThrow(origin, destination
|
|
|
18007
18007
|
return asset;
|
|
18008
18008
|
};
|
|
18009
18009
|
|
|
18010
|
+
var createSelection = function createSelection(chain) {
|
|
18011
|
+
var nativeSymbol = getNativeAssetSymbol(chain);
|
|
18012
|
+
return {
|
|
18013
|
+
symbol: chain === 'Ethereum' ? nativeSymbol : Native(nativeSymbol)
|
|
18014
|
+
};
|
|
18015
|
+
};
|
|
18016
|
+
var findNativeAssetInfo = function findNativeAssetInfo(chain) {
|
|
18017
|
+
return findAssetInfo(chain, createSelection(chain), null);
|
|
18018
|
+
};
|
|
18019
|
+
var findNativeAssetInfoOrThrow = function findNativeAssetInfoOrThrow(chain) {
|
|
18020
|
+
return findAssetInfoOrThrow(chain, createSelection(chain), null);
|
|
18021
|
+
};
|
|
18022
|
+
|
|
18010
18023
|
/**
|
|
18011
18024
|
* Retrieves the existential deposit value for a given chain.
|
|
18012
18025
|
*
|
|
@@ -18334,6 +18347,8 @@ exports.findAssetInfoOnDest = findAssetInfoOnDest;
|
|
|
18334
18347
|
exports.findAssetInfoOrThrow = findAssetInfoOrThrow;
|
|
18335
18348
|
exports.findAssetOnDestOrThrow = findAssetOnDestOrThrow;
|
|
18336
18349
|
exports.findBestMatches = findBestMatches;
|
|
18350
|
+
exports.findNativeAssetInfo = findNativeAssetInfo;
|
|
18351
|
+
exports.findNativeAssetInfoOrThrow = findNativeAssetInfoOrThrow;
|
|
18337
18352
|
exports.getAllAssetsSymbols = getAllAssetsSymbols;
|
|
18338
18353
|
exports.getAssetDecimals = getAssetDecimals;
|
|
18339
18354
|
exports.getAssetId = getAssetId;
|
package/dist/index.d.ts
CHANGED
|
@@ -240,6 +240,9 @@ declare const findBestMatches: <T extends {
|
|
|
240
240
|
alias?: string;
|
|
241
241
|
}>(assets: T[], value: string, property?: "symbol" | "alias") => T[];
|
|
242
242
|
|
|
243
|
+
declare const findNativeAssetInfo: (chain: TChain) => TAssetInfo | null;
|
|
244
|
+
declare const findNativeAssetInfoOrThrow: (chain: TChain) => TAssetInfo;
|
|
245
|
+
|
|
243
246
|
/**
|
|
244
247
|
* Error thrown when multiple assets with the same symbol are found.
|
|
245
248
|
*/
|
|
@@ -290,5 +293,5 @@ declare const extractAssetLocation: <T = bigint>(asset: TAsset<T>) => TLocation;
|
|
|
290
293
|
|
|
291
294
|
declare const getAssetLocation: (chain: TChain, currency: TCurrencyInput) => TLocation | null;
|
|
292
295
|
|
|
293
|
-
export { DuplicateAssetError, DuplicateAssetIdError, Foreign, ForeignAbstract, InvalidCurrencyError, Native, Override, compareLocations, extractAssetLocation, filterEthCompatibleAssets, findAssetInfo, findAssetInfoById, findAssetInfoByLoc, findAssetInfoBySymbol, findAssetInfoOnDest, findAssetInfoOrThrow, findAssetOnDestOrThrow, findBestMatches, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetLocation, getAssets, getAssetsObject, getExistentialDeposit, getExistentialDepositOrThrow, getFeeAssets, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getSupportedDestinations, hasDryRunSupport, hasSupportForAsset, hasXcmPaymentApiSupport, isAssetEqual, isChainEvm, isForeignAsset, isOverrideLocationSpecifier, isSymbolMatch, isSymbolSpecifier, isTAsset, normalizeLocation, normalizeSymbol };
|
|
296
|
+
export { DuplicateAssetError, DuplicateAssetIdError, Foreign, ForeignAbstract, InvalidCurrencyError, Native, Override, compareLocations, extractAssetLocation, filterEthCompatibleAssets, findAssetInfo, findAssetInfoById, findAssetInfoByLoc, findAssetInfoBySymbol, findAssetInfoOnDest, findAssetInfoOrThrow, findAssetOnDestOrThrow, findBestMatches, findNativeAssetInfo, findNativeAssetInfoOrThrow, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetLocation, getAssets, getAssetsObject, getExistentialDeposit, getExistentialDepositOrThrow, getFeeAssets, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getSupportedDestinations, hasDryRunSupport, hasSupportForAsset, hasXcmPaymentApiSupport, isAssetEqual, isChainEvm, isForeignAsset, isOverrideLocationSpecifier, isSymbolMatch, isSymbolSpecifier, isTAsset, normalizeLocation, normalizeSymbol };
|
|
294
297
|
export type { TAmount, TAsset, TAssetInfo, TAssetJsonMap, TAssetV3, TAssetV4, TAssetWithFee, TAssetWithLocation, TChainAssetsInfo, TCurrency, TCurrencyCore, TCurrencyInput, TCurrencyInputWithAmount, TCurrencySymbol, TCurrencySymbolValue, TForeignAssetInfo, TForeignAssetWithId, TLocationValue, TLocationValueWithOverride, TNativeAssetInfo, TOverrideLocationSpecifier, TSymbolSpecifier, WithAmount, WithComplexAmount };
|
package/dist/index.mjs
CHANGED
|
@@ -18005,6 +18005,19 @@ var findAssetOnDestOrThrow = function findAssetOnDestOrThrow(origin, destination
|
|
|
18005
18005
|
return asset;
|
|
18006
18006
|
};
|
|
18007
18007
|
|
|
18008
|
+
var createSelection = function createSelection(chain) {
|
|
18009
|
+
var nativeSymbol = getNativeAssetSymbol(chain);
|
|
18010
|
+
return {
|
|
18011
|
+
symbol: chain === 'Ethereum' ? nativeSymbol : Native(nativeSymbol)
|
|
18012
|
+
};
|
|
18013
|
+
};
|
|
18014
|
+
var findNativeAssetInfo = function findNativeAssetInfo(chain) {
|
|
18015
|
+
return findAssetInfo(chain, createSelection(chain), null);
|
|
18016
|
+
};
|
|
18017
|
+
var findNativeAssetInfoOrThrow = function findNativeAssetInfoOrThrow(chain) {
|
|
18018
|
+
return findAssetInfoOrThrow(chain, createSelection(chain), null);
|
|
18019
|
+
};
|
|
18020
|
+
|
|
18008
18021
|
/**
|
|
18009
18022
|
* Retrieves the existential deposit value for a given chain.
|
|
18010
18023
|
*
|
|
@@ -18314,4 +18327,4 @@ var isAssetEqual = function isAssetEqual(asset1, asset2) {
|
|
|
18314
18327
|
return asset1.symbol.toLowerCase() === asset2.symbol.toLowerCase();
|
|
18315
18328
|
};
|
|
18316
18329
|
|
|
18317
|
-
export { DuplicateAssetError, DuplicateAssetIdError, Foreign, ForeignAbstract, InvalidCurrencyError, Native, Override, compareLocations, extractAssetLocation, filterEthCompatibleAssets, findAssetInfo, findAssetInfoById, findAssetInfoByLoc, findAssetInfoBySymbol, findAssetInfoOnDest, findAssetInfoOrThrow, findAssetOnDestOrThrow, findBestMatches, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetLocation, getAssets, getAssetsObject, getExistentialDeposit, getExistentialDepositOrThrow, getFeeAssets, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getSupportedDestinations, hasDryRunSupport, hasSupportForAsset, hasXcmPaymentApiSupport, isAssetEqual, isChainEvm, isForeignAsset, isOverrideLocationSpecifier, isSymbolMatch, isSymbolSpecifier, isTAsset, normalizeLocation, normalizeSymbol };
|
|
18330
|
+
export { DuplicateAssetError, DuplicateAssetIdError, Foreign, ForeignAbstract, InvalidCurrencyError, Native, Override, compareLocations, extractAssetLocation, filterEthCompatibleAssets, findAssetInfo, findAssetInfoById, findAssetInfoByLoc, findAssetInfoBySymbol, findAssetInfoOnDest, findAssetInfoOrThrow, findAssetOnDestOrThrow, findBestMatches, findNativeAssetInfo, findNativeAssetInfoOrThrow, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetLocation, getAssets, getAssetsObject, getExistentialDeposit, getExistentialDepositOrThrow, getFeeAssets, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getSupportedDestinations, hasDryRunSupport, hasSupportForAsset, hasXcmPaymentApiSupport, isAssetEqual, isChainEvm, isForeignAsset, isOverrideLocationSpecifier, isSymbolMatch, isSymbolSpecifier, isTAsset, normalizeLocation, normalizeSymbol };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/assets",
|
|
3
|
-
"version": "11.4.
|
|
3
|
+
"version": "11.4.2",
|
|
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": "11.4.
|
|
26
|
+
"@paraspell/sdk-common": "11.4.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/plugin-syntax-import-attributes": "^7.27.1",
|