@paraspell/sdk-pjs 10.0.2 → 10.1.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 +15 -9
- package/dist/index.mjs +15 -9
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -861,6 +861,11 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
861
861
|
}
|
|
862
862
|
return getBalanceAssetsPallet;
|
|
863
863
|
}()
|
|
864
|
+
}, {
|
|
865
|
+
key: "getMethod",
|
|
866
|
+
value: function getMethod(tx) {
|
|
867
|
+
return tx.method.toString();
|
|
868
|
+
}
|
|
864
869
|
}, {
|
|
865
870
|
key: "getFromRpc",
|
|
866
871
|
value: function () {
|
|
@@ -931,7 +936,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
931
936
|
value: function () {
|
|
932
937
|
var _getDryRunCall = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14(_ref4) {
|
|
933
938
|
var _this$api$call$dryRun;
|
|
934
|
-
var tx, address, node, supportsDryRunApi, needsVersionParam, DEFAULT_XCM_VERSION, response, result, resultJson, isSuccess, moduleError, failureReason, executionFee, fee, actualWeight, weight, forwardedXcms, destParaId;
|
|
939
|
+
var tx, address, node, supportsDryRunApi, nodesRequiringVersionParam, needsVersionParam, DEFAULT_XCM_VERSION, response, result, resultJson, isSuccess, moduleError, failureReason, executionFee, fee, actualWeight, weight, forwardedXcms, destParaId;
|
|
935
940
|
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
936
941
|
while (1) switch (_context14.prev = _context14.next) {
|
|
937
942
|
case 0:
|
|
@@ -943,21 +948,22 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
943
948
|
}
|
|
944
949
|
throw new sdkCore.NodeNotSupportedError("DryRunApi is not available on node ".concat(node));
|
|
945
950
|
case 4:
|
|
946
|
-
|
|
951
|
+
nodesRequiringVersionParam = ['BifrostPolkadot', 'BifrostKusama', 'AssetHubKusama', 'AssetHubPolkadot', 'Kusama', 'Polkadot', 'Polimec', 'Astar'];
|
|
952
|
+
needsVersionParam = nodesRequiringVersionParam.includes(node);
|
|
947
953
|
DEFAULT_XCM_VERSION = 3;
|
|
948
|
-
_context14.next =
|
|
954
|
+
_context14.next = 9;
|
|
949
955
|
return (_this$api$call$dryRun = this.api.call.dryRunApi).dryRunCall.apply(_this$api$call$dryRun, [{
|
|
950
956
|
system: {
|
|
951
957
|
Signed: address
|
|
952
958
|
}
|
|
953
959
|
}, tx].concat(_toConsumableArray(needsVersionParam ? [DEFAULT_XCM_VERSION] : [])));
|
|
954
|
-
case
|
|
960
|
+
case 9:
|
|
955
961
|
response = _context14.sent;
|
|
956
962
|
result = response.toHuman();
|
|
957
963
|
resultJson = response.toJSON();
|
|
958
964
|
isSuccess = result.Ok && result.Ok.executionResult.Ok;
|
|
959
965
|
if (isSuccess) {
|
|
960
|
-
_context14.next =
|
|
966
|
+
_context14.next = 17;
|
|
961
967
|
break;
|
|
962
968
|
}
|
|
963
969
|
moduleError = result.Ok.executionResult.Err.error.Module;
|
|
@@ -966,10 +972,10 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
966
972
|
success: false,
|
|
967
973
|
failureReason: failureReason
|
|
968
974
|
});
|
|
969
|
-
case
|
|
970
|
-
_context14.next =
|
|
975
|
+
case 17:
|
|
976
|
+
_context14.next = 19;
|
|
971
977
|
return this.calculateTransactionFee(tx, address);
|
|
972
|
-
case
|
|
978
|
+
case 19:
|
|
973
979
|
executionFee = _context14.sent;
|
|
974
980
|
fee = sdkCore.computeFeeFromDryRunPjs(result, node, executionFee);
|
|
975
981
|
actualWeight = resultJson.ok.executionResult.ok.actualWeight;
|
|
@@ -988,7 +994,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
988
994
|
forwardedXcms: forwardedXcms,
|
|
989
995
|
destParaId: destParaId
|
|
990
996
|
});
|
|
991
|
-
case
|
|
997
|
+
case 26:
|
|
992
998
|
case "end":
|
|
993
999
|
return _context14.stop();
|
|
994
1000
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -860,6 +860,11 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
860
860
|
}
|
|
861
861
|
return getBalanceAssetsPallet;
|
|
862
862
|
}()
|
|
863
|
+
}, {
|
|
864
|
+
key: "getMethod",
|
|
865
|
+
value: function getMethod(tx) {
|
|
866
|
+
return tx.method.toString();
|
|
867
|
+
}
|
|
863
868
|
}, {
|
|
864
869
|
key: "getFromRpc",
|
|
865
870
|
value: function () {
|
|
@@ -930,7 +935,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
930
935
|
value: function () {
|
|
931
936
|
var _getDryRunCall = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14(_ref4) {
|
|
932
937
|
var _this$api$call$dryRun;
|
|
933
|
-
var tx, address, node, supportsDryRunApi, needsVersionParam, DEFAULT_XCM_VERSION, response, result, resultJson, isSuccess, moduleError, failureReason, executionFee, fee, actualWeight, weight, forwardedXcms, destParaId;
|
|
938
|
+
var tx, address, node, supportsDryRunApi, nodesRequiringVersionParam, needsVersionParam, DEFAULT_XCM_VERSION, response, result, resultJson, isSuccess, moduleError, failureReason, executionFee, fee, actualWeight, weight, forwardedXcms, destParaId;
|
|
934
939
|
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
935
940
|
while (1) switch (_context14.prev = _context14.next) {
|
|
936
941
|
case 0:
|
|
@@ -942,21 +947,22 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
942
947
|
}
|
|
943
948
|
throw new NodeNotSupportedError("DryRunApi is not available on node ".concat(node));
|
|
944
949
|
case 4:
|
|
945
|
-
|
|
950
|
+
nodesRequiringVersionParam = ['BifrostPolkadot', 'BifrostKusama', 'AssetHubKusama', 'AssetHubPolkadot', 'Kusama', 'Polkadot', 'Polimec', 'Astar'];
|
|
951
|
+
needsVersionParam = nodesRequiringVersionParam.includes(node);
|
|
946
952
|
DEFAULT_XCM_VERSION = 3;
|
|
947
|
-
_context14.next =
|
|
953
|
+
_context14.next = 9;
|
|
948
954
|
return (_this$api$call$dryRun = this.api.call.dryRunApi).dryRunCall.apply(_this$api$call$dryRun, [{
|
|
949
955
|
system: {
|
|
950
956
|
Signed: address
|
|
951
957
|
}
|
|
952
958
|
}, tx].concat(_toConsumableArray(needsVersionParam ? [DEFAULT_XCM_VERSION] : [])));
|
|
953
|
-
case
|
|
959
|
+
case 9:
|
|
954
960
|
response = _context14.sent;
|
|
955
961
|
result = response.toHuman();
|
|
956
962
|
resultJson = response.toJSON();
|
|
957
963
|
isSuccess = result.Ok && result.Ok.executionResult.Ok;
|
|
958
964
|
if (isSuccess) {
|
|
959
|
-
_context14.next =
|
|
965
|
+
_context14.next = 17;
|
|
960
966
|
break;
|
|
961
967
|
}
|
|
962
968
|
moduleError = result.Ok.executionResult.Err.error.Module;
|
|
@@ -965,10 +971,10 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
965
971
|
success: false,
|
|
966
972
|
failureReason: failureReason
|
|
967
973
|
});
|
|
968
|
-
case
|
|
969
|
-
_context14.next =
|
|
974
|
+
case 17:
|
|
975
|
+
_context14.next = 19;
|
|
970
976
|
return this.calculateTransactionFee(tx, address);
|
|
971
|
-
case
|
|
977
|
+
case 19:
|
|
972
978
|
executionFee = _context14.sent;
|
|
973
979
|
fee = computeFeeFromDryRunPjs(result, node, executionFee);
|
|
974
980
|
actualWeight = resultJson.ok.executionResult.ok.actualWeight;
|
|
@@ -987,7 +993,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
987
993
|
forwardedXcms: forwardedXcms,
|
|
988
994
|
destParaId: destParaId
|
|
989
995
|
});
|
|
990
|
-
case
|
|
996
|
+
case 26:
|
|
991
997
|
case "end":
|
|
992
998
|
return _context14.stop();
|
|
993
999
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk-pjs",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.1.1",
|
|
4
4
|
"description": "Polkadot.js based SDK for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@snowbridge/contract-types": "0.1.50",
|
|
28
28
|
"ethers": "^6.13.7",
|
|
29
29
|
"viem": "^2.28.1",
|
|
30
|
-
"@paraspell/sdk-core": "10.
|
|
30
|
+
"@paraspell/sdk-core": "10.1.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@polkadot/api": ">= 15.0 < 16",
|