@paraspell/assets 10.3.1 → 10.4.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/index.cjs +130 -44
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +130 -45
- 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: [
|
|
@@ -2813,13 +2827,15 @@ var Hydration = {
|
|
|
2813
2827
|
symbol: "KSM",
|
|
2814
2828
|
decimals: 12,
|
|
2815
2829
|
multiLocation: {
|
|
2816
|
-
parents:
|
|
2830
|
+
parents: 2,
|
|
2817
2831
|
interior: {
|
|
2818
|
-
X1:
|
|
2819
|
-
|
|
2820
|
-
|
|
2832
|
+
X1: [
|
|
2833
|
+
{
|
|
2834
|
+
GlobalConsensus: {
|
|
2835
|
+
kusama: null
|
|
2836
|
+
}
|
|
2821
2837
|
}
|
|
2822
|
-
|
|
2838
|
+
]
|
|
2823
2839
|
}
|
|
2824
2840
|
},
|
|
2825
2841
|
existentialDeposit: "313283208"
|
|
@@ -4346,7 +4362,13 @@ var Interlay = {
|
|
|
4346
4362
|
symbol: "DOT",
|
|
4347
4363
|
isNative: true,
|
|
4348
4364
|
decimals: 10,
|
|
4349
|
-
existentialDeposit: "0"
|
|
4365
|
+
existentialDeposit: "0",
|
|
4366
|
+
multiLocation: {
|
|
4367
|
+
parents: 1,
|
|
4368
|
+
interior: {
|
|
4369
|
+
Here: null
|
|
4370
|
+
}
|
|
4371
|
+
}
|
|
4350
4372
|
},
|
|
4351
4373
|
{
|
|
4352
4374
|
symbol: "KINT",
|
|
@@ -5953,13 +5975,14 @@ var AssetHubPolkadot = {
|
|
|
5953
5975
|
symbol: "DOT",
|
|
5954
5976
|
isNative: true,
|
|
5955
5977
|
decimals: 10,
|
|
5978
|
+
existentialDeposit: "100000000",
|
|
5956
5979
|
multiLocation: {
|
|
5957
5980
|
parents: 1,
|
|
5958
5981
|
interior: {
|
|
5959
5982
|
Here: null
|
|
5960
5983
|
}
|
|
5961
5984
|
},
|
|
5962
|
-
|
|
5985
|
+
isFeeAsset: true
|
|
5963
5986
|
}
|
|
5964
5987
|
],
|
|
5965
5988
|
otherAssets: [
|
|
@@ -7289,7 +7312,14 @@ var Encointer = {
|
|
|
7289
7312
|
symbol: "KSM",
|
|
7290
7313
|
isNative: true,
|
|
7291
7314
|
decimals: 12,
|
|
7292
|
-
existentialDeposit: "33333333"
|
|
7315
|
+
existentialDeposit: "33333333",
|
|
7316
|
+
multiLocation: {
|
|
7317
|
+
parents: 1,
|
|
7318
|
+
interior: {
|
|
7319
|
+
Here: null
|
|
7320
|
+
}
|
|
7321
|
+
},
|
|
7322
|
+
isFeeAsset: true
|
|
7293
7323
|
}
|
|
7294
7324
|
],
|
|
7295
7325
|
otherAssets: [
|
|
@@ -7342,7 +7372,13 @@ var Curio = {
|
|
|
7342
7372
|
isNative: true,
|
|
7343
7373
|
symbol: "KSM",
|
|
7344
7374
|
decimals: 12,
|
|
7345
|
-
existentialDeposit: "333333333"
|
|
7375
|
+
existentialDeposit: "333333333",
|
|
7376
|
+
multiLocation: {
|
|
7377
|
+
parents: 1,
|
|
7378
|
+
interior: {
|
|
7379
|
+
Here: null
|
|
7380
|
+
}
|
|
7381
|
+
}
|
|
7346
7382
|
}
|
|
7347
7383
|
],
|
|
7348
7384
|
otherAssets: [
|
|
@@ -7988,7 +8024,13 @@ var Kintsugi = {
|
|
|
7988
8024
|
symbol: "KSM",
|
|
7989
8025
|
isNative: true,
|
|
7990
8026
|
decimals: 12,
|
|
7991
|
-
existentialDeposit: "0"
|
|
8027
|
+
existentialDeposit: "0",
|
|
8028
|
+
multiLocation: {
|
|
8029
|
+
parents: 1,
|
|
8030
|
+
interior: {
|
|
8031
|
+
Here: null
|
|
8032
|
+
}
|
|
8033
|
+
}
|
|
7992
8034
|
},
|
|
7993
8035
|
{
|
|
7994
8036
|
symbol: "INTR",
|
|
@@ -8285,7 +8327,14 @@ var PeopleKusama = {
|
|
|
8285
8327
|
symbol: "KSM",
|
|
8286
8328
|
isNative: true,
|
|
8287
8329
|
decimals: 12,
|
|
8288
|
-
existentialDeposit: "33333333"
|
|
8330
|
+
existentialDeposit: "33333333",
|
|
8331
|
+
multiLocation: {
|
|
8332
|
+
parents: 1,
|
|
8333
|
+
interior: {
|
|
8334
|
+
Here: null
|
|
8335
|
+
}
|
|
8336
|
+
},
|
|
8337
|
+
isFeeAsset: true
|
|
8289
8338
|
}
|
|
8290
8339
|
],
|
|
8291
8340
|
otherAssets: [
|
|
@@ -8303,7 +8352,14 @@ var PeoplePolkadot = {
|
|
|
8303
8352
|
symbol: "DOT",
|
|
8304
8353
|
isNative: true,
|
|
8305
8354
|
decimals: 10,
|
|
8306
|
-
existentialDeposit: "1000000000"
|
|
8355
|
+
existentialDeposit: "1000000000",
|
|
8356
|
+
multiLocation: {
|
|
8357
|
+
parents: 1,
|
|
8358
|
+
interior: {
|
|
8359
|
+
Here: null
|
|
8360
|
+
}
|
|
8361
|
+
},
|
|
8362
|
+
isFeeAsset: true
|
|
8307
8363
|
}
|
|
8308
8364
|
],
|
|
8309
8365
|
otherAssets: [
|
|
@@ -8682,13 +8738,14 @@ var AssetHubKusama = {
|
|
|
8682
8738
|
symbol: "KSM",
|
|
8683
8739
|
isNative: true,
|
|
8684
8740
|
decimals: 12,
|
|
8741
|
+
existentialDeposit: "3333333",
|
|
8685
8742
|
multiLocation: {
|
|
8686
8743
|
parents: 1,
|
|
8687
8744
|
interior: {
|
|
8688
8745
|
Here: null
|
|
8689
8746
|
}
|
|
8690
8747
|
},
|
|
8691
|
-
|
|
8748
|
+
isFeeAsset: true
|
|
8692
8749
|
}
|
|
8693
8750
|
],
|
|
8694
8751
|
otherAssets: [
|
|
@@ -8973,7 +9030,14 @@ var CoretimeKusama = {
|
|
|
8973
9030
|
symbol: "KSM",
|
|
8974
9031
|
isNative: true,
|
|
8975
9032
|
decimals: 12,
|
|
8976
|
-
existentialDeposit: "33333333"
|
|
9033
|
+
existentialDeposit: "33333333",
|
|
9034
|
+
multiLocation: {
|
|
9035
|
+
parents: 1,
|
|
9036
|
+
interior: {
|
|
9037
|
+
Here: null
|
|
9038
|
+
}
|
|
9039
|
+
},
|
|
9040
|
+
isFeeAsset: true
|
|
8977
9041
|
}
|
|
8978
9042
|
],
|
|
8979
9043
|
otherAssets: [
|
|
@@ -8991,7 +9055,14 @@ var CoretimePolkadot = {
|
|
|
8991
9055
|
symbol: "DOT",
|
|
8992
9056
|
isNative: true,
|
|
8993
9057
|
decimals: 10,
|
|
8994
|
-
existentialDeposit: "1000000000"
|
|
9058
|
+
existentialDeposit: "1000000000",
|
|
9059
|
+
multiLocation: {
|
|
9060
|
+
parents: 1,
|
|
9061
|
+
interior: {
|
|
9062
|
+
Here: null
|
|
9063
|
+
}
|
|
9064
|
+
},
|
|
9065
|
+
isFeeAsset: true
|
|
8995
9066
|
}
|
|
8996
9067
|
],
|
|
8997
9068
|
otherAssets: [
|
|
@@ -10284,7 +10355,14 @@ var Collectives = {
|
|
|
10284
10355
|
symbol: "DOT",
|
|
10285
10356
|
isNative: true,
|
|
10286
10357
|
decimals: 10,
|
|
10287
|
-
existentialDeposit: "1000000000"
|
|
10358
|
+
existentialDeposit: "1000000000",
|
|
10359
|
+
multiLocation: {
|
|
10360
|
+
parents: 1,
|
|
10361
|
+
interior: {
|
|
10362
|
+
Here: null
|
|
10363
|
+
}
|
|
10364
|
+
},
|
|
10365
|
+
isFeeAsset: true
|
|
10288
10366
|
}
|
|
10289
10367
|
],
|
|
10290
10368
|
otherAssets: [
|
|
@@ -10663,7 +10741,7 @@ var Ethereum = {
|
|
|
10663
10741
|
X1: [
|
|
10664
10742
|
{
|
|
10665
10743
|
GlobalConsensus: {
|
|
10666
|
-
|
|
10744
|
+
kusama: null
|
|
10667
10745
|
}
|
|
10668
10746
|
}
|
|
10669
10747
|
]
|
|
@@ -11115,31 +11193,6 @@ var assetsMapJson = {
|
|
|
11115
11193
|
Peaq: Peaq
|
|
11116
11194
|
};
|
|
11117
11195
|
|
|
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
11196
|
/**
|
|
11144
11197
|
* Error thrown when multiple assets with the same symbol are found.
|
|
11145
11198
|
*/
|
|
@@ -11200,6 +11253,31 @@ var InvalidCurrencyError = /*#__PURE__*/function (_Error) {
|
|
|
11200
11253
|
return _createClass(InvalidCurrencyError);
|
|
11201
11254
|
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
11202
11255
|
|
|
11256
|
+
var isForeignAsset = function isForeignAsset(asset) {
|
|
11257
|
+
return _typeof(asset) === 'object' && asset !== null && ('assetId' in asset || 'multiLocation' in asset) && !('isNative' in asset);
|
|
11258
|
+
};
|
|
11259
|
+
|
|
11260
|
+
var isOverrideMultiLocationSpecifier = function isOverrideMultiLocationSpecifier(multiLocationSpecifier) {
|
|
11261
|
+
return _typeof(multiLocationSpecifier) === 'object' && 'type' in multiLocationSpecifier && 'value' in multiLocationSpecifier;
|
|
11262
|
+
};
|
|
11263
|
+
|
|
11264
|
+
var isSymbolSpecifier = function isSymbolSpecifier(currencySymbolValue) {
|
|
11265
|
+
return _typeof(currencySymbolValue) === 'object' && 'type' in currencySymbolValue && 'value' in currencySymbolValue;
|
|
11266
|
+
};
|
|
11267
|
+
|
|
11268
|
+
var isTMultiAsset = function isTMultiAsset(value) {
|
|
11269
|
+
return _typeof(value) === 'object' && value !== null && 'id' in value && 'fun' in value;
|
|
11270
|
+
};
|
|
11271
|
+
|
|
11272
|
+
var filterEthCompatibleAssets = function filterEthCompatibleAssets(assets) {
|
|
11273
|
+
var ethAssets = getOtherAssets('Ethereum');
|
|
11274
|
+
return assets.filter(function (asset) {
|
|
11275
|
+
var assetMultiLoc = asset.multiLocation;
|
|
11276
|
+
if (!assetMultiLoc) return false;
|
|
11277
|
+
return Boolean(findAssetByMultiLocation(ethAssets, assetMultiLoc));
|
|
11278
|
+
});
|
|
11279
|
+
};
|
|
11280
|
+
|
|
11203
11281
|
var findAssetById = function findAssetById(assets, assetId) {
|
|
11204
11282
|
var otherAssetsMatches = assets.filter(function (_ref) {
|
|
11205
11283
|
var currentAssetId = _ref.assetId;
|
|
@@ -11541,6 +11619,13 @@ var getExistentialDeposit = function getExistentialDeposit(node, currency) {
|
|
|
11541
11619
|
var asset = findAssetForNodeOrThrow(node, currency, null);
|
|
11542
11620
|
return (_asset$existentialDep = asset.existentialDeposit) !== null && _asset$existentialDep !== void 0 ? _asset$existentialDep : null;
|
|
11543
11621
|
};
|
|
11622
|
+
var getExistentialDepositOrThrow = function getExistentialDepositOrThrow(node, currency) {
|
|
11623
|
+
var ed = getExistentialDeposit(node, currency);
|
|
11624
|
+
if (ed === null) {
|
|
11625
|
+
throw new InvalidCurrencyError("Existential deposit not found for currency ".concat(JSON.stringify(currency), " on node ").concat(node, "."));
|
|
11626
|
+
}
|
|
11627
|
+
return BigInt(ed);
|
|
11628
|
+
};
|
|
11544
11629
|
|
|
11545
11630
|
var _excluded = ["isFeeAsset"];
|
|
11546
11631
|
var getFeeAssets = function getFeeAssets(node) {
|
|
@@ -11845,6 +11930,7 @@ exports.getAssetMultiLocation = getAssetMultiLocation;
|
|
|
11845
11930
|
exports.getAssets = getAssets;
|
|
11846
11931
|
exports.getAssetsObject = getAssetsObject;
|
|
11847
11932
|
exports.getExistentialDeposit = getExistentialDeposit;
|
|
11933
|
+
exports.getExistentialDepositOrThrow = getExistentialDepositOrThrow;
|
|
11848
11934
|
exports.getFeeAssets = getFeeAssets;
|
|
11849
11935
|
exports.getNativeAssetSymbol = getNativeAssetSymbol;
|
|
11850
11936
|
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: [
|
|
@@ -2811,13 +2825,15 @@ var Hydration = {
|
|
|
2811
2825
|
symbol: "KSM",
|
|
2812
2826
|
decimals: 12,
|
|
2813
2827
|
multiLocation: {
|
|
2814
|
-
parents:
|
|
2828
|
+
parents: 2,
|
|
2815
2829
|
interior: {
|
|
2816
|
-
X1:
|
|
2817
|
-
|
|
2818
|
-
|
|
2830
|
+
X1: [
|
|
2831
|
+
{
|
|
2832
|
+
GlobalConsensus: {
|
|
2833
|
+
kusama: null
|
|
2834
|
+
}
|
|
2819
2835
|
}
|
|
2820
|
-
|
|
2836
|
+
]
|
|
2821
2837
|
}
|
|
2822
2838
|
},
|
|
2823
2839
|
existentialDeposit: "313283208"
|
|
@@ -4344,7 +4360,13 @@ var Interlay = {
|
|
|
4344
4360
|
symbol: "DOT",
|
|
4345
4361
|
isNative: true,
|
|
4346
4362
|
decimals: 10,
|
|
4347
|
-
existentialDeposit: "0"
|
|
4363
|
+
existentialDeposit: "0",
|
|
4364
|
+
multiLocation: {
|
|
4365
|
+
parents: 1,
|
|
4366
|
+
interior: {
|
|
4367
|
+
Here: null
|
|
4368
|
+
}
|
|
4369
|
+
}
|
|
4348
4370
|
},
|
|
4349
4371
|
{
|
|
4350
4372
|
symbol: "KINT",
|
|
@@ -5951,13 +5973,14 @@ var AssetHubPolkadot = {
|
|
|
5951
5973
|
symbol: "DOT",
|
|
5952
5974
|
isNative: true,
|
|
5953
5975
|
decimals: 10,
|
|
5976
|
+
existentialDeposit: "100000000",
|
|
5954
5977
|
multiLocation: {
|
|
5955
5978
|
parents: 1,
|
|
5956
5979
|
interior: {
|
|
5957
5980
|
Here: null
|
|
5958
5981
|
}
|
|
5959
5982
|
},
|
|
5960
|
-
|
|
5983
|
+
isFeeAsset: true
|
|
5961
5984
|
}
|
|
5962
5985
|
],
|
|
5963
5986
|
otherAssets: [
|
|
@@ -7287,7 +7310,14 @@ var Encointer = {
|
|
|
7287
7310
|
symbol: "KSM",
|
|
7288
7311
|
isNative: true,
|
|
7289
7312
|
decimals: 12,
|
|
7290
|
-
existentialDeposit: "33333333"
|
|
7313
|
+
existentialDeposit: "33333333",
|
|
7314
|
+
multiLocation: {
|
|
7315
|
+
parents: 1,
|
|
7316
|
+
interior: {
|
|
7317
|
+
Here: null
|
|
7318
|
+
}
|
|
7319
|
+
},
|
|
7320
|
+
isFeeAsset: true
|
|
7291
7321
|
}
|
|
7292
7322
|
],
|
|
7293
7323
|
otherAssets: [
|
|
@@ -7340,7 +7370,13 @@ var Curio = {
|
|
|
7340
7370
|
isNative: true,
|
|
7341
7371
|
symbol: "KSM",
|
|
7342
7372
|
decimals: 12,
|
|
7343
|
-
existentialDeposit: "333333333"
|
|
7373
|
+
existentialDeposit: "333333333",
|
|
7374
|
+
multiLocation: {
|
|
7375
|
+
parents: 1,
|
|
7376
|
+
interior: {
|
|
7377
|
+
Here: null
|
|
7378
|
+
}
|
|
7379
|
+
}
|
|
7344
7380
|
}
|
|
7345
7381
|
],
|
|
7346
7382
|
otherAssets: [
|
|
@@ -7986,7 +8022,13 @@ var Kintsugi = {
|
|
|
7986
8022
|
symbol: "KSM",
|
|
7987
8023
|
isNative: true,
|
|
7988
8024
|
decimals: 12,
|
|
7989
|
-
existentialDeposit: "0"
|
|
8025
|
+
existentialDeposit: "0",
|
|
8026
|
+
multiLocation: {
|
|
8027
|
+
parents: 1,
|
|
8028
|
+
interior: {
|
|
8029
|
+
Here: null
|
|
8030
|
+
}
|
|
8031
|
+
}
|
|
7990
8032
|
},
|
|
7991
8033
|
{
|
|
7992
8034
|
symbol: "INTR",
|
|
@@ -8283,7 +8325,14 @@ var PeopleKusama = {
|
|
|
8283
8325
|
symbol: "KSM",
|
|
8284
8326
|
isNative: true,
|
|
8285
8327
|
decimals: 12,
|
|
8286
|
-
existentialDeposit: "33333333"
|
|
8328
|
+
existentialDeposit: "33333333",
|
|
8329
|
+
multiLocation: {
|
|
8330
|
+
parents: 1,
|
|
8331
|
+
interior: {
|
|
8332
|
+
Here: null
|
|
8333
|
+
}
|
|
8334
|
+
},
|
|
8335
|
+
isFeeAsset: true
|
|
8287
8336
|
}
|
|
8288
8337
|
],
|
|
8289
8338
|
otherAssets: [
|
|
@@ -8301,7 +8350,14 @@ var PeoplePolkadot = {
|
|
|
8301
8350
|
symbol: "DOT",
|
|
8302
8351
|
isNative: true,
|
|
8303
8352
|
decimals: 10,
|
|
8304
|
-
existentialDeposit: "1000000000"
|
|
8353
|
+
existentialDeposit: "1000000000",
|
|
8354
|
+
multiLocation: {
|
|
8355
|
+
parents: 1,
|
|
8356
|
+
interior: {
|
|
8357
|
+
Here: null
|
|
8358
|
+
}
|
|
8359
|
+
},
|
|
8360
|
+
isFeeAsset: true
|
|
8305
8361
|
}
|
|
8306
8362
|
],
|
|
8307
8363
|
otherAssets: [
|
|
@@ -8680,13 +8736,14 @@ var AssetHubKusama = {
|
|
|
8680
8736
|
symbol: "KSM",
|
|
8681
8737
|
isNative: true,
|
|
8682
8738
|
decimals: 12,
|
|
8739
|
+
existentialDeposit: "3333333",
|
|
8683
8740
|
multiLocation: {
|
|
8684
8741
|
parents: 1,
|
|
8685
8742
|
interior: {
|
|
8686
8743
|
Here: null
|
|
8687
8744
|
}
|
|
8688
8745
|
},
|
|
8689
|
-
|
|
8746
|
+
isFeeAsset: true
|
|
8690
8747
|
}
|
|
8691
8748
|
],
|
|
8692
8749
|
otherAssets: [
|
|
@@ -8971,7 +9028,14 @@ var CoretimeKusama = {
|
|
|
8971
9028
|
symbol: "KSM",
|
|
8972
9029
|
isNative: true,
|
|
8973
9030
|
decimals: 12,
|
|
8974
|
-
existentialDeposit: "33333333"
|
|
9031
|
+
existentialDeposit: "33333333",
|
|
9032
|
+
multiLocation: {
|
|
9033
|
+
parents: 1,
|
|
9034
|
+
interior: {
|
|
9035
|
+
Here: null
|
|
9036
|
+
}
|
|
9037
|
+
},
|
|
9038
|
+
isFeeAsset: true
|
|
8975
9039
|
}
|
|
8976
9040
|
],
|
|
8977
9041
|
otherAssets: [
|
|
@@ -8989,7 +9053,14 @@ var CoretimePolkadot = {
|
|
|
8989
9053
|
symbol: "DOT",
|
|
8990
9054
|
isNative: true,
|
|
8991
9055
|
decimals: 10,
|
|
8992
|
-
existentialDeposit: "1000000000"
|
|
9056
|
+
existentialDeposit: "1000000000",
|
|
9057
|
+
multiLocation: {
|
|
9058
|
+
parents: 1,
|
|
9059
|
+
interior: {
|
|
9060
|
+
Here: null
|
|
9061
|
+
}
|
|
9062
|
+
},
|
|
9063
|
+
isFeeAsset: true
|
|
8993
9064
|
}
|
|
8994
9065
|
],
|
|
8995
9066
|
otherAssets: [
|
|
@@ -10282,7 +10353,14 @@ var Collectives = {
|
|
|
10282
10353
|
symbol: "DOT",
|
|
10283
10354
|
isNative: true,
|
|
10284
10355
|
decimals: 10,
|
|
10285
|
-
existentialDeposit: "1000000000"
|
|
10356
|
+
existentialDeposit: "1000000000",
|
|
10357
|
+
multiLocation: {
|
|
10358
|
+
parents: 1,
|
|
10359
|
+
interior: {
|
|
10360
|
+
Here: null
|
|
10361
|
+
}
|
|
10362
|
+
},
|
|
10363
|
+
isFeeAsset: true
|
|
10286
10364
|
}
|
|
10287
10365
|
],
|
|
10288
10366
|
otherAssets: [
|
|
@@ -10661,7 +10739,7 @@ var Ethereum = {
|
|
|
10661
10739
|
X1: [
|
|
10662
10740
|
{
|
|
10663
10741
|
GlobalConsensus: {
|
|
10664
|
-
|
|
10742
|
+
kusama: null
|
|
10665
10743
|
}
|
|
10666
10744
|
}
|
|
10667
10745
|
]
|
|
@@ -11113,31 +11191,6 @@ var assetsMapJson = {
|
|
|
11113
11191
|
Peaq: Peaq
|
|
11114
11192
|
};
|
|
11115
11193
|
|
|
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
11194
|
/**
|
|
11142
11195
|
* Error thrown when multiple assets with the same symbol are found.
|
|
11143
11196
|
*/
|
|
@@ -11198,6 +11251,31 @@ var InvalidCurrencyError = /*#__PURE__*/function (_Error) {
|
|
|
11198
11251
|
return _createClass(InvalidCurrencyError);
|
|
11199
11252
|
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
11200
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
|
+
|
|
11201
11279
|
var findAssetById = function findAssetById(assets, assetId) {
|
|
11202
11280
|
var otherAssetsMatches = assets.filter(function (_ref) {
|
|
11203
11281
|
var currentAssetId = _ref.assetId;
|
|
@@ -11539,6 +11617,13 @@ var getExistentialDeposit = function getExistentialDeposit(node, currency) {
|
|
|
11539
11617
|
var asset = findAssetForNodeOrThrow(node, currency, null);
|
|
11540
11618
|
return (_asset$existentialDep = asset.existentialDeposit) !== null && _asset$existentialDep !== void 0 ? _asset$existentialDep : null;
|
|
11541
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
|
+
};
|
|
11542
11627
|
|
|
11543
11628
|
var _excluded = ["isFeeAsset"];
|
|
11544
11629
|
var getFeeAssets = function getFeeAssets(node) {
|
|
@@ -11819,4 +11904,4 @@ var getAssetMultiLocation = function getAssetMultiLocation(node, currency) {
|
|
|
11819
11904
|
return asset.multiLocation;
|
|
11820
11905
|
};
|
|
11821
11906
|
|
|
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 };
|
|
11907
|
+
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.1",
|
|
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.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/plugin-syntax-import-attributes": "^7.27.1",
|