@paraspell/sdk-core 8.7.1 → 8.8.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 +165 -86
- package/dist/index.d.ts +3 -1
- package/dist/index.mjs +165 -87
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3729,14 +3729,42 @@ var resolveAsset = function resolveAsset(currency, origin, destination, assetChe
|
|
|
3729
3729
|
return assetCheckEnabled ? getAssetBySymbolOrId(origin, currency, !isTMultiLocation(destination) ? destination : null) : null;
|
|
3730
3730
|
};
|
|
3731
3731
|
|
|
3732
|
-
var resolveFeeAsset = function resolveFeeAsset(feeAsset, origin, destination) {
|
|
3732
|
+
var resolveFeeAsset = function resolveFeeAsset(feeAsset, origin, destination, currency) {
|
|
3733
3733
|
var asset = getAssetBySymbolOrId(origin, feeAsset, !isTMultiLocation(destination) ? destination : null);
|
|
3734
|
-
|
|
3734
|
+
var usesRawOverriddenMultiAssets = 'multiasset' in currency && currency.multiasset.every(isTMultiAsset);
|
|
3735
|
+
if (!asset && !usesRawOverriddenMultiAssets) {
|
|
3735
3736
|
throwUnsupportedCurrency(feeAsset, origin);
|
|
3736
3737
|
}
|
|
3737
3738
|
return asset !== null && asset !== void 0 ? asset : undefined;
|
|
3738
3739
|
};
|
|
3739
3740
|
|
|
3741
|
+
var extractMultiAssetLoc = function extractMultiAssetLoc(multiAsset) {
|
|
3742
|
+
return 'Concrete' in multiAsset.id ? multiAsset.id.Concrete : multiAsset.id;
|
|
3743
|
+
};
|
|
3744
|
+
|
|
3745
|
+
var transformMultiLocation = function transformMultiLocation(multiLocation) {
|
|
3746
|
+
var newInterior;
|
|
3747
|
+
if (multiLocation.interior === 'Here') {
|
|
3748
|
+
newInterior = 'Here';
|
|
3749
|
+
} else {
|
|
3750
|
+
var junctions = Object.values(multiLocation.interior).flat().filter(function (junction) {
|
|
3751
|
+
return _typeof(junction) === 'object' && junction !== null;
|
|
3752
|
+
});
|
|
3753
|
+
var filteredJunctions = junctions.filter(function (junction) {
|
|
3754
|
+
return !('Parachain' in junction);
|
|
3755
|
+
});
|
|
3756
|
+
if (filteredJunctions.length === 0) {
|
|
3757
|
+
newInterior = 'Here';
|
|
3758
|
+
} else {
|
|
3759
|
+
newInterior = _defineProperty({}, "X".concat(filteredJunctions.length), filteredJunctions);
|
|
3760
|
+
}
|
|
3761
|
+
}
|
|
3762
|
+
return _objectSpread2(_objectSpread2({}, multiLocation), {}, {
|
|
3763
|
+
parents: exports.Parents.ZERO,
|
|
3764
|
+
interior: newInterior
|
|
3765
|
+
});
|
|
3766
|
+
};
|
|
3767
|
+
|
|
3740
3768
|
var AssetHubPolkadot$2 = {
|
|
3741
3769
|
defaultPallet: "PolkadotXcm",
|
|
3742
3770
|
supportedPallets: [
|
|
@@ -4553,7 +4581,9 @@ var validateCurrency = function validateCurrency(currency, feeAsset) {
|
|
|
4553
4581
|
if (currency.multiasset.length === 1) {
|
|
4554
4582
|
throw new InvalidCurrencyError('Please provide more than one multi asset');
|
|
4555
4583
|
}
|
|
4556
|
-
if (currency.multiasset.length > 1 && !
|
|
4584
|
+
if (currency.multiasset.length > 1 && !currency.multiasset.every(function (asset) {
|
|
4585
|
+
return isTMultiAsset(asset);
|
|
4586
|
+
}) && !feeAsset) {
|
|
4557
4587
|
throw new InvalidCurrencyError('Overridden multi assets cannot be used without specifying fee asset');
|
|
4558
4588
|
}
|
|
4559
4589
|
}
|
|
@@ -4615,8 +4645,9 @@ var validateAssetSupport = function validateAssetSupport(_ref, assetCheckEnabled
|
|
|
4615
4645
|
}
|
|
4616
4646
|
};
|
|
4617
4647
|
|
|
4618
|
-
var resolveOverriddenAsset = function resolveOverriddenAsset(options, isBridge, assetCheckEnabled,
|
|
4648
|
+
var resolveOverriddenAsset = function resolveOverriddenAsset(options, isBridge, assetCheckEnabled, resolvedFeeAsset) {
|
|
4619
4649
|
var currency = options.currency,
|
|
4650
|
+
feeAsset = options.feeAsset,
|
|
4620
4651
|
origin = options.from,
|
|
4621
4652
|
destination = options.to;
|
|
4622
4653
|
if ('multilocation' in currency && isOverrideMultiLocationSpecifier(currency.multilocation)) {
|
|
@@ -4626,10 +4657,24 @@ var resolveOverriddenAsset = function resolveOverriddenAsset(options, isBridge,
|
|
|
4626
4657
|
if (!feeAsset) {
|
|
4627
4658
|
throw new InvalidCurrencyError('Overridden multi assets cannot be used without specifying fee asset');
|
|
4628
4659
|
}
|
|
4660
|
+
if ('multilocation' in feeAsset && isOverrideMultiLocationSpecifier(feeAsset.multilocation)) {
|
|
4661
|
+
throw new InvalidCurrencyError('Fee asset cannot be an overridden multi location specifier');
|
|
4662
|
+
}
|
|
4629
4663
|
if (currency.multiasset.every(function (asset) {
|
|
4630
4664
|
return isTMultiAsset(asset);
|
|
4631
4665
|
})) {
|
|
4632
|
-
|
|
4666
|
+
if (!feeAsset) {
|
|
4667
|
+
throw new InvalidCurrencyError('Fee asset not provided');
|
|
4668
|
+
}
|
|
4669
|
+
if (!('multilocation' in feeAsset)) {
|
|
4670
|
+
throw new InvalidCurrencyError('Fee asset must be specified by multilocation when using raw overridden multi assets');
|
|
4671
|
+
}
|
|
4672
|
+
return currency.multiasset.map(function (multiAsset) {
|
|
4673
|
+
var ml = extractMultiAssetLoc(multiAsset);
|
|
4674
|
+
return _objectSpread2(_objectSpread2({}, multiAsset), {}, {
|
|
4675
|
+
isFeeAsset: _deepEqual(ml, feeAsset.multilocation)
|
|
4676
|
+
});
|
|
4677
|
+
});
|
|
4633
4678
|
}
|
|
4634
4679
|
// MultiAsset is an array of TCurrencyCore, search for assets
|
|
4635
4680
|
var assets = currency.multiasset.map(function (currency) {
|
|
@@ -4640,11 +4685,14 @@ var resolveOverriddenAsset = function resolveOverriddenAsset(options, isBridge,
|
|
|
4640
4685
|
if (!asset) {
|
|
4641
4686
|
throw new InvalidCurrencyError("Origin node ".concat(origin, " does not support currency ").concat(JSON.stringify(currency)));
|
|
4642
4687
|
}
|
|
4688
|
+
if (!resolvedFeeAsset) {
|
|
4689
|
+
throw new InvalidCurrencyError('Fee asset not found');
|
|
4690
|
+
}
|
|
4643
4691
|
validateAssetSupport(options, assetCheckEnabled, isBridge, asset);
|
|
4644
4692
|
var originTyped = origin;
|
|
4645
4693
|
var originNode = getNode(originTyped);
|
|
4646
4694
|
return _objectSpread2({
|
|
4647
|
-
isFeeAsset: isAssetEqual(
|
|
4695
|
+
isFeeAsset: isAssetEqual(resolvedFeeAsset, asset)
|
|
4648
4696
|
}, createMultiAsset(originNode.version, currency.amount, asset.multiLocation));
|
|
4649
4697
|
});
|
|
4650
4698
|
if (assets.filter(function (asset) {
|
|
@@ -4704,7 +4752,7 @@ var send = /*#__PURE__*/function () {
|
|
|
4704
4752
|
assetCheckEnabled = determineAssetCheckEnabled(origin, currency, isBridge);
|
|
4705
4753
|
validateAssetSpecifiers(assetCheckEnabled, currency);
|
|
4706
4754
|
asset = resolveAsset(currency, origin, destination, assetCheckEnabled);
|
|
4707
|
-
resolvedFeeAsset = feeAsset ? resolveFeeAsset(feeAsset, origin, destination) : undefined;
|
|
4755
|
+
resolvedFeeAsset = feeAsset ? resolveFeeAsset(feeAsset, origin, destination, currency) : undefined;
|
|
4708
4756
|
validateAssetSupport(options, assetCheckEnabled, isBridge, asset);
|
|
4709
4757
|
if (!isRelayChain(origin)) {
|
|
4710
4758
|
_context.next = 19;
|
|
@@ -5202,29 +5250,6 @@ var AssetHubKusama$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
5202
5250
|
}]);
|
|
5203
5251
|
}(ParachainNode);
|
|
5204
5252
|
|
|
5205
|
-
var transformMultiLocation = function transformMultiLocation(multiLocation) {
|
|
5206
|
-
var newInterior;
|
|
5207
|
-
if (multiLocation.interior === 'Here') {
|
|
5208
|
-
newInterior = 'Here';
|
|
5209
|
-
} else {
|
|
5210
|
-
var junctions = Object.values(multiLocation.interior).flat().filter(function (junction) {
|
|
5211
|
-
return _typeof(junction) === 'object' && junction !== null;
|
|
5212
|
-
});
|
|
5213
|
-
var filteredJunctions = junctions.filter(function (junction) {
|
|
5214
|
-
return !('Parachain' in junction);
|
|
5215
|
-
});
|
|
5216
|
-
if (filteredJunctions.length === 0) {
|
|
5217
|
-
newInterior = 'Here';
|
|
5218
|
-
} else {
|
|
5219
|
-
newInterior = _defineProperty({}, "X".concat(filteredJunctions.length), filteredJunctions);
|
|
5220
|
-
}
|
|
5221
|
-
}
|
|
5222
|
-
return _objectSpread2(_objectSpread2({}, multiLocation), {}, {
|
|
5223
|
-
parents: exports.Parents.ZERO,
|
|
5224
|
-
interior: newInterior
|
|
5225
|
-
});
|
|
5226
|
-
};
|
|
5227
|
-
|
|
5228
5253
|
var createExecuteXcm = function createExecuteXcm(input, weight, executionFee) {
|
|
5229
5254
|
var api = input.api,
|
|
5230
5255
|
_input$version = input.version,
|
|
@@ -5583,8 +5608,12 @@ var AssetHubPolkadot$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
5583
5608
|
var scenario = input.scenario,
|
|
5584
5609
|
asset = input.asset,
|
|
5585
5610
|
destination = input.destination,
|
|
5586
|
-
feeAsset = input.feeAsset
|
|
5611
|
+
feeAsset = input.feeAsset,
|
|
5612
|
+
overriddenAsset = input.overriddenAsset;
|
|
5587
5613
|
if (feeAsset) {
|
|
5614
|
+
if (overriddenAsset) {
|
|
5615
|
+
throw new InvalidCurrencyError('Cannot use overridden multi-assets with XCM execute');
|
|
5616
|
+
}
|
|
5588
5617
|
if (!isAssetEqual(feeAsset, asset)) {
|
|
5589
5618
|
throw new InvalidCurrencyError("Fee asset does not match transfer asset.");
|
|
5590
5619
|
}
|
|
@@ -8781,28 +8810,6 @@ var BifrostPolkadot = {
|
|
|
8781
8810
|
},
|
|
8782
8811
|
existentialDeposit: "1000000000000"
|
|
8783
8812
|
},
|
|
8784
|
-
{
|
|
8785
|
-
assetId: "4",
|
|
8786
|
-
symbol: "vFIL",
|
|
8787
|
-
decimals: 18,
|
|
8788
|
-
multiLocation: {
|
|
8789
|
-
parents: 1,
|
|
8790
|
-
interior: {
|
|
8791
|
-
X2: [
|
|
8792
|
-
{
|
|
8793
|
-
Parachain: 2030
|
|
8794
|
-
},
|
|
8795
|
-
{
|
|
8796
|
-
GeneralKey: {
|
|
8797
|
-
length: 2,
|
|
8798
|
-
data: "0x0904000000000000000000000000000000000000000000000000000000000000"
|
|
8799
|
-
}
|
|
8800
|
-
}
|
|
8801
|
-
]
|
|
8802
|
-
}
|
|
8803
|
-
},
|
|
8804
|
-
existentialDeposit: "1000000000000"
|
|
8805
|
-
},
|
|
8806
8813
|
{
|
|
8807
8814
|
assetId: "9",
|
|
8808
8815
|
symbol: "BNCS",
|
|
@@ -8825,28 +8832,6 @@ var BifrostPolkadot = {
|
|
|
8825
8832
|
},
|
|
8826
8833
|
existentialDeposit: "10000000000"
|
|
8827
8834
|
},
|
|
8828
|
-
{
|
|
8829
|
-
assetId: "4",
|
|
8830
|
-
symbol: "FIL",
|
|
8831
|
-
decimals: 18,
|
|
8832
|
-
multiLocation: {
|
|
8833
|
-
parents: 1,
|
|
8834
|
-
interior: {
|
|
8835
|
-
X2: [
|
|
8836
|
-
{
|
|
8837
|
-
Parachain: 2030
|
|
8838
|
-
},
|
|
8839
|
-
{
|
|
8840
|
-
GeneralKey: {
|
|
8841
|
-
length: 2,
|
|
8842
|
-
data: "0x0804000000000000000000000000000000000000000000000000000000000000"
|
|
8843
|
-
}
|
|
8844
|
-
}
|
|
8845
|
-
]
|
|
8846
|
-
}
|
|
8847
|
-
},
|
|
8848
|
-
existentialDeposit: "1000000000000"
|
|
8849
|
-
},
|
|
8850
8835
|
{
|
|
8851
8836
|
assetId: "8",
|
|
8852
8837
|
symbol: "vMANTA",
|
|
@@ -8933,9 +8918,49 @@ var BifrostPolkadot = {
|
|
|
8933
8918
|
existentialDeposit: "1000000"
|
|
8934
8919
|
},
|
|
8935
8920
|
{
|
|
8936
|
-
assetId: "
|
|
8937
|
-
symbol: "
|
|
8921
|
+
assetId: "7",
|
|
8922
|
+
symbol: "INTR",
|
|
8938
8923
|
decimals: 10,
|
|
8924
|
+
multiLocation: {
|
|
8925
|
+
parents: 1,
|
|
8926
|
+
interior: {
|
|
8927
|
+
X2: [
|
|
8928
|
+
{
|
|
8929
|
+
Parachain: 2032
|
|
8930
|
+
},
|
|
8931
|
+
{
|
|
8932
|
+
GeneralKey: {
|
|
8933
|
+
length: 2,
|
|
8934
|
+
data: "0x0002000000000000000000000000000000000000000000000000000000000000"
|
|
8935
|
+
}
|
|
8936
|
+
}
|
|
8937
|
+
]
|
|
8938
|
+
}
|
|
8939
|
+
},
|
|
8940
|
+
existentialDeposit: "10000000"
|
|
8941
|
+
},
|
|
8942
|
+
{
|
|
8943
|
+
assetId: "15",
|
|
8944
|
+
symbol: "ETH",
|
|
8945
|
+
decimals: 18,
|
|
8946
|
+
multiLocation: {
|
|
8947
|
+
parents: 1,
|
|
8948
|
+
interior: {
|
|
8949
|
+
X1: {
|
|
8950
|
+
GlobalConsensus: {
|
|
8951
|
+
Ethereum: {
|
|
8952
|
+
chainId: 1
|
|
8953
|
+
}
|
|
8954
|
+
}
|
|
8955
|
+
}
|
|
8956
|
+
}
|
|
8957
|
+
},
|
|
8958
|
+
existentialDeposit: "15000000000000"
|
|
8959
|
+
},
|
|
8960
|
+
{
|
|
8961
|
+
assetId: "4",
|
|
8962
|
+
symbol: "vFIL",
|
|
8963
|
+
decimals: 18,
|
|
8939
8964
|
multiLocation: {
|
|
8940
8965
|
parents: 1,
|
|
8941
8966
|
interior: {
|
|
@@ -8946,35 +8971,35 @@ var BifrostPolkadot = {
|
|
|
8946
8971
|
{
|
|
8947
8972
|
GeneralKey: {
|
|
8948
8973
|
length: 2,
|
|
8949
|
-
data: "
|
|
8974
|
+
data: "0x0904000000000000000000000000000000000000000000000000000000000000"
|
|
8950
8975
|
}
|
|
8951
8976
|
}
|
|
8952
8977
|
]
|
|
8953
8978
|
}
|
|
8954
8979
|
},
|
|
8955
|
-
existentialDeposit: "
|
|
8980
|
+
existentialDeposit: "1000000000000"
|
|
8956
8981
|
},
|
|
8957
8982
|
{
|
|
8958
|
-
assetId: "
|
|
8959
|
-
symbol: "
|
|
8960
|
-
decimals:
|
|
8983
|
+
assetId: "4",
|
|
8984
|
+
symbol: "FIL",
|
|
8985
|
+
decimals: 18,
|
|
8961
8986
|
multiLocation: {
|
|
8962
8987
|
parents: 1,
|
|
8963
8988
|
interior: {
|
|
8964
8989
|
X2: [
|
|
8965
8990
|
{
|
|
8966
|
-
Parachain:
|
|
8991
|
+
Parachain: 2030
|
|
8967
8992
|
},
|
|
8968
8993
|
{
|
|
8969
8994
|
GeneralKey: {
|
|
8970
8995
|
length: 2,
|
|
8971
|
-
data: "
|
|
8996
|
+
data: "0x0804000000000000000000000000000000000000000000000000000000000000"
|
|
8972
8997
|
}
|
|
8973
8998
|
}
|
|
8974
8999
|
]
|
|
8975
9000
|
}
|
|
8976
9001
|
},
|
|
8977
|
-
existentialDeposit: "
|
|
9002
|
+
existentialDeposit: "1000000000000"
|
|
8978
9003
|
},
|
|
8979
9004
|
{
|
|
8980
9005
|
assetId: "3",
|
|
@@ -8989,6 +9014,28 @@ var BifrostPolkadot = {
|
|
|
8989
9014
|
}
|
|
8990
9015
|
},
|
|
8991
9016
|
existentialDeposit: "10000000000000000"
|
|
9017
|
+
},
|
|
9018
|
+
{
|
|
9019
|
+
assetId: "0",
|
|
9020
|
+
symbol: "vsDOT",
|
|
9021
|
+
decimals: 10,
|
|
9022
|
+
multiLocation: {
|
|
9023
|
+
parents: 1,
|
|
9024
|
+
interior: {
|
|
9025
|
+
X2: [
|
|
9026
|
+
{
|
|
9027
|
+
Parachain: 2030
|
|
9028
|
+
},
|
|
9029
|
+
{
|
|
9030
|
+
GeneralKey: {
|
|
9031
|
+
length: 2,
|
|
9032
|
+
data: "0x0403000000000000000000000000000000000000000000000000000000000000"
|
|
9033
|
+
}
|
|
9034
|
+
}
|
|
9035
|
+
]
|
|
9036
|
+
}
|
|
9037
|
+
},
|
|
9038
|
+
existentialDeposit: "1000000"
|
|
8992
9039
|
}
|
|
8993
9040
|
]
|
|
8994
9041
|
};
|
|
@@ -10918,6 +10965,20 @@ var Hydration = {
|
|
|
10918
10965
|
},
|
|
10919
10966
|
existentialDeposit: "205888408"
|
|
10920
10967
|
},
|
|
10968
|
+
{
|
|
10969
|
+
assetId: "252525",
|
|
10970
|
+
symbol: "EWT",
|
|
10971
|
+
decimals: 18,
|
|
10972
|
+
multiLocation: {
|
|
10973
|
+
parents: 1,
|
|
10974
|
+
interior: {
|
|
10975
|
+
X1: {
|
|
10976
|
+
Parachain: 3345
|
|
10977
|
+
}
|
|
10978
|
+
}
|
|
10979
|
+
},
|
|
10980
|
+
existentialDeposit: "3244646333550"
|
|
10981
|
+
},
|
|
10921
10982
|
{
|
|
10922
10983
|
assetId: "30",
|
|
10923
10984
|
symbol: "MYTH",
|
|
@@ -18620,6 +18681,23 @@ var Ethereum = {
|
|
|
18620
18681
|
}
|
|
18621
18682
|
],
|
|
18622
18683
|
otherAssets: [
|
|
18684
|
+
{
|
|
18685
|
+
symbol: "ETH",
|
|
18686
|
+
assetId: "0x0000000000000000000000000000000000000000",
|
|
18687
|
+
existentialDeposit: "15000000000000",
|
|
18688
|
+
multiLocation: {
|
|
18689
|
+
parents: 1,
|
|
18690
|
+
interior: {
|
|
18691
|
+
X1: {
|
|
18692
|
+
GlobalConsensus: {
|
|
18693
|
+
Ethereum: {
|
|
18694
|
+
chainId: 1
|
|
18695
|
+
}
|
|
18696
|
+
}
|
|
18697
|
+
}
|
|
18698
|
+
}
|
|
18699
|
+
}
|
|
18700
|
+
},
|
|
18623
18701
|
{
|
|
18624
18702
|
symbol: "WETH",
|
|
18625
18703
|
assetId: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
|
|
@@ -18926,7 +19004,7 @@ var Mythos = {
|
|
|
18926
19004
|
relayChainAssetSymbol: "DOT",
|
|
18927
19005
|
nativeAssetSymbol: "MYTH",
|
|
18928
19006
|
isEVM: true,
|
|
18929
|
-
supportsDryRunApi:
|
|
19007
|
+
supportsDryRunApi: true,
|
|
18930
19008
|
nativeAssets: [
|
|
18931
19009
|
{
|
|
18932
19010
|
symbol: "MYTH",
|
|
@@ -20829,6 +20907,7 @@ exports.createApiInstanceForNode = createApiInstanceForNode;
|
|
|
20829
20907
|
exports.createX1Payload = createX1Payload;
|
|
20830
20908
|
exports.deepEqual = _deepEqual;
|
|
20831
20909
|
exports.determineRelayChain = determineRelayChain;
|
|
20910
|
+
exports.extractMultiAssetLoc = extractMultiAssetLoc;
|
|
20832
20911
|
exports.findAssetById = findAssetById;
|
|
20833
20912
|
exports.findAssetByMultiLocation = findAssetByMultiLocation;
|
|
20834
20913
|
exports.findAssetBySymbol = findAssetBySymbol;
|
package/dist/index.d.ts
CHANGED
|
@@ -1838,6 +1838,8 @@ declare const getFees: (scenario: TScenario) => number;
|
|
|
1838
1838
|
*/
|
|
1839
1839
|
declare const getNode: <TApi, TRes, T extends keyof ReturnType<typeof nodes>>(node: T) => ReturnType<typeof nodes<TApi, TRes>>[T];
|
|
1840
1840
|
|
|
1841
|
+
declare const extractMultiAssetLoc: (multiAsset: TMultiAsset) => TMultiLocation;
|
|
1842
|
+
|
|
1841
1843
|
declare const isOverrideMultiLocationSpecifier: (multiLocationSpecifier: TMultiLocationValueWithOverride) => multiLocationSpecifier is TOverrideMultiLocationSpecifier;
|
|
1842
1844
|
|
|
1843
1845
|
declare const transformMultiLocation: (multiLocation: TMultiLocation) => TMultiLocation;
|
|
@@ -1861,4 +1863,4 @@ declare const determineRelayChain: (node: TNodeWithRelayChains) => TRelaychain;
|
|
|
1861
1863
|
*/
|
|
1862
1864
|
declare const isRelayChain: (node: TNodeWithRelayChains) => node is "Polkadot" | "Kusama";
|
|
1863
1865
|
|
|
1864
|
-
export { AssetClaimBuilder, BatchMode, Builder, DuplicateAssetError, DuplicateAssetIdError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, Foreign, ForeignAbstract, GeneralBuilder, type IPolkadotApi, type IPolkadotXCMTransfer, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidAddressError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Native, NoXCMSupportImplementedError, NodeNotSupportedError, type OneKey, Override, Parents, PolkadotXcmError, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TApiOrUrl, type TAsset, type TAssetClaimOptions, type TAssetClaimOptionsBase, type TAssetJsonMap, type TBalanceResponse, type TBatchOptions, type TBifrostToken, type TCurrency, type TCurrencyCore, type TCurrencyInput, type TCurrencyInputWithAmount, type TCurrencySymbol, type TCurrencySymbolValue, type TDestWeight, type TDestination, type TDryRunBaseOptions, type TDryRunOptions, type TDryRunResult, type TEcosystemType, type TEdJsonMap, type TEvmBuilderOptions, type TEvmBuilderOptionsBase, type TEvmNodeFrom, type TForeignAsset, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TGetAssetBalanceOptions, type TGetAssetBalanceOptionsBase, type TGetBalanceForeignOptions, type TGetBalanceForeignOptionsBase, type TGetBalanceNativeOptions, type TGetBalanceNativeOptionsBase, type TGetMaxForeignTransferableAmountOptions, type TGetMaxForeignTransferableAmountOptionsBase, type TGetMaxNativeTransferableAmountOptions, type TGetMaxNativeTransferableAmountOptionsBase, type TGetOriginFeeDetailsOptions, type TGetOriginFeeDetailsOptionsBase, type TGetTransferInfoOptions, type TGetTransferInfoOptionsBase, type TGetTransferableAmountOptions, type TGetTransferableAmountOptionsBase, type TJunction, type TJunctionGeneralIndex, type TJunctionParachain, type TJunctionType, type TJunctions, type TMantaAsset, type TModuleError, type TMultiAsset, type TMultiAssetV3, type TMultiAssetV4, type TMultiAssetWithFee, type TMultiLocation, type TMultiLocationValue, type TMultiLocationValueWithOverride, type TNativeAsset, type TNativeTokenAsset, type TNode, type TNodeAssets, type TNodeConfig, type TNodeConfigMap, type TNodeDotKsmWithRelayChains, type TNodePolkadotKusama, type TNodeWithRelayChains, type TNodleAsset, type TOriginFeeDetails, type TOtherReserveAsset, type TOverrideMultiLocationSpecifier, type TPallet, type TPalletDetails, type TPalletJsonMap, type TPalletMap, type TPolkadotXCMTransferOptions, type TPolkadotXcmSection, type TProviderEntry, type TRelayChainSymbol, type TRelayToParaDestination, type TRelayToParaOptions, type TRelayToParaOverrides, type TRelaychain, type TReserveAsset, type TScenario, type TSelfReserveAsset, type TSendBaseOptions, type TSendInternalOptions, type TSendOptions, type TSerializeEthTransferOptions, type TSerializedApiCall, type TSerializedEthTransfer, type TSymbolSpecifier, type TTransferInfo, type TVerifyEdOnDestinationOptions, type TVerifyEdOnDestinationOptionsBase, type TVersionClaimAssets, type TWeight, type TXTokensCurrencySelection, type TXTokensSection, type TXTokensTransferOptions, type TXTransferSection, type TXTransferTransferOptions, type TXcmAsset, type TXcmForeignAsset, type TXcmPalletSection, type TXcmVersioned, type TZeitgeistAsset, Version, type WithAmount, type WithApi, XTokensError, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, createApiInstanceForNode, createX1Payload, deepEqual, determineRelayChain, findAssetById, findAssetByMultiLocation, findAssetBySymbol, findBestMatches, generateAddressMultiLocationV4, generateAddressPayload, getAllAssetsSymbols, getAssetBalance, getAssetBalanceInternal, getAssetBySymbolOrId, getAssetDecimals, getAssetId, getAssetMultiLocation, getAssets, getAssetsObject, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getDefaultPallet, getDryRun, getExistentialDeposit, getFees, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getNativeAssetSymbol, getNativeAssets, getNode, getNodeConfig, getNodeProviders, getOriginFeeDetails, getOriginFeeDetailsInternal, getOtherAssets, getParaEthTransferFees, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getSupportedPalletsDetails, getTNode, getTransferInfo, getTransferableAmount, hasDryRunSupport, hasSupportForAsset, isAssetEqual, isEthersContract, isEthersSigner, isForeignAsset, isNodeEvm, isOverrideMultiLocationSpecifier, isRelayChain, isSymbolSpecifier, normalizeSymbol, resolveModuleError, resolveParaId, send, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, transformMultiLocation, validateAddress, verifyEdOnDestination };
|
|
1866
|
+
export { AssetClaimBuilder, BatchMode, Builder, DuplicateAssetError, DuplicateAssetIdError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, Foreign, ForeignAbstract, GeneralBuilder, type IPolkadotApi, type IPolkadotXCMTransfer, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidAddressError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Native, NoXCMSupportImplementedError, NodeNotSupportedError, type OneKey, Override, Parents, PolkadotXcmError, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TApiOrUrl, type TAsset, type TAssetClaimOptions, type TAssetClaimOptionsBase, type TAssetJsonMap, type TBalanceResponse, type TBatchOptions, type TBifrostToken, type TCurrency, type TCurrencyCore, type TCurrencyInput, type TCurrencyInputWithAmount, type TCurrencySymbol, type TCurrencySymbolValue, type TDestWeight, type TDestination, type TDryRunBaseOptions, type TDryRunOptions, type TDryRunResult, type TEcosystemType, type TEdJsonMap, type TEvmBuilderOptions, type TEvmBuilderOptionsBase, type TEvmNodeFrom, type TForeignAsset, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TGetAssetBalanceOptions, type TGetAssetBalanceOptionsBase, type TGetBalanceForeignOptions, type TGetBalanceForeignOptionsBase, type TGetBalanceNativeOptions, type TGetBalanceNativeOptionsBase, type TGetMaxForeignTransferableAmountOptions, type TGetMaxForeignTransferableAmountOptionsBase, type TGetMaxNativeTransferableAmountOptions, type TGetMaxNativeTransferableAmountOptionsBase, type TGetOriginFeeDetailsOptions, type TGetOriginFeeDetailsOptionsBase, type TGetTransferInfoOptions, type TGetTransferInfoOptionsBase, type TGetTransferableAmountOptions, type TGetTransferableAmountOptionsBase, type TJunction, type TJunctionGeneralIndex, type TJunctionParachain, type TJunctionType, type TJunctions, type TMantaAsset, type TModuleError, type TMultiAsset, type TMultiAssetV3, type TMultiAssetV4, type TMultiAssetWithFee, type TMultiLocation, type TMultiLocationValue, type TMultiLocationValueWithOverride, type TNativeAsset, type TNativeTokenAsset, type TNode, type TNodeAssets, type TNodeConfig, type TNodeConfigMap, type TNodeDotKsmWithRelayChains, type TNodePolkadotKusama, type TNodeWithRelayChains, type TNodleAsset, type TOriginFeeDetails, type TOtherReserveAsset, type TOverrideMultiLocationSpecifier, type TPallet, type TPalletDetails, type TPalletJsonMap, type TPalletMap, type TPolkadotXCMTransferOptions, type TPolkadotXcmSection, type TProviderEntry, type TRelayChainSymbol, type TRelayToParaDestination, type TRelayToParaOptions, type TRelayToParaOverrides, type TRelaychain, type TReserveAsset, type TScenario, type TSelfReserveAsset, type TSendBaseOptions, type TSendInternalOptions, type TSendOptions, type TSerializeEthTransferOptions, type TSerializedApiCall, type TSerializedEthTransfer, type TSymbolSpecifier, type TTransferInfo, type TVerifyEdOnDestinationOptions, type TVerifyEdOnDestinationOptionsBase, type TVersionClaimAssets, type TWeight, type TXTokensCurrencySelection, type TXTokensSection, type TXTokensTransferOptions, type TXTransferSection, type TXTransferTransferOptions, type TXcmAsset, type TXcmForeignAsset, type TXcmPalletSection, type TXcmVersioned, type TZeitgeistAsset, Version, type WithAmount, type WithApi, XTokensError, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, createApiInstanceForNode, createX1Payload, deepEqual, determineRelayChain, extractMultiAssetLoc, findAssetById, findAssetByMultiLocation, findAssetBySymbol, findBestMatches, generateAddressMultiLocationV4, generateAddressPayload, getAllAssetsSymbols, getAssetBalance, getAssetBalanceInternal, getAssetBySymbolOrId, getAssetDecimals, getAssetId, getAssetMultiLocation, getAssets, getAssetsObject, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getDefaultPallet, getDryRun, getExistentialDeposit, getFees, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getNativeAssetSymbol, getNativeAssets, getNode, getNodeConfig, getNodeProviders, getOriginFeeDetails, getOriginFeeDetailsInternal, getOtherAssets, getParaEthTransferFees, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getSupportedPalletsDetails, getTNode, getTransferInfo, getTransferableAmount, hasDryRunSupport, hasSupportForAsset, isAssetEqual, isEthersContract, isEthersSigner, isForeignAsset, isNodeEvm, isOverrideMultiLocationSpecifier, isRelayChain, isSymbolSpecifier, normalizeSymbol, resolveModuleError, resolveParaId, send, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, transformMultiLocation, validateAddress, verifyEdOnDestination };
|
package/dist/index.mjs
CHANGED
|
@@ -3727,14 +3727,42 @@ var resolveAsset = function resolveAsset(currency, origin, destination, assetChe
|
|
|
3727
3727
|
return assetCheckEnabled ? getAssetBySymbolOrId(origin, currency, !isTMultiLocation(destination) ? destination : null) : null;
|
|
3728
3728
|
};
|
|
3729
3729
|
|
|
3730
|
-
var resolveFeeAsset = function resolveFeeAsset(feeAsset, origin, destination) {
|
|
3730
|
+
var resolveFeeAsset = function resolveFeeAsset(feeAsset, origin, destination, currency) {
|
|
3731
3731
|
var asset = getAssetBySymbolOrId(origin, feeAsset, !isTMultiLocation(destination) ? destination : null);
|
|
3732
|
-
|
|
3732
|
+
var usesRawOverriddenMultiAssets = 'multiasset' in currency && currency.multiasset.every(isTMultiAsset);
|
|
3733
|
+
if (!asset && !usesRawOverriddenMultiAssets) {
|
|
3733
3734
|
throwUnsupportedCurrency(feeAsset, origin);
|
|
3734
3735
|
}
|
|
3735
3736
|
return asset !== null && asset !== void 0 ? asset : undefined;
|
|
3736
3737
|
};
|
|
3737
3738
|
|
|
3739
|
+
var extractMultiAssetLoc = function extractMultiAssetLoc(multiAsset) {
|
|
3740
|
+
return 'Concrete' in multiAsset.id ? multiAsset.id.Concrete : multiAsset.id;
|
|
3741
|
+
};
|
|
3742
|
+
|
|
3743
|
+
var transformMultiLocation = function transformMultiLocation(multiLocation) {
|
|
3744
|
+
var newInterior;
|
|
3745
|
+
if (multiLocation.interior === 'Here') {
|
|
3746
|
+
newInterior = 'Here';
|
|
3747
|
+
} else {
|
|
3748
|
+
var junctions = Object.values(multiLocation.interior).flat().filter(function (junction) {
|
|
3749
|
+
return _typeof(junction) === 'object' && junction !== null;
|
|
3750
|
+
});
|
|
3751
|
+
var filteredJunctions = junctions.filter(function (junction) {
|
|
3752
|
+
return !('Parachain' in junction);
|
|
3753
|
+
});
|
|
3754
|
+
if (filteredJunctions.length === 0) {
|
|
3755
|
+
newInterior = 'Here';
|
|
3756
|
+
} else {
|
|
3757
|
+
newInterior = _defineProperty({}, "X".concat(filteredJunctions.length), filteredJunctions);
|
|
3758
|
+
}
|
|
3759
|
+
}
|
|
3760
|
+
return _objectSpread2(_objectSpread2({}, multiLocation), {}, {
|
|
3761
|
+
parents: Parents.ZERO,
|
|
3762
|
+
interior: newInterior
|
|
3763
|
+
});
|
|
3764
|
+
};
|
|
3765
|
+
|
|
3738
3766
|
var AssetHubPolkadot$2 = {
|
|
3739
3767
|
defaultPallet: "PolkadotXcm",
|
|
3740
3768
|
supportedPallets: [
|
|
@@ -4551,7 +4579,9 @@ var validateCurrency = function validateCurrency(currency, feeAsset) {
|
|
|
4551
4579
|
if (currency.multiasset.length === 1) {
|
|
4552
4580
|
throw new InvalidCurrencyError('Please provide more than one multi asset');
|
|
4553
4581
|
}
|
|
4554
|
-
if (currency.multiasset.length > 1 && !
|
|
4582
|
+
if (currency.multiasset.length > 1 && !currency.multiasset.every(function (asset) {
|
|
4583
|
+
return isTMultiAsset(asset);
|
|
4584
|
+
}) && !feeAsset) {
|
|
4555
4585
|
throw new InvalidCurrencyError('Overridden multi assets cannot be used without specifying fee asset');
|
|
4556
4586
|
}
|
|
4557
4587
|
}
|
|
@@ -4613,8 +4643,9 @@ var validateAssetSupport = function validateAssetSupport(_ref, assetCheckEnabled
|
|
|
4613
4643
|
}
|
|
4614
4644
|
};
|
|
4615
4645
|
|
|
4616
|
-
var resolveOverriddenAsset = function resolveOverriddenAsset(options, isBridge, assetCheckEnabled,
|
|
4646
|
+
var resolveOverriddenAsset = function resolveOverriddenAsset(options, isBridge, assetCheckEnabled, resolvedFeeAsset) {
|
|
4617
4647
|
var currency = options.currency,
|
|
4648
|
+
feeAsset = options.feeAsset,
|
|
4618
4649
|
origin = options.from,
|
|
4619
4650
|
destination = options.to;
|
|
4620
4651
|
if ('multilocation' in currency && isOverrideMultiLocationSpecifier(currency.multilocation)) {
|
|
@@ -4624,10 +4655,24 @@ var resolveOverriddenAsset = function resolveOverriddenAsset(options, isBridge,
|
|
|
4624
4655
|
if (!feeAsset) {
|
|
4625
4656
|
throw new InvalidCurrencyError('Overridden multi assets cannot be used without specifying fee asset');
|
|
4626
4657
|
}
|
|
4658
|
+
if ('multilocation' in feeAsset && isOverrideMultiLocationSpecifier(feeAsset.multilocation)) {
|
|
4659
|
+
throw new InvalidCurrencyError('Fee asset cannot be an overridden multi location specifier');
|
|
4660
|
+
}
|
|
4627
4661
|
if (currency.multiasset.every(function (asset) {
|
|
4628
4662
|
return isTMultiAsset(asset);
|
|
4629
4663
|
})) {
|
|
4630
|
-
|
|
4664
|
+
if (!feeAsset) {
|
|
4665
|
+
throw new InvalidCurrencyError('Fee asset not provided');
|
|
4666
|
+
}
|
|
4667
|
+
if (!('multilocation' in feeAsset)) {
|
|
4668
|
+
throw new InvalidCurrencyError('Fee asset must be specified by multilocation when using raw overridden multi assets');
|
|
4669
|
+
}
|
|
4670
|
+
return currency.multiasset.map(function (multiAsset) {
|
|
4671
|
+
var ml = extractMultiAssetLoc(multiAsset);
|
|
4672
|
+
return _objectSpread2(_objectSpread2({}, multiAsset), {}, {
|
|
4673
|
+
isFeeAsset: _deepEqual(ml, feeAsset.multilocation)
|
|
4674
|
+
});
|
|
4675
|
+
});
|
|
4631
4676
|
}
|
|
4632
4677
|
// MultiAsset is an array of TCurrencyCore, search for assets
|
|
4633
4678
|
var assets = currency.multiasset.map(function (currency) {
|
|
@@ -4638,11 +4683,14 @@ var resolveOverriddenAsset = function resolveOverriddenAsset(options, isBridge,
|
|
|
4638
4683
|
if (!asset) {
|
|
4639
4684
|
throw new InvalidCurrencyError("Origin node ".concat(origin, " does not support currency ").concat(JSON.stringify(currency)));
|
|
4640
4685
|
}
|
|
4686
|
+
if (!resolvedFeeAsset) {
|
|
4687
|
+
throw new InvalidCurrencyError('Fee asset not found');
|
|
4688
|
+
}
|
|
4641
4689
|
validateAssetSupport(options, assetCheckEnabled, isBridge, asset);
|
|
4642
4690
|
var originTyped = origin;
|
|
4643
4691
|
var originNode = getNode(originTyped);
|
|
4644
4692
|
return _objectSpread2({
|
|
4645
|
-
isFeeAsset: isAssetEqual(
|
|
4693
|
+
isFeeAsset: isAssetEqual(resolvedFeeAsset, asset)
|
|
4646
4694
|
}, createMultiAsset(originNode.version, currency.amount, asset.multiLocation));
|
|
4647
4695
|
});
|
|
4648
4696
|
if (assets.filter(function (asset) {
|
|
@@ -4702,7 +4750,7 @@ var send = /*#__PURE__*/function () {
|
|
|
4702
4750
|
assetCheckEnabled = determineAssetCheckEnabled(origin, currency, isBridge);
|
|
4703
4751
|
validateAssetSpecifiers(assetCheckEnabled, currency);
|
|
4704
4752
|
asset = resolveAsset(currency, origin, destination, assetCheckEnabled);
|
|
4705
|
-
resolvedFeeAsset = feeAsset ? resolveFeeAsset(feeAsset, origin, destination) : undefined;
|
|
4753
|
+
resolvedFeeAsset = feeAsset ? resolveFeeAsset(feeAsset, origin, destination, currency) : undefined;
|
|
4706
4754
|
validateAssetSupport(options, assetCheckEnabled, isBridge, asset);
|
|
4707
4755
|
if (!isRelayChain(origin)) {
|
|
4708
4756
|
_context.next = 19;
|
|
@@ -5200,29 +5248,6 @@ var AssetHubKusama$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
5200
5248
|
}]);
|
|
5201
5249
|
}(ParachainNode);
|
|
5202
5250
|
|
|
5203
|
-
var transformMultiLocation = function transformMultiLocation(multiLocation) {
|
|
5204
|
-
var newInterior;
|
|
5205
|
-
if (multiLocation.interior === 'Here') {
|
|
5206
|
-
newInterior = 'Here';
|
|
5207
|
-
} else {
|
|
5208
|
-
var junctions = Object.values(multiLocation.interior).flat().filter(function (junction) {
|
|
5209
|
-
return _typeof(junction) === 'object' && junction !== null;
|
|
5210
|
-
});
|
|
5211
|
-
var filteredJunctions = junctions.filter(function (junction) {
|
|
5212
|
-
return !('Parachain' in junction);
|
|
5213
|
-
});
|
|
5214
|
-
if (filteredJunctions.length === 0) {
|
|
5215
|
-
newInterior = 'Here';
|
|
5216
|
-
} else {
|
|
5217
|
-
newInterior = _defineProperty({}, "X".concat(filteredJunctions.length), filteredJunctions);
|
|
5218
|
-
}
|
|
5219
|
-
}
|
|
5220
|
-
return _objectSpread2(_objectSpread2({}, multiLocation), {}, {
|
|
5221
|
-
parents: Parents.ZERO,
|
|
5222
|
-
interior: newInterior
|
|
5223
|
-
});
|
|
5224
|
-
};
|
|
5225
|
-
|
|
5226
5251
|
var createExecuteXcm = function createExecuteXcm(input, weight, executionFee) {
|
|
5227
5252
|
var api = input.api,
|
|
5228
5253
|
_input$version = input.version,
|
|
@@ -5581,8 +5606,12 @@ var AssetHubPolkadot$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
5581
5606
|
var scenario = input.scenario,
|
|
5582
5607
|
asset = input.asset,
|
|
5583
5608
|
destination = input.destination,
|
|
5584
|
-
feeAsset = input.feeAsset
|
|
5609
|
+
feeAsset = input.feeAsset,
|
|
5610
|
+
overriddenAsset = input.overriddenAsset;
|
|
5585
5611
|
if (feeAsset) {
|
|
5612
|
+
if (overriddenAsset) {
|
|
5613
|
+
throw new InvalidCurrencyError('Cannot use overridden multi-assets with XCM execute');
|
|
5614
|
+
}
|
|
5586
5615
|
if (!isAssetEqual(feeAsset, asset)) {
|
|
5587
5616
|
throw new InvalidCurrencyError("Fee asset does not match transfer asset.");
|
|
5588
5617
|
}
|
|
@@ -8779,28 +8808,6 @@ var BifrostPolkadot = {
|
|
|
8779
8808
|
},
|
|
8780
8809
|
existentialDeposit: "1000000000000"
|
|
8781
8810
|
},
|
|
8782
|
-
{
|
|
8783
|
-
assetId: "4",
|
|
8784
|
-
symbol: "vFIL",
|
|
8785
|
-
decimals: 18,
|
|
8786
|
-
multiLocation: {
|
|
8787
|
-
parents: 1,
|
|
8788
|
-
interior: {
|
|
8789
|
-
X2: [
|
|
8790
|
-
{
|
|
8791
|
-
Parachain: 2030
|
|
8792
|
-
},
|
|
8793
|
-
{
|
|
8794
|
-
GeneralKey: {
|
|
8795
|
-
length: 2,
|
|
8796
|
-
data: "0x0904000000000000000000000000000000000000000000000000000000000000"
|
|
8797
|
-
}
|
|
8798
|
-
}
|
|
8799
|
-
]
|
|
8800
|
-
}
|
|
8801
|
-
},
|
|
8802
|
-
existentialDeposit: "1000000000000"
|
|
8803
|
-
},
|
|
8804
8811
|
{
|
|
8805
8812
|
assetId: "9",
|
|
8806
8813
|
symbol: "BNCS",
|
|
@@ -8823,28 +8830,6 @@ var BifrostPolkadot = {
|
|
|
8823
8830
|
},
|
|
8824
8831
|
existentialDeposit: "10000000000"
|
|
8825
8832
|
},
|
|
8826
|
-
{
|
|
8827
|
-
assetId: "4",
|
|
8828
|
-
symbol: "FIL",
|
|
8829
|
-
decimals: 18,
|
|
8830
|
-
multiLocation: {
|
|
8831
|
-
parents: 1,
|
|
8832
|
-
interior: {
|
|
8833
|
-
X2: [
|
|
8834
|
-
{
|
|
8835
|
-
Parachain: 2030
|
|
8836
|
-
},
|
|
8837
|
-
{
|
|
8838
|
-
GeneralKey: {
|
|
8839
|
-
length: 2,
|
|
8840
|
-
data: "0x0804000000000000000000000000000000000000000000000000000000000000"
|
|
8841
|
-
}
|
|
8842
|
-
}
|
|
8843
|
-
]
|
|
8844
|
-
}
|
|
8845
|
-
},
|
|
8846
|
-
existentialDeposit: "1000000000000"
|
|
8847
|
-
},
|
|
8848
8833
|
{
|
|
8849
8834
|
assetId: "8",
|
|
8850
8835
|
symbol: "vMANTA",
|
|
@@ -8931,9 +8916,49 @@ var BifrostPolkadot = {
|
|
|
8931
8916
|
existentialDeposit: "1000000"
|
|
8932
8917
|
},
|
|
8933
8918
|
{
|
|
8934
|
-
assetId: "
|
|
8935
|
-
symbol: "
|
|
8919
|
+
assetId: "7",
|
|
8920
|
+
symbol: "INTR",
|
|
8936
8921
|
decimals: 10,
|
|
8922
|
+
multiLocation: {
|
|
8923
|
+
parents: 1,
|
|
8924
|
+
interior: {
|
|
8925
|
+
X2: [
|
|
8926
|
+
{
|
|
8927
|
+
Parachain: 2032
|
|
8928
|
+
},
|
|
8929
|
+
{
|
|
8930
|
+
GeneralKey: {
|
|
8931
|
+
length: 2,
|
|
8932
|
+
data: "0x0002000000000000000000000000000000000000000000000000000000000000"
|
|
8933
|
+
}
|
|
8934
|
+
}
|
|
8935
|
+
]
|
|
8936
|
+
}
|
|
8937
|
+
},
|
|
8938
|
+
existentialDeposit: "10000000"
|
|
8939
|
+
},
|
|
8940
|
+
{
|
|
8941
|
+
assetId: "15",
|
|
8942
|
+
symbol: "ETH",
|
|
8943
|
+
decimals: 18,
|
|
8944
|
+
multiLocation: {
|
|
8945
|
+
parents: 1,
|
|
8946
|
+
interior: {
|
|
8947
|
+
X1: {
|
|
8948
|
+
GlobalConsensus: {
|
|
8949
|
+
Ethereum: {
|
|
8950
|
+
chainId: 1
|
|
8951
|
+
}
|
|
8952
|
+
}
|
|
8953
|
+
}
|
|
8954
|
+
}
|
|
8955
|
+
},
|
|
8956
|
+
existentialDeposit: "15000000000000"
|
|
8957
|
+
},
|
|
8958
|
+
{
|
|
8959
|
+
assetId: "4",
|
|
8960
|
+
symbol: "vFIL",
|
|
8961
|
+
decimals: 18,
|
|
8937
8962
|
multiLocation: {
|
|
8938
8963
|
parents: 1,
|
|
8939
8964
|
interior: {
|
|
@@ -8944,35 +8969,35 @@ var BifrostPolkadot = {
|
|
|
8944
8969
|
{
|
|
8945
8970
|
GeneralKey: {
|
|
8946
8971
|
length: 2,
|
|
8947
|
-
data: "
|
|
8972
|
+
data: "0x0904000000000000000000000000000000000000000000000000000000000000"
|
|
8948
8973
|
}
|
|
8949
8974
|
}
|
|
8950
8975
|
]
|
|
8951
8976
|
}
|
|
8952
8977
|
},
|
|
8953
|
-
existentialDeposit: "
|
|
8978
|
+
existentialDeposit: "1000000000000"
|
|
8954
8979
|
},
|
|
8955
8980
|
{
|
|
8956
|
-
assetId: "
|
|
8957
|
-
symbol: "
|
|
8958
|
-
decimals:
|
|
8981
|
+
assetId: "4",
|
|
8982
|
+
symbol: "FIL",
|
|
8983
|
+
decimals: 18,
|
|
8959
8984
|
multiLocation: {
|
|
8960
8985
|
parents: 1,
|
|
8961
8986
|
interior: {
|
|
8962
8987
|
X2: [
|
|
8963
8988
|
{
|
|
8964
|
-
Parachain:
|
|
8989
|
+
Parachain: 2030
|
|
8965
8990
|
},
|
|
8966
8991
|
{
|
|
8967
8992
|
GeneralKey: {
|
|
8968
8993
|
length: 2,
|
|
8969
|
-
data: "
|
|
8994
|
+
data: "0x0804000000000000000000000000000000000000000000000000000000000000"
|
|
8970
8995
|
}
|
|
8971
8996
|
}
|
|
8972
8997
|
]
|
|
8973
8998
|
}
|
|
8974
8999
|
},
|
|
8975
|
-
existentialDeposit: "
|
|
9000
|
+
existentialDeposit: "1000000000000"
|
|
8976
9001
|
},
|
|
8977
9002
|
{
|
|
8978
9003
|
assetId: "3",
|
|
@@ -8987,6 +9012,28 @@ var BifrostPolkadot = {
|
|
|
8987
9012
|
}
|
|
8988
9013
|
},
|
|
8989
9014
|
existentialDeposit: "10000000000000000"
|
|
9015
|
+
},
|
|
9016
|
+
{
|
|
9017
|
+
assetId: "0",
|
|
9018
|
+
symbol: "vsDOT",
|
|
9019
|
+
decimals: 10,
|
|
9020
|
+
multiLocation: {
|
|
9021
|
+
parents: 1,
|
|
9022
|
+
interior: {
|
|
9023
|
+
X2: [
|
|
9024
|
+
{
|
|
9025
|
+
Parachain: 2030
|
|
9026
|
+
},
|
|
9027
|
+
{
|
|
9028
|
+
GeneralKey: {
|
|
9029
|
+
length: 2,
|
|
9030
|
+
data: "0x0403000000000000000000000000000000000000000000000000000000000000"
|
|
9031
|
+
}
|
|
9032
|
+
}
|
|
9033
|
+
]
|
|
9034
|
+
}
|
|
9035
|
+
},
|
|
9036
|
+
existentialDeposit: "1000000"
|
|
8990
9037
|
}
|
|
8991
9038
|
]
|
|
8992
9039
|
};
|
|
@@ -10916,6 +10963,20 @@ var Hydration = {
|
|
|
10916
10963
|
},
|
|
10917
10964
|
existentialDeposit: "205888408"
|
|
10918
10965
|
},
|
|
10966
|
+
{
|
|
10967
|
+
assetId: "252525",
|
|
10968
|
+
symbol: "EWT",
|
|
10969
|
+
decimals: 18,
|
|
10970
|
+
multiLocation: {
|
|
10971
|
+
parents: 1,
|
|
10972
|
+
interior: {
|
|
10973
|
+
X1: {
|
|
10974
|
+
Parachain: 3345
|
|
10975
|
+
}
|
|
10976
|
+
}
|
|
10977
|
+
},
|
|
10978
|
+
existentialDeposit: "3244646333550"
|
|
10979
|
+
},
|
|
10919
10980
|
{
|
|
10920
10981
|
assetId: "30",
|
|
10921
10982
|
symbol: "MYTH",
|
|
@@ -18618,6 +18679,23 @@ var Ethereum = {
|
|
|
18618
18679
|
}
|
|
18619
18680
|
],
|
|
18620
18681
|
otherAssets: [
|
|
18682
|
+
{
|
|
18683
|
+
symbol: "ETH",
|
|
18684
|
+
assetId: "0x0000000000000000000000000000000000000000",
|
|
18685
|
+
existentialDeposit: "15000000000000",
|
|
18686
|
+
multiLocation: {
|
|
18687
|
+
parents: 1,
|
|
18688
|
+
interior: {
|
|
18689
|
+
X1: {
|
|
18690
|
+
GlobalConsensus: {
|
|
18691
|
+
Ethereum: {
|
|
18692
|
+
chainId: 1
|
|
18693
|
+
}
|
|
18694
|
+
}
|
|
18695
|
+
}
|
|
18696
|
+
}
|
|
18697
|
+
}
|
|
18698
|
+
},
|
|
18621
18699
|
{
|
|
18622
18700
|
symbol: "WETH",
|
|
18623
18701
|
assetId: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
|
|
@@ -18924,7 +19002,7 @@ var Mythos = {
|
|
|
18924
19002
|
relayChainAssetSymbol: "DOT",
|
|
18925
19003
|
nativeAssetSymbol: "MYTH",
|
|
18926
19004
|
isEVM: true,
|
|
18927
|
-
supportsDryRunApi:
|
|
19005
|
+
supportsDryRunApi: true,
|
|
18928
19006
|
nativeAssets: [
|
|
18929
19007
|
{
|
|
18930
19008
|
symbol: "MYTH",
|
|
@@ -20798,4 +20876,4 @@ var Builder = function Builder(api) {
|
|
|
20798
20876
|
return new GeneralBuilder(api, new BatchTransactionManager());
|
|
20799
20877
|
};
|
|
20800
20878
|
|
|
20801
|
-
export { AssetClaimBuilder, BatchMode, Builder, DuplicateAssetError, DuplicateAssetIdError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, Foreign, ForeignAbstract, GeneralBuilder, IncompatibleNodesError, InvalidAddressError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Native, NoXCMSupportImplementedError, NodeNotSupportedError, Override, Parents, PolkadotXcmError, SUPPORTED_PALLETS, ScenarioNotSupportedError, Version, XTokensError, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, createApiInstanceForNode, createX1Payload, _deepEqual as deepEqual, determineRelayChain, findAssetById, findAssetByMultiLocation, findAssetBySymbol, findBestMatches, generateAddressMultiLocationV4, generateAddressPayload, getAllAssetsSymbols, getAssetBalance, getAssetBalanceInternal, getAssetBySymbolOrId, getAssetDecimals, getAssetId, getAssetMultiLocation, getAssets, getAssetsObject, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getDefaultPallet, getDryRun, getExistentialDeposit, getFees, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getNativeAssetSymbol, getNativeAssets, getNode, getNodeConfig, getNodeProviders, getOriginFeeDetails, getOriginFeeDetailsInternal, getOtherAssets, getParaEthTransferFees, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getSupportedPalletsDetails, getTNode, getTransferInfo, getTransferableAmount, hasDryRunSupport, hasSupportForAsset, isAssetEqual, isEthersContract, isEthersSigner, isForeignAsset, isNodeEvm, isOverrideMultiLocationSpecifier, isRelayChain, isSymbolSpecifier, normalizeSymbol, resolveModuleError, resolveParaId, send, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, transformMultiLocation, validateAddress, verifyEdOnDestination };
|
|
20879
|
+
export { AssetClaimBuilder, BatchMode, Builder, DuplicateAssetError, DuplicateAssetIdError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, Foreign, ForeignAbstract, GeneralBuilder, IncompatibleNodesError, InvalidAddressError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Native, NoXCMSupportImplementedError, NodeNotSupportedError, Override, Parents, PolkadotXcmError, SUPPORTED_PALLETS, ScenarioNotSupportedError, Version, XTokensError, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, createApiInstanceForNode, createX1Payload, _deepEqual as deepEqual, determineRelayChain, extractMultiAssetLoc, findAssetById, findAssetByMultiLocation, findAssetBySymbol, findBestMatches, generateAddressMultiLocationV4, generateAddressPayload, getAllAssetsSymbols, getAssetBalance, getAssetBalanceInternal, getAssetBySymbolOrId, getAssetDecimals, getAssetId, getAssetMultiLocation, getAssets, getAssetsObject, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getDefaultPallet, getDryRun, getExistentialDeposit, getFees, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getNativeAssetSymbol, getNativeAssets, getNode, getNodeConfig, getNodeProviders, getOriginFeeDetails, getOriginFeeDetailsInternal, getOtherAssets, getParaEthTransferFees, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getSupportedPalletsDetails, getTNode, getTransferInfo, getTransferableAmount, hasDryRunSupport, hasSupportForAsset, isAssetEqual, isEthersContract, isEthersSigner, isForeignAsset, isNodeEvm, isOverrideMultiLocationSpecifier, isRelayChain, isSymbolSpecifier, normalizeSymbol, resolveModuleError, resolveParaId, send, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, transformMultiLocation, validateAddress, verifyEdOnDestination };
|