@paraspell/sdk 10.8.1 → 10.8.3
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 +9 -6
- package/dist/index.mjs +10 -7
- package/package.json +13 -13
package/dist/index.cjs
CHANGED
|
@@ -200,7 +200,7 @@ function _regenerator() {
|
|
|
200
200
|
i = p[t],
|
|
201
201
|
d = G.p,
|
|
202
202
|
l = i[2];
|
|
203
|
-
r > 3 ? (o = l === n) && (
|
|
203
|
+
r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
|
|
204
204
|
}
|
|
205
205
|
if (o || r > 1) return a;
|
|
206
206
|
throw y = true, n;
|
|
@@ -1238,11 +1238,11 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1238
1238
|
value: function () {
|
|
1239
1239
|
var _getDryRunCall = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee18(_ref6) {
|
|
1240
1240
|
var _this = this;
|
|
1241
|
-
var tx, address, node,
|
|
1241
|
+
var tx, address, node, feeAsset, supportsDryRunApi, DEFAULT_XCM_VERSION, basePayload, performDryRunCall, getExecutionSuccessFromResult, extractFailureReasonFromResult, result, isSuccess, failureOutputReason, initialFailureReason, actualWeight, weight, forwardedXcms, destParaId, executionFee, nativeAsset, hasMultiLocation, xcmFee, fee;
|
|
1242
1242
|
return _regenerator().w(function (_context18) {
|
|
1243
1243
|
while (1) switch (_context18.n) {
|
|
1244
1244
|
case 0:
|
|
1245
|
-
tx = _ref6.tx, address = _ref6.address, node = _ref6.node,
|
|
1245
|
+
tx = _ref6.tx, address = _ref6.address, node = _ref6.node, feeAsset = _ref6.feeAsset;
|
|
1246
1246
|
supportsDryRunApi = sdkCore.getAssetsObject(node).supportsDryRunApi;
|
|
1247
1247
|
if (supportsDryRunApi) {
|
|
1248
1248
|
_context18.n = 1;
|
|
@@ -1342,13 +1342,16 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1342
1342
|
return this.calculateTransactionFee(tx, address);
|
|
1343
1343
|
case 6:
|
|
1344
1344
|
executionFee = _context18.v;
|
|
1345
|
-
|
|
1346
|
-
|
|
1345
|
+
nativeAsset = sdkCore.findAsset(node, {
|
|
1346
|
+
symbol: sdkCore.Native(sdkCore.getNativeAssetSymbol(node))
|
|
1347
|
+
}, null);
|
|
1348
|
+
hasMultiLocation = feeAsset ? Boolean(feeAsset.multiLocation) : Boolean(nativeAsset === null || nativeAsset === void 0 ? void 0 : nativeAsset.multiLocation);
|
|
1349
|
+
if (!(sdkCore.hasXcmPaymentApiSupport(node) && result.value.local_xcm && hasMultiLocation && nativeAsset && node !== 'AssetHubPolkadot')) {
|
|
1347
1350
|
_context18.n = 8;
|
|
1348
1351
|
break;
|
|
1349
1352
|
}
|
|
1350
1353
|
_context18.n = 7;
|
|
1351
|
-
return this.getXcmPaymentApiFee(node, result.value.local_xcm, feeAsset !== null && feeAsset !== void 0 ? feeAsset :
|
|
1354
|
+
return this.getXcmPaymentApiFee(node, result.value.local_xcm, feeAsset !== null && feeAsset !== void 0 ? feeAsset : nativeAsset);
|
|
1352
1355
|
case 7:
|
|
1353
1356
|
xcmFee = _context18.v;
|
|
1354
1357
|
if (!(typeof xcmFee === 'bigint')) {
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InvalidParameterError, BatchMode, getNodeProviders, createApiInstanceForNode as createApiInstanceForNode$1, NodeNotSupportedError, Parents, Version, getNode, isForeignAsset, computeFeeFromDryRun, hasXcmPaymentApiSupport, getAssetsObject, localizeLocation, isRelayChain, InvalidCurrencyError, isAssetEqual, getBalanceNative as getBalanceNative$1, getBalanceForeign as getBalanceForeign$1, getAssetBalance as getAssetBalance$1, claimAssets as claimAssets$1, getOriginFeeDetails as getOriginFeeDetails$1, Foreign, ForeignAbstract,
|
|
1
|
+
import { InvalidParameterError, BatchMode, getNodeProviders, createApiInstanceForNode as createApiInstanceForNode$1, NodeNotSupportedError, Parents, Version, getNode, isForeignAsset, computeFeeFromDryRun, findAsset, Native, getNativeAssetSymbol, hasXcmPaymentApiSupport, getAssetsObject, localizeLocation, isRelayChain, InvalidCurrencyError, isAssetEqual, getBalanceNative as getBalanceNative$1, getBalanceForeign as getBalanceForeign$1, getAssetBalance as getAssetBalance$1, claimAssets as claimAssets$1, getOriginFeeDetails as getOriginFeeDetails$1, Foreign, ForeignAbstract, Override, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getExistentialDeposit, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTNode, hasSupportForAsset, isNodeEvm, convertSs58 as convertSs58$1, transferMoonbeamEvm, validateAddress, transferMoonbeamToEth, Builder as Builder$1, getParaEthTransferFees as getParaEthTransferFees$1, getBridgeStatus as getBridgeStatus$1, send as send$1, dryRun as dryRun$1, dryRunOrigin as dryRunOrigin$1, getOriginXcmFee as getOriginXcmFee$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';
|
|
@@ -199,7 +199,7 @@ function _regenerator() {
|
|
|
199
199
|
i = p[t],
|
|
200
200
|
d = G.p,
|
|
201
201
|
l = i[2];
|
|
202
|
-
r > 3 ? (o = l === n) && (
|
|
202
|
+
r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
|
|
203
203
|
}
|
|
204
204
|
if (o || r > 1) return a;
|
|
205
205
|
throw y = true, n;
|
|
@@ -1237,11 +1237,11 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1237
1237
|
value: function () {
|
|
1238
1238
|
var _getDryRunCall = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee18(_ref6) {
|
|
1239
1239
|
var _this = this;
|
|
1240
|
-
var tx, address, node,
|
|
1240
|
+
var tx, address, node, feeAsset, supportsDryRunApi, DEFAULT_XCM_VERSION, basePayload, performDryRunCall, getExecutionSuccessFromResult, extractFailureReasonFromResult, result, isSuccess, failureOutputReason, initialFailureReason, actualWeight, weight, forwardedXcms, destParaId, executionFee, nativeAsset, hasMultiLocation, xcmFee, fee;
|
|
1241
1241
|
return _regenerator().w(function (_context18) {
|
|
1242
1242
|
while (1) switch (_context18.n) {
|
|
1243
1243
|
case 0:
|
|
1244
|
-
tx = _ref6.tx, address = _ref6.address, node = _ref6.node,
|
|
1244
|
+
tx = _ref6.tx, address = _ref6.address, node = _ref6.node, feeAsset = _ref6.feeAsset;
|
|
1245
1245
|
supportsDryRunApi = getAssetsObject(node).supportsDryRunApi;
|
|
1246
1246
|
if (supportsDryRunApi) {
|
|
1247
1247
|
_context18.n = 1;
|
|
@@ -1341,13 +1341,16 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1341
1341
|
return this.calculateTransactionFee(tx, address);
|
|
1342
1342
|
case 6:
|
|
1343
1343
|
executionFee = _context18.v;
|
|
1344
|
-
|
|
1345
|
-
|
|
1344
|
+
nativeAsset = findAsset(node, {
|
|
1345
|
+
symbol: Native(getNativeAssetSymbol(node))
|
|
1346
|
+
}, null);
|
|
1347
|
+
hasMultiLocation = feeAsset ? Boolean(feeAsset.multiLocation) : Boolean(nativeAsset === null || nativeAsset === void 0 ? void 0 : nativeAsset.multiLocation);
|
|
1348
|
+
if (!(hasXcmPaymentApiSupport(node) && result.value.local_xcm && hasMultiLocation && nativeAsset && node !== 'AssetHubPolkadot')) {
|
|
1346
1349
|
_context18.n = 8;
|
|
1347
1350
|
break;
|
|
1348
1351
|
}
|
|
1349
1352
|
_context18.n = 7;
|
|
1350
|
-
return this.getXcmPaymentApiFee(node, result.value.local_xcm, feeAsset !== null && feeAsset !== void 0 ? feeAsset :
|
|
1353
|
+
return this.getXcmPaymentApiFee(node, result.value.local_xcm, feeAsset !== null && feeAsset !== void 0 ? feeAsset : nativeAsset);
|
|
1351
1354
|
case 7:
|
|
1352
1355
|
xcmFee = _context18.v;
|
|
1353
1356
|
if (!(typeof xcmFee === 'bigint')) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk",
|
|
3
|
-
"version": "10.8.
|
|
3
|
+
"version": "10.8.3",
|
|
4
4
|
"description": "SDK for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,29 +24,29 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@noble/hashes": "^1.8.0",
|
|
27
|
-
"viem": "^2.
|
|
28
|
-
"@paraspell/sdk-core": "10.8.
|
|
27
|
+
"viem": "^2.31.6",
|
|
28
|
+
"@paraspell/sdk-core": "10.8.3"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"polkadot-api": ">= 1.
|
|
31
|
+
"polkadot-api": ">= 1.14.1 < 2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/plugin-syntax-import-attributes": "^7.27.1",
|
|
35
35
|
"@babel/preset-env": "^7.27.2",
|
|
36
36
|
"@codecov/rollup-plugin": "^1.9.1",
|
|
37
|
-
"@noble/curves": "^1.9.
|
|
38
|
-
"@polkadot-labs/hdkd": "^0.0.
|
|
39
|
-
"@polkadot-labs/hdkd-helpers": "^0.0.
|
|
37
|
+
"@noble/curves": "^1.9.2",
|
|
38
|
+
"@polkadot-labs/hdkd": "^0.0.19",
|
|
39
|
+
"@polkadot-labs/hdkd-helpers": "^0.0.19",
|
|
40
40
|
"@rollup/plugin-babel": "^6.0.4",
|
|
41
41
|
"@rollup/plugin-json": "^6.1.0",
|
|
42
|
-
"@rollup/plugin-typescript": "^12.1.
|
|
42
|
+
"@rollup/plugin-typescript": "^12.1.4",
|
|
43
43
|
"@scure/bip32": "^1.7.0",
|
|
44
44
|
"@scure/bip39": "^1.6.0",
|
|
45
|
-
"@vitest/coverage-v8": "^3.
|
|
46
|
-
"axios": "^1.
|
|
47
|
-
"dotenv": "^
|
|
48
|
-
"prettier": "^3.
|
|
49
|
-
"rollup": "^4.
|
|
45
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
46
|
+
"axios": "^1.10.0",
|
|
47
|
+
"dotenv": "^17.0.0",
|
|
48
|
+
"prettier": "^3.6.2",
|
|
49
|
+
"rollup": "^4.44.1",
|
|
50
50
|
"rollup-plugin-dts": "^6.2.1",
|
|
51
51
|
"tslib": "^2.8.1"
|
|
52
52
|
},
|