@paraspell/sdk 11.4.0 → 11.4.2
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 +7 -10
- package/dist/index.mjs +8 -11
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1374,13 +1374,12 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1374
1374
|
key: "getDryRunCall",
|
|
1375
1375
|
value: function () {
|
|
1376
1376
|
var _getDryRunCall = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee20(options) {
|
|
1377
|
-
var _this = this
|
|
1378
|
-
|
|
1379
|
-
var tx, chain, address, asset, feeAsset, bypassOptions, _options$useRootOrigi, useRootOrigin, supportsDryRunApi, DEFAULT_XCM_VERSION, basePayload, resolvedTx, performDryRunCall, getExecutionSuccessFromResult, extractFailureReasonFromResult, result, isSuccess, failureOutputReason, initialFailureReason, usedSymbol, usedAsset, actualWeight, weight, forwardedXcms, destParaId, executionFee, nativeAsset, hasLocation, xcmFee, fee, _t4;
|
|
1377
|
+
var _this = this;
|
|
1378
|
+
var tx, chain, address, feeAsset, bypassOptions, _options$useRootOrigi, useRootOrigin, supportsDryRunApi, DEFAULT_XCM_VERSION, basePayload, resolvedTx, performDryRunCall, getExecutionSuccessFromResult, extractFailureReasonFromResult, result, isSuccess, failureOutputReason, initialFailureReason, usedAsset, usedSymbol, actualWeight, weight, forwardedXcms, destParaId, executionFee, nativeAsset, hasLocation, xcmFee, fee, _t4;
|
|
1380
1379
|
return _regenerator().w(function (_context20) {
|
|
1381
1380
|
while (1) switch (_context20.n) {
|
|
1382
1381
|
case 0:
|
|
1383
|
-
tx = options.tx, chain = options.chain, address = options.address,
|
|
1382
|
+
tx = options.tx, chain = options.chain, address = options.address, feeAsset = options.feeAsset, bypassOptions = options.bypassOptions, _options$useRootOrigi = options.useRootOrigin, useRootOrigin = _options$useRootOrigi === void 0 ? false : _options$useRootOrigi;
|
|
1384
1383
|
supportsDryRunApi = sdkCore.getAssetsObject(chain).supportsDryRunApi;
|
|
1385
1384
|
if (supportsDryRunApi) {
|
|
1386
1385
|
_context20.n = 1;
|
|
@@ -1483,8 +1482,8 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1483
1482
|
failureOutputReason = '';
|
|
1484
1483
|
}
|
|
1485
1484
|
case 7:
|
|
1486
|
-
|
|
1487
|
-
|
|
1485
|
+
usedAsset = feeAsset !== null && feeAsset !== void 0 ? feeAsset : sdkCore.findNativeAssetInfoOrThrow(chain);
|
|
1486
|
+
usedSymbol = usedAsset.symbol;
|
|
1488
1487
|
if (isSuccess) {
|
|
1489
1488
|
_context20.n = 8;
|
|
1490
1489
|
break;
|
|
@@ -1507,11 +1506,9 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1507
1506
|
return this.calculateTransactionFee(resolvedTx, address);
|
|
1508
1507
|
case 9:
|
|
1509
1508
|
executionFee = _context20.v;
|
|
1510
|
-
nativeAsset = sdkCore.
|
|
1511
|
-
symbol: sdkCore.Native(sdkCore.getNativeAssetSymbol(chain))
|
|
1512
|
-
}, null);
|
|
1509
|
+
nativeAsset = sdkCore.findNativeAssetInfoOrThrow(chain);
|
|
1513
1510
|
hasLocation = feeAsset ? Boolean(feeAsset.location) : Boolean(nativeAsset === null || nativeAsset === void 0 ? void 0 : nativeAsset.location);
|
|
1514
|
-
if (!(sdkCore.hasXcmPaymentApiSupport(chain) && result.value.local_xcm && hasLocation &&
|
|
1511
|
+
if (!(sdkCore.hasXcmPaymentApiSupport(chain) && result.value.local_xcm && hasLocation && chain !== 'AssetHubPolkadot' && chain !== 'Kusama')) {
|
|
1515
1512
|
_context20.n = 11;
|
|
1516
1513
|
break;
|
|
1517
1514
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InvalidParameterError, isConfig, BatchMode, getChainProviders, MissingChainApiError, ChainNotSupportedError, createChainClient as createChainClient$1, Parents, Version, getChain, isForeignAsset, assertHasId, computeFeeFromDryRun,
|
|
1
|
+
import { InvalidParameterError, isConfig, BatchMode, getChainProviders, MissingChainApiError, ChainNotSupportedError, createChainClient as createChainClient$1, Parents, Version, getChain, isForeignAsset, assertHasId, computeFeeFromDryRun, findNativeAssetInfoOrThrow, hasXcmPaymentApiSupport, replaceBigInt, getAssetsObject, wrapTxBypass, assertHasLocation, localizeLocation, isRelayChain, padFeeBy, isAssetEqual, getBalanceNative as getBalanceNative$1, getBalanceForeign as getBalanceForeign$1, getAssetBalance as getAssetBalance$1, claimAssets as claimAssets$1, getOriginFeeDetails as getOriginFeeDetails$1, Foreign, ForeignAbstract, Native, Override, findAssetInfo, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTChain, hasSupportForAsset, isChainEvm, convertSs58 as convertSs58$1, transferMoonbeamEvm, validateAddress, transferMoonbeamToEth, Builder as Builder$1, getParaEthTransferFees as getParaEthTransferFees$1, getBridgeStatus as getBridgeStatus$1, getXcmFee as getXcmFee$1, send as send$1, dryRun as dryRun$1, dryRunOrigin as dryRunOrigin$1, getOriginXcmFee as getOriginXcmFee$1, handleSwapExecuteTransfer as handleSwapExecuteTransfer$1 } from '@paraspell/sdk-core';
|
|
2
2
|
export * from '@paraspell/sdk-core';
|
|
3
3
|
import { blake2b } from '@noble/hashes/blake2';
|
|
4
4
|
import { bytesToHex } from '@noble/hashes/utils';
|
|
@@ -1373,13 +1373,12 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1373
1373
|
key: "getDryRunCall",
|
|
1374
1374
|
value: function () {
|
|
1375
1375
|
var _getDryRunCall = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee20(options) {
|
|
1376
|
-
var _this = this
|
|
1377
|
-
|
|
1378
|
-
var tx, chain, address, asset, feeAsset, bypassOptions, _options$useRootOrigi, useRootOrigin, supportsDryRunApi, DEFAULT_XCM_VERSION, basePayload, resolvedTx, performDryRunCall, getExecutionSuccessFromResult, extractFailureReasonFromResult, result, isSuccess, failureOutputReason, initialFailureReason, usedSymbol, usedAsset, actualWeight, weight, forwardedXcms, destParaId, executionFee, nativeAsset, hasLocation, xcmFee, fee, _t4;
|
|
1376
|
+
var _this = this;
|
|
1377
|
+
var tx, chain, address, feeAsset, bypassOptions, _options$useRootOrigi, useRootOrigin, supportsDryRunApi, DEFAULT_XCM_VERSION, basePayload, resolvedTx, performDryRunCall, getExecutionSuccessFromResult, extractFailureReasonFromResult, result, isSuccess, failureOutputReason, initialFailureReason, usedAsset, usedSymbol, actualWeight, weight, forwardedXcms, destParaId, executionFee, nativeAsset, hasLocation, xcmFee, fee, _t4;
|
|
1379
1378
|
return _regenerator().w(function (_context20) {
|
|
1380
1379
|
while (1) switch (_context20.n) {
|
|
1381
1380
|
case 0:
|
|
1382
|
-
tx = options.tx, chain = options.chain, address = options.address,
|
|
1381
|
+
tx = options.tx, chain = options.chain, address = options.address, feeAsset = options.feeAsset, bypassOptions = options.bypassOptions, _options$useRootOrigi = options.useRootOrigin, useRootOrigin = _options$useRootOrigi === void 0 ? false : _options$useRootOrigi;
|
|
1383
1382
|
supportsDryRunApi = getAssetsObject(chain).supportsDryRunApi;
|
|
1384
1383
|
if (supportsDryRunApi) {
|
|
1385
1384
|
_context20.n = 1;
|
|
@@ -1482,8 +1481,8 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1482
1481
|
failureOutputReason = '';
|
|
1483
1482
|
}
|
|
1484
1483
|
case 7:
|
|
1485
|
-
|
|
1486
|
-
|
|
1484
|
+
usedAsset = feeAsset !== null && feeAsset !== void 0 ? feeAsset : findNativeAssetInfoOrThrow(chain);
|
|
1485
|
+
usedSymbol = usedAsset.symbol;
|
|
1487
1486
|
if (isSuccess) {
|
|
1488
1487
|
_context20.n = 8;
|
|
1489
1488
|
break;
|
|
@@ -1506,11 +1505,9 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1506
1505
|
return this.calculateTransactionFee(resolvedTx, address);
|
|
1507
1506
|
case 9:
|
|
1508
1507
|
executionFee = _context20.v;
|
|
1509
|
-
nativeAsset =
|
|
1510
|
-
symbol: Native(getNativeAssetSymbol(chain))
|
|
1511
|
-
}, null);
|
|
1508
|
+
nativeAsset = findNativeAssetInfoOrThrow(chain);
|
|
1512
1509
|
hasLocation = feeAsset ? Boolean(feeAsset.location) : Boolean(nativeAsset === null || nativeAsset === void 0 ? void 0 : nativeAsset.location);
|
|
1513
|
-
if (!(hasXcmPaymentApiSupport(chain) && result.value.local_xcm && hasLocation &&
|
|
1510
|
+
if (!(hasXcmPaymentApiSupport(chain) && result.value.local_xcm && hasLocation && chain !== 'AssetHubPolkadot' && chain !== 'Kusama')) {
|
|
1514
1511
|
_context20.n = 11;
|
|
1515
1512
|
break;
|
|
1516
1513
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk",
|
|
3
|
-
"version": "11.4.
|
|
3
|
+
"version": "11.4.2",
|
|
4
4
|
"description": "SDK for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@noble/hashes": "^1.8.0",
|
|
27
27
|
"viem": "^2.36.0",
|
|
28
|
-
"@paraspell/sdk-core": "11.4.
|
|
28
|
+
"@paraspell/sdk-core": "11.4.2"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"polkadot-api": ">= 1.16.3 < 2"
|