@paraspell/assets 10.3.1 → 10.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 +122 -38
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +122 -39
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -908,7 +908,14 @@ var BridgeHubPolkadot = {
|
|
|
908
908
|
symbol: "DOT",
|
|
909
909
|
isNative: true,
|
|
910
910
|
decimals: 10,
|
|
911
|
-
existentialDeposit: "1000000000"
|
|
911
|
+
existentialDeposit: "1000000000",
|
|
912
|
+
multiLocation: {
|
|
913
|
+
parents: 1,
|
|
914
|
+
interior: {
|
|
915
|
+
Here: null
|
|
916
|
+
}
|
|
917
|
+
},
|
|
918
|
+
isFeeAsset: true
|
|
912
919
|
}
|
|
913
920
|
],
|
|
914
921
|
otherAssets: [
|
|
@@ -926,7 +933,14 @@ var BridgeHubKusama = {
|
|
|
926
933
|
symbol: "KSM",
|
|
927
934
|
isNative: true,
|
|
928
935
|
decimals: 12,
|
|
929
|
-
existentialDeposit: "33333333"
|
|
936
|
+
existentialDeposit: "33333333",
|
|
937
|
+
multiLocation: {
|
|
938
|
+
parents: 1,
|
|
939
|
+
interior: {
|
|
940
|
+
Here: null
|
|
941
|
+
}
|
|
942
|
+
},
|
|
943
|
+
isFeeAsset: true
|
|
930
944
|
}
|
|
931
945
|
],
|
|
932
946
|
otherAssets: [
|
|
@@ -4346,7 +4360,13 @@ var Interlay = {
|
|
|
4346
4360
|
symbol: "DOT",
|
|
4347
4361
|
isNative: true,
|
|
4348
4362
|
decimals: 10,
|
|
4349
|
-
existentialDeposit: "0"
|
|
4363
|
+
existentialDeposit: "0",
|
|
4364
|
+
multiLocation: {
|
|
4365
|
+
parents: 1,
|
|
4366
|
+
interior: {
|
|
4367
|
+
Here: null
|
|
4368
|
+
}
|
|
4369
|
+
}
|
|
4350
4370
|
},
|
|
4351
4371
|
{
|
|
4352
4372
|
symbol: "KINT",
|
|
@@ -5953,13 +5973,14 @@ var AssetHubPolkadot = {
|
|
|
5953
5973
|
symbol: "DOT",
|
|
5954
5974
|
isNative: true,
|
|
5955
5975
|
decimals: 10,
|
|
5976
|
+
existentialDeposit: "100000000",
|
|
5956
5977
|
multiLocation: {
|
|
5957
5978
|
parents: 1,
|
|
5958
5979
|
interior: {
|
|
5959
5980
|
Here: null
|
|
5960
5981
|
}
|
|
5961
5982
|
},
|
|
5962
|
-
|
|
5983
|
+
isFeeAsset: true
|
|
5963
5984
|
}
|
|
5964
5985
|
],
|
|
5965
5986
|
otherAssets: [
|
|
@@ -7289,7 +7310,14 @@ var Encointer = {
|
|
|
7289
7310
|
symbol: "KSM",
|
|
7290
7311
|
isNative: true,
|
|
7291
7312
|
decimals: 12,
|
|
7292
|
-
existentialDeposit: "33333333"
|
|
7313
|
+
existentialDeposit: "33333333",
|
|
7314
|
+
multiLocation: {
|
|
7315
|
+
parents: 1,
|
|
7316
|
+
interior: {
|
|
7317
|
+
Here: null
|
|
7318
|
+
}
|
|
7319
|
+
},
|
|
7320
|
+
isFeeAsset: true
|
|
7293
7321
|
}
|
|
7294
7322
|
],
|
|
7295
7323
|
otherAssets: [
|
|
@@ -7342,7 +7370,13 @@ var Curio = {
|
|
|
7342
7370
|
isNative: true,
|
|
7343
7371
|
symbol: "KSM",
|
|
7344
7372
|
decimals: 12,
|
|
7345
|
-
existentialDeposit: "333333333"
|
|
7373
|
+
existentialDeposit: "333333333",
|
|
7374
|
+
multiLocation: {
|
|
7375
|
+
parents: 1,
|
|
7376
|
+
interior: {
|
|
7377
|
+
Here: null
|
|
7378
|
+
}
|
|
7379
|
+
}
|
|
7346
7380
|
}
|
|
7347
7381
|
],
|
|
7348
7382
|
otherAssets: [
|
|
@@ -7988,7 +8022,13 @@ var Kintsugi = {
|
|
|
7988
8022
|
symbol: "KSM",
|
|
7989
8023
|
isNative: true,
|
|
7990
8024
|
decimals: 12,
|
|
7991
|
-
existentialDeposit: "0"
|
|
8025
|
+
existentialDeposit: "0",
|
|
8026
|
+
multiLocation: {
|
|
8027
|
+
parents: 1,
|
|
8028
|
+
interior: {
|
|
8029
|
+
Here: null
|
|
8030
|
+
}
|
|
8031
|
+
}
|
|
7992
8032
|
},
|
|
7993
8033
|
{
|
|
7994
8034
|
symbol: "INTR",
|
|
@@ -8285,7 +8325,14 @@ var PeopleKusama = {
|
|
|
8285
8325
|
symbol: "KSM",
|
|
8286
8326
|
isNative: true,
|
|
8287
8327
|
decimals: 12,
|
|
8288
|
-
existentialDeposit: "33333333"
|
|
8328
|
+
existentialDeposit: "33333333",
|
|
8329
|
+
multiLocation: {
|
|
8330
|
+
parents: 1,
|
|
8331
|
+
interior: {
|
|
8332
|
+
Here: null
|
|
8333
|
+
}
|
|
8334
|
+
},
|
|
8335
|
+
isFeeAsset: true
|
|
8289
8336
|
}
|
|
8290
8337
|
],
|
|
8291
8338
|
otherAssets: [
|
|
@@ -8303,7 +8350,14 @@ var PeoplePolkadot = {
|
|
|
8303
8350
|
symbol: "DOT",
|
|
8304
8351
|
isNative: true,
|
|
8305
8352
|
decimals: 10,
|
|
8306
|
-
existentialDeposit: "1000000000"
|
|
8353
|
+
existentialDeposit: "1000000000",
|
|
8354
|
+
multiLocation: {
|
|
8355
|
+
parents: 1,
|
|
8356
|
+
interior: {
|
|
8357
|
+
Here: null
|
|
8358
|
+
}
|
|
8359
|
+
},
|
|
8360
|
+
isFeeAsset: true
|
|
8307
8361
|
}
|
|
8308
8362
|
],
|
|
8309
8363
|
otherAssets: [
|
|
@@ -8682,13 +8736,14 @@ var AssetHubKusama = {
|
|
|
8682
8736
|
symbol: "KSM",
|
|
8683
8737
|
isNative: true,
|
|
8684
8738
|
decimals: 12,
|
|
8739
|
+
existentialDeposit: "3333333",
|
|
8685
8740
|
multiLocation: {
|
|
8686
8741
|
parents: 1,
|
|
8687
8742
|
interior: {
|
|
8688
8743
|
Here: null
|
|
8689
8744
|
}
|
|
8690
8745
|
},
|
|
8691
|
-
|
|
8746
|
+
isFeeAsset: true
|
|
8692
8747
|
}
|
|
8693
8748
|
],
|
|
8694
8749
|
otherAssets: [
|
|
@@ -8973,7 +9028,14 @@ var CoretimeKusama = {
|
|
|
8973
9028
|
symbol: "KSM",
|
|
8974
9029
|
isNative: true,
|
|
8975
9030
|
decimals: 12,
|
|
8976
|
-
existentialDeposit: "33333333"
|
|
9031
|
+
existentialDeposit: "33333333",
|
|
9032
|
+
multiLocation: {
|
|
9033
|
+
parents: 1,
|
|
9034
|
+
interior: {
|
|
9035
|
+
Here: null
|
|
9036
|
+
}
|
|
9037
|
+
},
|
|
9038
|
+
isFeeAsset: true
|
|
8977
9039
|
}
|
|
8978
9040
|
],
|
|
8979
9041
|
otherAssets: [
|
|
@@ -8991,7 +9053,14 @@ var CoretimePolkadot = {
|
|
|
8991
9053
|
symbol: "DOT",
|
|
8992
9054
|
isNative: true,
|
|
8993
9055
|
decimals: 10,
|
|
8994
|
-
existentialDeposit: "1000000000"
|
|
9056
|
+
existentialDeposit: "1000000000",
|
|
9057
|
+
multiLocation: {
|
|
9058
|
+
parents: 1,
|
|
9059
|
+
interior: {
|
|
9060
|
+
Here: null
|
|
9061
|
+
}
|
|
9062
|
+
},
|
|
9063
|
+
isFeeAsset: true
|
|
8995
9064
|
}
|
|
8996
9065
|
],
|
|
8997
9066
|
otherAssets: [
|
|
@@ -10284,7 +10353,14 @@ var Collectives = {
|
|
|
10284
10353
|
symbol: "DOT",
|
|
10285
10354
|
isNative: true,
|
|
10286
10355
|
decimals: 10,
|
|
10287
|
-
existentialDeposit: "1000000000"
|
|
10356
|
+
existentialDeposit: "1000000000",
|
|
10357
|
+
multiLocation: {
|
|
10358
|
+
parents: 1,
|
|
10359
|
+
interior: {
|
|
10360
|
+
Here: null
|
|
10361
|
+
}
|
|
10362
|
+
},
|
|
10363
|
+
isFeeAsset: true
|
|
10288
10364
|
}
|
|
10289
10365
|
],
|
|
10290
10366
|
otherAssets: [
|
|
@@ -11115,31 +11191,6 @@ var assetsMapJson = {
|
|
|
11115
11191
|
Peaq: Peaq
|
|
11116
11192
|
};
|
|
11117
11193
|
|
|
11118
|
-
var isForeignAsset = function isForeignAsset(asset) {
|
|
11119
|
-
return _typeof(asset) === 'object' && asset !== null && ('assetId' in asset || 'multiLocation' in asset) && !('isNative' in asset);
|
|
11120
|
-
};
|
|
11121
|
-
|
|
11122
|
-
var isOverrideMultiLocationSpecifier = function isOverrideMultiLocationSpecifier(multiLocationSpecifier) {
|
|
11123
|
-
return _typeof(multiLocationSpecifier) === 'object' && 'type' in multiLocationSpecifier && 'value' in multiLocationSpecifier;
|
|
11124
|
-
};
|
|
11125
|
-
|
|
11126
|
-
var isSymbolSpecifier = function isSymbolSpecifier(currencySymbolValue) {
|
|
11127
|
-
return _typeof(currencySymbolValue) === 'object' && 'type' in currencySymbolValue && 'value' in currencySymbolValue;
|
|
11128
|
-
};
|
|
11129
|
-
|
|
11130
|
-
var isTMultiAsset = function isTMultiAsset(value) {
|
|
11131
|
-
return _typeof(value) === 'object' && value !== null && 'id' in value && 'fun' in value;
|
|
11132
|
-
};
|
|
11133
|
-
|
|
11134
|
-
var filterEthCompatibleAssets = function filterEthCompatibleAssets(assets) {
|
|
11135
|
-
var ethAssets = getOtherAssets('Ethereum');
|
|
11136
|
-
return assets.filter(function (asset) {
|
|
11137
|
-
var assetMultiLoc = asset.multiLocation;
|
|
11138
|
-
if (!assetMultiLoc) return false;
|
|
11139
|
-
return Boolean(findAssetByMultiLocation(ethAssets, assetMultiLoc));
|
|
11140
|
-
});
|
|
11141
|
-
};
|
|
11142
|
-
|
|
11143
11194
|
/**
|
|
11144
11195
|
* Error thrown when multiple assets with the same symbol are found.
|
|
11145
11196
|
*/
|
|
@@ -11200,6 +11251,31 @@ var InvalidCurrencyError = /*#__PURE__*/function (_Error) {
|
|
|
11200
11251
|
return _createClass(InvalidCurrencyError);
|
|
11201
11252
|
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
11202
11253
|
|
|
11254
|
+
var isForeignAsset = function isForeignAsset(asset) {
|
|
11255
|
+
return _typeof(asset) === 'object' && asset !== null && ('assetId' in asset || 'multiLocation' in asset) && !('isNative' in asset);
|
|
11256
|
+
};
|
|
11257
|
+
|
|
11258
|
+
var isOverrideMultiLocationSpecifier = function isOverrideMultiLocationSpecifier(multiLocationSpecifier) {
|
|
11259
|
+
return _typeof(multiLocationSpecifier) === 'object' && 'type' in multiLocationSpecifier && 'value' in multiLocationSpecifier;
|
|
11260
|
+
};
|
|
11261
|
+
|
|
11262
|
+
var isSymbolSpecifier = function isSymbolSpecifier(currencySymbolValue) {
|
|
11263
|
+
return _typeof(currencySymbolValue) === 'object' && 'type' in currencySymbolValue && 'value' in currencySymbolValue;
|
|
11264
|
+
};
|
|
11265
|
+
|
|
11266
|
+
var isTMultiAsset = function isTMultiAsset(value) {
|
|
11267
|
+
return _typeof(value) === 'object' && value !== null && 'id' in value && 'fun' in value;
|
|
11268
|
+
};
|
|
11269
|
+
|
|
11270
|
+
var filterEthCompatibleAssets = function filterEthCompatibleAssets(assets) {
|
|
11271
|
+
var ethAssets = getOtherAssets('Ethereum');
|
|
11272
|
+
return assets.filter(function (asset) {
|
|
11273
|
+
var assetMultiLoc = asset.multiLocation;
|
|
11274
|
+
if (!assetMultiLoc) return false;
|
|
11275
|
+
return Boolean(findAssetByMultiLocation(ethAssets, assetMultiLoc));
|
|
11276
|
+
});
|
|
11277
|
+
};
|
|
11278
|
+
|
|
11203
11279
|
var findAssetById = function findAssetById(assets, assetId) {
|
|
11204
11280
|
var otherAssetsMatches = assets.filter(function (_ref) {
|
|
11205
11281
|
var currentAssetId = _ref.assetId;
|
|
@@ -11541,6 +11617,13 @@ var getExistentialDeposit = function getExistentialDeposit(node, currency) {
|
|
|
11541
11617
|
var asset = findAssetForNodeOrThrow(node, currency, null);
|
|
11542
11618
|
return (_asset$existentialDep = asset.existentialDeposit) !== null && _asset$existentialDep !== void 0 ? _asset$existentialDep : null;
|
|
11543
11619
|
};
|
|
11620
|
+
var getExistentialDepositOrThrow = function getExistentialDepositOrThrow(node, currency) {
|
|
11621
|
+
var ed = getExistentialDeposit(node, currency);
|
|
11622
|
+
if (ed === null) {
|
|
11623
|
+
throw new InvalidCurrencyError("Existential deposit not found for currency ".concat(JSON.stringify(currency), " on node ").concat(node, "."));
|
|
11624
|
+
}
|
|
11625
|
+
return BigInt(ed);
|
|
11626
|
+
};
|
|
11544
11627
|
|
|
11545
11628
|
var _excluded = ["isFeeAsset"];
|
|
11546
11629
|
var getFeeAssets = function getFeeAssets(node) {
|
|
@@ -11845,6 +11928,7 @@ exports.getAssetMultiLocation = getAssetMultiLocation;
|
|
|
11845
11928
|
exports.getAssets = getAssets;
|
|
11846
11929
|
exports.getAssetsObject = getAssetsObject;
|
|
11847
11930
|
exports.getExistentialDeposit = getExistentialDeposit;
|
|
11931
|
+
exports.getExistentialDepositOrThrow = getExistentialDepositOrThrow;
|
|
11848
11932
|
exports.getFeeAssets = getFeeAssets;
|
|
11849
11933
|
exports.getNativeAssetSymbol = getNativeAssetSymbol;
|
|
11850
11934
|
exports.getNativeAssets = getNativeAssets;
|
package/dist/index.d.ts
CHANGED
|
@@ -97,6 +97,7 @@ type WithAmount<TBase> = TBase & {
|
|
|
97
97
|
* @returns The existential deposit as a string if available; otherwise, null.
|
|
98
98
|
*/
|
|
99
99
|
declare const getExistentialDeposit: (node: TNodeWithRelayChains, currency?: TCurrencyCore) => string | null;
|
|
100
|
+
declare const getExistentialDepositOrThrow: (node: TNodeWithRelayChains, currency?: TCurrencyCore) => bigint;
|
|
100
101
|
|
|
101
102
|
declare const getFeeAssets: (node: TNodeDotKsmWithRelayChains) => Omit<TAsset, "isFeeAsset">[];
|
|
102
103
|
|
|
@@ -269,5 +270,5 @@ declare const extractMultiAssetLoc: (multiAsset: TMultiAsset) => TMultiLocation;
|
|
|
269
270
|
|
|
270
271
|
declare const getAssetMultiLocation: (node: TNodeWithRelayChains, currency: TCurrencyInput) => TMultiLocation | null;
|
|
271
272
|
|
|
272
|
-
export { DuplicateAssetError, DuplicateAssetIdError, Foreign, ForeignAbstract, InvalidCurrencyError, Native, Override, compareMultiLocations, extractMultiAssetLoc, filterEthCompatibleAssets, findAsset, findAssetById, findAssetByMultiLocation, findAssetBySymbol, findAssetForNodeOrThrow, findAssetOnDestOrThrow, findBestMatches, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetMultiLocation, getAssets, getAssetsObject, getExistentialDeposit, getFeeAssets, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, hasDryRunSupport, hasSupportForAsset, hasXcmPaymentApiSupport, isAssetEqual, isForeignAsset, isNodeEvm, isOverrideMultiLocationSpecifier, isSymbolSpecifier, isTMultiAsset, normalizeSymbol };
|
|
273
|
+
export { DuplicateAssetError, DuplicateAssetIdError, Foreign, ForeignAbstract, InvalidCurrencyError, Native, Override, compareMultiLocations, extractMultiAssetLoc, filterEthCompatibleAssets, findAsset, findAssetById, findAssetByMultiLocation, findAssetBySymbol, findAssetForNodeOrThrow, findAssetOnDestOrThrow, findBestMatches, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetMultiLocation, getAssets, getAssetsObject, getExistentialDeposit, getExistentialDepositOrThrow, getFeeAssets, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, hasDryRunSupport, hasSupportForAsset, hasXcmPaymentApiSupport, isAssetEqual, isForeignAsset, isNodeEvm, isOverrideMultiLocationSpecifier, isSymbolSpecifier, isTMultiAsset, normalizeSymbol };
|
|
273
274
|
export type { TAmount, TAsset, TAssetJsonMap, TCurrency, TCurrencyCore, TCurrencyInput, TCurrencyInputWithAmount, TCurrencySymbol, TCurrencySymbolValue, TForeignAsset, TMultiAsset, TMultiAssetV3, TMultiAssetV4, TMultiAssetWithFee, TMultiLocationValue, TMultiLocationValueWithOverride, TNativeAsset, TNodeAssets, TOverrideMultiLocationSpecifier, TSymbolSpecifier, WithAmount };
|
package/dist/index.mjs
CHANGED
|
@@ -906,7 +906,14 @@ var BridgeHubPolkadot = {
|
|
|
906
906
|
symbol: "DOT",
|
|
907
907
|
isNative: true,
|
|
908
908
|
decimals: 10,
|
|
909
|
-
existentialDeposit: "1000000000"
|
|
909
|
+
existentialDeposit: "1000000000",
|
|
910
|
+
multiLocation: {
|
|
911
|
+
parents: 1,
|
|
912
|
+
interior: {
|
|
913
|
+
Here: null
|
|
914
|
+
}
|
|
915
|
+
},
|
|
916
|
+
isFeeAsset: true
|
|
910
917
|
}
|
|
911
918
|
],
|
|
912
919
|
otherAssets: [
|
|
@@ -924,7 +931,14 @@ var BridgeHubKusama = {
|
|
|
924
931
|
symbol: "KSM",
|
|
925
932
|
isNative: true,
|
|
926
933
|
decimals: 12,
|
|
927
|
-
existentialDeposit: "33333333"
|
|
934
|
+
existentialDeposit: "33333333",
|
|
935
|
+
multiLocation: {
|
|
936
|
+
parents: 1,
|
|
937
|
+
interior: {
|
|
938
|
+
Here: null
|
|
939
|
+
}
|
|
940
|
+
},
|
|
941
|
+
isFeeAsset: true
|
|
928
942
|
}
|
|
929
943
|
],
|
|
930
944
|
otherAssets: [
|
|
@@ -4344,7 +4358,13 @@ var Interlay = {
|
|
|
4344
4358
|
symbol: "DOT",
|
|
4345
4359
|
isNative: true,
|
|
4346
4360
|
decimals: 10,
|
|
4347
|
-
existentialDeposit: "0"
|
|
4361
|
+
existentialDeposit: "0",
|
|
4362
|
+
multiLocation: {
|
|
4363
|
+
parents: 1,
|
|
4364
|
+
interior: {
|
|
4365
|
+
Here: null
|
|
4366
|
+
}
|
|
4367
|
+
}
|
|
4348
4368
|
},
|
|
4349
4369
|
{
|
|
4350
4370
|
symbol: "KINT",
|
|
@@ -5951,13 +5971,14 @@ var AssetHubPolkadot = {
|
|
|
5951
5971
|
symbol: "DOT",
|
|
5952
5972
|
isNative: true,
|
|
5953
5973
|
decimals: 10,
|
|
5974
|
+
existentialDeposit: "100000000",
|
|
5954
5975
|
multiLocation: {
|
|
5955
5976
|
parents: 1,
|
|
5956
5977
|
interior: {
|
|
5957
5978
|
Here: null
|
|
5958
5979
|
}
|
|
5959
5980
|
},
|
|
5960
|
-
|
|
5981
|
+
isFeeAsset: true
|
|
5961
5982
|
}
|
|
5962
5983
|
],
|
|
5963
5984
|
otherAssets: [
|
|
@@ -7287,7 +7308,14 @@ var Encointer = {
|
|
|
7287
7308
|
symbol: "KSM",
|
|
7288
7309
|
isNative: true,
|
|
7289
7310
|
decimals: 12,
|
|
7290
|
-
existentialDeposit: "33333333"
|
|
7311
|
+
existentialDeposit: "33333333",
|
|
7312
|
+
multiLocation: {
|
|
7313
|
+
parents: 1,
|
|
7314
|
+
interior: {
|
|
7315
|
+
Here: null
|
|
7316
|
+
}
|
|
7317
|
+
},
|
|
7318
|
+
isFeeAsset: true
|
|
7291
7319
|
}
|
|
7292
7320
|
],
|
|
7293
7321
|
otherAssets: [
|
|
@@ -7340,7 +7368,13 @@ var Curio = {
|
|
|
7340
7368
|
isNative: true,
|
|
7341
7369
|
symbol: "KSM",
|
|
7342
7370
|
decimals: 12,
|
|
7343
|
-
existentialDeposit: "333333333"
|
|
7371
|
+
existentialDeposit: "333333333",
|
|
7372
|
+
multiLocation: {
|
|
7373
|
+
parents: 1,
|
|
7374
|
+
interior: {
|
|
7375
|
+
Here: null
|
|
7376
|
+
}
|
|
7377
|
+
}
|
|
7344
7378
|
}
|
|
7345
7379
|
],
|
|
7346
7380
|
otherAssets: [
|
|
@@ -7986,7 +8020,13 @@ var Kintsugi = {
|
|
|
7986
8020
|
symbol: "KSM",
|
|
7987
8021
|
isNative: true,
|
|
7988
8022
|
decimals: 12,
|
|
7989
|
-
existentialDeposit: "0"
|
|
8023
|
+
existentialDeposit: "0",
|
|
8024
|
+
multiLocation: {
|
|
8025
|
+
parents: 1,
|
|
8026
|
+
interior: {
|
|
8027
|
+
Here: null
|
|
8028
|
+
}
|
|
8029
|
+
}
|
|
7990
8030
|
},
|
|
7991
8031
|
{
|
|
7992
8032
|
symbol: "INTR",
|
|
@@ -8283,7 +8323,14 @@ var PeopleKusama = {
|
|
|
8283
8323
|
symbol: "KSM",
|
|
8284
8324
|
isNative: true,
|
|
8285
8325
|
decimals: 12,
|
|
8286
|
-
existentialDeposit: "33333333"
|
|
8326
|
+
existentialDeposit: "33333333",
|
|
8327
|
+
multiLocation: {
|
|
8328
|
+
parents: 1,
|
|
8329
|
+
interior: {
|
|
8330
|
+
Here: null
|
|
8331
|
+
}
|
|
8332
|
+
},
|
|
8333
|
+
isFeeAsset: true
|
|
8287
8334
|
}
|
|
8288
8335
|
],
|
|
8289
8336
|
otherAssets: [
|
|
@@ -8301,7 +8348,14 @@ var PeoplePolkadot = {
|
|
|
8301
8348
|
symbol: "DOT",
|
|
8302
8349
|
isNative: true,
|
|
8303
8350
|
decimals: 10,
|
|
8304
|
-
existentialDeposit: "1000000000"
|
|
8351
|
+
existentialDeposit: "1000000000",
|
|
8352
|
+
multiLocation: {
|
|
8353
|
+
parents: 1,
|
|
8354
|
+
interior: {
|
|
8355
|
+
Here: null
|
|
8356
|
+
}
|
|
8357
|
+
},
|
|
8358
|
+
isFeeAsset: true
|
|
8305
8359
|
}
|
|
8306
8360
|
],
|
|
8307
8361
|
otherAssets: [
|
|
@@ -8680,13 +8734,14 @@ var AssetHubKusama = {
|
|
|
8680
8734
|
symbol: "KSM",
|
|
8681
8735
|
isNative: true,
|
|
8682
8736
|
decimals: 12,
|
|
8737
|
+
existentialDeposit: "3333333",
|
|
8683
8738
|
multiLocation: {
|
|
8684
8739
|
parents: 1,
|
|
8685
8740
|
interior: {
|
|
8686
8741
|
Here: null
|
|
8687
8742
|
}
|
|
8688
8743
|
},
|
|
8689
|
-
|
|
8744
|
+
isFeeAsset: true
|
|
8690
8745
|
}
|
|
8691
8746
|
],
|
|
8692
8747
|
otherAssets: [
|
|
@@ -8971,7 +9026,14 @@ var CoretimeKusama = {
|
|
|
8971
9026
|
symbol: "KSM",
|
|
8972
9027
|
isNative: true,
|
|
8973
9028
|
decimals: 12,
|
|
8974
|
-
existentialDeposit: "33333333"
|
|
9029
|
+
existentialDeposit: "33333333",
|
|
9030
|
+
multiLocation: {
|
|
9031
|
+
parents: 1,
|
|
9032
|
+
interior: {
|
|
9033
|
+
Here: null
|
|
9034
|
+
}
|
|
9035
|
+
},
|
|
9036
|
+
isFeeAsset: true
|
|
8975
9037
|
}
|
|
8976
9038
|
],
|
|
8977
9039
|
otherAssets: [
|
|
@@ -8989,7 +9051,14 @@ var CoretimePolkadot = {
|
|
|
8989
9051
|
symbol: "DOT",
|
|
8990
9052
|
isNative: true,
|
|
8991
9053
|
decimals: 10,
|
|
8992
|
-
existentialDeposit: "1000000000"
|
|
9054
|
+
existentialDeposit: "1000000000",
|
|
9055
|
+
multiLocation: {
|
|
9056
|
+
parents: 1,
|
|
9057
|
+
interior: {
|
|
9058
|
+
Here: null
|
|
9059
|
+
}
|
|
9060
|
+
},
|
|
9061
|
+
isFeeAsset: true
|
|
8993
9062
|
}
|
|
8994
9063
|
],
|
|
8995
9064
|
otherAssets: [
|
|
@@ -10282,7 +10351,14 @@ var Collectives = {
|
|
|
10282
10351
|
symbol: "DOT",
|
|
10283
10352
|
isNative: true,
|
|
10284
10353
|
decimals: 10,
|
|
10285
|
-
existentialDeposit: "1000000000"
|
|
10354
|
+
existentialDeposit: "1000000000",
|
|
10355
|
+
multiLocation: {
|
|
10356
|
+
parents: 1,
|
|
10357
|
+
interior: {
|
|
10358
|
+
Here: null
|
|
10359
|
+
}
|
|
10360
|
+
},
|
|
10361
|
+
isFeeAsset: true
|
|
10286
10362
|
}
|
|
10287
10363
|
],
|
|
10288
10364
|
otherAssets: [
|
|
@@ -11113,31 +11189,6 @@ var assetsMapJson = {
|
|
|
11113
11189
|
Peaq: Peaq
|
|
11114
11190
|
};
|
|
11115
11191
|
|
|
11116
|
-
var isForeignAsset = function isForeignAsset(asset) {
|
|
11117
|
-
return _typeof(asset) === 'object' && asset !== null && ('assetId' in asset || 'multiLocation' in asset) && !('isNative' in asset);
|
|
11118
|
-
};
|
|
11119
|
-
|
|
11120
|
-
var isOverrideMultiLocationSpecifier = function isOverrideMultiLocationSpecifier(multiLocationSpecifier) {
|
|
11121
|
-
return _typeof(multiLocationSpecifier) === 'object' && 'type' in multiLocationSpecifier && 'value' in multiLocationSpecifier;
|
|
11122
|
-
};
|
|
11123
|
-
|
|
11124
|
-
var isSymbolSpecifier = function isSymbolSpecifier(currencySymbolValue) {
|
|
11125
|
-
return _typeof(currencySymbolValue) === 'object' && 'type' in currencySymbolValue && 'value' in currencySymbolValue;
|
|
11126
|
-
};
|
|
11127
|
-
|
|
11128
|
-
var isTMultiAsset = function isTMultiAsset(value) {
|
|
11129
|
-
return _typeof(value) === 'object' && value !== null && 'id' in value && 'fun' in value;
|
|
11130
|
-
};
|
|
11131
|
-
|
|
11132
|
-
var filterEthCompatibleAssets = function filterEthCompatibleAssets(assets) {
|
|
11133
|
-
var ethAssets = getOtherAssets('Ethereum');
|
|
11134
|
-
return assets.filter(function (asset) {
|
|
11135
|
-
var assetMultiLoc = asset.multiLocation;
|
|
11136
|
-
if (!assetMultiLoc) return false;
|
|
11137
|
-
return Boolean(findAssetByMultiLocation(ethAssets, assetMultiLoc));
|
|
11138
|
-
});
|
|
11139
|
-
};
|
|
11140
|
-
|
|
11141
11192
|
/**
|
|
11142
11193
|
* Error thrown when multiple assets with the same symbol are found.
|
|
11143
11194
|
*/
|
|
@@ -11198,6 +11249,31 @@ var InvalidCurrencyError = /*#__PURE__*/function (_Error) {
|
|
|
11198
11249
|
return _createClass(InvalidCurrencyError);
|
|
11199
11250
|
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
11200
11251
|
|
|
11252
|
+
var isForeignAsset = function isForeignAsset(asset) {
|
|
11253
|
+
return _typeof(asset) === 'object' && asset !== null && ('assetId' in asset || 'multiLocation' in asset) && !('isNative' in asset);
|
|
11254
|
+
};
|
|
11255
|
+
|
|
11256
|
+
var isOverrideMultiLocationSpecifier = function isOverrideMultiLocationSpecifier(multiLocationSpecifier) {
|
|
11257
|
+
return _typeof(multiLocationSpecifier) === 'object' && 'type' in multiLocationSpecifier && 'value' in multiLocationSpecifier;
|
|
11258
|
+
};
|
|
11259
|
+
|
|
11260
|
+
var isSymbolSpecifier = function isSymbolSpecifier(currencySymbolValue) {
|
|
11261
|
+
return _typeof(currencySymbolValue) === 'object' && 'type' in currencySymbolValue && 'value' in currencySymbolValue;
|
|
11262
|
+
};
|
|
11263
|
+
|
|
11264
|
+
var isTMultiAsset = function isTMultiAsset(value) {
|
|
11265
|
+
return _typeof(value) === 'object' && value !== null && 'id' in value && 'fun' in value;
|
|
11266
|
+
};
|
|
11267
|
+
|
|
11268
|
+
var filterEthCompatibleAssets = function filterEthCompatibleAssets(assets) {
|
|
11269
|
+
var ethAssets = getOtherAssets('Ethereum');
|
|
11270
|
+
return assets.filter(function (asset) {
|
|
11271
|
+
var assetMultiLoc = asset.multiLocation;
|
|
11272
|
+
if (!assetMultiLoc) return false;
|
|
11273
|
+
return Boolean(findAssetByMultiLocation(ethAssets, assetMultiLoc));
|
|
11274
|
+
});
|
|
11275
|
+
};
|
|
11276
|
+
|
|
11201
11277
|
var findAssetById = function findAssetById(assets, assetId) {
|
|
11202
11278
|
var otherAssetsMatches = assets.filter(function (_ref) {
|
|
11203
11279
|
var currentAssetId = _ref.assetId;
|
|
@@ -11539,6 +11615,13 @@ var getExistentialDeposit = function getExistentialDeposit(node, currency) {
|
|
|
11539
11615
|
var asset = findAssetForNodeOrThrow(node, currency, null);
|
|
11540
11616
|
return (_asset$existentialDep = asset.existentialDeposit) !== null && _asset$existentialDep !== void 0 ? _asset$existentialDep : null;
|
|
11541
11617
|
};
|
|
11618
|
+
var getExistentialDepositOrThrow = function getExistentialDepositOrThrow(node, currency) {
|
|
11619
|
+
var ed = getExistentialDeposit(node, currency);
|
|
11620
|
+
if (ed === null) {
|
|
11621
|
+
throw new InvalidCurrencyError("Existential deposit not found for currency ".concat(JSON.stringify(currency), " on node ").concat(node, "."));
|
|
11622
|
+
}
|
|
11623
|
+
return BigInt(ed);
|
|
11624
|
+
};
|
|
11542
11625
|
|
|
11543
11626
|
var _excluded = ["isFeeAsset"];
|
|
11544
11627
|
var getFeeAssets = function getFeeAssets(node) {
|
|
@@ -11819,4 +11902,4 @@ var getAssetMultiLocation = function getAssetMultiLocation(node, currency) {
|
|
|
11819
11902
|
return asset.multiLocation;
|
|
11820
11903
|
};
|
|
11821
11904
|
|
|
11822
|
-
export { DuplicateAssetError, DuplicateAssetIdError, Foreign, ForeignAbstract, InvalidCurrencyError, Native, Override, compareMultiLocations, extractMultiAssetLoc, filterEthCompatibleAssets, findAsset, findAssetById, findAssetByMultiLocation, findAssetBySymbol, findAssetForNodeOrThrow, findAssetOnDestOrThrow, findBestMatches, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetMultiLocation, getAssets, getAssetsObject, getExistentialDeposit, getFeeAssets, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, hasDryRunSupport, hasSupportForAsset, hasXcmPaymentApiSupport, isAssetEqual, isForeignAsset, isNodeEvm, isOverrideMultiLocationSpecifier, isSymbolSpecifier, isTMultiAsset, normalizeSymbol };
|
|
11905
|
+
export { DuplicateAssetError, DuplicateAssetIdError, Foreign, ForeignAbstract, InvalidCurrencyError, Native, Override, compareMultiLocations, extractMultiAssetLoc, filterEthCompatibleAssets, findAsset, findAssetById, findAssetByMultiLocation, findAssetBySymbol, findAssetForNodeOrThrow, findAssetOnDestOrThrow, findBestMatches, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetMultiLocation, getAssets, getAssetsObject, getExistentialDeposit, getExistentialDepositOrThrow, getFeeAssets, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, hasDryRunSupport, hasSupportForAsset, hasXcmPaymentApiSupport, isAssetEqual, isForeignAsset, isNodeEvm, isOverrideMultiLocationSpecifier, isSymbolSpecifier, isTMultiAsset, normalizeSymbol };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/assets",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.4.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.4.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/plugin-syntax-import-attributes": "^7.27.1",
|