@paraspell/sdk-pjs 10.11.6 → 10.11.7
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 +67 -40
- package/dist/index.mjs +68 -41
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -829,23 +829,50 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
829
829
|
return getDryRunCall;
|
|
830
830
|
}()
|
|
831
831
|
}, {
|
|
832
|
-
key: "
|
|
832
|
+
key: "getXcmPaymentApiFee",
|
|
833
833
|
value: function () {
|
|
834
|
-
var
|
|
835
|
-
var
|
|
834
|
+
var _getXcmPaymentApiFee = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee16(node, xcm, asset) {
|
|
835
|
+
var weight, localizedLocation, feeResult;
|
|
836
836
|
return _regenerator().w(function (_context16) {
|
|
837
837
|
while (1) switch (_context16.n) {
|
|
838
838
|
case 0:
|
|
839
839
|
_context16.n = 1;
|
|
840
840
|
return this.api.call.xcmPaymentApi.queryXcmWeight(xcm);
|
|
841
841
|
case 1:
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
842
|
+
weight = _context16.v;
|
|
843
|
+
sdkCore.assertHasLocation(asset);
|
|
844
|
+
localizedLocation = node === 'AssetHubPolkadot' || node === 'AssetHubKusama' || sdkCore.isRelayChain(node) ? sdkCore.localizeLocation(node, asset.multiLocation) : asset.multiLocation;
|
|
845
|
+
_context16.n = 2;
|
|
846
|
+
return this.api.call.xcmPaymentApi.queryWeightToAssetFee(weight, sdkCore.addXcmVersionHeader(localizedLocation, sdkCore.Version.V4));
|
|
847
|
+
case 2:
|
|
848
|
+
feeResult = _context16.v;
|
|
849
|
+
return _context16.a(2, BigInt(feeResult.toString()));
|
|
845
850
|
}
|
|
846
851
|
}, _callee16, this);
|
|
847
852
|
}));
|
|
848
|
-
function
|
|
853
|
+
function getXcmPaymentApiFee(_x31, _x32, _x33) {
|
|
854
|
+
return _getXcmPaymentApiFee.apply(this, arguments);
|
|
855
|
+
}
|
|
856
|
+
return getXcmPaymentApiFee;
|
|
857
|
+
}()
|
|
858
|
+
}, {
|
|
859
|
+
key: "getXcmWeight",
|
|
860
|
+
value: function () {
|
|
861
|
+
var _getXcmWeight = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee17(xcm) {
|
|
862
|
+
var result, resultJson;
|
|
863
|
+
return _regenerator().w(function (_context17) {
|
|
864
|
+
while (1) switch (_context17.n) {
|
|
865
|
+
case 0:
|
|
866
|
+
_context17.n = 1;
|
|
867
|
+
return this.api.call.xcmPaymentApi.queryXcmWeight(xcm);
|
|
868
|
+
case 1:
|
|
869
|
+
result = _context17.v;
|
|
870
|
+
resultJson = result.toJSON();
|
|
871
|
+
return _context17.a(2, resultJson.ok);
|
|
872
|
+
}
|
|
873
|
+
}, _callee17, this);
|
|
874
|
+
}));
|
|
875
|
+
function getXcmWeight(_x34) {
|
|
849
876
|
return _getXcmWeight.apply(this, arguments);
|
|
850
877
|
}
|
|
851
878
|
return getXcmWeight;
|
|
@@ -853,33 +880,33 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
853
880
|
}, {
|
|
854
881
|
key: "getDryRunXcm",
|
|
855
882
|
value: function () {
|
|
856
|
-
var _getDryRunXcm = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
883
|
+
var _getDryRunXcm = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee18(_ref6) {
|
|
857
884
|
var _ref7, _ref8, _ref9;
|
|
858
885
|
var originLocation, xcm, node, origin, supportsDryRunApi, response, result, resultJson, isSuccess, failureReason, emitted, reversedEvents, palletsWithIssued, feeEvent, feeAmount, fee, actualWeight, weight, forwardedXcms, destParaId;
|
|
859
|
-
return _regenerator().w(function (
|
|
860
|
-
while (1) switch (
|
|
886
|
+
return _regenerator().w(function (_context18) {
|
|
887
|
+
while (1) switch (_context18.n) {
|
|
861
888
|
case 0:
|
|
862
889
|
originLocation = _ref6.originLocation, xcm = _ref6.xcm, node = _ref6.node, origin = _ref6.origin;
|
|
863
890
|
supportsDryRunApi = sdkCore.getAssetsObject(node).supportsDryRunApi;
|
|
864
891
|
if (supportsDryRunApi) {
|
|
865
|
-
|
|
892
|
+
_context18.n = 1;
|
|
866
893
|
break;
|
|
867
894
|
}
|
|
868
895
|
throw new sdkCore.NodeNotSupportedError("DryRunApi is not available on node ".concat(node));
|
|
869
896
|
case 1:
|
|
870
|
-
|
|
897
|
+
_context18.n = 2;
|
|
871
898
|
return this.api.call.dryRunApi.dryRunXcm(originLocation, xcm);
|
|
872
899
|
case 2:
|
|
873
|
-
response =
|
|
900
|
+
response = _context18.v;
|
|
874
901
|
result = response.toHuman();
|
|
875
902
|
resultJson = response.toJSON();
|
|
876
903
|
isSuccess = result.Ok && result.Ok.executionResult.Complete;
|
|
877
904
|
if (isSuccess) {
|
|
878
|
-
|
|
905
|
+
_context18.n = 3;
|
|
879
906
|
break;
|
|
880
907
|
}
|
|
881
908
|
failureReason = result.Ok.executionResult.Incomplete.error;
|
|
882
|
-
return
|
|
909
|
+
return _context18.a(2, {
|
|
883
910
|
success: false,
|
|
884
911
|
failureReason: failureReason
|
|
885
912
|
});
|
|
@@ -901,10 +928,10 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
901
928
|
return ['currencies', 'tokens'].includes(event.section) && event.method === 'Deposited';
|
|
902
929
|
});
|
|
903
930
|
if (feeEvent) {
|
|
904
|
-
|
|
931
|
+
_context18.n = 4;
|
|
905
932
|
break;
|
|
906
933
|
}
|
|
907
|
-
return
|
|
934
|
+
return _context18.a(2, Promise.resolve({
|
|
908
935
|
success: false,
|
|
909
936
|
failureReason: 'Cannot determine destination fee. No Issued event found'
|
|
910
937
|
}));
|
|
@@ -920,7 +947,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
920
947
|
destParaId = forwardedXcms.length === 0 ? undefined : function (i, _ref0) {
|
|
921
948
|
return i.Here ? 0 : (_ref0 = Array.isArray(i.x1) ? i.x1[0] : i.x1) === null || _ref0 === void 0 ? void 0 : _ref0.parachain;
|
|
922
949
|
}(Object.values(forwardedXcms[0])[0].interior);
|
|
923
|
-
return
|
|
950
|
+
return _context18.a(2, {
|
|
924
951
|
success: true,
|
|
925
952
|
fee: fee,
|
|
926
953
|
weight: weight,
|
|
@@ -928,9 +955,9 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
928
955
|
destParaId: destParaId
|
|
929
956
|
});
|
|
930
957
|
}
|
|
931
|
-
},
|
|
958
|
+
}, _callee18, this);
|
|
932
959
|
}));
|
|
933
|
-
function getDryRunXcm(
|
|
960
|
+
function getDryRunXcm(_x35) {
|
|
934
961
|
return _getDryRunXcm.apply(this, arguments);
|
|
935
962
|
}
|
|
936
963
|
return getDryRunXcm;
|
|
@@ -938,18 +965,18 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
938
965
|
}, {
|
|
939
966
|
key: "getBridgeStatus",
|
|
940
967
|
value: function () {
|
|
941
|
-
var _getBridgeStatus = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
968
|
+
var _getBridgeStatus = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee19() {
|
|
942
969
|
var outboundOperatingMode;
|
|
943
|
-
return _regenerator().w(function (
|
|
944
|
-
while (1) switch (
|
|
970
|
+
return _regenerator().w(function (_context19) {
|
|
971
|
+
while (1) switch (_context19.n) {
|
|
945
972
|
case 0:
|
|
946
|
-
|
|
973
|
+
_context19.n = 1;
|
|
947
974
|
return this.api.query.ethereumOutboundQueue.operatingMode();
|
|
948
975
|
case 1:
|
|
949
|
-
outboundOperatingMode =
|
|
950
|
-
return
|
|
976
|
+
outboundOperatingMode = _context19.v;
|
|
977
|
+
return _context19.a(2, outboundOperatingMode.toPrimitive());
|
|
951
978
|
}
|
|
952
|
-
},
|
|
979
|
+
}, _callee19, this);
|
|
953
980
|
}));
|
|
954
981
|
function getBridgeStatus() {
|
|
955
982
|
return _getBridgeStatus.apply(this, arguments);
|
|
@@ -969,38 +996,38 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
969
996
|
}, {
|
|
970
997
|
key: "disconnect",
|
|
971
998
|
value: function () {
|
|
972
|
-
var _disconnect = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
999
|
+
var _disconnect = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee20() {
|
|
973
1000
|
var _this$_config$apiOver2;
|
|
974
1001
|
var force,
|
|
975
1002
|
api,
|
|
976
|
-
|
|
977
|
-
return _regenerator().w(function (
|
|
978
|
-
while (1) switch (
|
|
1003
|
+
_args20 = arguments;
|
|
1004
|
+
return _regenerator().w(function (_context20) {
|
|
1005
|
+
while (1) switch (_context20.n) {
|
|
979
1006
|
case 0:
|
|
980
|
-
force =
|
|
1007
|
+
force = _args20.length > 0 && _args20[0] !== undefined ? _args20[0] : false;
|
|
981
1008
|
if (this.initialized) {
|
|
982
|
-
|
|
1009
|
+
_context20.n = 1;
|
|
983
1010
|
break;
|
|
984
1011
|
}
|
|
985
|
-
return
|
|
1012
|
+
return _context20.a(2, Promise.resolve());
|
|
986
1013
|
case 1:
|
|
987
1014
|
if (!(!force && !this.disconnectAllowed)) {
|
|
988
|
-
|
|
1015
|
+
_context20.n = 2;
|
|
989
1016
|
break;
|
|
990
1017
|
}
|
|
991
|
-
return
|
|
1018
|
+
return _context20.a(2);
|
|
992
1019
|
case 2:
|
|
993
1020
|
api = sdkCore.isConfig(this._config) ? (_this$_config$apiOver2 = this._config.apiOverrides) === null || _this$_config$apiOver2 === void 0 ? void 0 : _this$_config$apiOver2[this._node] : this._config; // Disconnect api only if it was created automatically
|
|
994
1021
|
if (!(force || typeof api === 'string' || api === undefined)) {
|
|
995
|
-
|
|
1022
|
+
_context20.n = 3;
|
|
996
1023
|
break;
|
|
997
1024
|
}
|
|
998
|
-
|
|
1025
|
+
_context20.n = 3;
|
|
999
1026
|
return this.api.disconnect();
|
|
1000
1027
|
case 3:
|
|
1001
|
-
return
|
|
1028
|
+
return _context20.a(2);
|
|
1002
1029
|
}
|
|
1003
|
-
},
|
|
1030
|
+
}, _callee20, this);
|
|
1004
1031
|
}));
|
|
1005
1032
|
function disconnect() {
|
|
1006
1033
|
return _disconnect.apply(this, arguments);
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isConfig, BatchMode, MissingChainApiError, createApiInstanceForNode as createApiInstanceForNode$1, getNode, isForeignAsset, InvalidParameterError, computeFeeFromDryRunPjs, resolveModuleError, getAssetsObject, NodeNotSupportedError, getBalanceNative as getBalanceNative$1, getBalanceForeign as getBalanceForeign$1, getAssetBalance as getAssetBalance$1, claimAssets as claimAssets$1, getOriginFeeDetails as getOriginFeeDetails$1, Foreign, ForeignAbstract, Native, Override, findAsset, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTNode, hasSupportForAsset, isNodeEvm, convertSs58 as convertSs58$1, getParaId, ETH_CHAIN_ID, InvalidCurrencyError, isOverrideMultiLocationSpecifier, transferMoonbeamEvm, transferMoonbeamToEth, validateAddress, Builder as Builder$1, getParaEthTransferFees as getParaEthTransferFees$1, DRY_RUN_CLIENT_TIMEOUT_MS, getBridgeStatus as getBridgeStatus$1, send as send$1, dryRun as dryRun$1, dryRunOrigin as dryRunOrigin$1 } from '@paraspell/sdk-core';
|
|
1
|
+
import { isConfig, BatchMode, MissingChainApiError, createApiInstanceForNode as createApiInstanceForNode$1, getNode, isForeignAsset, InvalidParameterError, computeFeeFromDryRunPjs, resolveModuleError, getAssetsObject, NodeNotSupportedError, assertHasLocation, localizeLocation, isRelayChain, addXcmVersionHeader, Version, getBalanceNative as getBalanceNative$1, getBalanceForeign as getBalanceForeign$1, getAssetBalance as getAssetBalance$1, claimAssets as claimAssets$1, getOriginFeeDetails as getOriginFeeDetails$1, Foreign, ForeignAbstract, Native, Override, findAsset, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTNode, hasSupportForAsset, isNodeEvm, convertSs58 as convertSs58$1, getParaId, ETH_CHAIN_ID, InvalidCurrencyError, isOverrideMultiLocationSpecifier, transferMoonbeamEvm, transferMoonbeamToEth, validateAddress, Builder as Builder$1, getParaEthTransferFees as getParaEthTransferFees$1, DRY_RUN_CLIENT_TIMEOUT_MS, getBridgeStatus as getBridgeStatus$1, send as send$1, dryRun as dryRun$1, dryRunOrigin as dryRunOrigin$1 } from '@paraspell/sdk-core';
|
|
2
2
|
export * from '@paraspell/sdk-core';
|
|
3
3
|
import { WsProvider, ApiPromise } from '@polkadot/api';
|
|
4
4
|
import { u32 } from '@polkadot/types';
|
|
@@ -828,23 +828,50 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
828
828
|
return getDryRunCall;
|
|
829
829
|
}()
|
|
830
830
|
}, {
|
|
831
|
-
key: "
|
|
831
|
+
key: "getXcmPaymentApiFee",
|
|
832
832
|
value: function () {
|
|
833
|
-
var
|
|
834
|
-
var
|
|
833
|
+
var _getXcmPaymentApiFee = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee16(node, xcm, asset) {
|
|
834
|
+
var weight, localizedLocation, feeResult;
|
|
835
835
|
return _regenerator().w(function (_context16) {
|
|
836
836
|
while (1) switch (_context16.n) {
|
|
837
837
|
case 0:
|
|
838
838
|
_context16.n = 1;
|
|
839
839
|
return this.api.call.xcmPaymentApi.queryXcmWeight(xcm);
|
|
840
840
|
case 1:
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
841
|
+
weight = _context16.v;
|
|
842
|
+
assertHasLocation(asset);
|
|
843
|
+
localizedLocation = node === 'AssetHubPolkadot' || node === 'AssetHubKusama' || isRelayChain(node) ? localizeLocation(node, asset.multiLocation) : asset.multiLocation;
|
|
844
|
+
_context16.n = 2;
|
|
845
|
+
return this.api.call.xcmPaymentApi.queryWeightToAssetFee(weight, addXcmVersionHeader(localizedLocation, Version.V4));
|
|
846
|
+
case 2:
|
|
847
|
+
feeResult = _context16.v;
|
|
848
|
+
return _context16.a(2, BigInt(feeResult.toString()));
|
|
844
849
|
}
|
|
845
850
|
}, _callee16, this);
|
|
846
851
|
}));
|
|
847
|
-
function
|
|
852
|
+
function getXcmPaymentApiFee(_x31, _x32, _x33) {
|
|
853
|
+
return _getXcmPaymentApiFee.apply(this, arguments);
|
|
854
|
+
}
|
|
855
|
+
return getXcmPaymentApiFee;
|
|
856
|
+
}()
|
|
857
|
+
}, {
|
|
858
|
+
key: "getXcmWeight",
|
|
859
|
+
value: function () {
|
|
860
|
+
var _getXcmWeight = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee17(xcm) {
|
|
861
|
+
var result, resultJson;
|
|
862
|
+
return _regenerator().w(function (_context17) {
|
|
863
|
+
while (1) switch (_context17.n) {
|
|
864
|
+
case 0:
|
|
865
|
+
_context17.n = 1;
|
|
866
|
+
return this.api.call.xcmPaymentApi.queryXcmWeight(xcm);
|
|
867
|
+
case 1:
|
|
868
|
+
result = _context17.v;
|
|
869
|
+
resultJson = result.toJSON();
|
|
870
|
+
return _context17.a(2, resultJson.ok);
|
|
871
|
+
}
|
|
872
|
+
}, _callee17, this);
|
|
873
|
+
}));
|
|
874
|
+
function getXcmWeight(_x34) {
|
|
848
875
|
return _getXcmWeight.apply(this, arguments);
|
|
849
876
|
}
|
|
850
877
|
return getXcmWeight;
|
|
@@ -852,33 +879,33 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
852
879
|
}, {
|
|
853
880
|
key: "getDryRunXcm",
|
|
854
881
|
value: function () {
|
|
855
|
-
var _getDryRunXcm = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
882
|
+
var _getDryRunXcm = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee18(_ref6) {
|
|
856
883
|
var _ref7, _ref8, _ref9;
|
|
857
884
|
var originLocation, xcm, node, origin, supportsDryRunApi, response, result, resultJson, isSuccess, failureReason, emitted, reversedEvents, palletsWithIssued, feeEvent, feeAmount, fee, actualWeight, weight, forwardedXcms, destParaId;
|
|
858
|
-
return _regenerator().w(function (
|
|
859
|
-
while (1) switch (
|
|
885
|
+
return _regenerator().w(function (_context18) {
|
|
886
|
+
while (1) switch (_context18.n) {
|
|
860
887
|
case 0:
|
|
861
888
|
originLocation = _ref6.originLocation, xcm = _ref6.xcm, node = _ref6.node, origin = _ref6.origin;
|
|
862
889
|
supportsDryRunApi = getAssetsObject(node).supportsDryRunApi;
|
|
863
890
|
if (supportsDryRunApi) {
|
|
864
|
-
|
|
891
|
+
_context18.n = 1;
|
|
865
892
|
break;
|
|
866
893
|
}
|
|
867
894
|
throw new NodeNotSupportedError("DryRunApi is not available on node ".concat(node));
|
|
868
895
|
case 1:
|
|
869
|
-
|
|
896
|
+
_context18.n = 2;
|
|
870
897
|
return this.api.call.dryRunApi.dryRunXcm(originLocation, xcm);
|
|
871
898
|
case 2:
|
|
872
|
-
response =
|
|
899
|
+
response = _context18.v;
|
|
873
900
|
result = response.toHuman();
|
|
874
901
|
resultJson = response.toJSON();
|
|
875
902
|
isSuccess = result.Ok && result.Ok.executionResult.Complete;
|
|
876
903
|
if (isSuccess) {
|
|
877
|
-
|
|
904
|
+
_context18.n = 3;
|
|
878
905
|
break;
|
|
879
906
|
}
|
|
880
907
|
failureReason = result.Ok.executionResult.Incomplete.error;
|
|
881
|
-
return
|
|
908
|
+
return _context18.a(2, {
|
|
882
909
|
success: false,
|
|
883
910
|
failureReason: failureReason
|
|
884
911
|
});
|
|
@@ -900,10 +927,10 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
900
927
|
return ['currencies', 'tokens'].includes(event.section) && event.method === 'Deposited';
|
|
901
928
|
});
|
|
902
929
|
if (feeEvent) {
|
|
903
|
-
|
|
930
|
+
_context18.n = 4;
|
|
904
931
|
break;
|
|
905
932
|
}
|
|
906
|
-
return
|
|
933
|
+
return _context18.a(2, Promise.resolve({
|
|
907
934
|
success: false,
|
|
908
935
|
failureReason: 'Cannot determine destination fee. No Issued event found'
|
|
909
936
|
}));
|
|
@@ -919,7 +946,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
919
946
|
destParaId = forwardedXcms.length === 0 ? undefined : function (i, _ref0) {
|
|
920
947
|
return i.Here ? 0 : (_ref0 = Array.isArray(i.x1) ? i.x1[0] : i.x1) === null || _ref0 === void 0 ? void 0 : _ref0.parachain;
|
|
921
948
|
}(Object.values(forwardedXcms[0])[0].interior);
|
|
922
|
-
return
|
|
949
|
+
return _context18.a(2, {
|
|
923
950
|
success: true,
|
|
924
951
|
fee: fee,
|
|
925
952
|
weight: weight,
|
|
@@ -927,9 +954,9 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
927
954
|
destParaId: destParaId
|
|
928
955
|
});
|
|
929
956
|
}
|
|
930
|
-
},
|
|
957
|
+
}, _callee18, this);
|
|
931
958
|
}));
|
|
932
|
-
function getDryRunXcm(
|
|
959
|
+
function getDryRunXcm(_x35) {
|
|
933
960
|
return _getDryRunXcm.apply(this, arguments);
|
|
934
961
|
}
|
|
935
962
|
return getDryRunXcm;
|
|
@@ -937,18 +964,18 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
937
964
|
}, {
|
|
938
965
|
key: "getBridgeStatus",
|
|
939
966
|
value: function () {
|
|
940
|
-
var _getBridgeStatus = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
967
|
+
var _getBridgeStatus = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee19() {
|
|
941
968
|
var outboundOperatingMode;
|
|
942
|
-
return _regenerator().w(function (
|
|
943
|
-
while (1) switch (
|
|
969
|
+
return _regenerator().w(function (_context19) {
|
|
970
|
+
while (1) switch (_context19.n) {
|
|
944
971
|
case 0:
|
|
945
|
-
|
|
972
|
+
_context19.n = 1;
|
|
946
973
|
return this.api.query.ethereumOutboundQueue.operatingMode();
|
|
947
974
|
case 1:
|
|
948
|
-
outboundOperatingMode =
|
|
949
|
-
return
|
|
975
|
+
outboundOperatingMode = _context19.v;
|
|
976
|
+
return _context19.a(2, outboundOperatingMode.toPrimitive());
|
|
950
977
|
}
|
|
951
|
-
},
|
|
978
|
+
}, _callee19, this);
|
|
952
979
|
}));
|
|
953
980
|
function getBridgeStatus() {
|
|
954
981
|
return _getBridgeStatus.apply(this, arguments);
|
|
@@ -968,38 +995,38 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
968
995
|
}, {
|
|
969
996
|
key: "disconnect",
|
|
970
997
|
value: function () {
|
|
971
|
-
var _disconnect = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
998
|
+
var _disconnect = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee20() {
|
|
972
999
|
var _this$_config$apiOver2;
|
|
973
1000
|
var force,
|
|
974
1001
|
api,
|
|
975
|
-
|
|
976
|
-
return _regenerator().w(function (
|
|
977
|
-
while (1) switch (
|
|
1002
|
+
_args20 = arguments;
|
|
1003
|
+
return _regenerator().w(function (_context20) {
|
|
1004
|
+
while (1) switch (_context20.n) {
|
|
978
1005
|
case 0:
|
|
979
|
-
force =
|
|
1006
|
+
force = _args20.length > 0 && _args20[0] !== undefined ? _args20[0] : false;
|
|
980
1007
|
if (this.initialized) {
|
|
981
|
-
|
|
1008
|
+
_context20.n = 1;
|
|
982
1009
|
break;
|
|
983
1010
|
}
|
|
984
|
-
return
|
|
1011
|
+
return _context20.a(2, Promise.resolve());
|
|
985
1012
|
case 1:
|
|
986
1013
|
if (!(!force && !this.disconnectAllowed)) {
|
|
987
|
-
|
|
1014
|
+
_context20.n = 2;
|
|
988
1015
|
break;
|
|
989
1016
|
}
|
|
990
|
-
return
|
|
1017
|
+
return _context20.a(2);
|
|
991
1018
|
case 2:
|
|
992
1019
|
api = isConfig(this._config) ? (_this$_config$apiOver2 = this._config.apiOverrides) === null || _this$_config$apiOver2 === void 0 ? void 0 : _this$_config$apiOver2[this._node] : this._config; // Disconnect api only if it was created automatically
|
|
993
1020
|
if (!(force || typeof api === 'string' || api === undefined)) {
|
|
994
|
-
|
|
1021
|
+
_context20.n = 3;
|
|
995
1022
|
break;
|
|
996
1023
|
}
|
|
997
|
-
|
|
1024
|
+
_context20.n = 3;
|
|
998
1025
|
return this.api.disconnect();
|
|
999
1026
|
case 3:
|
|
1000
|
-
return
|
|
1027
|
+
return _context20.a(2);
|
|
1001
1028
|
}
|
|
1002
|
-
},
|
|
1029
|
+
}, _callee20, this);
|
|
1003
1030
|
}));
|
|
1004
1031
|
function disconnect() {
|
|
1005
1032
|
return _disconnect.apply(this, arguments);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk-pjs",
|
|
3
|
-
"version": "10.11.
|
|
3
|
+
"version": "10.11.7",
|
|
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.64",
|
|
28
28
|
"ethers": "^6.15.0",
|
|
29
29
|
"viem": "^2.33.2",
|
|
30
|
-
"@paraspell/sdk-core": "10.11.
|
|
30
|
+
"@paraspell/sdk-core": "10.11.7"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@polkadot/api": ">= 16.0 < 17",
|