@paraspell/sdk-core 10.4.3 → 10.4.4
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 +238 -241
- package/dist/index.d.ts +11 -24
- package/dist/index.mjs +223 -225
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { blake2b } from '@noble/hashes/blake2';
|
|
2
|
-
import { isNodeEvm, getAssetsObject, getNativeAssetSymbol, getOtherAssets, getRelayChainSymbol, InvalidCurrencyError, isForeignAsset, findAssetForNodeOrThrow, findAsset, isOverrideMultiLocationSpecifier, findAssetByMultiLocation, isTMultiAsset, getExistentialDeposit, isAssetEqual, findAssetOnDestOrThrow, normalizeSymbol, getExistentialDepositOrThrow, hasDryRunSupport, hasSupportForAsset, extractMultiAssetLoc, isSymbolSpecifier, getAssetId } from '@paraspell/assets';
|
|
2
|
+
import { isNodeEvm, getAssetsObject, getNativeAssetSymbol, getOtherAssets, getRelayChainSymbol, InvalidCurrencyError, isForeignAsset, findAssetForNodeOrThrow, findAsset, isOverrideMultiLocationSpecifier, findAssetByMultiLocation, isTMultiAsset, getExistentialDeposit, isAssetEqual, findAssetOnDestOrThrow, normalizeSymbol, getExistentialDepositOrThrow, hasDryRunSupport, hasSupportForAsset, extractMultiAssetLoc, isSymbolSpecifier, normalizeMultiLocation, getAssetId } from '@paraspell/assets';
|
|
3
3
|
export * from '@paraspell/assets';
|
|
4
4
|
import { base58 } from '@scure/base';
|
|
5
5
|
import { isAddress, createPublicClient, http, getContract } from 'viem';
|
|
6
|
-
import { Parents, isTMultiLocation, isRelayChain, NODE_NAMES_DOT_KSM, hasJunction, deepEqual, isDotKsmBridge } from '@paraspell/sdk-common';
|
|
6
|
+
import { Parents, Version, isTMultiLocation, isRelayChain, NODE_NAMES_DOT_KSM, hasJunction, deepEqual, isDotKsmBridge } from '@paraspell/sdk-common';
|
|
7
7
|
export * from '@paraspell/sdk-common';
|
|
8
8
|
import { getSupportedPalletsDetails, getDefaultPallet } from '@paraspell/pallets';
|
|
9
9
|
export * from '@paraspell/pallets';
|
|
@@ -2017,83 +2017,6 @@ var getParaId = function getParaId(node) {
|
|
|
2017
2017
|
return getNodeConfig(node).paraId;
|
|
2018
2018
|
};
|
|
2019
2019
|
|
|
2020
|
-
/**
|
|
2021
|
-
* The options for the batch builder.
|
|
2022
|
-
*/
|
|
2023
|
-
var BatchMode;
|
|
2024
|
-
(function (BatchMode) {
|
|
2025
|
-
/**
|
|
2026
|
-
* Does not commit if one of the calls in the batch fails.
|
|
2027
|
-
*/
|
|
2028
|
-
BatchMode["BATCH_ALL"] = "BATCH_ALL";
|
|
2029
|
-
/**
|
|
2030
|
-
* Commits each successful call regardless if a call fails.
|
|
2031
|
-
*/
|
|
2032
|
-
BatchMode["BATCH"] = "BATCH";
|
|
2033
|
-
})(BatchMode || (BatchMode = {}));
|
|
2034
|
-
|
|
2035
|
-
var XTokensError;
|
|
2036
|
-
(function (XTokensError) {
|
|
2037
|
-
XTokensError["AssetHasNoReserve"] = "AssetHasNoReserve";
|
|
2038
|
-
XTokensError["NotCrossChainTransfer"] = "NotCrossChainTransfer";
|
|
2039
|
-
XTokensError["InvalidDest"] = "InvalidDest";
|
|
2040
|
-
XTokensError["NotCrossChainTransferableCurrency"] = "NotCrossChainTransferableCurrency";
|
|
2041
|
-
XTokensError["UnweighableMessage"] = "UnweighableMessage";
|
|
2042
|
-
XTokensError["XcmExecutionFailed"] = "XcmExecutionFailed";
|
|
2043
|
-
XTokensError["CannotReanchor"] = "CannotReanchor";
|
|
2044
|
-
XTokensError["InvalidAncestry"] = "InvalidAncestry";
|
|
2045
|
-
XTokensError["InvalidAsset"] = "InvalidAsset";
|
|
2046
|
-
XTokensError["DestinationNotInvertible"] = "DestinationNotInvertible";
|
|
2047
|
-
XTokensError["BadVersion"] = "BadVersion";
|
|
2048
|
-
XTokensError["DistinctReserveForAssetAndFee"] = "DistinctReserveForAssetAndFee";
|
|
2049
|
-
XTokensError["ZeroFee"] = "ZeroFee";
|
|
2050
|
-
XTokensError["ZeroAmount"] = "ZeroAmount";
|
|
2051
|
-
XTokensError["TooManyAssetsBeingSent"] = "TooManyAssetsBeingSent";
|
|
2052
|
-
XTokensError["AssetIndexNonExistent"] = "AssetIndexNonExistent";
|
|
2053
|
-
XTokensError["FeeNotEnough"] = "FeeNotEnough";
|
|
2054
|
-
XTokensError["NotSupportedLocation"] = "NotSupportedLocation";
|
|
2055
|
-
XTokensError["MinXcmFeeNotDefined"] = "MinXcmFeeNotDefined";
|
|
2056
|
-
XTokensError["RateLimited"] = "RateLimited";
|
|
2057
|
-
})(XTokensError || (XTokensError = {}));
|
|
2058
|
-
var PolkadotXcmError;
|
|
2059
|
-
(function (PolkadotXcmError) {
|
|
2060
|
-
PolkadotXcmError["Unreachable"] = "Unreachable";
|
|
2061
|
-
PolkadotXcmError["SendFailure"] = "SendFailure";
|
|
2062
|
-
PolkadotXcmError["Filtered"] = "Filtered";
|
|
2063
|
-
PolkadotXcmError["UnweighableMessage"] = "UnweighableMessage";
|
|
2064
|
-
PolkadotXcmError["DestinationNotInvertible"] = "DestinationNotInvertible";
|
|
2065
|
-
PolkadotXcmError["Empty"] = "Empty";
|
|
2066
|
-
PolkadotXcmError["CannotReanchor"] = "CannotReanchor";
|
|
2067
|
-
PolkadotXcmError["TooManyAssets"] = "TooManyAssets";
|
|
2068
|
-
PolkadotXcmError["InvalidOrigin"] = "InvalidOrigin";
|
|
2069
|
-
PolkadotXcmError["BadVersion"] = "BadVersion";
|
|
2070
|
-
PolkadotXcmError["BadLocation"] = "BadLocation";
|
|
2071
|
-
PolkadotXcmError["NoSubscription"] = "NoSubscription";
|
|
2072
|
-
PolkadotXcmError["AlreadySubscribed"] = "AlreadySubscribed";
|
|
2073
|
-
PolkadotXcmError["CannotCheckOutTeleport"] = "CannotCheckOutTeleport";
|
|
2074
|
-
PolkadotXcmError["LowBalance"] = "LowBalance";
|
|
2075
|
-
PolkadotXcmError["TooManyLocks"] = "TooManyLocks";
|
|
2076
|
-
PolkadotXcmError["AccountNotSovereign"] = "AccountNotSovereign";
|
|
2077
|
-
PolkadotXcmError["FeesNotMet"] = "FeesNotMet";
|
|
2078
|
-
PolkadotXcmError["LockNotFound"] = "LockNotFound";
|
|
2079
|
-
PolkadotXcmError["InUse"] = "InUse";
|
|
2080
|
-
PolkadotXcmError["REMOVED"] = "REMOVED";
|
|
2081
|
-
PolkadotXcmError["InvalidAssetUnknownReserve"] = "InvalidAssetUnknownReserve";
|
|
2082
|
-
PolkadotXcmError["InvalidAssetUnsupportedReserve"] = "InvalidAssetUnsupportedReserve";
|
|
2083
|
-
PolkadotXcmError["TooManyReserves"] = "TooManyReserves";
|
|
2084
|
-
PolkadotXcmError["LocalExecutionIncomplete"] = "LocalExecutionIncomplete";
|
|
2085
|
-
})(PolkadotXcmError || (PolkadotXcmError = {}));
|
|
2086
|
-
|
|
2087
|
-
/**
|
|
2088
|
-
* The XCM version.
|
|
2089
|
-
*/
|
|
2090
|
-
var Version;
|
|
2091
|
-
(function (Version) {
|
|
2092
|
-
Version["V3"] = "V3";
|
|
2093
|
-
Version["V4"] = "V4";
|
|
2094
|
-
Version["V5"] = "V5";
|
|
2095
|
-
})(Version || (Version = {}));
|
|
2096
|
-
|
|
2097
2020
|
var createApiInstanceForNode = /*#__PURE__*/function () {
|
|
2098
2021
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(api, node) {
|
|
2099
2022
|
var wsUrl;
|
|
@@ -2111,10 +2034,10 @@ var createApiInstanceForNode = /*#__PURE__*/function () {
|
|
|
2111
2034
|
}();
|
|
2112
2035
|
|
|
2113
2036
|
var createX1Payload = function createX1Payload(version, junction) {
|
|
2114
|
-
return version === Version.
|
|
2115
|
-
X1: [junction]
|
|
2116
|
-
} : {
|
|
2037
|
+
return version === Version.V3 ? {
|
|
2117
2038
|
X1: junction
|
|
2039
|
+
} : {
|
|
2040
|
+
X1: [junction]
|
|
2118
2041
|
};
|
|
2119
2042
|
};
|
|
2120
2043
|
|
|
@@ -2370,6 +2293,73 @@ var computeFeeFromDryRunPjs = function computeFeeFromDryRunPjs(dryRun, node, exe
|
|
|
2370
2293
|
return totalDeliveryFees + executionFee;
|
|
2371
2294
|
};
|
|
2372
2295
|
|
|
2296
|
+
/**
|
|
2297
|
+
* The options for the batch builder.
|
|
2298
|
+
*/
|
|
2299
|
+
var BatchMode;
|
|
2300
|
+
(function (BatchMode) {
|
|
2301
|
+
/**
|
|
2302
|
+
* Does not commit if one of the calls in the batch fails.
|
|
2303
|
+
*/
|
|
2304
|
+
BatchMode["BATCH_ALL"] = "BATCH_ALL";
|
|
2305
|
+
/**
|
|
2306
|
+
* Commits each successful call regardless if a call fails.
|
|
2307
|
+
*/
|
|
2308
|
+
BatchMode["BATCH"] = "BATCH";
|
|
2309
|
+
})(BatchMode || (BatchMode = {}));
|
|
2310
|
+
|
|
2311
|
+
var XTokensError;
|
|
2312
|
+
(function (XTokensError) {
|
|
2313
|
+
XTokensError["AssetHasNoReserve"] = "AssetHasNoReserve";
|
|
2314
|
+
XTokensError["NotCrossChainTransfer"] = "NotCrossChainTransfer";
|
|
2315
|
+
XTokensError["InvalidDest"] = "InvalidDest";
|
|
2316
|
+
XTokensError["NotCrossChainTransferableCurrency"] = "NotCrossChainTransferableCurrency";
|
|
2317
|
+
XTokensError["UnweighableMessage"] = "UnweighableMessage";
|
|
2318
|
+
XTokensError["XcmExecutionFailed"] = "XcmExecutionFailed";
|
|
2319
|
+
XTokensError["CannotReanchor"] = "CannotReanchor";
|
|
2320
|
+
XTokensError["InvalidAncestry"] = "InvalidAncestry";
|
|
2321
|
+
XTokensError["InvalidAsset"] = "InvalidAsset";
|
|
2322
|
+
XTokensError["DestinationNotInvertible"] = "DestinationNotInvertible";
|
|
2323
|
+
XTokensError["BadVersion"] = "BadVersion";
|
|
2324
|
+
XTokensError["DistinctReserveForAssetAndFee"] = "DistinctReserveForAssetAndFee";
|
|
2325
|
+
XTokensError["ZeroFee"] = "ZeroFee";
|
|
2326
|
+
XTokensError["ZeroAmount"] = "ZeroAmount";
|
|
2327
|
+
XTokensError["TooManyAssetsBeingSent"] = "TooManyAssetsBeingSent";
|
|
2328
|
+
XTokensError["AssetIndexNonExistent"] = "AssetIndexNonExistent";
|
|
2329
|
+
XTokensError["FeeNotEnough"] = "FeeNotEnough";
|
|
2330
|
+
XTokensError["NotSupportedLocation"] = "NotSupportedLocation";
|
|
2331
|
+
XTokensError["MinXcmFeeNotDefined"] = "MinXcmFeeNotDefined";
|
|
2332
|
+
XTokensError["RateLimited"] = "RateLimited";
|
|
2333
|
+
})(XTokensError || (XTokensError = {}));
|
|
2334
|
+
var PolkadotXcmError;
|
|
2335
|
+
(function (PolkadotXcmError) {
|
|
2336
|
+
PolkadotXcmError["Unreachable"] = "Unreachable";
|
|
2337
|
+
PolkadotXcmError["SendFailure"] = "SendFailure";
|
|
2338
|
+
PolkadotXcmError["Filtered"] = "Filtered";
|
|
2339
|
+
PolkadotXcmError["UnweighableMessage"] = "UnweighableMessage";
|
|
2340
|
+
PolkadotXcmError["DestinationNotInvertible"] = "DestinationNotInvertible";
|
|
2341
|
+
PolkadotXcmError["Empty"] = "Empty";
|
|
2342
|
+
PolkadotXcmError["CannotReanchor"] = "CannotReanchor";
|
|
2343
|
+
PolkadotXcmError["TooManyAssets"] = "TooManyAssets";
|
|
2344
|
+
PolkadotXcmError["InvalidOrigin"] = "InvalidOrigin";
|
|
2345
|
+
PolkadotXcmError["BadVersion"] = "BadVersion";
|
|
2346
|
+
PolkadotXcmError["BadLocation"] = "BadLocation";
|
|
2347
|
+
PolkadotXcmError["NoSubscription"] = "NoSubscription";
|
|
2348
|
+
PolkadotXcmError["AlreadySubscribed"] = "AlreadySubscribed";
|
|
2349
|
+
PolkadotXcmError["CannotCheckOutTeleport"] = "CannotCheckOutTeleport";
|
|
2350
|
+
PolkadotXcmError["LowBalance"] = "LowBalance";
|
|
2351
|
+
PolkadotXcmError["TooManyLocks"] = "TooManyLocks";
|
|
2352
|
+
PolkadotXcmError["AccountNotSovereign"] = "AccountNotSovereign";
|
|
2353
|
+
PolkadotXcmError["FeesNotMet"] = "FeesNotMet";
|
|
2354
|
+
PolkadotXcmError["LockNotFound"] = "LockNotFound";
|
|
2355
|
+
PolkadotXcmError["InUse"] = "InUse";
|
|
2356
|
+
PolkadotXcmError["REMOVED"] = "REMOVED";
|
|
2357
|
+
PolkadotXcmError["InvalidAssetUnknownReserve"] = "InvalidAssetUnknownReserve";
|
|
2358
|
+
PolkadotXcmError["InvalidAssetUnsupportedReserve"] = "InvalidAssetUnsupportedReserve";
|
|
2359
|
+
PolkadotXcmError["TooManyReserves"] = "TooManyReserves";
|
|
2360
|
+
PolkadotXcmError["LocalExecutionIncomplete"] = "LocalExecutionIncomplete";
|
|
2361
|
+
})(PolkadotXcmError || (PolkadotXcmError = {}));
|
|
2362
|
+
|
|
2373
2363
|
var resolveModuleError = function resolveModuleError(node, error) {
|
|
2374
2364
|
var palletDetails = getSupportedPalletsDetails(node).find(function (p) {
|
|
2375
2365
|
return p.index === Number(error.index);
|
|
@@ -2390,29 +2380,6 @@ var resolveModuleError = function resolveModuleError(node, error) {
|
|
|
2390
2380
|
return failureReason;
|
|
2391
2381
|
};
|
|
2392
2382
|
|
|
2393
|
-
var generateAddressMultiLocationV4 = function generateAddressMultiLocationV4(api, address) {
|
|
2394
|
-
var isMultiLocation = _typeof(address) === 'object';
|
|
2395
|
-
if (isMultiLocation) {
|
|
2396
|
-
return _defineProperty({}, Version.V4, address);
|
|
2397
|
-
}
|
|
2398
|
-
var isEthAddress = isAddress(address);
|
|
2399
|
-
return addXcmVersionHeader({
|
|
2400
|
-
parents: Parents.ZERO,
|
|
2401
|
-
interior: {
|
|
2402
|
-
X1: [isEthAddress ? {
|
|
2403
|
-
AccountKey20: {
|
|
2404
|
-
key: address
|
|
2405
|
-
}
|
|
2406
|
-
} : {
|
|
2407
|
-
AccountId32: {
|
|
2408
|
-
id: api.accountToHex(address),
|
|
2409
|
-
network: null
|
|
2410
|
-
}
|
|
2411
|
-
}]
|
|
2412
|
-
}
|
|
2413
|
-
}, Version.V4);
|
|
2414
|
-
};
|
|
2415
|
-
|
|
2416
2383
|
var getFees = function getFees(scenario) {
|
|
2417
2384
|
if (scenario === 'ParaToRelay') {
|
|
2418
2385
|
return 4600000000;
|
|
@@ -2532,7 +2499,7 @@ var constructRelayToParaParameters = function constructRelayToParaParameters(_re
|
|
|
2532
2499
|
};
|
|
2533
2500
|
|
|
2534
2501
|
var createMultiAsset = function createMultiAsset(version, amount, multiLocation) {
|
|
2535
|
-
if (version === Version.V4) {
|
|
2502
|
+
if (version === Version.V4 || version === Version.V5) {
|
|
2536
2503
|
return {
|
|
2537
2504
|
id: multiLocation,
|
|
2538
2505
|
fun: {
|
|
@@ -3469,13 +3436,14 @@ var transferMoonbeamEvm = /*#__PURE__*/function () {
|
|
|
3469
3436
|
};
|
|
3470
3437
|
}();
|
|
3471
3438
|
|
|
3472
|
-
var createCustomXcmOnDest = function createCustomXcmOnDest(_ref, origin,
|
|
3439
|
+
var createCustomXcmOnDest = function createCustomXcmOnDest(_ref, origin, messageId) {
|
|
3473
3440
|
var api = _ref.api,
|
|
3474
3441
|
address = _ref.address,
|
|
3475
3442
|
asset = _ref.asset,
|
|
3476
3443
|
scenario = _ref.scenario,
|
|
3477
3444
|
senderAddress = _ref.senderAddress,
|
|
3478
|
-
ahAddress = _ref.ahAddress
|
|
3445
|
+
ahAddress = _ref.ahAddress,
|
|
3446
|
+
version = _ref.version;
|
|
3479
3447
|
if (!isForeignAsset(asset)) {
|
|
3480
3448
|
throw new InvalidCurrencyError("Asset ".concat(JSON.stringify(asset), " is not a foreign asset"));
|
|
3481
3449
|
}
|
|
@@ -3782,7 +3750,9 @@ var transferMoonbeamToEth = /*#__PURE__*/function () {
|
|
|
3782
3750
|
ahAddress: ahAddress,
|
|
3783
3751
|
asset: _objectSpread2(_objectSpread2({}, foundAsset), {}, {
|
|
3784
3752
|
amount: currency.amount
|
|
3785
|
-
})
|
|
3753
|
+
}),
|
|
3754
|
+
version: Version.V4
|
|
3755
|
+
}, from, messageId);
|
|
3786
3756
|
_context.n = 12;
|
|
3787
3757
|
return api.objectToHex(customXcm, 'XcmVersionedXcm');
|
|
3788
3758
|
case 12:
|
|
@@ -5631,7 +5601,7 @@ var validateAssetSupport = function validateAssetSupport(_ref, assetCheckEnabled
|
|
|
5631
5601
|
destination = _ref.to,
|
|
5632
5602
|
currency = _ref.currency;
|
|
5633
5603
|
var isDestAssetHub = destination === 'AssetHubPolkadot' || destination === 'AssetHubKusama';
|
|
5634
|
-
var allowedChainsToAh = ['BifrostPolkadot', 'BifrostKusama', 'Hydration', 'Moonbeam', 'Ajuna', 'Polimec'];
|
|
5604
|
+
var allowedChainsToAh = ['AssetHubPolkadot', 'BifrostPolkadot', 'BifrostKusama', 'Hydration', 'Moonbeam', 'Ajuna', 'Polimec'];
|
|
5635
5605
|
if (!isRelayChain(origin) && !isBridge && isDestAssetHub && !allowedChainsToAh.includes(origin) && (asset === null || asset === void 0 ? void 0 : asset.symbol) === 'DOT') {
|
|
5636
5606
|
throw new TransferToAhNotSupported("Node ".concat(origin, " does not support DOT transfer to AssetHub"));
|
|
5637
5607
|
}
|
|
@@ -5710,6 +5680,17 @@ var resolveOverriddenAsset = function resolveOverriddenAsset(options, isBridge,
|
|
|
5710
5680
|
return undefined;
|
|
5711
5681
|
};
|
|
5712
5682
|
|
|
5683
|
+
var selectXcmVersion = function selectXcmVersion(forcedVersion, originVersion, destMaxVersion) {
|
|
5684
|
+
if (forcedVersion) {
|
|
5685
|
+
return forcedVersion;
|
|
5686
|
+
}
|
|
5687
|
+
var destVersion = destMaxVersion !== null && destMaxVersion !== void 0 ? destMaxVersion : originVersion;
|
|
5688
|
+
if (originVersion === Version.V4 && destVersion === Version.V3) {
|
|
5689
|
+
return Version.V3;
|
|
5690
|
+
}
|
|
5691
|
+
return originVersion;
|
|
5692
|
+
};
|
|
5693
|
+
|
|
5713
5694
|
var shouldPerformAssetCheck = function shouldPerformAssetCheck(origin, currency) {
|
|
5714
5695
|
if (isRelayChain(origin)) return true;
|
|
5715
5696
|
var hasMultiAsset = 'multiasset' in currency;
|
|
@@ -5768,7 +5749,7 @@ var validateAssetSpecifiers = function validateAssetSpecifiers(assetCheckEnabled
|
|
|
5768
5749
|
|
|
5769
5750
|
var send = /*#__PURE__*/function () {
|
|
5770
5751
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(options) {
|
|
5771
|
-
var api, origin, currency, feeAsset, address, destination, paraIdTo, version, senderAddress, ahAddress, pallet, method, isBridge, assetCheckEnabled, asset, resolvedFeeAsset, isLocalTransfer, overriddenAsset, resolvedAsset,
|
|
5752
|
+
var api, origin, currency, feeAsset, address, destination, paraIdTo, version, senderAddress, ahAddress, pallet, method, isBridge, assetCheckEnabled, asset, resolvedFeeAsset, originVersion, destVersion, resolvedVersion, isLocalTransfer, overriddenAsset, resolvedAsset, finalAsset, finalVersion, normalizedAsset;
|
|
5772
5753
|
return _regenerator().w(function (_context) {
|
|
5773
5754
|
while (1) switch (_context.n) {
|
|
5774
5755
|
case 0:
|
|
@@ -5783,6 +5764,9 @@ var send = /*#__PURE__*/function () {
|
|
|
5783
5764
|
asset = resolveAsset(currency, origin, destination, assetCheckEnabled);
|
|
5784
5765
|
resolvedFeeAsset = feeAsset ? resolveFeeAsset(feeAsset, origin, destination, currency) : undefined;
|
|
5785
5766
|
validateAssetSupport(options, assetCheckEnabled, isBridge, asset);
|
|
5767
|
+
originVersion = isRelayChain(origin) ? Version.V4 : getNode(origin).version;
|
|
5768
|
+
destVersion = !isTMultiLocation(destination) && !isRelayChain(destination) && destination !== 'Ethereum' ? getNode(destination).version : undefined;
|
|
5769
|
+
resolvedVersion = selectXcmVersion(version, originVersion, destVersion);
|
|
5786
5770
|
if (!isRelayChain(origin)) {
|
|
5787
5771
|
_context.n = 6;
|
|
5788
5772
|
break;
|
|
@@ -5833,7 +5817,7 @@ var send = /*#__PURE__*/function () {
|
|
|
5833
5817
|
amount: 'multiasset' in currency ? 0 : currency.amount
|
|
5834
5818
|
}),
|
|
5835
5819
|
paraIdTo: paraIdTo,
|
|
5836
|
-
version:
|
|
5820
|
+
version: resolvedVersion,
|
|
5837
5821
|
pallet: pallet,
|
|
5838
5822
|
method: method
|
|
5839
5823
|
}));
|
|
@@ -5846,7 +5830,6 @@ var send = /*#__PURE__*/function () {
|
|
|
5846
5830
|
resolvedAsset = asset !== null && asset !== void 0 ? asset : {
|
|
5847
5831
|
symbol: 'symbol' in currency ? currency.symbol : undefined
|
|
5848
5832
|
};
|
|
5849
|
-
originNode = getNode(origin);
|
|
5850
5833
|
finalAsset = 'multiasset' in currency ? _objectSpread2(_objectSpread2({}, resolvedAsset), {}, {
|
|
5851
5834
|
amount: 0,
|
|
5852
5835
|
assetId: '1'
|
|
@@ -5854,16 +5837,20 @@ var send = /*#__PURE__*/function () {
|
|
|
5854
5837
|
_objectSpread2(_objectSpread2({}, resolvedAsset), {}, {
|
|
5855
5838
|
amount: BigInt(currency.amount) < 1n ? 1n : currency.amount
|
|
5856
5839
|
});
|
|
5857
|
-
|
|
5840
|
+
finalVersion = selectXcmVersion(version, originVersion, destVersion);
|
|
5841
|
+
normalizedAsset = finalAsset.multiLocation ? _objectSpread2(_objectSpread2({}, finalAsset), {}, {
|
|
5842
|
+
multilocation: normalizeMultiLocation(finalAsset.multiLocation, finalVersion)
|
|
5843
|
+
}) : finalAsset;
|
|
5844
|
+
return _context.a(2, getNode(origin).transfer({
|
|
5858
5845
|
api: api,
|
|
5859
|
-
asset:
|
|
5846
|
+
asset: normalizedAsset,
|
|
5860
5847
|
currency: currency,
|
|
5861
5848
|
feeAsset: resolvedFeeAsset,
|
|
5862
5849
|
address: address,
|
|
5863
5850
|
to: destination,
|
|
5864
5851
|
paraIdTo: paraIdTo,
|
|
5865
5852
|
overriddenAsset: overriddenAsset,
|
|
5866
|
-
version:
|
|
5853
|
+
version: finalVersion,
|
|
5867
5854
|
senderAddress: senderAddress,
|
|
5868
5855
|
ahAddress: ahAddress,
|
|
5869
5856
|
pallet: pallet,
|
|
@@ -5925,7 +5912,7 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
5925
5912
|
key: "transfer",
|
|
5926
5913
|
value: function () {
|
|
5927
5914
|
var _transfer = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(options) {
|
|
5928
|
-
var api, asset, currency, feeAsset, address, destination, paraIdTo, overriddenAsset, version, senderAddress, ahAddress, pallet, method, isRelayDestination, scenario, paraId,
|
|
5915
|
+
var api, asset, currency, feeAsset, address, destination, paraIdTo, overriddenAsset, version, senderAddress, ahAddress, pallet, method, isRelayDestination, scenario, paraId, isLocalTransfer, isBifrostOrigin, isAssetHubDest, shouldUseMultiasset, input, _options, isEthAsset, isAHPOrigin, isAHPDest, isEthDest;
|
|
5929
5916
|
return _regenerator().w(function (_context) {
|
|
5930
5917
|
while (1) switch (_context.n) {
|
|
5931
5918
|
case 0:
|
|
@@ -5939,7 +5926,6 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
5939
5926
|
}
|
|
5940
5927
|
throw new InvalidParameterError('Sending assets to Polimec is supported only from AssetHubPolkadot and Hydration');
|
|
5941
5928
|
case 1:
|
|
5942
|
-
versionOrDefault = version !== null && version !== void 0 ? version : this.version;
|
|
5943
5929
|
isLocalTransfer = this.node === destination;
|
|
5944
5930
|
if (!isLocalTransfer) {
|
|
5945
5931
|
_context.n = 2;
|
|
@@ -5962,14 +5948,14 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
5962
5948
|
scenario: scenario,
|
|
5963
5949
|
pallet: 'XTokens',
|
|
5964
5950
|
recipientAddress: address,
|
|
5965
|
-
version:
|
|
5951
|
+
version: version,
|
|
5966
5952
|
paraId: paraId
|
|
5967
5953
|
}),
|
|
5968
5954
|
fees: getFees(scenario),
|
|
5969
5955
|
origin: this.node,
|
|
5970
5956
|
scenario: scenario,
|
|
5971
5957
|
paraIdTo: paraId,
|
|
5972
|
-
version:
|
|
5958
|
+
version: version,
|
|
5973
5959
|
destination: destination,
|
|
5974
5960
|
overriddenAsset: overriddenAsset,
|
|
5975
5961
|
pallet: pallet,
|
|
@@ -6005,17 +5991,17 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
6005
5991
|
}
|
|
6006
5992
|
_options = {
|
|
6007
5993
|
api: api,
|
|
6008
|
-
header: this.createVersionedDestination(scenario,
|
|
5994
|
+
header: this.createVersionedDestination(scenario, version, destination, paraId),
|
|
6009
5995
|
addressSelection: createVersionedBeneficiary({
|
|
6010
5996
|
api: api,
|
|
6011
5997
|
scenario: scenario,
|
|
6012
5998
|
pallet: 'PolkadotXcm',
|
|
6013
5999
|
recipientAddress: address,
|
|
6014
|
-
version:
|
|
6000
|
+
version: version,
|
|
6015
6001
|
paraId: paraId
|
|
6016
6002
|
}),
|
|
6017
6003
|
address: address,
|
|
6018
|
-
currencySelection: this.createCurrencySpec(asset.amount, scenario,
|
|
6004
|
+
currencySelection: this.createCurrencySpec(asset.amount, scenario, version, asset, overriddenAsset !== undefined),
|
|
6019
6005
|
overriddenAsset: overriddenAsset,
|
|
6020
6006
|
asset: asset,
|
|
6021
6007
|
currency: currency,
|
|
@@ -6069,8 +6055,7 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
6069
6055
|
}, {
|
|
6070
6056
|
key: "transferRelayToPara",
|
|
6071
6057
|
value: function transferRelayToPara(options) {
|
|
6072
|
-
var
|
|
6073
|
-
version = _options$version === void 0 ? Version.V3 : _options$version,
|
|
6058
|
+
var version = options.version,
|
|
6074
6059
|
pallet = options.pallet,
|
|
6075
6060
|
methodOverride = options.method;
|
|
6076
6061
|
var _this$getRelayToParaO = this.getRelayToParaOverrides(),
|
|
@@ -6166,11 +6151,11 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
6166
6151
|
value: function () {
|
|
6167
6152
|
var _transferEthAssetViaAH = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(input) {
|
|
6168
6153
|
var _feeAsset$multiLocati;
|
|
6169
|
-
var api, asset, scenario,
|
|
6154
|
+
var api, asset, scenario, version, destination, address, senderAddress, feeAsset, paraIdTo, ethMultiAsset, PARA_TO_PARA_FEE_DOT, AH_EXECUTION_FEE_PADDED, dryRunResult, dryRunFeePadded, dest, call;
|
|
6170
6155
|
return _regenerator().w(function (_context2) {
|
|
6171
6156
|
while (1) switch (_context2.n) {
|
|
6172
6157
|
case 0:
|
|
6173
|
-
api = input.api, asset = input.asset, scenario = input.scenario,
|
|
6158
|
+
api = input.api, asset = input.asset, scenario = input.scenario, version = input.version, destination = input.destination, address = input.address, senderAddress = input.senderAddress, feeAsset = input.feeAsset, paraIdTo = input.paraIdTo;
|
|
6174
6159
|
if (asset.multiLocation) {
|
|
6175
6160
|
_context2.n = 1;
|
|
6176
6161
|
break;
|
|
@@ -6286,7 +6271,6 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
6286
6271
|
api,
|
|
6287
6272
|
asset,
|
|
6288
6273
|
scenario,
|
|
6289
|
-
_input$version2,
|
|
6290
6274
|
version,
|
|
6291
6275
|
destination,
|
|
6292
6276
|
address,
|
|
@@ -6310,7 +6294,7 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
6310
6294
|
while (1) switch (_context3.n) {
|
|
6311
6295
|
case 0:
|
|
6312
6296
|
useOnlyDepositInstruction = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : false;
|
|
6313
|
-
api = input.api, asset = input.asset, scenario = input.scenario,
|
|
6297
|
+
api = input.api, asset = input.asset, scenario = input.scenario, version = input.version, destination = input.destination, address = input.address, senderAddress = input.senderAddress, feeAsset = input.feeAsset;
|
|
6314
6298
|
_context3.n = 1;
|
|
6315
6299
|
return getBridgeStatus(api.clone());
|
|
6316
6300
|
case 1:
|
|
@@ -6393,7 +6377,7 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
6393
6377
|
return generateMessageId(api, senderAddress, getParaId(this.node), ethAsset.assetId, address, asset.amount);
|
|
6394
6378
|
case 11:
|
|
6395
6379
|
messageId = _context3.v;
|
|
6396
|
-
customXcmOnDest = createCustomXcmOnDest(input, this.node,
|
|
6380
|
+
customXcmOnDest = createCustomXcmOnDest(input, this.node, messageId);
|
|
6397
6381
|
case 12:
|
|
6398
6382
|
call = {
|
|
6399
6383
|
module: 'PolkadotXcm',
|
|
@@ -6423,7 +6407,7 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
6423
6407
|
var Acala = /*#__PURE__*/function (_ParachainNode) {
|
|
6424
6408
|
function Acala() {
|
|
6425
6409
|
_classCallCheck(this, Acala);
|
|
6426
|
-
return _callSuper(this, Acala, ['Acala', 'acala', 'polkadot', Version.
|
|
6410
|
+
return _callSuper(this, Acala, ['Acala', 'acala', 'polkadot', Version.V4]);
|
|
6427
6411
|
}
|
|
6428
6412
|
_inherits(Acala, _ParachainNode);
|
|
6429
6413
|
return _createClass(Acala, [{
|
|
@@ -6591,7 +6575,7 @@ var Ajuna = /*#__PURE__*/function (_ParachainNode) {
|
|
|
6591
6575
|
var Altair = /*#__PURE__*/function (_ParachainNode) {
|
|
6592
6576
|
function Altair() {
|
|
6593
6577
|
_classCallCheck(this, Altair);
|
|
6594
|
-
return _callSuper(this, Altair, ['Altair', 'altair', 'kusama', Version.
|
|
6578
|
+
return _callSuper(this, Altair, ['Altair', 'altair', 'kusama', Version.V4]);
|
|
6595
6579
|
}
|
|
6596
6580
|
_inherits(Altair, _ParachainNode);
|
|
6597
6581
|
return _createClass(Altair, [{
|
|
@@ -6663,7 +6647,7 @@ var Amplitude = /*#__PURE__*/function (_ParachainNode) {
|
|
|
6663
6647
|
var AssetHubKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
6664
6648
|
function AssetHubKusama() {
|
|
6665
6649
|
_classCallCheck(this, AssetHubKusama);
|
|
6666
|
-
return _callSuper(this, AssetHubKusama, ['AssetHubKusama', 'KusamaAssetHub', 'kusama', Version.
|
|
6650
|
+
return _callSuper(this, AssetHubKusama, ['AssetHubKusama', 'KusamaAssetHub', 'kusama', Version.V4]);
|
|
6667
6651
|
}
|
|
6668
6652
|
_inherits(AssetHubKusama, _ParachainNode);
|
|
6669
6653
|
return _createClass(AssetHubKusama, [{
|
|
@@ -6726,8 +6710,7 @@ xcm, maxWeight) {
|
|
|
6726
6710
|
|
|
6727
6711
|
var createExecuteExchangeXcm = function createExecuteExchangeXcm(input, weight, originExecutionFee, destExecutionFee) {
|
|
6728
6712
|
var api = input.api,
|
|
6729
|
-
|
|
6730
|
-
version = _input$version === void 0 ? Version.V4 : _input$version,
|
|
6713
|
+
version = input.version,
|
|
6731
6714
|
asset = input.asset,
|
|
6732
6715
|
scenario = input.scenario,
|
|
6733
6716
|
destination = input.destination,
|
|
@@ -6839,25 +6822,44 @@ var createExecuteXcm = function createExecuteXcm(input, executionFee, version) {
|
|
|
6839
6822
|
version: version,
|
|
6840
6823
|
paraId: paraIdTo
|
|
6841
6824
|
});
|
|
6842
|
-
if (!asset.multiLocation ||
|
|
6843
|
-
throw new InvalidCurrencyError("Asset ".concat(JSON.stringify(asset), "
|
|
6825
|
+
if (!isForeignAsset(asset) || !asset.multiLocation || !asset.assetId) {
|
|
6826
|
+
throw new InvalidCurrencyError("Asset ".concat(JSON.stringify(asset), " is missing multiLocation or assetId"));
|
|
6827
|
+
}
|
|
6828
|
+
if (feeAsset && (!isForeignAsset(feeAsset) || !feeAsset.multiLocation || !feeAsset.assetId)) {
|
|
6829
|
+
throw new InvalidCurrencyError("Fee asset ".concat(JSON.stringify(feeAsset), " is missing multiLocation or assetId"));
|
|
6844
6830
|
}
|
|
6845
6831
|
var assetML = transformMultiLocation(asset.multiLocation);
|
|
6846
6832
|
var feeML = transformMultiLocation((_feeAsset$multiLocati = feeAsset === null || feeAsset === void 0 ? void 0 : feeAsset.multiLocation) !== null && _feeAsset$multiLocati !== void 0 ? _feeAsset$multiLocati : asset.multiLocation);
|
|
6847
6833
|
var sameFeeAsset = feeAsset && isAssetEqual(asset, feeAsset);
|
|
6848
6834
|
var amountWithoutFee = BigInt(asset.amount) - executionFee;
|
|
6849
|
-
var
|
|
6850
|
-
|
|
6835
|
+
var assetsToWithdraw = [{
|
|
6836
|
+
assetId: asset.assetId,
|
|
6837
|
+
multiasset: {
|
|
6851
6838
|
id: assetML,
|
|
6852
6839
|
fun: {
|
|
6853
6840
|
Fungible: BigInt(asset.amount)
|
|
6854
6841
|
}
|
|
6855
|
-
}
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6842
|
+
}
|
|
6843
|
+
}];
|
|
6844
|
+
if (!sameFeeAsset && feeAsset !== null && feeAsset !== void 0 && feeAsset.multiLocation) {
|
|
6845
|
+
assetsToWithdraw.push({
|
|
6846
|
+
assetId: feeAsset.assetId,
|
|
6847
|
+
multiasset: {
|
|
6848
|
+
id: feeML,
|
|
6849
|
+
fun: {
|
|
6850
|
+
Fungible: executionFee
|
|
6851
|
+
}
|
|
6859
6852
|
}
|
|
6860
|
-
}
|
|
6853
|
+
});
|
|
6854
|
+
}
|
|
6855
|
+
assetsToWithdraw.sort(function (a, b) {
|
|
6856
|
+
return a.assetId > b.assetId ? 1 : -1;
|
|
6857
|
+
});
|
|
6858
|
+
var xcm = [{
|
|
6859
|
+
WithdrawAsset: assetsToWithdraw.map(function (_ref) {
|
|
6860
|
+
var multiasset = _ref.multiasset;
|
|
6861
|
+
return multiasset;
|
|
6862
|
+
})
|
|
6861
6863
|
}, {
|
|
6862
6864
|
BuyExecution: {
|
|
6863
6865
|
fees: {
|
|
@@ -7000,13 +7002,12 @@ var AssetHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
|
7000
7002
|
function AssetHubPolkadot() {
|
|
7001
7003
|
var _this;
|
|
7002
7004
|
_classCallCheck(this, AssetHubPolkadot);
|
|
7003
|
-
_this = _callSuper(this, AssetHubPolkadot, ['AssetHubPolkadot', 'PolkadotAssetHub', 'polkadot', Version.
|
|
7005
|
+
_this = _callSuper(this, AssetHubPolkadot, ['AssetHubPolkadot', 'PolkadotAssetHub', 'polkadot', Version.V4]);
|
|
7004
7006
|
_this.handleLocalReserveTransfer = function (input) {
|
|
7005
7007
|
var useDOTAsFeeAsset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
7006
7008
|
var api = input.api,
|
|
7007
7009
|
scenario = input.scenario,
|
|
7008
|
-
|
|
7009
|
-
version = _input$version === void 0 ? Version.V4 : _input$version,
|
|
7010
|
+
version = input.version,
|
|
7010
7011
|
destination = input.destination,
|
|
7011
7012
|
asset = input.asset,
|
|
7012
7013
|
paraIdTo = input.paraIdTo;
|
|
@@ -7038,42 +7039,46 @@ var AssetHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
|
7038
7039
|
return _createClass(AssetHubPolkadot, [{
|
|
7039
7040
|
key: "handleBridgeTransfer",
|
|
7040
7041
|
value: function handleBridgeTransfer(input, targetChain) {
|
|
7041
|
-
var
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
}
|
|
7051
|
-
};
|
|
7042
|
+
var _asset$symbol, _asset$symbol2, _asset$symbol3, _asset$symbol4;
|
|
7043
|
+
var api = input.api,
|
|
7044
|
+
asset = input.asset,
|
|
7045
|
+
destination = input.destination,
|
|
7046
|
+
scenario = input.scenario,
|
|
7047
|
+
address = input.address,
|
|
7048
|
+
version = input.version,
|
|
7049
|
+
paraIdTo = input.paraIdTo;
|
|
7050
|
+
if (targetChain === 'Kusama' && ((_asset$symbol = asset.symbol) === null || _asset$symbol === void 0 ? void 0 : _asset$symbol.toUpperCase()) === 'KSM' || targetChain === 'Polkadot' && ((_asset$symbol2 = asset.symbol) === null || _asset$symbol2 === void 0 ? void 0 : _asset$symbol2.toUpperCase()) === 'DOT') {
|
|
7052
7051
|
var modifiedInput = _objectSpread2(_objectSpread2({}, input), {}, {
|
|
7053
|
-
header: createBridgePolkadotXcmDest(
|
|
7054
|
-
addressSelection:
|
|
7055
|
-
|
|
7052
|
+
header: createBridgePolkadotXcmDest(version, targetChain, destination, paraIdTo),
|
|
7053
|
+
addressSelection: createVersionedBeneficiary({
|
|
7054
|
+
api: api,
|
|
7055
|
+
scenario: scenario,
|
|
7056
|
+
pallet: 'PolkadotXcm',
|
|
7057
|
+
recipientAddress: address,
|
|
7058
|
+
version: version,
|
|
7059
|
+
paraId: paraIdTo
|
|
7060
|
+
}),
|
|
7061
|
+
currencySelection: createVersionedMultiAssets(version, asset.amount, asset.multiLocation)
|
|
7056
7062
|
});
|
|
7057
7063
|
return PolkadotXCMTransferImpl.transferPolkadotXCM(modifiedInput, 'transfer_assets', 'Unlimited');
|
|
7058
|
-
} else if (targetChain === 'Polkadot' && ((
|
|
7059
|
-
var _overriddenVersion = Version.V3;
|
|
7064
|
+
} else if (targetChain === 'Polkadot' && ((_asset$symbol3 = asset.symbol) === null || _asset$symbol3 === void 0 ? void 0 : _asset$symbol3.toUpperCase()) === 'KSM' || targetChain === 'Kusama' && ((_asset$symbol4 = asset.symbol) === null || _asset$symbol4 === void 0 ? void 0 : _asset$symbol4.toUpperCase()) === 'DOT') {
|
|
7060
7065
|
var _modifiedInput = _objectSpread2(_objectSpread2({}, input), {}, {
|
|
7061
|
-
header: createBridgePolkadotXcmDest(
|
|
7062
|
-
currencySelection: createVersionedMultiAssets(
|
|
7066
|
+
header: createBridgePolkadotXcmDest(version, targetChain, destination, paraIdTo),
|
|
7067
|
+
currencySelection: createVersionedMultiAssets(version, asset.amount, DOT_MULTILOCATION)
|
|
7063
7068
|
});
|
|
7064
7069
|
return PolkadotXCMTransferImpl.transferPolkadotXCM(_modifiedInput, 'limited_reserve_transfer_assets', 'Unlimited');
|
|
7065
7070
|
}
|
|
7066
|
-
throw new InvalidCurrencyError("Polkadot <-> Kusama bridge does not support currency ".concat(
|
|
7071
|
+
throw new InvalidCurrencyError("Polkadot <-> Kusama bridge does not support currency ".concat(asset.symbol));
|
|
7067
7072
|
}
|
|
7068
7073
|
}, {
|
|
7069
7074
|
key: "handleEthBridgeNativeTransfer",
|
|
7070
7075
|
value: function () {
|
|
7071
7076
|
var _handleEthBridgeNativeTransfer = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(input) {
|
|
7072
|
-
var api,
|
|
7077
|
+
var api, version, scenario, destination, senderAddress, address, paraIdTo, asset, bridgeStatus, messageId, multiLocation, call;
|
|
7073
7078
|
return _regenerator().w(function (_context) {
|
|
7074
7079
|
while (1) switch (_context.n) {
|
|
7075
7080
|
case 0:
|
|
7076
|
-
api = input.api,
|
|
7081
|
+
api = input.api, version = input.version, scenario = input.scenario, destination = input.destination, senderAddress = input.senderAddress, address = input.address, paraIdTo = input.paraIdTo, asset = input.asset;
|
|
7077
7082
|
_context.n = 1;
|
|
7078
7083
|
return getBridgeStatus(api.clone());
|
|
7079
7084
|
case 1:
|
|
@@ -7156,11 +7161,11 @@ var AssetHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
|
7156
7161
|
key: "handleEthBridgeTransfer",
|
|
7157
7162
|
value: function () {
|
|
7158
7163
|
var _handleEthBridgeTransfer = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(input) {
|
|
7159
|
-
var api, scenario, destination, paraIdTo, address, asset, bridgeStatus, modifiedInput;
|
|
7164
|
+
var api, scenario, destination, paraIdTo, address, asset, version, bridgeStatus, modifiedInput;
|
|
7160
7165
|
return _regenerator().w(function (_context2) {
|
|
7161
7166
|
while (1) switch (_context2.n) {
|
|
7162
7167
|
case 0:
|
|
7163
|
-
api = input.api, scenario = input.scenario, destination = input.destination, paraIdTo = input.paraIdTo, address = input.address, asset = input.asset;
|
|
7168
|
+
api = input.api, scenario = input.scenario, destination = input.destination, paraIdTo = input.paraIdTo, address = input.address, asset = input.asset, version = input.version;
|
|
7164
7169
|
_context2.n = 1;
|
|
7165
7170
|
return getBridgeStatus(api.clone());
|
|
7166
7171
|
case 1:
|
|
@@ -7199,7 +7204,7 @@ var AssetHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
|
7199
7204
|
version: this.version,
|
|
7200
7205
|
paraId: paraIdTo
|
|
7201
7206
|
}),
|
|
7202
|
-
currencySelection: createVersionedMultiAssets(
|
|
7207
|
+
currencySelection: createVersionedMultiAssets(version, asset.amount, asset.multiLocation)
|
|
7203
7208
|
});
|
|
7204
7209
|
return _context2.a(2, PolkadotXCMTransferImpl.transferPolkadotXCM(modifiedInput, 'transfer_assets', 'Unlimited'));
|
|
7205
7210
|
}
|
|
@@ -7218,8 +7223,8 @@ var AssetHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
|
7218
7223
|
asset = input.asset,
|
|
7219
7224
|
scenario = input.scenario,
|
|
7220
7225
|
destination = input.destination,
|
|
7221
|
-
paraIdTo = input.paraIdTo
|
|
7222
|
-
|
|
7226
|
+
paraIdTo = input.paraIdTo,
|
|
7227
|
+
version = input.version;
|
|
7223
7228
|
var paraId = resolveParaId(paraIdTo, destination);
|
|
7224
7229
|
var customMultiLocation = {
|
|
7225
7230
|
parents: Parents.ONE,
|
|
@@ -7248,8 +7253,8 @@ var AssetHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
|
7248
7253
|
value: function patchInput(input) {
|
|
7249
7254
|
var asset = input.asset,
|
|
7250
7255
|
destination = input.destination,
|
|
7251
|
-
_input$
|
|
7252
|
-
version = _input$
|
|
7256
|
+
_input$version = input.version,
|
|
7257
|
+
version = _input$version === void 0 ? this.version : _input$version;
|
|
7253
7258
|
if ((destination === 'Hydration' || destination === 'Polimec' || destination === 'Moonbeam' || destination === 'BifrostPolkadot') && asset.symbol === 'DOT') {
|
|
7254
7259
|
return _objectSpread2(_objectSpread2({}, input), {}, {
|
|
7255
7260
|
currencySelection: createVersionedMultiAssets(version, asset.amount, DOT_MULTILOCATION)
|
|
@@ -7268,11 +7273,11 @@ var AssetHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
|
7268
7273
|
key: "handleExecuteTransfer",
|
|
7269
7274
|
value: function () {
|
|
7270
7275
|
var _handleExecuteTransfer = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(input) {
|
|
7271
|
-
var api, senderAddress, asset, feeAsset,
|
|
7276
|
+
var api, senderAddress, asset, feeAsset, version, decimals, multiplier, base, scaledMultiplier, MIN_FEE, call, dryRunResult, paddedFee, xcm, weight;
|
|
7272
7277
|
return _regenerator().w(function (_context3) {
|
|
7273
7278
|
while (1) switch (_context3.n) {
|
|
7274
7279
|
case 0:
|
|
7275
|
-
api = input.api, senderAddress = input.senderAddress, asset = input.asset, feeAsset = input.feeAsset,
|
|
7280
|
+
api = input.api, senderAddress = input.senderAddress, asset = input.asset, feeAsset = input.feeAsset, version = input.version;
|
|
7276
7281
|
if (senderAddress) {
|
|
7277
7282
|
_context3.n = 1;
|
|
7278
7283
|
break;
|
|
@@ -7475,7 +7480,7 @@ var AssetHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
|
7475
7480
|
var Astar = /*#__PURE__*/function (_ParachainNode) {
|
|
7476
7481
|
function Astar() {
|
|
7477
7482
|
_classCallCheck(this, Astar);
|
|
7478
|
-
return _callSuper(this, Astar, ['Astar', 'astar', 'polkadot', Version.
|
|
7483
|
+
return _callSuper(this, Astar, ['Astar', 'astar', 'polkadot', Version.V4]);
|
|
7479
7484
|
}
|
|
7480
7485
|
_inherits(Astar, _ParachainNode);
|
|
7481
7486
|
return _createClass(Astar, [{
|
|
@@ -7528,7 +7533,7 @@ var Astar = /*#__PURE__*/function (_ParachainNode) {
|
|
|
7528
7533
|
var Basilisk = /*#__PURE__*/function (_ParachainNode) {
|
|
7529
7534
|
function Basilisk() {
|
|
7530
7535
|
_classCallCheck(this, Basilisk);
|
|
7531
|
-
return _callSuper(this, Basilisk, ['Basilisk', 'basilisk', 'kusama', Version.
|
|
7536
|
+
return _callSuper(this, Basilisk, ['Basilisk', 'basilisk', 'kusama', Version.V4]);
|
|
7532
7537
|
}
|
|
7533
7538
|
_inherits(Basilisk, _ParachainNode);
|
|
7534
7539
|
return _createClass(Basilisk, [{
|
|
@@ -7556,7 +7561,7 @@ var Basilisk = /*#__PURE__*/function (_ParachainNode) {
|
|
|
7556
7561
|
var BifrostKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
7557
7562
|
function BifrostKusama() {
|
|
7558
7563
|
_classCallCheck(this, BifrostKusama);
|
|
7559
|
-
return _callSuper(this, BifrostKusama, ['BifrostKusama', 'bifrost', 'kusama', Version.
|
|
7564
|
+
return _callSuper(this, BifrostKusama, ['BifrostKusama', 'bifrost', 'kusama', Version.V4]);
|
|
7560
7565
|
}
|
|
7561
7566
|
_inherits(BifrostKusama, _ParachainNode);
|
|
7562
7567
|
return _createClass(BifrostKusama, [{
|
|
@@ -7575,7 +7580,7 @@ var BifrostKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
|
7575
7580
|
var BifrostPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
7576
7581
|
function BifrostPolkadot() {
|
|
7577
7582
|
_classCallCheck(this, BifrostPolkadot);
|
|
7578
|
-
return _callSuper(this, BifrostPolkadot, ['BifrostPolkadot', 'bifrost', 'polkadot', Version.
|
|
7583
|
+
return _callSuper(this, BifrostPolkadot, ['BifrostPolkadot', 'bifrost', 'polkadot', Version.V4]);
|
|
7579
7584
|
}
|
|
7580
7585
|
_inherits(BifrostPolkadot, _ParachainNode);
|
|
7581
7586
|
return _createClass(BifrostPolkadot, [{
|
|
@@ -7677,7 +7682,7 @@ var BifrostPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
|
7677
7682
|
var BridgeHubKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
7678
7683
|
function BridgeHubKusama() {
|
|
7679
7684
|
_classCallCheck(this, BridgeHubKusama);
|
|
7680
|
-
return _callSuper(this, BridgeHubKusama, ['BridgeHubKusama', 'kusamaBridgeHub', 'kusama', Version.
|
|
7685
|
+
return _callSuper(this, BridgeHubKusama, ['BridgeHubKusama', 'kusamaBridgeHub', 'kusama', Version.V4]);
|
|
7681
7686
|
}
|
|
7682
7687
|
_inherits(BridgeHubKusama, _ParachainNode);
|
|
7683
7688
|
return _createClass(BridgeHubKusama, [{
|
|
@@ -7704,7 +7709,7 @@ var BridgeHubKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
|
7704
7709
|
var BridgeHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
7705
7710
|
function BridgeHubPolkadot() {
|
|
7706
7711
|
_classCallCheck(this, BridgeHubPolkadot);
|
|
7707
|
-
return _callSuper(this, BridgeHubPolkadot, ['BridgeHubPolkadot', 'polkadotBridgeHub', 'polkadot', Version.
|
|
7712
|
+
return _callSuper(this, BridgeHubPolkadot, ['BridgeHubPolkadot', 'polkadotBridgeHub', 'polkadot', Version.V4]);
|
|
7708
7713
|
}
|
|
7709
7714
|
_inherits(BridgeHubPolkadot, _ParachainNode);
|
|
7710
7715
|
return _createClass(BridgeHubPolkadot, [{
|
|
@@ -7731,7 +7736,7 @@ var BridgeHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
|
7731
7736
|
var Centrifuge = /*#__PURE__*/function (_ParachainNode) {
|
|
7732
7737
|
function Centrifuge() {
|
|
7733
7738
|
_classCallCheck(this, Centrifuge);
|
|
7734
|
-
return _callSuper(this, Centrifuge, ['Centrifuge', 'centrifuge', 'polkadot', Version.
|
|
7739
|
+
return _callSuper(this, Centrifuge, ['Centrifuge', 'centrifuge', 'polkadot', Version.V4]);
|
|
7735
7740
|
}
|
|
7736
7741
|
_inherits(Centrifuge, _ParachainNode);
|
|
7737
7742
|
return _createClass(Centrifuge, [{
|
|
@@ -7782,7 +7787,7 @@ var Centrifuge = /*#__PURE__*/function (_ParachainNode) {
|
|
|
7782
7787
|
var Collectives = /*#__PURE__*/function (_ParachainNode) {
|
|
7783
7788
|
function Collectives() {
|
|
7784
7789
|
_classCallCheck(this, Collectives);
|
|
7785
|
-
return _callSuper(this, Collectives, ['Collectives', 'polkadotCollectives', 'polkadot', Version.
|
|
7790
|
+
return _callSuper(this, Collectives, ['Collectives', 'polkadotCollectives', 'polkadot', Version.V4]);
|
|
7786
7791
|
}
|
|
7787
7792
|
_inherits(Collectives, _ParachainNode);
|
|
7788
7793
|
return _createClass(Collectives, [{
|
|
@@ -7831,7 +7836,7 @@ var ComposableFinance = /*#__PURE__*/function (_ParachainNode) {
|
|
|
7831
7836
|
var CoretimeKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
7832
7837
|
function CoretimeKusama() {
|
|
7833
7838
|
_classCallCheck(this, CoretimeKusama);
|
|
7834
|
-
return _callSuper(this, CoretimeKusama, ['CoretimeKusama', 'kusamaCoretime', 'kusama', Version.
|
|
7839
|
+
return _callSuper(this, CoretimeKusama, ['CoretimeKusama', 'kusamaCoretime', 'kusama', Version.V4]);
|
|
7835
7840
|
}
|
|
7836
7841
|
_inherits(CoretimeKusama, _ParachainNode);
|
|
7837
7842
|
return _createClass(CoretimeKusama, [{
|
|
@@ -7856,7 +7861,7 @@ var CoretimeKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
|
7856
7861
|
var CoretimePolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
7857
7862
|
function CoretimePolkadot() {
|
|
7858
7863
|
_classCallCheck(this, CoretimePolkadot);
|
|
7859
|
-
return _callSuper(this, CoretimePolkadot, ['CoretimePolkadot', 'polkadotCoretime', 'polkadot', Version.
|
|
7864
|
+
return _callSuper(this, CoretimePolkadot, ['CoretimePolkadot', 'polkadotCoretime', 'polkadot', Version.V4]);
|
|
7860
7865
|
}
|
|
7861
7866
|
_inherits(CoretimePolkadot, _ParachainNode);
|
|
7862
7867
|
return _createClass(CoretimePolkadot, [{
|
|
@@ -7880,7 +7885,7 @@ var CoretimePolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
|
7880
7885
|
var Crab = /*#__PURE__*/function (_ParachainNode) {
|
|
7881
7886
|
function Crab() {
|
|
7882
7887
|
_classCallCheck(this, Crab);
|
|
7883
|
-
return _callSuper(this, Crab, ['Crab', 'crab', 'kusama', Version.
|
|
7888
|
+
return _callSuper(this, Crab, ['Crab', 'crab', 'kusama', Version.V4]);
|
|
7884
7889
|
}
|
|
7885
7890
|
_inherits(Crab, _ParachainNode);
|
|
7886
7891
|
return _createClass(Crab, [{
|
|
@@ -8031,7 +8036,7 @@ var Curio = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8031
8036
|
var Darwinia = /*#__PURE__*/function (_ParachainNode) {
|
|
8032
8037
|
function Darwinia() {
|
|
8033
8038
|
_classCallCheck(this, Darwinia);
|
|
8034
|
-
return _callSuper(this, Darwinia, ['Darwinia', 'darwinia', 'polkadot', Version.
|
|
8039
|
+
return _callSuper(this, Darwinia, ['Darwinia', 'darwinia', 'polkadot', Version.V4]);
|
|
8035
8040
|
}
|
|
8036
8041
|
_inherits(Darwinia, _ParachainNode);
|
|
8037
8042
|
return _createClass(Darwinia, [{
|
|
@@ -8088,7 +8093,7 @@ var Darwinia = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8088
8093
|
var Encointer = /*#__PURE__*/function (_ParachainNode) {
|
|
8089
8094
|
function Encointer() {
|
|
8090
8095
|
_classCallCheck(this, Encointer);
|
|
8091
|
-
return _callSuper(this, Encointer, ['Encointer', 'encointer', 'kusama', Version.
|
|
8096
|
+
return _callSuper(this, Encointer, ['Encointer', 'encointer', 'kusama', Version.V4]);
|
|
8092
8097
|
}
|
|
8093
8098
|
_inherits(Encointer, _ParachainNode);
|
|
8094
8099
|
return _createClass(Encointer, [{
|
|
@@ -8115,7 +8120,7 @@ var Encointer = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8115
8120
|
var Heima = /*#__PURE__*/function (_ParachainNode) {
|
|
8116
8121
|
function Heima() {
|
|
8117
8122
|
_classCallCheck(this, Heima);
|
|
8118
|
-
return _callSuper(this, Heima, ['Heima', 'litentry', 'polkadot', Version.
|
|
8123
|
+
return _callSuper(this, Heima, ['Heima', 'litentry', 'polkadot', Version.V4]);
|
|
8119
8124
|
}
|
|
8120
8125
|
_inherits(Heima, _ParachainNode);
|
|
8121
8126
|
return _createClass(Heima, [{
|
|
@@ -8181,10 +8186,8 @@ var createTypeAndThenTransfer = function createTypeAndThenTransfer(_ref, version
|
|
|
8181
8186
|
})]),
|
|
8182
8187
|
assets_transfer_type: transferType,
|
|
8183
8188
|
remote_fees_id: _defineProperty({}, version, {
|
|
8184
|
-
|
|
8185
|
-
|
|
8186
|
-
interior: 'Here'
|
|
8187
|
-
}
|
|
8189
|
+
parents: scenario === 'ParaToPara' ? Parents.ONE : Parents.ZERO,
|
|
8190
|
+
interior: 'Here'
|
|
8188
8191
|
}),
|
|
8189
8192
|
fees_transfer_type: transferType,
|
|
8190
8193
|
custom_xcm_on_dest: createCustomXcmPolimec(api, address, scenario, destination, paraIdTo, version),
|
|
@@ -8206,10 +8209,8 @@ var createCustomXcmPolimec = function createCustomXcmPolimec(api, address, scena
|
|
|
8206
8209
|
BuyExecution: {
|
|
8207
8210
|
fees: {
|
|
8208
8211
|
id: {
|
|
8209
|
-
|
|
8210
|
-
|
|
8211
|
-
interior: 'Here'
|
|
8212
|
-
}
|
|
8212
|
+
parents: Parents.ONE,
|
|
8213
|
+
interior: 'Here'
|
|
8213
8214
|
},
|
|
8214
8215
|
fun: {
|
|
8215
8216
|
Fungible: GAS_LIMIT
|
|
@@ -8239,7 +8240,7 @@ var createCustomXcmPolimec = function createCustomXcmPolimec(api, address, scena
|
|
|
8239
8240
|
var Polimec = /*#__PURE__*/function (_ParachainNode) {
|
|
8240
8241
|
function Polimec() {
|
|
8241
8242
|
_classCallCheck(this, Polimec);
|
|
8242
|
-
return _callSuper(this, Polimec, ['Polimec', 'polimec', 'polkadot', Version.
|
|
8243
|
+
return _callSuper(this, Polimec, ['Polimec', 'polimec', 'polkadot', Version.V4]);
|
|
8243
8244
|
}
|
|
8244
8245
|
_inherits(Polimec, _ParachainNode);
|
|
8245
8246
|
return _createClass(Polimec, [{
|
|
@@ -8341,7 +8342,7 @@ var createCustomXcmAh = function createCustomXcmAh(_ref, version) {
|
|
|
8341
8342
|
var Hydration = /*#__PURE__*/function (_ParachainNode) {
|
|
8342
8343
|
function Hydration() {
|
|
8343
8344
|
_classCallCheck(this, Hydration);
|
|
8344
|
-
return _callSuper(this, Hydration, ['Hydration', 'hydradx', 'polkadot', Version.
|
|
8345
|
+
return _callSuper(this, Hydration, ['Hydration', 'hydradx', 'polkadot', Version.V4]);
|
|
8345
8346
|
}
|
|
8346
8347
|
_inherits(Hydration, _ParachainNode);
|
|
8347
8348
|
return _createClass(Hydration, [{
|
|
@@ -8352,22 +8353,19 @@ var Hydration = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8352
8353
|
scenario = input.scenario,
|
|
8353
8354
|
version = input.version,
|
|
8354
8355
|
destination = input.destination;
|
|
8355
|
-
var versionOrDefault = version !== null && version !== void 0 ? version : Version.V3;
|
|
8356
8356
|
var call = {
|
|
8357
8357
|
module: 'PolkadotXcm',
|
|
8358
8358
|
method: 'transfer_assets_using_type_and_then',
|
|
8359
8359
|
parameters: {
|
|
8360
|
-
dest: this.createVersionedDestination(scenario,
|
|
8361
|
-
assets: _defineProperty({},
|
|
8360
|
+
dest: this.createVersionedDestination(scenario, version, destination, getParaId('AssetHubPolkadot')),
|
|
8361
|
+
assets: _defineProperty({}, version, [createMultiAsset(version, asset.amount, DOT_MULTILOCATION)]),
|
|
8362
8362
|
assets_transfer_type: 'DestinationReserve',
|
|
8363
|
-
remote_fees_id: _defineProperty({},
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
interior: 'Here'
|
|
8367
|
-
}
|
|
8363
|
+
remote_fees_id: _defineProperty({}, version, {
|
|
8364
|
+
parents: Parents.ONE,
|
|
8365
|
+
interior: 'Here'
|
|
8368
8366
|
}),
|
|
8369
8367
|
fees_transfer_type: 'DestinationReserve',
|
|
8370
|
-
custom_xcm_on_dest: createCustomXcmAh(input,
|
|
8368
|
+
custom_xcm_on_dest: createCustomXcmAh(input, version),
|
|
8371
8369
|
weight_limit: 'Unlimited'
|
|
8372
8370
|
}
|
|
8373
8371
|
};
|
|
@@ -8530,7 +8528,7 @@ var Interlay = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8530
8528
|
var Karura = /*#__PURE__*/function (_ParachainNode) {
|
|
8531
8529
|
function Karura() {
|
|
8532
8530
|
_classCallCheck(this, Karura);
|
|
8533
|
-
return _callSuper(this, Karura, ['Karura', 'karura', 'kusama', Version.
|
|
8531
|
+
return _callSuper(this, Karura, ['Karura', 'karura', 'kusama', Version.V4]);
|
|
8534
8532
|
}
|
|
8535
8533
|
_inherits(Karura, _ParachainNode);
|
|
8536
8534
|
return _createClass(Karura, [{
|
|
@@ -8554,7 +8552,7 @@ var Karura = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8554
8552
|
var KiltSpiritnet = /*#__PURE__*/function (_ParachainNode) {
|
|
8555
8553
|
function KiltSpiritnet() {
|
|
8556
8554
|
_classCallCheck(this, KiltSpiritnet);
|
|
8557
|
-
return _callSuper(this, KiltSpiritnet, ['KiltSpiritnet', 'kilt', 'polkadot', Version.
|
|
8555
|
+
return _callSuper(this, KiltSpiritnet, ['KiltSpiritnet', 'kilt', 'polkadot', Version.V4]);
|
|
8558
8556
|
}
|
|
8559
8557
|
_inherits(KiltSpiritnet, _ParachainNode);
|
|
8560
8558
|
return _createClass(KiltSpiritnet, [{
|
|
@@ -8676,7 +8674,7 @@ Manta.NATIVE_ASSET_ID = 1n;
|
|
|
8676
8674
|
var Moonbeam = /*#__PURE__*/function (_ParachainNode) {
|
|
8677
8675
|
function Moonbeam() {
|
|
8678
8676
|
_classCallCheck(this, Moonbeam);
|
|
8679
|
-
return _callSuper(this, Moonbeam, ['Moonbeam', 'moonbeam', 'polkadot', Version.
|
|
8677
|
+
return _callSuper(this, Moonbeam, ['Moonbeam', 'moonbeam', 'polkadot', Version.V4]);
|
|
8680
8678
|
}
|
|
8681
8679
|
_inherits(Moonbeam, _ParachainNode);
|
|
8682
8680
|
return _createClass(Moonbeam, [{
|
|
@@ -8748,7 +8746,7 @@ var Moonbeam = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8748
8746
|
var Moonriver = /*#__PURE__*/function (_ParachainNode) {
|
|
8749
8747
|
function Moonriver() {
|
|
8750
8748
|
_classCallCheck(this, Moonriver);
|
|
8751
|
-
return _callSuper(this, Moonriver, ['Moonriver', 'moonriver', 'kusama', Version.
|
|
8749
|
+
return _callSuper(this, Moonriver, ['Moonriver', 'moonriver', 'kusama', Version.V4]);
|
|
8752
8750
|
}
|
|
8753
8751
|
_inherits(Moonriver, _ParachainNode);
|
|
8754
8752
|
return _createClass(Moonriver, [{
|
|
@@ -8799,7 +8797,7 @@ var Moonriver = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8799
8797
|
var Mythos = /*#__PURE__*/function (_ParachainNode) {
|
|
8800
8798
|
function Mythos() {
|
|
8801
8799
|
_classCallCheck(this, Mythos);
|
|
8802
|
-
return _callSuper(this, Mythos, ['Mythos', 'mythos', 'polkadot', Version.
|
|
8800
|
+
return _callSuper(this, Mythos, ['Mythos', 'mythos', 'polkadot', Version.V4]);
|
|
8803
8801
|
}
|
|
8804
8802
|
_inherits(Mythos, _ParachainNode);
|
|
8805
8803
|
return _createClass(Mythos, [{
|
|
@@ -8856,7 +8854,7 @@ var Mythos = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8856
8854
|
var NeuroWeb = /*#__PURE__*/function (_ParachainNode) {
|
|
8857
8855
|
function NeuroWeb() {
|
|
8858
8856
|
_classCallCheck(this, NeuroWeb);
|
|
8859
|
-
return _callSuper(this, NeuroWeb, ['NeuroWeb', 'neuroweb', 'polkadot', Version.
|
|
8857
|
+
return _callSuper(this, NeuroWeb, ['NeuroWeb', 'neuroweb', 'polkadot', Version.V4]);
|
|
8860
8858
|
}
|
|
8861
8859
|
_inherits(NeuroWeb, _ParachainNode);
|
|
8862
8860
|
return _createClass(NeuroWeb, [{
|
|
@@ -8870,7 +8868,7 @@ var NeuroWeb = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8870
8868
|
var Nodle = /*#__PURE__*/function (_ParachainNode) {
|
|
8871
8869
|
function Nodle() {
|
|
8872
8870
|
_classCallCheck(this, Nodle);
|
|
8873
|
-
return _callSuper(this, Nodle, ['Nodle', 'nodle', 'polkadot', Version.
|
|
8871
|
+
return _callSuper(this, Nodle, ['Nodle', 'nodle', 'polkadot', Version.V4]);
|
|
8874
8872
|
}
|
|
8875
8873
|
_inherits(Nodle, _ParachainNode);
|
|
8876
8874
|
return _createClass(Nodle, [{
|
|
@@ -8897,7 +8895,7 @@ var Nodle = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8897
8895
|
var Peaq = /*#__PURE__*/function (_ParachainNode) {
|
|
8898
8896
|
function Peaq() {
|
|
8899
8897
|
_classCallCheck(this, Peaq);
|
|
8900
|
-
return _callSuper(this, Peaq, ['Peaq', 'peaq', 'polkadot', Version.
|
|
8898
|
+
return _callSuper(this, Peaq, ['Peaq', 'peaq', 'polkadot', Version.V4]);
|
|
8901
8899
|
}
|
|
8902
8900
|
_inherits(Peaq, _ParachainNode);
|
|
8903
8901
|
return _createClass(Peaq, [{
|
|
@@ -8981,7 +8979,7 @@ var Pendulum = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8981
8979
|
var PeopleKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
8982
8980
|
function PeopleKusama() {
|
|
8983
8981
|
_classCallCheck(this, PeopleKusama);
|
|
8984
|
-
return _callSuper(this, PeopleKusama, ['PeopleKusama', 'kusamaPeople', 'kusama', Version.
|
|
8982
|
+
return _callSuper(this, PeopleKusama, ['PeopleKusama', 'kusamaPeople', 'kusama', Version.V4]);
|
|
8985
8983
|
}
|
|
8986
8984
|
_inherits(PeopleKusama, _ParachainNode);
|
|
8987
8985
|
return _createClass(PeopleKusama, [{
|
|
@@ -9008,7 +9006,7 @@ var PeopleKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9008
9006
|
var PeoplePolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
9009
9007
|
function PeoplePolkadot() {
|
|
9010
9008
|
_classCallCheck(this, PeoplePolkadot);
|
|
9011
|
-
return _callSuper(this, PeoplePolkadot, ['PeoplePolkadot', 'polkadotPeople', 'polkadot', Version.
|
|
9009
|
+
return _callSuper(this, PeoplePolkadot, ['PeoplePolkadot', 'polkadotPeople', 'polkadot', Version.V4]);
|
|
9012
9010
|
}
|
|
9013
9011
|
_inherits(PeoplePolkadot, _ParachainNode);
|
|
9014
9012
|
return _createClass(PeoplePolkadot, [{
|
|
@@ -9161,7 +9159,7 @@ var Phala = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9161
9159
|
var Quartz = /*#__PURE__*/function (_ParachainNode) {
|
|
9162
9160
|
function Quartz() {
|
|
9163
9161
|
_classCallCheck(this, Quartz);
|
|
9164
|
-
return _callSuper(this, Quartz, ['Quartz', 'quartz', 'kusama', Version.
|
|
9162
|
+
return _callSuper(this, Quartz, ['Quartz', 'quartz', 'kusama', Version.V4]);
|
|
9165
9163
|
}
|
|
9166
9164
|
_inherits(Quartz, _ParachainNode);
|
|
9167
9165
|
return _createClass(Quartz, [{
|
|
@@ -9240,7 +9238,7 @@ var RobonomicsPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9240
9238
|
var Shiden = /*#__PURE__*/function (_ParachainNode) {
|
|
9241
9239
|
function Shiden() {
|
|
9242
9240
|
_classCallCheck(this, Shiden);
|
|
9243
|
-
return _callSuper(this, Shiden, ['Shiden', 'shiden', 'kusama', Version.
|
|
9241
|
+
return _callSuper(this, Shiden, ['Shiden', 'shiden', 'kusama', Version.V4]);
|
|
9244
9242
|
}
|
|
9245
9243
|
_inherits(Shiden, _ParachainNode);
|
|
9246
9244
|
return _createClass(Shiden, [{
|
|
@@ -9294,7 +9292,7 @@ var Subsocial = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9294
9292
|
var Unique = /*#__PURE__*/function (_ParachainNode) {
|
|
9295
9293
|
function Unique() {
|
|
9296
9294
|
_classCallCheck(this, Unique);
|
|
9297
|
-
return _callSuper(this, Unique, ['Unique', 'unique', 'polkadot', Version.
|
|
9295
|
+
return _callSuper(this, Unique, ['Unique', 'unique', 'polkadot', Version.V4]);
|
|
9298
9296
|
}
|
|
9299
9297
|
_inherits(Unique, _ParachainNode);
|
|
9300
9298
|
return _createClass(Unique, [{
|
|
@@ -9448,7 +9446,7 @@ var buildClaimAssetsInput = function buildClaimAssetsInput(_ref) {
|
|
|
9448
9446
|
multiAssets = _ref.multiAssets,
|
|
9449
9447
|
address = _ref.address,
|
|
9450
9448
|
_ref$version = _ref.version,
|
|
9451
|
-
version = _ref$version === void 0 ? Version.
|
|
9449
|
+
version = _ref$version === void 0 ? Version.V4 : _ref$version;
|
|
9452
9450
|
return {
|
|
9453
9451
|
assets: _defineProperty({}, version, multiAssets),
|
|
9454
9452
|
beneficiary: _defineProperty({}, version, buildBeneficiaryInput(api, address))
|
|
@@ -10283,4 +10281,4 @@ var Builder = function Builder(api) {
|
|
|
10283
10281
|
return new GeneralBuilder(api, new BatchTransactionManager());
|
|
10284
10282
|
};
|
|
10285
10283
|
|
|
10286
|
-
export { AssetClaimBuilder, BatchMode, BridgeHaltedError, Builder, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, GeneralBuilder, IncompatibleNodesError, InvalidAddressError, InvalidParameterError, NoXCMSupportImplementedError, NodeNotSupportedError, PolkadotXcmError, ScenarioNotSupportedError, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, UnableToComputeError,
|
|
10284
|
+
export { AssetClaimBuilder, BatchMode, BridgeHaltedError, Builder, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, GeneralBuilder, IncompatibleNodesError, InvalidAddressError, InvalidParameterError, NoXCMSupportImplementedError, NodeNotSupportedError, PolkadotXcmError, ScenarioNotSupportedError, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, UnableToComputeError, XTokensError, blake2b256, blake2b512, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, convertSs58, createApiInstanceForNode, createBeneficiary, createBeneficiaryMultiLocation, createVersionedBeneficiary, createX1Payload, deriveAccountId, determineRelayChain, dryRun, dryRunOrigin, encodeSs58, getAssetBalance, getAssetBalanceInternal, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getBridgeStatus, getFees, getNode, getNodeConfig, getNodeProviders, getOriginFeeDetails, getOriginFeeDetailsInternal, getOriginXcmFee, getOriginXcmFeeEstimate, getParaEthTransferFees, getParaId, getTNode, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeEstimate, replaceBigInt, resolveModuleError, resolveParaId, reverseTransformMultiLocation, send, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, transformMultiLocation, validateAddress, verifyEdOnDestination };
|