@paraspell/sdk-core 11.5.1 → 11.6.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 +129 -74
- package/dist/index.d.ts +18 -8
- package/dist/index.mjs +129 -74
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1105,17 +1105,6 @@ var EnergyWebX$1 = {
|
|
|
1105
1105
|
}
|
|
1106
1106
|
]
|
|
1107
1107
|
};
|
|
1108
|
-
var EnergyWebXPaseo$1 = {
|
|
1109
|
-
name: "PEX",
|
|
1110
|
-
info: "paseoEwx",
|
|
1111
|
-
paraId: 3345,
|
|
1112
|
-
providers: [
|
|
1113
|
-
{
|
|
1114
|
-
name: "Energy Web",
|
|
1115
|
-
endpoint: "wss://public-rpc.testnet.energywebx.com/"
|
|
1116
|
-
}
|
|
1117
|
-
]
|
|
1118
|
-
};
|
|
1119
1108
|
var Hydration$1 = {
|
|
1120
1109
|
name: "Hydration",
|
|
1121
1110
|
info: "hydradx",
|
|
@@ -1139,6 +1128,17 @@ var Hydration$1 = {
|
|
|
1139
1128
|
}
|
|
1140
1129
|
]
|
|
1141
1130
|
};
|
|
1131
|
+
var IntegriteePolkadot$1 = {
|
|
1132
|
+
name: "Integritee Network",
|
|
1133
|
+
info: "integritee",
|
|
1134
|
+
paraId: 2039,
|
|
1135
|
+
providers: [
|
|
1136
|
+
{
|
|
1137
|
+
name: "Integritee",
|
|
1138
|
+
endpoint: "wss://polkadot.api.integritee.network"
|
|
1139
|
+
}
|
|
1140
|
+
]
|
|
1141
|
+
};
|
|
1142
1142
|
var Interlay$1 = {
|
|
1143
1143
|
name: "Interlay",
|
|
1144
1144
|
info: "interlay",
|
|
@@ -2195,6 +2195,17 @@ var CoretimePaseo$1 = {
|
|
|
2195
2195
|
}
|
|
2196
2196
|
]
|
|
2197
2197
|
};
|
|
2198
|
+
var EnergyWebXPaseo$1 = {
|
|
2199
|
+
name: "PEX",
|
|
2200
|
+
info: "paseoEwx",
|
|
2201
|
+
paraId: 3345,
|
|
2202
|
+
providers: [
|
|
2203
|
+
{
|
|
2204
|
+
name: "Energy Web",
|
|
2205
|
+
endpoint: "wss://public-rpc.testnet.energywebx.com/"
|
|
2206
|
+
}
|
|
2207
|
+
]
|
|
2208
|
+
};
|
|
2198
2209
|
var HeimaPaseo$1 = {
|
|
2199
2210
|
name: "Heima paseo",
|
|
2200
2211
|
info: "heima-paseo",
|
|
@@ -2500,8 +2511,8 @@ var configs = {
|
|
|
2500
2511
|
ComposableFinance: ComposableFinance$1,
|
|
2501
2512
|
Darwinia: Darwinia$1,
|
|
2502
2513
|
EnergyWebX: EnergyWebX$1,
|
|
2503
|
-
EnergyWebXPaseo: EnergyWebXPaseo$1,
|
|
2504
2514
|
Hydration: Hydration$1,
|
|
2515
|
+
IntegriteePolkadot: IntegriteePolkadot$1,
|
|
2505
2516
|
Interlay: Interlay$1,
|
|
2506
2517
|
Heima: Heima$1,
|
|
2507
2518
|
Jamton: Jamton$1,
|
|
@@ -2554,6 +2565,7 @@ var configs = {
|
|
|
2554
2565
|
BifrostPaseo: BifrostPaseo$1,
|
|
2555
2566
|
BridgeHubPaseo: BridgeHubPaseo$1,
|
|
2556
2567
|
CoretimePaseo: CoretimePaseo$1,
|
|
2568
|
+
EnergyWebXPaseo: EnergyWebXPaseo$1,
|
|
2557
2569
|
HeimaPaseo: HeimaPaseo$1,
|
|
2558
2570
|
HydrationPaseo: HydrationPaseo$1,
|
|
2559
2571
|
IntegriteePaseo: IntegriteePaseo$1,
|
|
@@ -3814,12 +3826,12 @@ var getBalanceForeignXTokens = /*#__PURE__*/function () {
|
|
|
3814
3826
|
return _regenerator().w(function (_context) {
|
|
3815
3827
|
while (1) switch (_context.n) {
|
|
3816
3828
|
case 0:
|
|
3817
|
-
if (!(chain === 'Astar' || chain === 'Shiden')) {
|
|
3829
|
+
if (!(chain === 'Astar' || chain === 'Shiden' || chain.startsWith('Integritee'))) {
|
|
3818
3830
|
_context.n = 1;
|
|
3819
3831
|
break;
|
|
3820
3832
|
}
|
|
3821
3833
|
assertHasId(asset);
|
|
3822
|
-
return _context.a(2, api.getBalanceAssetsPallet(address, BigInt(asset.assetId)));
|
|
3834
|
+
return _context.a(2, api.getBalanceAssetsPallet(address, chain.startsWith('Integritee') ? Number(asset.assetId) : BigInt(asset.assetId)));
|
|
3823
3835
|
case 1:
|
|
3824
3836
|
if (!(chain === 'BifrostPolkadot' || chain === 'BifrostKusama')) {
|
|
3825
3837
|
_context.n = 2;
|
|
@@ -4300,11 +4312,11 @@ var createOriginLocation = function createOriginLocation(origin, destination) {
|
|
|
4300
4312
|
};
|
|
4301
4313
|
var getDestXcmFee = /*#__PURE__*/function () {
|
|
4302
4314
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(options) {
|
|
4303
|
-
var api, origin, hopChain, destination, currency, forwardedXcms, asset, address, feeAsset, originFee, tx, disableFallback, resolvedFeeAsset, calcPaymentInfoFee, _fee, sufficient, dryRunResult, _fee2, fee, newForwardedXcms, destParaId;
|
|
4315
|
+
var api, origin, hopChain, destination, currency, forwardedXcms, asset, address, feeAsset, originFee, tx, disableFallback, swapConfig, resolvedFeeAsset, calcPaymentInfoFee, _fee, sufficient, dryRunResult, _fee2, fee, newForwardedXcms, destParaId;
|
|
4304
4316
|
return _regenerator().w(function (_context2) {
|
|
4305
4317
|
while (1) switch (_context2.n) {
|
|
4306
4318
|
case 0:
|
|
4307
|
-
api = options.api, origin = options.origin, hopChain = options.prevChain, destination = options.destination, currency = options.currency, forwardedXcms = options.forwardedXcms, asset = options.asset, address = options.address, feeAsset = options.feeAsset, originFee = options.originFee, tx = options.tx, disableFallback = options.disableFallback;
|
|
4319
|
+
api = options.api, origin = options.origin, hopChain = options.prevChain, destination = options.destination, currency = options.currency, forwardedXcms = options.forwardedXcms, asset = options.asset, address = options.address, feeAsset = options.feeAsset, originFee = options.originFee, tx = options.tx, disableFallback = options.disableFallback, swapConfig = options.swapConfig;
|
|
4308
4320
|
resolvedFeeAsset = feeAsset ? resolveFeeAsset(feeAsset, origin, destination, currency) : undefined;
|
|
4309
4321
|
calcPaymentInfoFee = /*#__PURE__*/function () {
|
|
4310
4322
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
@@ -4318,7 +4330,7 @@ var getDestXcmFee = /*#__PURE__*/function () {
|
|
|
4318
4330
|
}
|
|
4319
4331
|
return _context.a(2, 0n);
|
|
4320
4332
|
case 1:
|
|
4321
|
-
originAsset = assets.findAssetInfoOrThrow(origin, currency, destination);
|
|
4333
|
+
originAsset = swapConfig !== null && swapConfig !== void 0 && swapConfig.currencyTo ? assets.findAssetInfoOrThrow(swapConfig.exchangeChain, swapConfig.currencyTo, destination) : assets.findAssetInfoOrThrow(origin, currency, destination);
|
|
4322
4334
|
if (!originAsset.location) {
|
|
4323
4335
|
_context.n = 7;
|
|
4324
4336
|
break;
|
|
@@ -6015,7 +6027,7 @@ var Parachain = /*#__PURE__*/function () {
|
|
|
6015
6027
|
key: "transfer",
|
|
6016
6028
|
value: function () {
|
|
6017
6029
|
var _transfer = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(sendOptions) {
|
|
6018
|
-
var api, asset, currency, feeAsset, feeCurrency, address, destination, paraIdTo, overriddenAsset, version, senderAddress, ahAddress, pallet, method, scenario, paraId, destChain, isLocalTransfer, isRelayAsset, supportsTypeThen, useTypeAndThen, isBifrostOrigin, isJamtonOrigin, isAssetHubDest, useMultiAssets, input, options, shouldUseTeleport, isAhToOtherPara, isOtherParaToAh, isAHPOrigin, isAHPDest, isExternalAsset, isEthDest, isExternalAssetViaAh, isExternalAssetToAh, call;
|
|
6030
|
+
var api, asset, currency, feeAsset, feeCurrency, address, destination, paraIdTo, overriddenAsset, version, senderAddress, ahAddress, pallet, method, scenario, paraId, destChain, isLocalTransfer, isRelayAsset, supportsTypeThen, useTypeAndThen, isBifrostOrigin, isJamtonOrigin, isAssetHubDest, useMultiAssets, input, options, shouldUseTeleport, isAhToOtherPara, isOtherParaToAh, isAllowedAhTransfer, isAHPOrigin, isAHPDest, isExternalAsset, isEthDest, isExternalAssetViaAh, isExternalAssetToAh, call;
|
|
6019
6031
|
return _regenerator().w(function (_context) {
|
|
6020
6032
|
while (1) switch (_context.n) {
|
|
6021
6033
|
case 0:
|
|
@@ -6126,7 +6138,10 @@ var Parachain = /*#__PURE__*/function () {
|
|
|
6126
6138
|
shouldUseTeleport = this.shouldUseNativeAssetTeleport(sendOptions);
|
|
6127
6139
|
isAhToOtherPara = this.chain.startsWith('AssetHub') && destChain && !sdkCommon.isTrustedChain(destChain);
|
|
6128
6140
|
isOtherParaToAh = (destChain === null || destChain === void 0 ? void 0 : destChain.startsWith('AssetHub')) && !sdkCommon.isTrustedChain(this.chain);
|
|
6129
|
-
|
|
6141
|
+
isAllowedAhTransfer = function isAllowedAhTransfer(chain) {
|
|
6142
|
+
return chain === null || chain === void 0 ? void 0 : chain.startsWith('Integritee');
|
|
6143
|
+
};
|
|
6144
|
+
if (!((isAhToOtherPara || isOtherParaToAh) && shouldUseTeleport && !isAllowedAhTransfer(destChain) && !isAllowedAhTransfer(this.chain))) {
|
|
6130
6145
|
_context.n = 8;
|
|
6131
6146
|
break;
|
|
6132
6147
|
}
|
|
@@ -6758,9 +6773,16 @@ var AssetHubKusama = /*#__PURE__*/function (_Parachain) {
|
|
|
6758
6773
|
if (scenario === 'ParaToPara' && asset.symbol === 'DOT' && !assets.isForeignAsset(asset)) {
|
|
6759
6774
|
throw new ScenarioNotSupportedError(this.chain, scenario, 'Bridged DOT cannot currently be transfered from AssetHubKusama, if you are sending different DOT asset, please specify {id: <DOTID>}.');
|
|
6760
6775
|
}
|
|
6761
|
-
var method = scenario
|
|
6776
|
+
var method = this.getMethod(scenario, destination);
|
|
6762
6777
|
return transferPolkadotXcm(input, method, 'Unlimited');
|
|
6763
6778
|
}
|
|
6779
|
+
}, {
|
|
6780
|
+
key: "getMethod",
|
|
6781
|
+
value: function getMethod(scenario, destination) {
|
|
6782
|
+
var isTrusted = !sdkCommon.isTLocation(destination) && sdkCommon.isTrustedChain(destination);
|
|
6783
|
+
if (destination === 'IntegriteeKusama') return 'transfer_assets';
|
|
6784
|
+
return scenario === 'ParaToPara' && !isTrusted ? 'limited_reserve_transfer_assets' : 'limited_teleport_assets';
|
|
6785
|
+
}
|
|
6764
6786
|
}, {
|
|
6765
6787
|
key: "getRelayToParaOverrides",
|
|
6766
6788
|
value: function getRelayToParaOverrides() {
|
|
@@ -6988,7 +7010,7 @@ var AssetHubPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
6988
7010
|
key: "getMethod",
|
|
6989
7011
|
value: function getMethod(scenario, destination) {
|
|
6990
7012
|
var isTrusted = !sdkCommon.isTLocation(destination) && sdkCommon.isTrustedChain(destination);
|
|
6991
|
-
if (destination === 'Polimec' || destination === 'Moonbeam') return 'transfer_assets';
|
|
7013
|
+
if (destination === 'Polimec' || destination === 'Moonbeam' || typeof destination === 'string' && destination.startsWith('Integritee')) return 'transfer_assets';
|
|
6992
7014
|
return scenario === 'ParaToPara' && !isTrusted ? 'limited_reserve_transfer_assets' : 'limited_teleport_assets';
|
|
6993
7015
|
}
|
|
6994
7016
|
}, {
|
|
@@ -8319,28 +8341,20 @@ var HydrationPaseo = /*#__PURE__*/function (_Hydration) {
|
|
|
8319
8341
|
return _createClass(HydrationPaseo);
|
|
8320
8342
|
}(Hydration);
|
|
8321
8343
|
|
|
8322
|
-
var
|
|
8323
|
-
function
|
|
8324
|
-
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '
|
|
8344
|
+
var IntegriteePolkadot = /*#__PURE__*/function (_Parachain) {
|
|
8345
|
+
function IntegriteePolkadot() {
|
|
8346
|
+
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'IntegriteePolkadot';
|
|
8325
8347
|
var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'integritee';
|
|
8326
|
-
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '
|
|
8327
|
-
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : sdkCommon.Version.
|
|
8328
|
-
_classCallCheck(this,
|
|
8329
|
-
return _callSuper(this,
|
|
8348
|
+
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Polkadot';
|
|
8349
|
+
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : sdkCommon.Version.V5;
|
|
8350
|
+
_classCallCheck(this, IntegriteePolkadot);
|
|
8351
|
+
return _callSuper(this, IntegriteePolkadot, [chain, info, type, version]);
|
|
8330
8352
|
}
|
|
8331
|
-
_inherits(
|
|
8332
|
-
return _createClass(
|
|
8333
|
-
key: "
|
|
8334
|
-
value: function
|
|
8335
|
-
|
|
8336
|
-
scenario = input.scenario;
|
|
8337
|
-
if (scenario !== 'ParaToPara') {
|
|
8338
|
-
throw new ScenarioNotSupportedError(this.chain, scenario);
|
|
8339
|
-
}
|
|
8340
|
-
if (asset.symbol !== this.getNativeAssetSymbol()) {
|
|
8341
|
-
throw new assets.InvalidCurrencyError("Asset ".concat(asset.symbol, " is not supported by chain ").concat(this.chain, "."));
|
|
8342
|
-
}
|
|
8343
|
-
return transferXTokens(input, asset.symbol);
|
|
8353
|
+
_inherits(IntegriteePolkadot, _Parachain);
|
|
8354
|
+
return _createClass(IntegriteePolkadot, [{
|
|
8355
|
+
key: "transferPolkadotXCM",
|
|
8356
|
+
value: function transferPolkadotXCM(input) {
|
|
8357
|
+
return transferPolkadotXcm(input, 'transfer_assets', 'Unlimited');
|
|
8344
8358
|
}
|
|
8345
8359
|
}, {
|
|
8346
8360
|
key: "transferRelayToPara",
|
|
@@ -8369,6 +8383,19 @@ var IntegriteeKusama = /*#__PURE__*/function (_Parachain) {
|
|
|
8369
8383
|
}]);
|
|
8370
8384
|
}(Parachain);
|
|
8371
8385
|
|
|
8386
|
+
var IntegriteeKusama = /*#__PURE__*/function (_IntegriteePolkadot) {
|
|
8387
|
+
function IntegriteeKusama() {
|
|
8388
|
+
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'IntegriteeKusama';
|
|
8389
|
+
var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'integritee';
|
|
8390
|
+
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Kusama';
|
|
8391
|
+
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : sdkCommon.Version.V5;
|
|
8392
|
+
_classCallCheck(this, IntegriteeKusama);
|
|
8393
|
+
return _callSuper(this, IntegriteeKusama, [chain, info, type, version]);
|
|
8394
|
+
}
|
|
8395
|
+
_inherits(IntegriteeKusama, _IntegriteePolkadot);
|
|
8396
|
+
return _createClass(IntegriteeKusama);
|
|
8397
|
+
}(IntegriteePolkadot);
|
|
8398
|
+
|
|
8372
8399
|
var IntegriteePaseo = /*#__PURE__*/function (_IntegriteeKusama) {
|
|
8373
8400
|
function IntegriteePaseo() {
|
|
8374
8401
|
_classCallCheck(this, IntegriteePaseo);
|
|
@@ -9486,6 +9513,7 @@ var chains = function chains() {
|
|
|
9486
9513
|
EnergyWebX: new EnergyWebX(),
|
|
9487
9514
|
Hydration: new Hydration(),
|
|
9488
9515
|
IntegriteeKusama: new IntegriteeKusama(),
|
|
9516
|
+
IntegriteePolkadot: new IntegriteePolkadot(),
|
|
9489
9517
|
Interlay: new Interlay(),
|
|
9490
9518
|
Heima: new Heima(),
|
|
9491
9519
|
Jamton: new Jamton(),
|
|
@@ -9572,7 +9600,7 @@ var RELAY_LOCATION = {
|
|
|
9572
9600
|
Here: null
|
|
9573
9601
|
}
|
|
9574
9602
|
};
|
|
9575
|
-
var CHAINS_DOT_RESERVE_AH = new Set(['Acala', 'Karura', 'Polimec', 'Moonbeam', 'Hydration', 'HydrationPaseo', 'AssetHubPolkadot', 'AssetHubKusama', 'AssetHubWestend', 'AssetHubPaseo', 'BifrostPolkadot', 'BifrostKusama', 'PeoplePolkadot', 'PeopleKusama', 'Ajuna']);
|
|
9603
|
+
var CHAINS_DOT_RESERVE_AH = new Set(['Acala', 'Karura', 'Polimec', 'Moonbeam', 'Hydration', 'HydrationPaseo', 'AssetHubPolkadot', 'AssetHubKusama', 'AssetHubWestend', 'AssetHubPaseo', 'BifrostPolkadot', 'BifrostKusama', 'PeoplePolkadot', 'PeopleKusama', 'Ajuna', 'IntegriteePolkadot', 'IntegriteeKusama', 'IntegriteePaseo']);
|
|
9576
9604
|
var ASSET_HUB_EXECUTION_FEE = 2200000000n; // 0.22 DOT
|
|
9577
9605
|
var TX_CLIENT_TIMEOUT_MS = 20 * 60 * 1000; // 20 minutes
|
|
9578
9606
|
var DRY_RUN_CLIENT_TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes
|
|
@@ -9581,6 +9609,8 @@ var MAX_WEIGHT = {
|
|
|
9581
9609
|
proofSize: MAX_U64,
|
|
9582
9610
|
refTime: MAX_U64
|
|
9583
9611
|
};
|
|
9612
|
+
var BYPASS_MINT_AMOUNT = '1000';
|
|
9613
|
+
var BYPASS_CURRENCY_AMOUNT = '800';
|
|
9584
9614
|
|
|
9585
9615
|
var buildClaimAssetsParams = function buildClaimAssetsParams(options) {
|
|
9586
9616
|
var assets = options.assets,
|
|
@@ -9962,7 +9992,6 @@ var getPalletInstance = function getPalletInstance(type) {
|
|
|
9962
9992
|
return new HandlerClass();
|
|
9963
9993
|
};
|
|
9964
9994
|
|
|
9965
|
-
var MINT_AMOUNT = 1000n; // Mint 1000 units of asset
|
|
9966
9995
|
var getCurrencySelection = function getCurrencySelection(asset) {
|
|
9967
9996
|
if (asset.location) return {
|
|
9968
9997
|
location: asset.location
|
|
@@ -9995,7 +10024,7 @@ var createMintTxs = function createMintTxs(chain, asset, balance, address, api)
|
|
|
9995
10024
|
return palletInstance.mint(address, asset, balance, chain, api);
|
|
9996
10025
|
};
|
|
9997
10026
|
var createRequiredMintTxs = function createRequiredMintTxs(chain, asset, amountHuman, balance, address, api) {
|
|
9998
|
-
var amount = viem.parseUnits(amountHuman
|
|
10027
|
+
var amount = viem.parseUnits(amountHuman, asset.decimals);
|
|
9999
10028
|
return createMintTxs(chain, _objectSpread2(_objectSpread2({}, asset), {}, {
|
|
10000
10029
|
amount: amount
|
|
10001
10030
|
}), balance, address, api);
|
|
@@ -10003,7 +10032,7 @@ var createRequiredMintTxs = function createRequiredMintTxs(chain, asset, amountH
|
|
|
10003
10032
|
var createOptionalMintTxs = function createOptionalMintTxs(chain, currency, amountHuman, balance, address, api) {
|
|
10004
10033
|
var asset = assets.findAssetInfo(chain, currency, null);
|
|
10005
10034
|
if (!asset) return null;
|
|
10006
|
-
var amount = viem.parseUnits(amountHuman
|
|
10035
|
+
var amount = viem.parseUnits(amountHuman, asset.decimals);
|
|
10007
10036
|
return createMintTxs(chain, _objectSpread2(_objectSpread2({}, asset), {}, {
|
|
10008
10037
|
amount: amount
|
|
10009
10038
|
}), balance, address, api);
|
|
@@ -10044,7 +10073,7 @@ var mintBonusForSent = function mintBonusForSent(chain, sent, feeAsset, mintFeeA
|
|
|
10044
10073
|
});
|
|
10045
10074
|
return preminted.some(function (a) {
|
|
10046
10075
|
return assets.isAssetXcEqual(a, sent);
|
|
10047
|
-
}) ? viem.parseUnits(
|
|
10076
|
+
}) ? viem.parseUnits(BYPASS_MINT_AMOUNT, sent.decimals) : 0n;
|
|
10048
10077
|
};
|
|
10049
10078
|
var wrapTxBypass = /*#__PURE__*/function () {
|
|
10050
10079
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(dryRunOptions) {
|
|
@@ -10100,7 +10129,7 @@ var wrapTxBypass = /*#__PURE__*/function () {
|
|
|
10100
10129
|
break;
|
|
10101
10130
|
}
|
|
10102
10131
|
_context.n = 1;
|
|
10103
|
-
return createRequiredMintTxs(chain, assets.findNativeAssetInfoOrThrow(chain),
|
|
10132
|
+
return createRequiredMintTxs(chain, assets.findNativeAssetInfoOrThrow(chain), BYPASS_MINT_AMOUNT, 0n, address, api);
|
|
10104
10133
|
case 1:
|
|
10105
10134
|
_t = _context.v;
|
|
10106
10135
|
_context.n = 3;
|
|
@@ -10114,7 +10143,7 @@ var wrapTxBypass = /*#__PURE__*/function () {
|
|
|
10114
10143
|
break;
|
|
10115
10144
|
}
|
|
10116
10145
|
_context.n = 4;
|
|
10117
|
-
return createOptionalMintTxs(chain, relayCurrency,
|
|
10146
|
+
return createOptionalMintTxs(chain, relayCurrency, BYPASS_MINT_AMOUNT, 0n, address, api);
|
|
10118
10147
|
case 4:
|
|
10119
10148
|
_t2 = _context.v;
|
|
10120
10149
|
_context.n = 6;
|
|
@@ -10127,7 +10156,7 @@ var wrapTxBypass = /*#__PURE__*/function () {
|
|
|
10127
10156
|
_context.n = 8;
|
|
10128
10157
|
break;
|
|
10129
10158
|
}
|
|
10130
|
-
amount = viem.parseUnits(
|
|
10159
|
+
amount = viem.parseUnits(BYPASS_MINT_AMOUNT, feeAsset.decimals);
|
|
10131
10160
|
_context.n = 7;
|
|
10132
10161
|
return createMintTxs(chain, _objectSpread2(_objectSpread2({}, feeAsset), {}, {
|
|
10133
10162
|
amount: amount
|
|
@@ -10146,7 +10175,7 @@ var wrapTxBypass = /*#__PURE__*/function () {
|
|
|
10146
10175
|
balance = _context.v;
|
|
10147
10176
|
bonus = mintBonusForSent(chain, asset, feeAsset, !!mintFeeAssets);
|
|
10148
10177
|
if ((options === null || options === void 0 ? void 0 : options.sentAssetMintMode) === 'bypass') {
|
|
10149
|
-
mintAmount = viem.parseUnits(
|
|
10178
|
+
mintAmount = viem.parseUnits(BYPASS_MINT_AMOUNT, asset.decimals) + asset.amount;
|
|
10150
10179
|
} else {
|
|
10151
10180
|
missing = (_calcPreviewMintAmoun = calcPreviewMintAmount(balance, asset.amount)) !== null && _calcPreviewMintAmoun !== void 0 ? _calcPreviewMintAmoun : 0n;
|
|
10152
10181
|
total = missing + bonus;
|
|
@@ -10587,7 +10616,8 @@ var getXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
10587
10616
|
tx: tx,
|
|
10588
10617
|
originFee: originFee !== null && originFee !== void 0 ? originFee : 0n,
|
|
10589
10618
|
senderAddress: senderAddress,
|
|
10590
|
-
disableFallback: disableFallback
|
|
10619
|
+
disableFallback: disableFallback,
|
|
10620
|
+
swapConfig: swapConfig
|
|
10591
10621
|
});
|
|
10592
10622
|
case 4:
|
|
10593
10623
|
destFeeRes = _context2.v;
|
|
@@ -11663,7 +11693,7 @@ var getMinTransferableAmountInternal = /*#__PURE__*/function () {
|
|
|
11663
11693
|
_context.n = 6;
|
|
11664
11694
|
break;
|
|
11665
11695
|
}
|
|
11666
|
-
|
|
11696
|
+
return _context.a(2, 0n);
|
|
11667
11697
|
case 6:
|
|
11668
11698
|
return _context.a(2, minAmount);
|
|
11669
11699
|
}
|
|
@@ -12660,6 +12690,31 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
12660
12690
|
}
|
|
12661
12691
|
return build;
|
|
12662
12692
|
}())
|
|
12693
|
+
}, {
|
|
12694
|
+
key: "computeOverridenAmount",
|
|
12695
|
+
value: function computeOverridenAmount() {
|
|
12696
|
+
var _this$_options2 = this._options,
|
|
12697
|
+
from = _this$_options2.from,
|
|
12698
|
+
to = _this$_options2.to,
|
|
12699
|
+
currency = _this$_options2.currency;
|
|
12700
|
+
var config = this.api.getConfig();
|
|
12701
|
+
if (isConfig(config) && config.abstractDecimals) {
|
|
12702
|
+
return BYPASS_CURRENCY_AMOUNT;
|
|
12703
|
+
} else {
|
|
12704
|
+
assertToIsString(to);
|
|
12705
|
+
var asset = assets.findAssetInfoOrThrow(from, currency, to);
|
|
12706
|
+
return viem.parseUnits(BYPASS_CURRENCY_AMOUNT, asset.decimals);
|
|
12707
|
+
}
|
|
12708
|
+
}
|
|
12709
|
+
}, {
|
|
12710
|
+
key: "overrideTxAmount",
|
|
12711
|
+
value: function overrideTxAmount() {
|
|
12712
|
+
var currency = this._options.currency;
|
|
12713
|
+
var modifiedBuilder = this.currency(_objectSpread2(_objectSpread2({}, currency), {}, {
|
|
12714
|
+
amount: this.computeOverridenAmount()
|
|
12715
|
+
}));
|
|
12716
|
+
return modifiedBuilder.build();
|
|
12717
|
+
}
|
|
12663
12718
|
}, {
|
|
12664
12719
|
key: "dryRun",
|
|
12665
12720
|
value: function () {
|
|
@@ -12715,15 +12770,15 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
12715
12770
|
value: (function () {
|
|
12716
12771
|
var _getXcmFee2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(options) {
|
|
12717
12772
|
var _options$disableFallb;
|
|
12718
|
-
var _this$
|
|
12773
|
+
var _this$_options3, from, to, address, senderAddress, feeAsset, currency, tx, disableFallback;
|
|
12719
12774
|
return _regenerator().w(function (_context5) {
|
|
12720
12775
|
while (1) switch (_context5.p = _context5.n) {
|
|
12721
12776
|
case 0:
|
|
12722
|
-
_this$
|
|
12777
|
+
_this$_options3 = this._options, from = _this$_options3.from, to = _this$_options3.to, address = _this$_options3.address, senderAddress = _this$_options3.senderAddress, feeAsset = _this$_options3.feeAsset, currency = _this$_options3.currency;
|
|
12723
12778
|
assertToIsString(to);
|
|
12724
12779
|
assertAddressIsString(address);
|
|
12725
12780
|
_context5.n = 1;
|
|
12726
|
-
return this.
|
|
12781
|
+
return this.overrideTxAmount();
|
|
12727
12782
|
case 1:
|
|
12728
12783
|
tx = _context5.v;
|
|
12729
12784
|
disableFallback = (_options$disableFallb = options === null || options === void 0 ? void 0 : options.disableFallback) !== null && _options$disableFallb !== void 0 ? _options$disableFallb : false;
|
|
@@ -12770,7 +12825,7 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
12770
12825
|
var _getOriginXcmFee2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6() {
|
|
12771
12826
|
var _ref,
|
|
12772
12827
|
disableFallback,
|
|
12773
|
-
_this$
|
|
12828
|
+
_this$_options4,
|
|
12774
12829
|
from,
|
|
12775
12830
|
to,
|
|
12776
12831
|
senderAddress,
|
|
@@ -12784,10 +12839,10 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
12784
12839
|
_ref = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {
|
|
12785
12840
|
disableFallback: false
|
|
12786
12841
|
}, disableFallback = _ref.disableFallback;
|
|
12787
|
-
_this$
|
|
12842
|
+
_this$_options4 = this._options, from = _this$_options4.from, to = _this$_options4.to, senderAddress = _this$_options4.senderAddress, currency = _this$_options4.currency, feeAsset = _this$_options4.feeAsset;
|
|
12788
12843
|
assertToIsString(to);
|
|
12789
12844
|
_context6.n = 1;
|
|
12790
|
-
return this.
|
|
12845
|
+
return this.overrideTxAmount();
|
|
12791
12846
|
case 1:
|
|
12792
12847
|
tx = _context6.v;
|
|
12793
12848
|
_context6.p = 2;
|
|
@@ -12830,11 +12885,11 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
12830
12885
|
key: "getXcmFeeEstimate",
|
|
12831
12886
|
value: (function () {
|
|
12832
12887
|
var _getXcmFeeEstimate2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7() {
|
|
12833
|
-
var _this$
|
|
12888
|
+
var _this$_options5, from, to, address, senderAddress, currency, tx;
|
|
12834
12889
|
return _regenerator().w(function (_context7) {
|
|
12835
12890
|
while (1) switch (_context7.p = _context7.n) {
|
|
12836
12891
|
case 0:
|
|
12837
|
-
_this$
|
|
12892
|
+
_this$_options5 = this._options, from = _this$_options5.from, to = _this$_options5.to, address = _this$_options5.address, senderAddress = _this$_options5.senderAddress, currency = _this$_options5.currency;
|
|
12838
12893
|
assertToIsString(to);
|
|
12839
12894
|
assertAddressIsString(address);
|
|
12840
12895
|
_context7.n = 1;
|
|
@@ -12880,11 +12935,11 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
12880
12935
|
key: "getOriginXcmFeeEstimate",
|
|
12881
12936
|
value: (function () {
|
|
12882
12937
|
var _getOriginXcmFeeEstimate2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8() {
|
|
12883
|
-
var _this$
|
|
12938
|
+
var _this$_options6, from, to, senderAddress, currency, tx;
|
|
12884
12939
|
return _regenerator().w(function (_context8) {
|
|
12885
12940
|
while (1) switch (_context8.p = _context8.n) {
|
|
12886
12941
|
case 0:
|
|
12887
|
-
_this$
|
|
12942
|
+
_this$_options6 = this._options, from = _this$_options6.from, to = _this$_options6.to, senderAddress = _this$_options6.senderAddress, currency = _this$_options6.currency;
|
|
12888
12943
|
assertToIsString(to);
|
|
12889
12944
|
_context8.n = 1;
|
|
12890
12945
|
return this.build();
|
|
@@ -12928,14 +12983,14 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
12928
12983
|
key: "getTransferableAmount",
|
|
12929
12984
|
value: (function () {
|
|
12930
12985
|
var _getTransferableAmount2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9() {
|
|
12931
|
-
var _this$
|
|
12986
|
+
var _this$_options7, from, to, senderAddress, currency, feeAsset, tx;
|
|
12932
12987
|
return _regenerator().w(function (_context9) {
|
|
12933
12988
|
while (1) switch (_context9.n) {
|
|
12934
12989
|
case 0:
|
|
12935
|
-
_this$
|
|
12990
|
+
_this$_options7 = this._options, from = _this$_options7.from, to = _this$_options7.to, senderAddress = _this$_options7.senderAddress, currency = _this$_options7.currency, feeAsset = _this$_options7.feeAsset;
|
|
12936
12991
|
assertToIsString(to);
|
|
12937
12992
|
_context9.n = 1;
|
|
12938
|
-
return this.
|
|
12993
|
+
return this.overrideTxAmount();
|
|
12939
12994
|
case 1:
|
|
12940
12995
|
tx = _context9.v;
|
|
12941
12996
|
return _context9.a(2, getTransferableAmount({
|
|
@@ -12965,15 +13020,15 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
12965
13020
|
key: "getMinTransferableAmount",
|
|
12966
13021
|
value: (function () {
|
|
12967
13022
|
var _getMinTransferableAmount2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0() {
|
|
12968
|
-
var _this$
|
|
13023
|
+
var _this$_options8, from, to, senderAddress, address, currency, feeAsset, tx;
|
|
12969
13024
|
return _regenerator().w(function (_context0) {
|
|
12970
13025
|
while (1) switch (_context0.n) {
|
|
12971
13026
|
case 0:
|
|
12972
|
-
_this$
|
|
13027
|
+
_this$_options8 = this._options, from = _this$_options8.from, to = _this$_options8.to, senderAddress = _this$_options8.senderAddress, address = _this$_options8.address, currency = _this$_options8.currency, feeAsset = _this$_options8.feeAsset;
|
|
12973
13028
|
assertToIsString(to);
|
|
12974
13029
|
assertAddressIsString(address);
|
|
12975
13030
|
_context0.n = 1;
|
|
12976
|
-
return this.
|
|
13031
|
+
return this.overrideTxAmount();
|
|
12977
13032
|
case 1:
|
|
12978
13033
|
tx = _context0.v;
|
|
12979
13034
|
return _context0.a(2, getMinTransferableAmount({
|
|
@@ -13005,15 +13060,15 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
13005
13060
|
key: "verifyEdOnDestination",
|
|
13006
13061
|
value: (function () {
|
|
13007
13062
|
var _verifyEdOnDestination2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1() {
|
|
13008
|
-
var _this$
|
|
13063
|
+
var _this$_options9, from, to, address, currency, senderAddress, feeAsset, tx;
|
|
13009
13064
|
return _regenerator().w(function (_context1) {
|
|
13010
13065
|
while (1) switch (_context1.n) {
|
|
13011
13066
|
case 0:
|
|
13012
|
-
_this$
|
|
13067
|
+
_this$_options9 = this._options, from = _this$_options9.from, to = _this$_options9.to, address = _this$_options9.address, currency = _this$_options9.currency, senderAddress = _this$_options9.senderAddress, feeAsset = _this$_options9.feeAsset;
|
|
13013
13068
|
assertToIsString(to);
|
|
13014
13069
|
assertAddressIsString(address);
|
|
13015
13070
|
_context1.n = 1;
|
|
13016
|
-
return this.
|
|
13071
|
+
return this.overrideTxAmount();
|
|
13017
13072
|
case 1:
|
|
13018
13073
|
tx = _context1.v;
|
|
13019
13074
|
return _context1.a(2, verifyEdOnDestination({
|
|
@@ -13044,15 +13099,15 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
13044
13099
|
key: "getTransferInfo",
|
|
13045
13100
|
value: (function () {
|
|
13046
13101
|
var _getTransferInfo2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee10() {
|
|
13047
|
-
var _this$
|
|
13102
|
+
var _this$_options0, from, to, address, currency, ahAddress, senderAddress, feeAsset, tx;
|
|
13048
13103
|
return _regenerator().w(function (_context10) {
|
|
13049
13104
|
while (1) switch (_context10.n) {
|
|
13050
13105
|
case 0:
|
|
13051
|
-
_this$
|
|
13106
|
+
_this$_options0 = this._options, from = _this$_options0.from, to = _this$_options0.to, address = _this$_options0.address, currency = _this$_options0.currency, ahAddress = _this$_options0.ahAddress, senderAddress = _this$_options0.senderAddress, feeAsset = _this$_options0.feeAsset;
|
|
13052
13107
|
assertToIsString(to);
|
|
13053
13108
|
assertAddressIsString(address);
|
|
13054
13109
|
_context10.n = 1;
|
|
13055
|
-
return this.
|
|
13110
|
+
return this.overrideTxAmount();
|
|
13056
13111
|
case 1:
|
|
13057
13112
|
tx = _context10.v;
|
|
13058
13113
|
return _context10.a(2, getTransferInfo({
|
package/dist/index.d.ts
CHANGED
|
@@ -449,6 +449,8 @@ declare class GeneralBuilder<TApi, TRes, T extends Partial<TSendBaseOptions> = o
|
|
|
449
449
|
* @returns A Promise that resolves to the transfer extrinsic.
|
|
450
450
|
*/
|
|
451
451
|
build(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>): Promise<TRes>;
|
|
452
|
+
protected computeOverridenAmount(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>): bigint | "800";
|
|
453
|
+
protected overrideTxAmount(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>): Promise<TRes>;
|
|
452
454
|
dryRun(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>): Promise<TDryRunResult>;
|
|
453
455
|
dryRunPreview(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>, options?: TDryRunPreviewOptions): Promise<TDryRunResult>;
|
|
454
456
|
/**
|
|
@@ -1154,10 +1156,7 @@ type TGetXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolean> = {
|
|
|
1154
1156
|
currency: WithAmount<TCurrencyCore>;
|
|
1155
1157
|
feeAsset?: TCurrencyInput;
|
|
1156
1158
|
disableFallback: TDisableFallback;
|
|
1157
|
-
swapConfig?:
|
|
1158
|
-
currencyTo: TCurrencyCore;
|
|
1159
|
-
exchangeChain: TParachain;
|
|
1160
|
-
};
|
|
1159
|
+
swapConfig?: TSwapConfig;
|
|
1161
1160
|
};
|
|
1162
1161
|
type TGetXcmFeeOptions<TApi, TRes, TDisableFallback extends boolean = boolean> = WithApi<TGetXcmFeeBaseOptions<TRes, TDisableFallback>, TApi, TRes>;
|
|
1163
1162
|
type TGetXcmFeeEstimateOptions<TApi, TRes> = Omit<TGetXcmFeeOptions<TApi, TRes>, 'disableFallback'>;
|
|
@@ -1179,6 +1178,10 @@ type TGetOriginXcmFeeOptions<TApi, TRes> = WithApi<TGetOriginXcmFeeBaseOptions<T
|
|
|
1179
1178
|
type TAttemptDryRunFeeOptions<TApi, TRes> = Omit<TGetOriginXcmFeeOptions<TApi, TRes>, 'tx'> & {
|
|
1180
1179
|
builder: GeneralBuilder<TApi, TRes, TSendBaseOptions>;
|
|
1181
1180
|
};
|
|
1181
|
+
type TSwapConfig = {
|
|
1182
|
+
currencyTo: TCurrencyCore;
|
|
1183
|
+
exchangeChain: TParachain;
|
|
1184
|
+
};
|
|
1182
1185
|
type TGetFeeForDestChainBaseOptions<TRes> = {
|
|
1183
1186
|
prevChain: TSubstrateChain;
|
|
1184
1187
|
origin: TSubstrateChain;
|
|
@@ -1192,6 +1195,7 @@ type TGetFeeForDestChainBaseOptions<TRes> = {
|
|
|
1192
1195
|
originFee: bigint;
|
|
1193
1196
|
feeAsset?: TCurrencyInput;
|
|
1194
1197
|
disableFallback: boolean;
|
|
1198
|
+
swapConfig?: TSwapConfig;
|
|
1195
1199
|
};
|
|
1196
1200
|
type TGetFeeForDestChainOptions<TApi, TRes> = WithApi<TGetFeeForDestChainBaseOptions<TRes>, TApi, TRes>;
|
|
1197
1201
|
type TGetReverseTxFeeOptions<TApi, TRes> = Omit<TGetFeeForDestChainOptions<TApi, TRes>, 'destination' | 'disableFallback' | 'forwardedXcms' | 'asset' | 'originFee' | 'prevChain'> & {
|
|
@@ -1525,6 +1529,7 @@ declare class Amplitude<TApi, TRes> extends Parachain<TApi, TRes> implements IXT
|
|
|
1525
1529
|
declare class AssetHubKusama<TApi, TRes> extends Parachain<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
1526
1530
|
constructor();
|
|
1527
1531
|
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1532
|
+
getMethod(scenario: TScenario, destination: TDestination): TPolkadotXcmMethod;
|
|
1528
1533
|
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
1529
1534
|
createCurrencySpec(amount: bigint, scenario: TScenario, version: Version, asset?: TAssetInfo, isOverridenAsset?: boolean): _paraspell_assets.TAsset;
|
|
1530
1535
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
@@ -1767,13 +1772,17 @@ declare class HydrationPaseo<TApi, TRes> extends Hydration<TApi, TRes> {
|
|
|
1767
1772
|
constructor();
|
|
1768
1773
|
}
|
|
1769
1774
|
|
|
1770
|
-
declare class
|
|
1775
|
+
declare class IntegriteePolkadot<TApi, TRes> extends Parachain<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
1771
1776
|
constructor(chain?: TParachain, info?: string, type?: TRelaychain, version?: Version);
|
|
1772
|
-
|
|
1777
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1773
1778
|
transferRelayToPara(): Promise<TSerializedApiCall>;
|
|
1774
1779
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
1775
1780
|
}
|
|
1776
1781
|
|
|
1782
|
+
declare class IntegriteeKusama<TApi, TRes> extends IntegriteePolkadot<TApi, TRes> {
|
|
1783
|
+
constructor(chain?: TParachain, info?: string, type?: TRelaychain, version?: Version);
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1777
1786
|
declare class IntegriteePaseo<TApi, TRes> extends IntegriteeKusama<TApi, TRes> {
|
|
1778
1787
|
constructor();
|
|
1779
1788
|
}
|
|
@@ -1994,6 +2003,7 @@ declare const chains: <TApi, TRes>() => {
|
|
|
1994
2003
|
EnergyWebX: EnergyWebX<TApi, TRes>;
|
|
1995
2004
|
Hydration: Hydration<TApi, TRes>;
|
|
1996
2005
|
IntegriteeKusama: IntegriteeKusama<TApi, TRes>;
|
|
2006
|
+
IntegriteePolkadot: IntegriteePolkadot<TApi, TRes>;
|
|
1997
2007
|
Interlay: Interlay<TApi, TRes>;
|
|
1998
2008
|
Heima: Heima<TApi, TRes>;
|
|
1999
2009
|
Jamton: Jamton<TApi, TRes>;
|
|
@@ -2211,7 +2221,7 @@ declare const localizeLocation: (chain: TChain, location: TLocation) => TLocatio
|
|
|
2211
2221
|
|
|
2212
2222
|
declare const reverseTransformLocation: (location: TLocation) => TLocation;
|
|
2213
2223
|
|
|
2214
|
-
declare const resolveDestChain: (originChain: TSubstrateChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "ComposableFinance" | "Darwinia" | "EnergyWebX" | "Hydration" | "Interlay" | "Heima" | "Jamton" | "Moonbeam" | "CoretimePolkadot" | "Collectives" | "Crust" | "Manta" | "Nodle" | "NeuroWeb" | "Pendulum" | "Phala" | "Subsocial" | "KiltSpiritnet" | "Curio" | "Mythos" | "Peaq" | "Polimec" | "RobonomicsPolkadot" | "PeoplePolkadot" | "Unique" | "AssetHubKusama" | "BridgeHubKusama" | "IntegriteeKusama" | "Karura" | "Kintsugi" | "Moonriver" | "CoretimeKusama" | "Encointer" | "Altair" | "Amplitude" | "Basilisk" | "BifrostKusama" | "CrustShadow" | "Crab" | "Laos" | "Quartz" | "RobonomicsKusama" | "PeopleKusama" | "Shiden" | "Zeitgeist" | "AssetHubWestend" | "BridgeHubWestend" | "CollectivesWestend" | "CoretimeWestend" | "Penpal" | "PeopleWestend" | "AjunaPaseo" | "AssetHubPaseo" | "BifrostPaseo" | "BridgeHubPaseo" | "CoretimePaseo" | "EnergyWebXPaseo" | "HeimaPaseo" | "HydrationPaseo" | "IntegriteePaseo" | "KiltPaseo" | "LaosPaseo" | "NeuroWebPaseo" | "NodlePaseo" | "PAssetHub" | "PeoplePaseo" | "ZeitgeistPaseo" | undefined;
|
|
2224
|
+
declare const resolveDestChain: (originChain: TSubstrateChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "ComposableFinance" | "Darwinia" | "EnergyWebX" | "Hydration" | "IntegriteePolkadot" | "Interlay" | "Heima" | "Jamton" | "Moonbeam" | "CoretimePolkadot" | "Collectives" | "Crust" | "Manta" | "Nodle" | "NeuroWeb" | "Pendulum" | "Phala" | "Subsocial" | "KiltSpiritnet" | "Curio" | "Mythos" | "Peaq" | "Polimec" | "RobonomicsPolkadot" | "PeoplePolkadot" | "Unique" | "AssetHubKusama" | "BridgeHubKusama" | "IntegriteeKusama" | "Karura" | "Kintsugi" | "Moonriver" | "CoretimeKusama" | "Encointer" | "Altair" | "Amplitude" | "Basilisk" | "BifrostKusama" | "CrustShadow" | "Crab" | "Laos" | "Quartz" | "RobonomicsKusama" | "PeopleKusama" | "Shiden" | "Zeitgeist" | "AssetHubWestend" | "BridgeHubWestend" | "CollectivesWestend" | "CoretimeWestend" | "Penpal" | "PeopleWestend" | "AjunaPaseo" | "AssetHubPaseo" | "BifrostPaseo" | "BridgeHubPaseo" | "CoretimePaseo" | "EnergyWebXPaseo" | "HeimaPaseo" | "HydrationPaseo" | "IntegriteePaseo" | "KiltPaseo" | "LaosPaseo" | "NeuroWebPaseo" | "NodlePaseo" | "PAssetHub" | "PeoplePaseo" | "ZeitgeistPaseo" | undefined;
|
|
2215
2225
|
|
|
2216
2226
|
declare const resolveParaId: (paraId: number | undefined, destination: TDestination) => number | undefined;
|
|
2217
2227
|
|
|
@@ -2248,4 +2258,4 @@ declare const handleToAhTeleport: <TApi, TRes>(origin: TParachain, input: TPolka
|
|
|
2248
2258
|
declare const validateAddress: (address: TAddress, chain: TChain, isDestination?: boolean) => void;
|
|
2249
2259
|
|
|
2250
2260
|
export { AmountTooLowError, AssetClaimBuilder, AssetsPallet, BatchMode, BridgeHaltedError, Builder, ChainNotSupportedError, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, GeneralBuilder, IncompatibleChainsError, InvalidAddressError, InvalidParameterError, MissingChainApiError, NoXCMSupportImplementedError, PolkadotXcmError, ScenarioNotSupportedError, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, UnableToComputeError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, applyDecimalAbstraction, assertAddressIsString, assertHasId, assertHasLocation, assertIsForeign, assertToIsString, blake2b256, blake2b512, calcPreviewMintAmount, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, convertSs58, createAsset, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createDirectExecuteXcm, createExecuteCall, createExecuteExchangeXcm, createTypeAndThenCall, createVersionedAssets, createX1Payload, deriveAccountId, dryRun, dryRunInternal, dryRunOrigin, encodeSs58, getAssetBalance, getAssetBalanceInternal, getAssetReserveChain, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getBridgeStatus, getChain, getChainConfig, getChainLocation, getChainProviders, getChainVersion, getCurrencySelection, getMinTransferableAmount, getMinTransferableAmountInternal, getOriginFeeDetails, getOriginFeeDetailsInternal, getOriginXcmFee, getOriginXcmFeeEstimate, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getRelayChainOf, getTChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeEstimate, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, localizeLocation, maybeOverrideAsset, maybeOverrideAssets, padFee, padFeeBy, resolveDestChain, resolveModuleError, resolveParaId, reverseTransformLocation, send, sortAssets, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, traverseXcmHops, validateAddress, verifyEdOnDestination, wrapTxBypass };
|
|
2251
|
-
export type { BuildHopInfoOptions, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotApi, IPolkadotXCMTransfer, IXTokensTransfer, IXTransferTransfer, OneKey, TAddress, TApiOrUrl, TAssetClaimInternalOptions, TAssetClaimOptions, TAssetClaimOptionsBase, TAttemptDryRunFeeOptions, TBatchOptions, TBifrostToken, TBridgeStatus, TBuildDestInfoOptions, TBuilderConfig, TBuilderOptions, TBypassOptions, TChainConfig, TChainConfigMap, TChainWithApi, TConditionalXcmFeeDetail, TConditionalXcmFeeHopInfo, TCreateBaseSwapXcmOptions, TCreateBaseTransferXcmOptions, TCreateBeneficiaryOptions, TCreateBeneficiaryXTokensOptions, TCreateSwapXcmInternalOptions, TCreateSwapXcmOptions, TCreateTransferXcmOptions, TDestWeight, TDestXcmFeeDetail, TDestination, TDryRunBaseOptions, TDryRunBypassOptions, TDryRunCallBaseOptions, TDryRunCallOptions, TDryRunChain, TDryRunChainFailure, TDryRunChainResult, TDryRunChainSuccess, TDryRunOptions, TDryRunPreviewOptions, TDryRunResBase, TDryRunResult, TDryRunXcmBaseOptions, TDryRunXcmOptions, TEvmBuilderOptions, TEvmBuilderOptionsBase, TEvmChainFrom, TFeeType, TForeignAssetId, TForeignOrNativeAsset, TForeignOrTokenAsset, TGetAssetBalanceOptions, TGetAssetBalanceOptionsBase, TGetBalanceForeignByAssetOptions, TGetBalanceForeignOptions, TGetBalanceForeignOptionsBase, TGetBalanceNativeOptions, TGetBalanceNativeOptionsBase, TGetFeeForDestChainBaseOptions, TGetFeeForDestChainOptions, TGetMinTransferableAmountOptions, TGetOriginFeeDetailsOptions, TGetOriginFeeDetailsOptionsBase, TGetOriginXcmFeeBaseOptions, TGetOriginXcmFeeEstimateOptions, TGetOriginXcmFeeOptions, TGetReverseTxFeeOptions, TGetTransferInfoOptions, TGetTransferInfoOptionsBase, TGetTransferableAmountOptions, TGetTransferableAmountOptionsBase, TGetXcmFeeBaseOptions, TGetXcmFeeBuilderOptions, TGetXcmFeeEstimateDetail, TGetXcmFeeEstimateOptions, TGetXcmFeeEstimateResult, TGetXcmFeeOptions, TGetXcmFeeResult, THopInfo, THopTransferInfo, THubKey, TMantaAsset, TModuleError, TNativeTokenAsset, TNodleAsset, TOriginFeeDetails, TOtherReserveAsset, TPolkadotXCMTransferOptions, TPolkadotXcmMethod, TProviderEntry, TRelayToParaDestination, TRelayToParaOptions, TRelayToParaOverrides, TReserveAsset, TScenario, TSelfReserveAsset, TSendBaseOptions, TSendBaseOptionsWithSenderAddress, TSendInternalOptions, TSendOptions, TSerializeEthTransferOptions, TSerializedApiCall, TSerializedEthTransfer, TSwapFeeEstimates, TTransferFeeEstimates, TTransferInfo, TTransferLocalOptions, TTypeAndThenCallContext, TTypeAndThenFees, TVerifyEdOnDestinationOptions, TVerifyEdOnDestinationOptionsBase, TWeight, TXTokensCurrencySelection, TXTokensMethod, TXTokensTransferOptions, TXTransferMethod, TXTransferTransferOptions, TXcmAsset, TXcmFeeBase, TXcmFeeChain, TXcmFeeDetail, TXcmFeeDetailError, TXcmFeeDetailSuccess, TXcmFeeDetailWithFallback, TXcmFeeHopInfo, TXcmFeeHopResult, TXcmForeignAsset, TXcmPalletMethod, TXcmVersioned, TZeitgeistAsset, WithApi, WithRequiredSenderAddress };
|
|
2261
|
+
export type { BuildHopInfoOptions, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotApi, IPolkadotXCMTransfer, IXTokensTransfer, IXTransferTransfer, OneKey, TAddress, TApiOrUrl, TAssetClaimInternalOptions, TAssetClaimOptions, TAssetClaimOptionsBase, TAttemptDryRunFeeOptions, TBatchOptions, TBifrostToken, TBridgeStatus, TBuildDestInfoOptions, TBuilderConfig, TBuilderOptions, TBypassOptions, TChainConfig, TChainConfigMap, TChainWithApi, TConditionalXcmFeeDetail, TConditionalXcmFeeHopInfo, TCreateBaseSwapXcmOptions, TCreateBaseTransferXcmOptions, TCreateBeneficiaryOptions, TCreateBeneficiaryXTokensOptions, TCreateSwapXcmInternalOptions, TCreateSwapXcmOptions, TCreateTransferXcmOptions, TDestWeight, TDestXcmFeeDetail, TDestination, TDryRunBaseOptions, TDryRunBypassOptions, TDryRunCallBaseOptions, TDryRunCallOptions, TDryRunChain, TDryRunChainFailure, TDryRunChainResult, TDryRunChainSuccess, TDryRunOptions, TDryRunPreviewOptions, TDryRunResBase, TDryRunResult, TDryRunXcmBaseOptions, TDryRunXcmOptions, TEvmBuilderOptions, TEvmBuilderOptionsBase, TEvmChainFrom, TFeeType, TForeignAssetId, TForeignOrNativeAsset, TForeignOrTokenAsset, TGetAssetBalanceOptions, TGetAssetBalanceOptionsBase, TGetBalanceForeignByAssetOptions, TGetBalanceForeignOptions, TGetBalanceForeignOptionsBase, TGetBalanceNativeOptions, TGetBalanceNativeOptionsBase, TGetFeeForDestChainBaseOptions, TGetFeeForDestChainOptions, TGetMinTransferableAmountOptions, TGetOriginFeeDetailsOptions, TGetOriginFeeDetailsOptionsBase, TGetOriginXcmFeeBaseOptions, TGetOriginXcmFeeEstimateOptions, TGetOriginXcmFeeOptions, TGetReverseTxFeeOptions, TGetTransferInfoOptions, TGetTransferInfoOptionsBase, TGetTransferableAmountOptions, TGetTransferableAmountOptionsBase, TGetXcmFeeBaseOptions, TGetXcmFeeBuilderOptions, TGetXcmFeeEstimateDetail, TGetXcmFeeEstimateOptions, TGetXcmFeeEstimateResult, TGetXcmFeeOptions, TGetXcmFeeResult, THopInfo, THopTransferInfo, THubKey, TMantaAsset, TModuleError, TNativeTokenAsset, TNodleAsset, TOriginFeeDetails, TOtherReserveAsset, TPolkadotXCMTransferOptions, TPolkadotXcmMethod, TProviderEntry, TRelayToParaDestination, TRelayToParaOptions, TRelayToParaOverrides, TReserveAsset, TScenario, TSelfReserveAsset, TSendBaseOptions, TSendBaseOptionsWithSenderAddress, TSendInternalOptions, TSendOptions, TSerializeEthTransferOptions, TSerializedApiCall, TSerializedEthTransfer, TSwapConfig, TSwapFeeEstimates, TTransferFeeEstimates, TTransferInfo, TTransferLocalOptions, TTypeAndThenCallContext, TTypeAndThenFees, TVerifyEdOnDestinationOptions, TVerifyEdOnDestinationOptionsBase, TWeight, TXTokensCurrencySelection, TXTokensMethod, TXTokensTransferOptions, TXTransferMethod, TXTransferTransferOptions, TXcmAsset, TXcmFeeBase, TXcmFeeChain, TXcmFeeDetail, TXcmFeeDetailError, TXcmFeeDetailSuccess, TXcmFeeDetailWithFallback, TXcmFeeHopInfo, TXcmFeeHopResult, TXcmForeignAsset, TXcmPalletMethod, TXcmVersioned, TZeitgeistAsset, WithApi, WithRequiredSenderAddress };
|
package/dist/index.mjs
CHANGED
|
@@ -1106,17 +1106,6 @@ var EnergyWebX$1 = {
|
|
|
1106
1106
|
}
|
|
1107
1107
|
]
|
|
1108
1108
|
};
|
|
1109
|
-
var EnergyWebXPaseo$1 = {
|
|
1110
|
-
name: "PEX",
|
|
1111
|
-
info: "paseoEwx",
|
|
1112
|
-
paraId: 3345,
|
|
1113
|
-
providers: [
|
|
1114
|
-
{
|
|
1115
|
-
name: "Energy Web",
|
|
1116
|
-
endpoint: "wss://public-rpc.testnet.energywebx.com/"
|
|
1117
|
-
}
|
|
1118
|
-
]
|
|
1119
|
-
};
|
|
1120
1109
|
var Hydration$1 = {
|
|
1121
1110
|
name: "Hydration",
|
|
1122
1111
|
info: "hydradx",
|
|
@@ -1140,6 +1129,17 @@ var Hydration$1 = {
|
|
|
1140
1129
|
}
|
|
1141
1130
|
]
|
|
1142
1131
|
};
|
|
1132
|
+
var IntegriteePolkadot$1 = {
|
|
1133
|
+
name: "Integritee Network",
|
|
1134
|
+
info: "integritee",
|
|
1135
|
+
paraId: 2039,
|
|
1136
|
+
providers: [
|
|
1137
|
+
{
|
|
1138
|
+
name: "Integritee",
|
|
1139
|
+
endpoint: "wss://polkadot.api.integritee.network"
|
|
1140
|
+
}
|
|
1141
|
+
]
|
|
1142
|
+
};
|
|
1143
1143
|
var Interlay$1 = {
|
|
1144
1144
|
name: "Interlay",
|
|
1145
1145
|
info: "interlay",
|
|
@@ -2196,6 +2196,17 @@ var CoretimePaseo$1 = {
|
|
|
2196
2196
|
}
|
|
2197
2197
|
]
|
|
2198
2198
|
};
|
|
2199
|
+
var EnergyWebXPaseo$1 = {
|
|
2200
|
+
name: "PEX",
|
|
2201
|
+
info: "paseoEwx",
|
|
2202
|
+
paraId: 3345,
|
|
2203
|
+
providers: [
|
|
2204
|
+
{
|
|
2205
|
+
name: "Energy Web",
|
|
2206
|
+
endpoint: "wss://public-rpc.testnet.energywebx.com/"
|
|
2207
|
+
}
|
|
2208
|
+
]
|
|
2209
|
+
};
|
|
2199
2210
|
var HeimaPaseo$1 = {
|
|
2200
2211
|
name: "Heima paseo",
|
|
2201
2212
|
info: "heima-paseo",
|
|
@@ -2501,8 +2512,8 @@ var configs = {
|
|
|
2501
2512
|
ComposableFinance: ComposableFinance$1,
|
|
2502
2513
|
Darwinia: Darwinia$1,
|
|
2503
2514
|
EnergyWebX: EnergyWebX$1,
|
|
2504
|
-
EnergyWebXPaseo: EnergyWebXPaseo$1,
|
|
2505
2515
|
Hydration: Hydration$1,
|
|
2516
|
+
IntegriteePolkadot: IntegriteePolkadot$1,
|
|
2506
2517
|
Interlay: Interlay$1,
|
|
2507
2518
|
Heima: Heima$1,
|
|
2508
2519
|
Jamton: Jamton$1,
|
|
@@ -2555,6 +2566,7 @@ var configs = {
|
|
|
2555
2566
|
BifrostPaseo: BifrostPaseo$1,
|
|
2556
2567
|
BridgeHubPaseo: BridgeHubPaseo$1,
|
|
2557
2568
|
CoretimePaseo: CoretimePaseo$1,
|
|
2569
|
+
EnergyWebXPaseo: EnergyWebXPaseo$1,
|
|
2558
2570
|
HeimaPaseo: HeimaPaseo$1,
|
|
2559
2571
|
HydrationPaseo: HydrationPaseo$1,
|
|
2560
2572
|
IntegriteePaseo: IntegriteePaseo$1,
|
|
@@ -3815,12 +3827,12 @@ var getBalanceForeignXTokens = /*#__PURE__*/function () {
|
|
|
3815
3827
|
return _regenerator().w(function (_context) {
|
|
3816
3828
|
while (1) switch (_context.n) {
|
|
3817
3829
|
case 0:
|
|
3818
|
-
if (!(chain === 'Astar' || chain === 'Shiden')) {
|
|
3830
|
+
if (!(chain === 'Astar' || chain === 'Shiden' || chain.startsWith('Integritee'))) {
|
|
3819
3831
|
_context.n = 1;
|
|
3820
3832
|
break;
|
|
3821
3833
|
}
|
|
3822
3834
|
assertHasId(asset);
|
|
3823
|
-
return _context.a(2, api.getBalanceAssetsPallet(address, BigInt(asset.assetId)));
|
|
3835
|
+
return _context.a(2, api.getBalanceAssetsPallet(address, chain.startsWith('Integritee') ? Number(asset.assetId) : BigInt(asset.assetId)));
|
|
3824
3836
|
case 1:
|
|
3825
3837
|
if (!(chain === 'BifrostPolkadot' || chain === 'BifrostKusama')) {
|
|
3826
3838
|
_context.n = 2;
|
|
@@ -4301,11 +4313,11 @@ var createOriginLocation = function createOriginLocation(origin, destination) {
|
|
|
4301
4313
|
};
|
|
4302
4314
|
var getDestXcmFee = /*#__PURE__*/function () {
|
|
4303
4315
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(options) {
|
|
4304
|
-
var api, origin, hopChain, destination, currency, forwardedXcms, asset, address, feeAsset, originFee, tx, disableFallback, resolvedFeeAsset, calcPaymentInfoFee, _fee, sufficient, dryRunResult, _fee2, fee, newForwardedXcms, destParaId;
|
|
4316
|
+
var api, origin, hopChain, destination, currency, forwardedXcms, asset, address, feeAsset, originFee, tx, disableFallback, swapConfig, resolvedFeeAsset, calcPaymentInfoFee, _fee, sufficient, dryRunResult, _fee2, fee, newForwardedXcms, destParaId;
|
|
4305
4317
|
return _regenerator().w(function (_context2) {
|
|
4306
4318
|
while (1) switch (_context2.n) {
|
|
4307
4319
|
case 0:
|
|
4308
|
-
api = options.api, origin = options.origin, hopChain = options.prevChain, destination = options.destination, currency = options.currency, forwardedXcms = options.forwardedXcms, asset = options.asset, address = options.address, feeAsset = options.feeAsset, originFee = options.originFee, tx = options.tx, disableFallback = options.disableFallback;
|
|
4320
|
+
api = options.api, origin = options.origin, hopChain = options.prevChain, destination = options.destination, currency = options.currency, forwardedXcms = options.forwardedXcms, asset = options.asset, address = options.address, feeAsset = options.feeAsset, originFee = options.originFee, tx = options.tx, disableFallback = options.disableFallback, swapConfig = options.swapConfig;
|
|
4309
4321
|
resolvedFeeAsset = feeAsset ? resolveFeeAsset(feeAsset, origin, destination, currency) : undefined;
|
|
4310
4322
|
calcPaymentInfoFee = /*#__PURE__*/function () {
|
|
4311
4323
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
@@ -4319,7 +4331,7 @@ var getDestXcmFee = /*#__PURE__*/function () {
|
|
|
4319
4331
|
}
|
|
4320
4332
|
return _context.a(2, 0n);
|
|
4321
4333
|
case 1:
|
|
4322
|
-
originAsset = findAssetInfoOrThrow(origin, currency, destination);
|
|
4334
|
+
originAsset = swapConfig !== null && swapConfig !== void 0 && swapConfig.currencyTo ? findAssetInfoOrThrow(swapConfig.exchangeChain, swapConfig.currencyTo, destination) : findAssetInfoOrThrow(origin, currency, destination);
|
|
4323
4335
|
if (!originAsset.location) {
|
|
4324
4336
|
_context.n = 7;
|
|
4325
4337
|
break;
|
|
@@ -6016,7 +6028,7 @@ var Parachain = /*#__PURE__*/function () {
|
|
|
6016
6028
|
key: "transfer",
|
|
6017
6029
|
value: function () {
|
|
6018
6030
|
var _transfer = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(sendOptions) {
|
|
6019
|
-
var api, asset, currency, feeAsset, feeCurrency, address, destination, paraIdTo, overriddenAsset, version, senderAddress, ahAddress, pallet, method, scenario, paraId, destChain, isLocalTransfer, isRelayAsset, supportsTypeThen, useTypeAndThen, isBifrostOrigin, isJamtonOrigin, isAssetHubDest, useMultiAssets, input, options, shouldUseTeleport, isAhToOtherPara, isOtherParaToAh, isAHPOrigin, isAHPDest, isExternalAsset, isEthDest, isExternalAssetViaAh, isExternalAssetToAh, call;
|
|
6031
|
+
var api, asset, currency, feeAsset, feeCurrency, address, destination, paraIdTo, overriddenAsset, version, senderAddress, ahAddress, pallet, method, scenario, paraId, destChain, isLocalTransfer, isRelayAsset, supportsTypeThen, useTypeAndThen, isBifrostOrigin, isJamtonOrigin, isAssetHubDest, useMultiAssets, input, options, shouldUseTeleport, isAhToOtherPara, isOtherParaToAh, isAllowedAhTransfer, isAHPOrigin, isAHPDest, isExternalAsset, isEthDest, isExternalAssetViaAh, isExternalAssetToAh, call;
|
|
6020
6032
|
return _regenerator().w(function (_context) {
|
|
6021
6033
|
while (1) switch (_context.n) {
|
|
6022
6034
|
case 0:
|
|
@@ -6127,7 +6139,10 @@ var Parachain = /*#__PURE__*/function () {
|
|
|
6127
6139
|
shouldUseTeleport = this.shouldUseNativeAssetTeleport(sendOptions);
|
|
6128
6140
|
isAhToOtherPara = this.chain.startsWith('AssetHub') && destChain && !isTrustedChain(destChain);
|
|
6129
6141
|
isOtherParaToAh = (destChain === null || destChain === void 0 ? void 0 : destChain.startsWith('AssetHub')) && !isTrustedChain(this.chain);
|
|
6130
|
-
|
|
6142
|
+
isAllowedAhTransfer = function isAllowedAhTransfer(chain) {
|
|
6143
|
+
return chain === null || chain === void 0 ? void 0 : chain.startsWith('Integritee');
|
|
6144
|
+
};
|
|
6145
|
+
if (!((isAhToOtherPara || isOtherParaToAh) && shouldUseTeleport && !isAllowedAhTransfer(destChain) && !isAllowedAhTransfer(this.chain))) {
|
|
6131
6146
|
_context.n = 8;
|
|
6132
6147
|
break;
|
|
6133
6148
|
}
|
|
@@ -6759,9 +6774,16 @@ var AssetHubKusama = /*#__PURE__*/function (_Parachain) {
|
|
|
6759
6774
|
if (scenario === 'ParaToPara' && asset.symbol === 'DOT' && !isForeignAsset(asset)) {
|
|
6760
6775
|
throw new ScenarioNotSupportedError(this.chain, scenario, 'Bridged DOT cannot currently be transfered from AssetHubKusama, if you are sending different DOT asset, please specify {id: <DOTID>}.');
|
|
6761
6776
|
}
|
|
6762
|
-
var method = scenario
|
|
6777
|
+
var method = this.getMethod(scenario, destination);
|
|
6763
6778
|
return transferPolkadotXcm(input, method, 'Unlimited');
|
|
6764
6779
|
}
|
|
6780
|
+
}, {
|
|
6781
|
+
key: "getMethod",
|
|
6782
|
+
value: function getMethod(scenario, destination) {
|
|
6783
|
+
var isTrusted = !isTLocation(destination) && isTrustedChain(destination);
|
|
6784
|
+
if (destination === 'IntegriteeKusama') return 'transfer_assets';
|
|
6785
|
+
return scenario === 'ParaToPara' && !isTrusted ? 'limited_reserve_transfer_assets' : 'limited_teleport_assets';
|
|
6786
|
+
}
|
|
6765
6787
|
}, {
|
|
6766
6788
|
key: "getRelayToParaOverrides",
|
|
6767
6789
|
value: function getRelayToParaOverrides() {
|
|
@@ -6989,7 +7011,7 @@ var AssetHubPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
6989
7011
|
key: "getMethod",
|
|
6990
7012
|
value: function getMethod(scenario, destination) {
|
|
6991
7013
|
var isTrusted = !isTLocation(destination) && isTrustedChain(destination);
|
|
6992
|
-
if (destination === 'Polimec' || destination === 'Moonbeam') return 'transfer_assets';
|
|
7014
|
+
if (destination === 'Polimec' || destination === 'Moonbeam' || typeof destination === 'string' && destination.startsWith('Integritee')) return 'transfer_assets';
|
|
6993
7015
|
return scenario === 'ParaToPara' && !isTrusted ? 'limited_reserve_transfer_assets' : 'limited_teleport_assets';
|
|
6994
7016
|
}
|
|
6995
7017
|
}, {
|
|
@@ -8320,28 +8342,20 @@ var HydrationPaseo = /*#__PURE__*/function (_Hydration) {
|
|
|
8320
8342
|
return _createClass(HydrationPaseo);
|
|
8321
8343
|
}(Hydration);
|
|
8322
8344
|
|
|
8323
|
-
var
|
|
8324
|
-
function
|
|
8325
|
-
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '
|
|
8345
|
+
var IntegriteePolkadot = /*#__PURE__*/function (_Parachain) {
|
|
8346
|
+
function IntegriteePolkadot() {
|
|
8347
|
+
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'IntegriteePolkadot';
|
|
8326
8348
|
var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'integritee';
|
|
8327
|
-
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '
|
|
8328
|
-
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Version.
|
|
8329
|
-
_classCallCheck(this,
|
|
8330
|
-
return _callSuper(this,
|
|
8349
|
+
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Polkadot';
|
|
8350
|
+
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Version.V5;
|
|
8351
|
+
_classCallCheck(this, IntegriteePolkadot);
|
|
8352
|
+
return _callSuper(this, IntegriteePolkadot, [chain, info, type, version]);
|
|
8331
8353
|
}
|
|
8332
|
-
_inherits(
|
|
8333
|
-
return _createClass(
|
|
8334
|
-
key: "
|
|
8335
|
-
value: function
|
|
8336
|
-
|
|
8337
|
-
scenario = input.scenario;
|
|
8338
|
-
if (scenario !== 'ParaToPara') {
|
|
8339
|
-
throw new ScenarioNotSupportedError(this.chain, scenario);
|
|
8340
|
-
}
|
|
8341
|
-
if (asset.symbol !== this.getNativeAssetSymbol()) {
|
|
8342
|
-
throw new InvalidCurrencyError("Asset ".concat(asset.symbol, " is not supported by chain ").concat(this.chain, "."));
|
|
8343
|
-
}
|
|
8344
|
-
return transferXTokens(input, asset.symbol);
|
|
8354
|
+
_inherits(IntegriteePolkadot, _Parachain);
|
|
8355
|
+
return _createClass(IntegriteePolkadot, [{
|
|
8356
|
+
key: "transferPolkadotXCM",
|
|
8357
|
+
value: function transferPolkadotXCM(input) {
|
|
8358
|
+
return transferPolkadotXcm(input, 'transfer_assets', 'Unlimited');
|
|
8345
8359
|
}
|
|
8346
8360
|
}, {
|
|
8347
8361
|
key: "transferRelayToPara",
|
|
@@ -8370,6 +8384,19 @@ var IntegriteeKusama = /*#__PURE__*/function (_Parachain) {
|
|
|
8370
8384
|
}]);
|
|
8371
8385
|
}(Parachain);
|
|
8372
8386
|
|
|
8387
|
+
var IntegriteeKusama = /*#__PURE__*/function (_IntegriteePolkadot) {
|
|
8388
|
+
function IntegriteeKusama() {
|
|
8389
|
+
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'IntegriteeKusama';
|
|
8390
|
+
var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'integritee';
|
|
8391
|
+
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Kusama';
|
|
8392
|
+
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Version.V5;
|
|
8393
|
+
_classCallCheck(this, IntegriteeKusama);
|
|
8394
|
+
return _callSuper(this, IntegriteeKusama, [chain, info, type, version]);
|
|
8395
|
+
}
|
|
8396
|
+
_inherits(IntegriteeKusama, _IntegriteePolkadot);
|
|
8397
|
+
return _createClass(IntegriteeKusama);
|
|
8398
|
+
}(IntegriteePolkadot);
|
|
8399
|
+
|
|
8373
8400
|
var IntegriteePaseo = /*#__PURE__*/function (_IntegriteeKusama) {
|
|
8374
8401
|
function IntegriteePaseo() {
|
|
8375
8402
|
_classCallCheck(this, IntegriteePaseo);
|
|
@@ -9487,6 +9514,7 @@ var chains = function chains() {
|
|
|
9487
9514
|
EnergyWebX: new EnergyWebX(),
|
|
9488
9515
|
Hydration: new Hydration(),
|
|
9489
9516
|
IntegriteeKusama: new IntegriteeKusama(),
|
|
9517
|
+
IntegriteePolkadot: new IntegriteePolkadot(),
|
|
9490
9518
|
Interlay: new Interlay(),
|
|
9491
9519
|
Heima: new Heima(),
|
|
9492
9520
|
Jamton: new Jamton(),
|
|
@@ -9573,7 +9601,7 @@ var RELAY_LOCATION = {
|
|
|
9573
9601
|
Here: null
|
|
9574
9602
|
}
|
|
9575
9603
|
};
|
|
9576
|
-
var CHAINS_DOT_RESERVE_AH = new Set(['Acala', 'Karura', 'Polimec', 'Moonbeam', 'Hydration', 'HydrationPaseo', 'AssetHubPolkadot', 'AssetHubKusama', 'AssetHubWestend', 'AssetHubPaseo', 'BifrostPolkadot', 'BifrostKusama', 'PeoplePolkadot', 'PeopleKusama', 'Ajuna']);
|
|
9604
|
+
var CHAINS_DOT_RESERVE_AH = new Set(['Acala', 'Karura', 'Polimec', 'Moonbeam', 'Hydration', 'HydrationPaseo', 'AssetHubPolkadot', 'AssetHubKusama', 'AssetHubWestend', 'AssetHubPaseo', 'BifrostPolkadot', 'BifrostKusama', 'PeoplePolkadot', 'PeopleKusama', 'Ajuna', 'IntegriteePolkadot', 'IntegriteeKusama', 'IntegriteePaseo']);
|
|
9577
9605
|
var ASSET_HUB_EXECUTION_FEE = 2200000000n; // 0.22 DOT
|
|
9578
9606
|
var TX_CLIENT_TIMEOUT_MS = 20 * 60 * 1000; // 20 minutes
|
|
9579
9607
|
var DRY_RUN_CLIENT_TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes
|
|
@@ -9582,6 +9610,8 @@ var MAX_WEIGHT = {
|
|
|
9582
9610
|
proofSize: MAX_U64,
|
|
9583
9611
|
refTime: MAX_U64
|
|
9584
9612
|
};
|
|
9613
|
+
var BYPASS_MINT_AMOUNT = '1000';
|
|
9614
|
+
var BYPASS_CURRENCY_AMOUNT = '800';
|
|
9585
9615
|
|
|
9586
9616
|
var buildClaimAssetsParams = function buildClaimAssetsParams(options) {
|
|
9587
9617
|
var assets = options.assets,
|
|
@@ -9963,7 +9993,6 @@ var getPalletInstance = function getPalletInstance(type) {
|
|
|
9963
9993
|
return new HandlerClass();
|
|
9964
9994
|
};
|
|
9965
9995
|
|
|
9966
|
-
var MINT_AMOUNT = 1000n; // Mint 1000 units of asset
|
|
9967
9996
|
var getCurrencySelection = function getCurrencySelection(asset) {
|
|
9968
9997
|
if (asset.location) return {
|
|
9969
9998
|
location: asset.location
|
|
@@ -9996,7 +10025,7 @@ var createMintTxs = function createMintTxs(chain, asset, balance, address, api)
|
|
|
9996
10025
|
return palletInstance.mint(address, asset, balance, chain, api);
|
|
9997
10026
|
};
|
|
9998
10027
|
var createRequiredMintTxs = function createRequiredMintTxs(chain, asset, amountHuman, balance, address, api) {
|
|
9999
|
-
var amount = parseUnits(amountHuman
|
|
10028
|
+
var amount = parseUnits(amountHuman, asset.decimals);
|
|
10000
10029
|
return createMintTxs(chain, _objectSpread2(_objectSpread2({}, asset), {}, {
|
|
10001
10030
|
amount: amount
|
|
10002
10031
|
}), balance, address, api);
|
|
@@ -10004,7 +10033,7 @@ var createRequiredMintTxs = function createRequiredMintTxs(chain, asset, amountH
|
|
|
10004
10033
|
var createOptionalMintTxs = function createOptionalMintTxs(chain, currency, amountHuman, balance, address, api) {
|
|
10005
10034
|
var asset = findAssetInfo(chain, currency, null);
|
|
10006
10035
|
if (!asset) return null;
|
|
10007
|
-
var amount = parseUnits(amountHuman
|
|
10036
|
+
var amount = parseUnits(amountHuman, asset.decimals);
|
|
10008
10037
|
return createMintTxs(chain, _objectSpread2(_objectSpread2({}, asset), {}, {
|
|
10009
10038
|
amount: amount
|
|
10010
10039
|
}), balance, address, api);
|
|
@@ -10045,7 +10074,7 @@ var mintBonusForSent = function mintBonusForSent(chain, sent, feeAsset, mintFeeA
|
|
|
10045
10074
|
});
|
|
10046
10075
|
return preminted.some(function (a) {
|
|
10047
10076
|
return isAssetXcEqual(a, sent);
|
|
10048
|
-
}) ? parseUnits(
|
|
10077
|
+
}) ? parseUnits(BYPASS_MINT_AMOUNT, sent.decimals) : 0n;
|
|
10049
10078
|
};
|
|
10050
10079
|
var wrapTxBypass = /*#__PURE__*/function () {
|
|
10051
10080
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(dryRunOptions) {
|
|
@@ -10101,7 +10130,7 @@ var wrapTxBypass = /*#__PURE__*/function () {
|
|
|
10101
10130
|
break;
|
|
10102
10131
|
}
|
|
10103
10132
|
_context.n = 1;
|
|
10104
|
-
return createRequiredMintTxs(chain, findNativeAssetInfoOrThrow(chain),
|
|
10133
|
+
return createRequiredMintTxs(chain, findNativeAssetInfoOrThrow(chain), BYPASS_MINT_AMOUNT, 0n, address, api);
|
|
10105
10134
|
case 1:
|
|
10106
10135
|
_t = _context.v;
|
|
10107
10136
|
_context.n = 3;
|
|
@@ -10115,7 +10144,7 @@ var wrapTxBypass = /*#__PURE__*/function () {
|
|
|
10115
10144
|
break;
|
|
10116
10145
|
}
|
|
10117
10146
|
_context.n = 4;
|
|
10118
|
-
return createOptionalMintTxs(chain, relayCurrency,
|
|
10147
|
+
return createOptionalMintTxs(chain, relayCurrency, BYPASS_MINT_AMOUNT, 0n, address, api);
|
|
10119
10148
|
case 4:
|
|
10120
10149
|
_t2 = _context.v;
|
|
10121
10150
|
_context.n = 6;
|
|
@@ -10128,7 +10157,7 @@ var wrapTxBypass = /*#__PURE__*/function () {
|
|
|
10128
10157
|
_context.n = 8;
|
|
10129
10158
|
break;
|
|
10130
10159
|
}
|
|
10131
|
-
amount = parseUnits(
|
|
10160
|
+
amount = parseUnits(BYPASS_MINT_AMOUNT, feeAsset.decimals);
|
|
10132
10161
|
_context.n = 7;
|
|
10133
10162
|
return createMintTxs(chain, _objectSpread2(_objectSpread2({}, feeAsset), {}, {
|
|
10134
10163
|
amount: amount
|
|
@@ -10147,7 +10176,7 @@ var wrapTxBypass = /*#__PURE__*/function () {
|
|
|
10147
10176
|
balance = _context.v;
|
|
10148
10177
|
bonus = mintBonusForSent(chain, asset, feeAsset, !!mintFeeAssets);
|
|
10149
10178
|
if ((options === null || options === void 0 ? void 0 : options.sentAssetMintMode) === 'bypass') {
|
|
10150
|
-
mintAmount = parseUnits(
|
|
10179
|
+
mintAmount = parseUnits(BYPASS_MINT_AMOUNT, asset.decimals) + asset.amount;
|
|
10151
10180
|
} else {
|
|
10152
10181
|
missing = (_calcPreviewMintAmoun = calcPreviewMintAmount(balance, asset.amount)) !== null && _calcPreviewMintAmoun !== void 0 ? _calcPreviewMintAmoun : 0n;
|
|
10153
10182
|
total = missing + bonus;
|
|
@@ -10588,7 +10617,8 @@ var getXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
10588
10617
|
tx: tx,
|
|
10589
10618
|
originFee: originFee !== null && originFee !== void 0 ? originFee : 0n,
|
|
10590
10619
|
senderAddress: senderAddress,
|
|
10591
|
-
disableFallback: disableFallback
|
|
10620
|
+
disableFallback: disableFallback,
|
|
10621
|
+
swapConfig: swapConfig
|
|
10592
10622
|
});
|
|
10593
10623
|
case 4:
|
|
10594
10624
|
destFeeRes = _context2.v;
|
|
@@ -11664,7 +11694,7 @@ var getMinTransferableAmountInternal = /*#__PURE__*/function () {
|
|
|
11664
11694
|
_context.n = 6;
|
|
11665
11695
|
break;
|
|
11666
11696
|
}
|
|
11667
|
-
|
|
11697
|
+
return _context.a(2, 0n);
|
|
11668
11698
|
case 6:
|
|
11669
11699
|
return _context.a(2, minAmount);
|
|
11670
11700
|
}
|
|
@@ -12661,6 +12691,31 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
12661
12691
|
}
|
|
12662
12692
|
return build;
|
|
12663
12693
|
}())
|
|
12694
|
+
}, {
|
|
12695
|
+
key: "computeOverridenAmount",
|
|
12696
|
+
value: function computeOverridenAmount() {
|
|
12697
|
+
var _this$_options2 = this._options,
|
|
12698
|
+
from = _this$_options2.from,
|
|
12699
|
+
to = _this$_options2.to,
|
|
12700
|
+
currency = _this$_options2.currency;
|
|
12701
|
+
var config = this.api.getConfig();
|
|
12702
|
+
if (isConfig(config) && config.abstractDecimals) {
|
|
12703
|
+
return BYPASS_CURRENCY_AMOUNT;
|
|
12704
|
+
} else {
|
|
12705
|
+
assertToIsString(to);
|
|
12706
|
+
var asset = findAssetInfoOrThrow(from, currency, to);
|
|
12707
|
+
return parseUnits(BYPASS_CURRENCY_AMOUNT, asset.decimals);
|
|
12708
|
+
}
|
|
12709
|
+
}
|
|
12710
|
+
}, {
|
|
12711
|
+
key: "overrideTxAmount",
|
|
12712
|
+
value: function overrideTxAmount() {
|
|
12713
|
+
var currency = this._options.currency;
|
|
12714
|
+
var modifiedBuilder = this.currency(_objectSpread2(_objectSpread2({}, currency), {}, {
|
|
12715
|
+
amount: this.computeOverridenAmount()
|
|
12716
|
+
}));
|
|
12717
|
+
return modifiedBuilder.build();
|
|
12718
|
+
}
|
|
12664
12719
|
}, {
|
|
12665
12720
|
key: "dryRun",
|
|
12666
12721
|
value: function () {
|
|
@@ -12716,15 +12771,15 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
12716
12771
|
value: (function () {
|
|
12717
12772
|
var _getXcmFee2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(options) {
|
|
12718
12773
|
var _options$disableFallb;
|
|
12719
|
-
var _this$
|
|
12774
|
+
var _this$_options3, from, to, address, senderAddress, feeAsset, currency, tx, disableFallback;
|
|
12720
12775
|
return _regenerator().w(function (_context5) {
|
|
12721
12776
|
while (1) switch (_context5.p = _context5.n) {
|
|
12722
12777
|
case 0:
|
|
12723
|
-
_this$
|
|
12778
|
+
_this$_options3 = this._options, from = _this$_options3.from, to = _this$_options3.to, address = _this$_options3.address, senderAddress = _this$_options3.senderAddress, feeAsset = _this$_options3.feeAsset, currency = _this$_options3.currency;
|
|
12724
12779
|
assertToIsString(to);
|
|
12725
12780
|
assertAddressIsString(address);
|
|
12726
12781
|
_context5.n = 1;
|
|
12727
|
-
return this.
|
|
12782
|
+
return this.overrideTxAmount();
|
|
12728
12783
|
case 1:
|
|
12729
12784
|
tx = _context5.v;
|
|
12730
12785
|
disableFallback = (_options$disableFallb = options === null || options === void 0 ? void 0 : options.disableFallback) !== null && _options$disableFallb !== void 0 ? _options$disableFallb : false;
|
|
@@ -12771,7 +12826,7 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
12771
12826
|
var _getOriginXcmFee2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6() {
|
|
12772
12827
|
var _ref,
|
|
12773
12828
|
disableFallback,
|
|
12774
|
-
_this$
|
|
12829
|
+
_this$_options4,
|
|
12775
12830
|
from,
|
|
12776
12831
|
to,
|
|
12777
12832
|
senderAddress,
|
|
@@ -12785,10 +12840,10 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
12785
12840
|
_ref = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {
|
|
12786
12841
|
disableFallback: false
|
|
12787
12842
|
}, disableFallback = _ref.disableFallback;
|
|
12788
|
-
_this$
|
|
12843
|
+
_this$_options4 = this._options, from = _this$_options4.from, to = _this$_options4.to, senderAddress = _this$_options4.senderAddress, currency = _this$_options4.currency, feeAsset = _this$_options4.feeAsset;
|
|
12789
12844
|
assertToIsString(to);
|
|
12790
12845
|
_context6.n = 1;
|
|
12791
|
-
return this.
|
|
12846
|
+
return this.overrideTxAmount();
|
|
12792
12847
|
case 1:
|
|
12793
12848
|
tx = _context6.v;
|
|
12794
12849
|
_context6.p = 2;
|
|
@@ -12831,11 +12886,11 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
12831
12886
|
key: "getXcmFeeEstimate",
|
|
12832
12887
|
value: (function () {
|
|
12833
12888
|
var _getXcmFeeEstimate2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7() {
|
|
12834
|
-
var _this$
|
|
12889
|
+
var _this$_options5, from, to, address, senderAddress, currency, tx;
|
|
12835
12890
|
return _regenerator().w(function (_context7) {
|
|
12836
12891
|
while (1) switch (_context7.p = _context7.n) {
|
|
12837
12892
|
case 0:
|
|
12838
|
-
_this$
|
|
12893
|
+
_this$_options5 = this._options, from = _this$_options5.from, to = _this$_options5.to, address = _this$_options5.address, senderAddress = _this$_options5.senderAddress, currency = _this$_options5.currency;
|
|
12839
12894
|
assertToIsString(to);
|
|
12840
12895
|
assertAddressIsString(address);
|
|
12841
12896
|
_context7.n = 1;
|
|
@@ -12881,11 +12936,11 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
12881
12936
|
key: "getOriginXcmFeeEstimate",
|
|
12882
12937
|
value: (function () {
|
|
12883
12938
|
var _getOriginXcmFeeEstimate2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8() {
|
|
12884
|
-
var _this$
|
|
12939
|
+
var _this$_options6, from, to, senderAddress, currency, tx;
|
|
12885
12940
|
return _regenerator().w(function (_context8) {
|
|
12886
12941
|
while (1) switch (_context8.p = _context8.n) {
|
|
12887
12942
|
case 0:
|
|
12888
|
-
_this$
|
|
12943
|
+
_this$_options6 = this._options, from = _this$_options6.from, to = _this$_options6.to, senderAddress = _this$_options6.senderAddress, currency = _this$_options6.currency;
|
|
12889
12944
|
assertToIsString(to);
|
|
12890
12945
|
_context8.n = 1;
|
|
12891
12946
|
return this.build();
|
|
@@ -12929,14 +12984,14 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
12929
12984
|
key: "getTransferableAmount",
|
|
12930
12985
|
value: (function () {
|
|
12931
12986
|
var _getTransferableAmount2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9() {
|
|
12932
|
-
var _this$
|
|
12987
|
+
var _this$_options7, from, to, senderAddress, currency, feeAsset, tx;
|
|
12933
12988
|
return _regenerator().w(function (_context9) {
|
|
12934
12989
|
while (1) switch (_context9.n) {
|
|
12935
12990
|
case 0:
|
|
12936
|
-
_this$
|
|
12991
|
+
_this$_options7 = this._options, from = _this$_options7.from, to = _this$_options7.to, senderAddress = _this$_options7.senderAddress, currency = _this$_options7.currency, feeAsset = _this$_options7.feeAsset;
|
|
12937
12992
|
assertToIsString(to);
|
|
12938
12993
|
_context9.n = 1;
|
|
12939
|
-
return this.
|
|
12994
|
+
return this.overrideTxAmount();
|
|
12940
12995
|
case 1:
|
|
12941
12996
|
tx = _context9.v;
|
|
12942
12997
|
return _context9.a(2, getTransferableAmount({
|
|
@@ -12966,15 +13021,15 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
12966
13021
|
key: "getMinTransferableAmount",
|
|
12967
13022
|
value: (function () {
|
|
12968
13023
|
var _getMinTransferableAmount2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0() {
|
|
12969
|
-
var _this$
|
|
13024
|
+
var _this$_options8, from, to, senderAddress, address, currency, feeAsset, tx;
|
|
12970
13025
|
return _regenerator().w(function (_context0) {
|
|
12971
13026
|
while (1) switch (_context0.n) {
|
|
12972
13027
|
case 0:
|
|
12973
|
-
_this$
|
|
13028
|
+
_this$_options8 = this._options, from = _this$_options8.from, to = _this$_options8.to, senderAddress = _this$_options8.senderAddress, address = _this$_options8.address, currency = _this$_options8.currency, feeAsset = _this$_options8.feeAsset;
|
|
12974
13029
|
assertToIsString(to);
|
|
12975
13030
|
assertAddressIsString(address);
|
|
12976
13031
|
_context0.n = 1;
|
|
12977
|
-
return this.
|
|
13032
|
+
return this.overrideTxAmount();
|
|
12978
13033
|
case 1:
|
|
12979
13034
|
tx = _context0.v;
|
|
12980
13035
|
return _context0.a(2, getMinTransferableAmount({
|
|
@@ -13006,15 +13061,15 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
13006
13061
|
key: "verifyEdOnDestination",
|
|
13007
13062
|
value: (function () {
|
|
13008
13063
|
var _verifyEdOnDestination2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1() {
|
|
13009
|
-
var _this$
|
|
13064
|
+
var _this$_options9, from, to, address, currency, senderAddress, feeAsset, tx;
|
|
13010
13065
|
return _regenerator().w(function (_context1) {
|
|
13011
13066
|
while (1) switch (_context1.n) {
|
|
13012
13067
|
case 0:
|
|
13013
|
-
_this$
|
|
13068
|
+
_this$_options9 = this._options, from = _this$_options9.from, to = _this$_options9.to, address = _this$_options9.address, currency = _this$_options9.currency, senderAddress = _this$_options9.senderAddress, feeAsset = _this$_options9.feeAsset;
|
|
13014
13069
|
assertToIsString(to);
|
|
13015
13070
|
assertAddressIsString(address);
|
|
13016
13071
|
_context1.n = 1;
|
|
13017
|
-
return this.
|
|
13072
|
+
return this.overrideTxAmount();
|
|
13018
13073
|
case 1:
|
|
13019
13074
|
tx = _context1.v;
|
|
13020
13075
|
return _context1.a(2, verifyEdOnDestination({
|
|
@@ -13045,15 +13100,15 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
13045
13100
|
key: "getTransferInfo",
|
|
13046
13101
|
value: (function () {
|
|
13047
13102
|
var _getTransferInfo2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee10() {
|
|
13048
|
-
var _this$
|
|
13103
|
+
var _this$_options0, from, to, address, currency, ahAddress, senderAddress, feeAsset, tx;
|
|
13049
13104
|
return _regenerator().w(function (_context10) {
|
|
13050
13105
|
while (1) switch (_context10.n) {
|
|
13051
13106
|
case 0:
|
|
13052
|
-
_this$
|
|
13107
|
+
_this$_options0 = this._options, from = _this$_options0.from, to = _this$_options0.to, address = _this$_options0.address, currency = _this$_options0.currency, ahAddress = _this$_options0.ahAddress, senderAddress = _this$_options0.senderAddress, feeAsset = _this$_options0.feeAsset;
|
|
13053
13108
|
assertToIsString(to);
|
|
13054
13109
|
assertAddressIsString(address);
|
|
13055
13110
|
_context10.n = 1;
|
|
13056
|
-
return this.
|
|
13111
|
+
return this.overrideTxAmount();
|
|
13057
13112
|
case 1:
|
|
13058
13113
|
tx = _context10.v;
|
|
13059
13114
|
return _context10.a(2, getTransferInfo({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk-core",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.6.1",
|
|
4
4
|
"description": "SDK core for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"@noble/hashes": "^1.8.0",
|
|
27
27
|
"@scure/base": "^2.0.0",
|
|
28
28
|
"viem": "^2.36.0",
|
|
29
|
-
"@paraspell/assets": "11.
|
|
30
|
-
"@paraspell/
|
|
31
|
-
"@paraspell/
|
|
29
|
+
"@paraspell/assets": "11.6.1",
|
|
30
|
+
"@paraspell/sdk-common": "11.6.1",
|
|
31
|
+
"@paraspell/pallets": "11.6.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/plugin-syntax-import-attributes": "^7.27.1",
|