@paraspell/sdk-pjs 11.8.5 → 11.8.6
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 +53 -30
- package/dist/index.mjs +54 -31
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -510,12 +510,13 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
510
510
|
}, {
|
|
511
511
|
key: "getBalanceForeignPolkadotXcm",
|
|
512
512
|
value: function () {
|
|
513
|
-
var _getBalanceForeignPolkadotXcm = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(address,
|
|
513
|
+
var _getBalanceForeignPolkadotXcm = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(_chain, address, asset) {
|
|
514
514
|
var parsedId, response, obj;
|
|
515
515
|
return _regenerator().w(function (_context7) {
|
|
516
516
|
while (1) switch (_context7.n) {
|
|
517
517
|
case 0:
|
|
518
|
-
|
|
518
|
+
sdkCore.assertHasId(asset);
|
|
519
|
+
parsedId = new types.u32(this.api.registry, asset.assetId);
|
|
519
520
|
_context7.n = 1;
|
|
520
521
|
return this.api.query.assets.account(parsedId, address);
|
|
521
522
|
case 1:
|
|
@@ -525,7 +526,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
525
526
|
}
|
|
526
527
|
}, _callee7, this);
|
|
527
528
|
}));
|
|
528
|
-
function getBalanceForeignPolkadotXcm(_x10, _x11) {
|
|
529
|
+
function getBalanceForeignPolkadotXcm(_x10, _x11, _x12) {
|
|
529
530
|
return _getBalanceForeignPolkadotXcm.apply(this, arguments);
|
|
530
531
|
}
|
|
531
532
|
return getBalanceForeignPolkadotXcm;
|
|
@@ -547,7 +548,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
547
548
|
}
|
|
548
549
|
}, _callee8, this);
|
|
549
550
|
}));
|
|
550
|
-
function getMythosForeignBalance(
|
|
551
|
+
function getMythosForeignBalance(_x13) {
|
|
551
552
|
return _getMythosForeignBalance.apply(this, arguments);
|
|
552
553
|
}
|
|
553
554
|
return getMythosForeignBalance;
|
|
@@ -569,7 +570,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
569
570
|
}
|
|
570
571
|
}, _callee9, this);
|
|
571
572
|
}));
|
|
572
|
-
function getBalanceForeignAssetsPallet(
|
|
573
|
+
function getBalanceForeignAssetsPallet(_x14, _x15) {
|
|
573
574
|
return _getBalanceForeignAssetsPallet.apply(this, arguments);
|
|
574
575
|
}
|
|
575
576
|
return getBalanceForeignAssetsPallet;
|
|
@@ -591,7 +592,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
591
592
|
}
|
|
592
593
|
}, _callee0, this);
|
|
593
594
|
}));
|
|
594
|
-
function getForeignAssetsByIdBalance(
|
|
595
|
+
function getForeignAssetsByIdBalance(_x16, _x17) {
|
|
595
596
|
return _getForeignAssetsByIdBalance.apply(this, arguments);
|
|
596
597
|
}
|
|
597
598
|
return getForeignAssetsByIdBalance;
|
|
@@ -614,7 +615,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
614
615
|
}
|
|
615
616
|
}, _callee1, this);
|
|
616
617
|
}));
|
|
617
|
-
function getBalanceForeignBifrost(
|
|
618
|
+
function getBalanceForeignBifrost(_x18, _x19) {
|
|
618
619
|
return _getBalanceForeignBifrost.apply(this, arguments);
|
|
619
620
|
}
|
|
620
621
|
return getBalanceForeignBifrost;
|
|
@@ -638,7 +639,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
638
639
|
}
|
|
639
640
|
}, _callee10, this);
|
|
640
641
|
}));
|
|
641
|
-
function getBalanceNativeAcala(
|
|
642
|
+
function getBalanceNativeAcala(_x20, _x21) {
|
|
642
643
|
return _getBalanceNativeAcala.apply(this, arguments);
|
|
643
644
|
}
|
|
644
645
|
return getBalanceNativeAcala;
|
|
@@ -674,7 +675,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
674
675
|
}
|
|
675
676
|
}, _callee11, this);
|
|
676
677
|
}));
|
|
677
|
-
function getBalanceForeignXTokens(
|
|
678
|
+
function getBalanceForeignXTokens(_x22, _x23, _x24) {
|
|
678
679
|
return _getBalanceForeignXTokens.apply(this, arguments);
|
|
679
680
|
}
|
|
680
681
|
return getBalanceForeignXTokens;
|
|
@@ -696,7 +697,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
696
697
|
}
|
|
697
698
|
}, _callee12, this);
|
|
698
699
|
}));
|
|
699
|
-
function getBalanceAssetsPallet(
|
|
700
|
+
function getBalanceAssetsPallet(_x25, _x26) {
|
|
700
701
|
return _getBalanceAssetsPallet.apply(this, arguments);
|
|
701
702
|
}
|
|
702
703
|
return getBalanceAssetsPallet;
|
|
@@ -737,7 +738,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
737
738
|
}
|
|
738
739
|
}, _callee13, this);
|
|
739
740
|
}));
|
|
740
|
-
function getFromRpc(
|
|
741
|
+
function getFromRpc(_x27, _x28, _x29) {
|
|
741
742
|
return _getFromRpc.apply(this, arguments);
|
|
742
743
|
}
|
|
743
744
|
return getFromRpc;
|
|
@@ -768,7 +769,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
768
769
|
}
|
|
769
770
|
}, _callee14);
|
|
770
771
|
}));
|
|
771
|
-
function createApiForChain(
|
|
772
|
+
function createApiForChain(_x30) {
|
|
772
773
|
return _createApiForChain.apply(this, arguments);
|
|
773
774
|
}
|
|
774
775
|
return createApiForChain;
|
|
@@ -807,7 +808,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
807
808
|
}
|
|
808
809
|
}, _callee15);
|
|
809
810
|
}));
|
|
810
|
-
return function performDryRunCall(
|
|
811
|
+
return function performDryRunCall(_x32) {
|
|
811
812
|
return _ref5.apply(this, arguments);
|
|
812
813
|
};
|
|
813
814
|
}();
|
|
@@ -938,7 +939,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
938
939
|
}
|
|
939
940
|
}, _callee16, this, [[7, 9], [2, 4]]);
|
|
940
941
|
}));
|
|
941
|
-
function getDryRunCall(
|
|
942
|
+
function getDryRunCall(_x31) {
|
|
942
943
|
return _getDryRunCall.apply(this, arguments);
|
|
943
944
|
}
|
|
944
945
|
return getDryRunCall;
|
|
@@ -966,7 +967,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
966
967
|
}
|
|
967
968
|
}, _callee17, this);
|
|
968
969
|
}));
|
|
969
|
-
function getXcmPaymentApiFee(
|
|
970
|
+
function getXcmPaymentApiFee(_x33, _x34, _x35) {
|
|
970
971
|
return _getXcmPaymentApiFee.apply(this, arguments);
|
|
971
972
|
}
|
|
972
973
|
return getXcmPaymentApiFee;
|
|
@@ -988,7 +989,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
988
989
|
}
|
|
989
990
|
}, _callee18, this);
|
|
990
991
|
}));
|
|
991
|
-
function getXcmWeight(
|
|
992
|
+
function getXcmWeight(_x36) {
|
|
992
993
|
return _getXcmWeight.apply(this, arguments);
|
|
993
994
|
}
|
|
994
995
|
return getXcmWeight;
|
|
@@ -1080,7 +1081,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
1080
1081
|
}
|
|
1081
1082
|
}, _callee19, this);
|
|
1082
1083
|
}));
|
|
1083
|
-
function getDryRunXcm(
|
|
1084
|
+
function getDryRunXcm(_x37) {
|
|
1084
1085
|
return _getDryRunXcm.apply(this, arguments);
|
|
1085
1086
|
}
|
|
1086
1087
|
return getDryRunXcm;
|
|
@@ -1116,41 +1117,63 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
1116
1117
|
value: function getDisconnectAllowed() {
|
|
1117
1118
|
return this.disconnectAllowed;
|
|
1118
1119
|
}
|
|
1120
|
+
}, {
|
|
1121
|
+
key: "convertLocationToAccount",
|
|
1122
|
+
value: function () {
|
|
1123
|
+
var _convertLocationToAccount = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee21(location) {
|
|
1124
|
+
var res, jsonRes;
|
|
1125
|
+
return _regenerator().w(function (_context21) {
|
|
1126
|
+
while (1) switch (_context21.n) {
|
|
1127
|
+
case 0:
|
|
1128
|
+
_context21.n = 1;
|
|
1129
|
+
return this.api.call.locationToAccountApi.convertLocation(location);
|
|
1130
|
+
case 1:
|
|
1131
|
+
res = _context21.v;
|
|
1132
|
+
jsonRes = res.toJSON();
|
|
1133
|
+
return _context21.a(2, jsonRes.ok ? jsonRes.ok.toString() : undefined);
|
|
1134
|
+
}
|
|
1135
|
+
}, _callee21, this);
|
|
1136
|
+
}));
|
|
1137
|
+
function convertLocationToAccount(_x38) {
|
|
1138
|
+
return _convertLocationToAccount.apply(this, arguments);
|
|
1139
|
+
}
|
|
1140
|
+
return convertLocationToAccount;
|
|
1141
|
+
}()
|
|
1119
1142
|
}, {
|
|
1120
1143
|
key: "disconnect",
|
|
1121
1144
|
value: function () {
|
|
1122
|
-
var _disconnect = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
1145
|
+
var _disconnect = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee22() {
|
|
1123
1146
|
var _this$_config$apiOver2;
|
|
1124
1147
|
var force,
|
|
1125
1148
|
api,
|
|
1126
|
-
|
|
1127
|
-
return _regenerator().w(function (
|
|
1128
|
-
while (1) switch (
|
|
1149
|
+
_args22 = arguments;
|
|
1150
|
+
return _regenerator().w(function (_context22) {
|
|
1151
|
+
while (1) switch (_context22.n) {
|
|
1129
1152
|
case 0:
|
|
1130
|
-
force =
|
|
1153
|
+
force = _args22.length > 0 && _args22[0] !== undefined ? _args22[0] : false;
|
|
1131
1154
|
if (this.initialized) {
|
|
1132
|
-
|
|
1155
|
+
_context22.n = 1;
|
|
1133
1156
|
break;
|
|
1134
1157
|
}
|
|
1135
|
-
return
|
|
1158
|
+
return _context22.a(2, Promise.resolve());
|
|
1136
1159
|
case 1:
|
|
1137
1160
|
if (!(!force && !this.disconnectAllowed)) {
|
|
1138
|
-
|
|
1161
|
+
_context22.n = 2;
|
|
1139
1162
|
break;
|
|
1140
1163
|
}
|
|
1141
|
-
return
|
|
1164
|
+
return _context22.a(2);
|
|
1142
1165
|
case 2:
|
|
1143
1166
|
api = sdkCore.isConfig(this._config) ? (_this$_config$apiOver2 = this._config.apiOverrides) === null || _this$_config$apiOver2 === void 0 ? void 0 : _this$_config$apiOver2[this._chain] : this._config; // Disconnect api only if it was created automatically
|
|
1144
1167
|
if (!(force || typeof api === 'string' || api === undefined)) {
|
|
1145
|
-
|
|
1168
|
+
_context22.n = 3;
|
|
1146
1169
|
break;
|
|
1147
1170
|
}
|
|
1148
|
-
|
|
1171
|
+
_context22.n = 3;
|
|
1149
1172
|
return this.api.disconnect();
|
|
1150
1173
|
case 3:
|
|
1151
|
-
return
|
|
1174
|
+
return _context22.a(2);
|
|
1152
1175
|
}
|
|
1153
|
-
},
|
|
1176
|
+
}, _callee22, this);
|
|
1154
1177
|
}));
|
|
1155
1178
|
function disconnect() {
|
|
1156
1179
|
return _disconnect.apply(this, arguments);
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isConfig, BatchMode, MissingChainApiError, createChainClient as createChainClient$1, getChain, isForeignAsset, InvalidParameterError, computeFeeFromDryRunPjs, findNativeAssetInfoOrThrow, resolveModuleError, getAssetsObject, ChainNotSupportedError, 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, findAssetInfo, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTChain, hasSupportForAsset, isChainEvm, convertSs58 as convertSs58$1, getParaId, ETH_CHAIN_ID, findAssetInfoOrThrow, abstractDecimals,
|
|
1
|
+
import { isConfig, BatchMode, MissingChainApiError, createChainClient as createChainClient$1, assertHasId, getChain, isForeignAsset, InvalidParameterError, computeFeeFromDryRunPjs, findNativeAssetInfoOrThrow, resolveModuleError, getAssetsObject, ChainNotSupportedError, 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, findAssetInfo, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTChain, hasSupportForAsset, isChainEvm, convertSs58 as convertSs58$1, getParaId, ETH_CHAIN_ID, findAssetInfoOrThrow, abstractDecimals, isOverrideLocationSpecifier, 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';
|
|
@@ -509,12 +509,13 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
509
509
|
}, {
|
|
510
510
|
key: "getBalanceForeignPolkadotXcm",
|
|
511
511
|
value: function () {
|
|
512
|
-
var _getBalanceForeignPolkadotXcm = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(address,
|
|
512
|
+
var _getBalanceForeignPolkadotXcm = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(_chain, address, asset) {
|
|
513
513
|
var parsedId, response, obj;
|
|
514
514
|
return _regenerator().w(function (_context7) {
|
|
515
515
|
while (1) switch (_context7.n) {
|
|
516
516
|
case 0:
|
|
517
|
-
|
|
517
|
+
assertHasId(asset);
|
|
518
|
+
parsedId = new u32(this.api.registry, asset.assetId);
|
|
518
519
|
_context7.n = 1;
|
|
519
520
|
return this.api.query.assets.account(parsedId, address);
|
|
520
521
|
case 1:
|
|
@@ -524,7 +525,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
524
525
|
}
|
|
525
526
|
}, _callee7, this);
|
|
526
527
|
}));
|
|
527
|
-
function getBalanceForeignPolkadotXcm(_x10, _x11) {
|
|
528
|
+
function getBalanceForeignPolkadotXcm(_x10, _x11, _x12) {
|
|
528
529
|
return _getBalanceForeignPolkadotXcm.apply(this, arguments);
|
|
529
530
|
}
|
|
530
531
|
return getBalanceForeignPolkadotXcm;
|
|
@@ -546,7 +547,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
546
547
|
}
|
|
547
548
|
}, _callee8, this);
|
|
548
549
|
}));
|
|
549
|
-
function getMythosForeignBalance(
|
|
550
|
+
function getMythosForeignBalance(_x13) {
|
|
550
551
|
return _getMythosForeignBalance.apply(this, arguments);
|
|
551
552
|
}
|
|
552
553
|
return getMythosForeignBalance;
|
|
@@ -568,7 +569,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
568
569
|
}
|
|
569
570
|
}, _callee9, this);
|
|
570
571
|
}));
|
|
571
|
-
function getBalanceForeignAssetsPallet(
|
|
572
|
+
function getBalanceForeignAssetsPallet(_x14, _x15) {
|
|
572
573
|
return _getBalanceForeignAssetsPallet.apply(this, arguments);
|
|
573
574
|
}
|
|
574
575
|
return getBalanceForeignAssetsPallet;
|
|
@@ -590,7 +591,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
590
591
|
}
|
|
591
592
|
}, _callee0, this);
|
|
592
593
|
}));
|
|
593
|
-
function getForeignAssetsByIdBalance(
|
|
594
|
+
function getForeignAssetsByIdBalance(_x16, _x17) {
|
|
594
595
|
return _getForeignAssetsByIdBalance.apply(this, arguments);
|
|
595
596
|
}
|
|
596
597
|
return getForeignAssetsByIdBalance;
|
|
@@ -613,7 +614,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
613
614
|
}
|
|
614
615
|
}, _callee1, this);
|
|
615
616
|
}));
|
|
616
|
-
function getBalanceForeignBifrost(
|
|
617
|
+
function getBalanceForeignBifrost(_x18, _x19) {
|
|
617
618
|
return _getBalanceForeignBifrost.apply(this, arguments);
|
|
618
619
|
}
|
|
619
620
|
return getBalanceForeignBifrost;
|
|
@@ -637,7 +638,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
637
638
|
}
|
|
638
639
|
}, _callee10, this);
|
|
639
640
|
}));
|
|
640
|
-
function getBalanceNativeAcala(
|
|
641
|
+
function getBalanceNativeAcala(_x20, _x21) {
|
|
641
642
|
return _getBalanceNativeAcala.apply(this, arguments);
|
|
642
643
|
}
|
|
643
644
|
return getBalanceNativeAcala;
|
|
@@ -673,7 +674,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
673
674
|
}
|
|
674
675
|
}, _callee11, this);
|
|
675
676
|
}));
|
|
676
|
-
function getBalanceForeignXTokens(
|
|
677
|
+
function getBalanceForeignXTokens(_x22, _x23, _x24) {
|
|
677
678
|
return _getBalanceForeignXTokens.apply(this, arguments);
|
|
678
679
|
}
|
|
679
680
|
return getBalanceForeignXTokens;
|
|
@@ -695,7 +696,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
695
696
|
}
|
|
696
697
|
}, _callee12, this);
|
|
697
698
|
}));
|
|
698
|
-
function getBalanceAssetsPallet(
|
|
699
|
+
function getBalanceAssetsPallet(_x25, _x26) {
|
|
699
700
|
return _getBalanceAssetsPallet.apply(this, arguments);
|
|
700
701
|
}
|
|
701
702
|
return getBalanceAssetsPallet;
|
|
@@ -736,7 +737,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
736
737
|
}
|
|
737
738
|
}, _callee13, this);
|
|
738
739
|
}));
|
|
739
|
-
function getFromRpc(
|
|
740
|
+
function getFromRpc(_x27, _x28, _x29) {
|
|
740
741
|
return _getFromRpc.apply(this, arguments);
|
|
741
742
|
}
|
|
742
743
|
return getFromRpc;
|
|
@@ -767,7 +768,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
767
768
|
}
|
|
768
769
|
}, _callee14);
|
|
769
770
|
}));
|
|
770
|
-
function createApiForChain(
|
|
771
|
+
function createApiForChain(_x30) {
|
|
771
772
|
return _createApiForChain.apply(this, arguments);
|
|
772
773
|
}
|
|
773
774
|
return createApiForChain;
|
|
@@ -806,7 +807,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
806
807
|
}
|
|
807
808
|
}, _callee15);
|
|
808
809
|
}));
|
|
809
|
-
return function performDryRunCall(
|
|
810
|
+
return function performDryRunCall(_x32) {
|
|
810
811
|
return _ref5.apply(this, arguments);
|
|
811
812
|
};
|
|
812
813
|
}();
|
|
@@ -937,7 +938,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
937
938
|
}
|
|
938
939
|
}, _callee16, this, [[7, 9], [2, 4]]);
|
|
939
940
|
}));
|
|
940
|
-
function getDryRunCall(
|
|
941
|
+
function getDryRunCall(_x31) {
|
|
941
942
|
return _getDryRunCall.apply(this, arguments);
|
|
942
943
|
}
|
|
943
944
|
return getDryRunCall;
|
|
@@ -965,7 +966,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
965
966
|
}
|
|
966
967
|
}, _callee17, this);
|
|
967
968
|
}));
|
|
968
|
-
function getXcmPaymentApiFee(
|
|
969
|
+
function getXcmPaymentApiFee(_x33, _x34, _x35) {
|
|
969
970
|
return _getXcmPaymentApiFee.apply(this, arguments);
|
|
970
971
|
}
|
|
971
972
|
return getXcmPaymentApiFee;
|
|
@@ -987,7 +988,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
987
988
|
}
|
|
988
989
|
}, _callee18, this);
|
|
989
990
|
}));
|
|
990
|
-
function getXcmWeight(
|
|
991
|
+
function getXcmWeight(_x36) {
|
|
991
992
|
return _getXcmWeight.apply(this, arguments);
|
|
992
993
|
}
|
|
993
994
|
return getXcmWeight;
|
|
@@ -1079,7 +1080,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
1079
1080
|
}
|
|
1080
1081
|
}, _callee19, this);
|
|
1081
1082
|
}));
|
|
1082
|
-
function getDryRunXcm(
|
|
1083
|
+
function getDryRunXcm(_x37) {
|
|
1083
1084
|
return _getDryRunXcm.apply(this, arguments);
|
|
1084
1085
|
}
|
|
1085
1086
|
return getDryRunXcm;
|
|
@@ -1115,41 +1116,63 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
1115
1116
|
value: function getDisconnectAllowed() {
|
|
1116
1117
|
return this.disconnectAllowed;
|
|
1117
1118
|
}
|
|
1119
|
+
}, {
|
|
1120
|
+
key: "convertLocationToAccount",
|
|
1121
|
+
value: function () {
|
|
1122
|
+
var _convertLocationToAccount = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee21(location) {
|
|
1123
|
+
var res, jsonRes;
|
|
1124
|
+
return _regenerator().w(function (_context21) {
|
|
1125
|
+
while (1) switch (_context21.n) {
|
|
1126
|
+
case 0:
|
|
1127
|
+
_context21.n = 1;
|
|
1128
|
+
return this.api.call.locationToAccountApi.convertLocation(location);
|
|
1129
|
+
case 1:
|
|
1130
|
+
res = _context21.v;
|
|
1131
|
+
jsonRes = res.toJSON();
|
|
1132
|
+
return _context21.a(2, jsonRes.ok ? jsonRes.ok.toString() : undefined);
|
|
1133
|
+
}
|
|
1134
|
+
}, _callee21, this);
|
|
1135
|
+
}));
|
|
1136
|
+
function convertLocationToAccount(_x38) {
|
|
1137
|
+
return _convertLocationToAccount.apply(this, arguments);
|
|
1138
|
+
}
|
|
1139
|
+
return convertLocationToAccount;
|
|
1140
|
+
}()
|
|
1118
1141
|
}, {
|
|
1119
1142
|
key: "disconnect",
|
|
1120
1143
|
value: function () {
|
|
1121
|
-
var _disconnect = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
1144
|
+
var _disconnect = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee22() {
|
|
1122
1145
|
var _this$_config$apiOver2;
|
|
1123
1146
|
var force,
|
|
1124
1147
|
api,
|
|
1125
|
-
|
|
1126
|
-
return _regenerator().w(function (
|
|
1127
|
-
while (1) switch (
|
|
1148
|
+
_args22 = arguments;
|
|
1149
|
+
return _regenerator().w(function (_context22) {
|
|
1150
|
+
while (1) switch (_context22.n) {
|
|
1128
1151
|
case 0:
|
|
1129
|
-
force =
|
|
1152
|
+
force = _args22.length > 0 && _args22[0] !== undefined ? _args22[0] : false;
|
|
1130
1153
|
if (this.initialized) {
|
|
1131
|
-
|
|
1154
|
+
_context22.n = 1;
|
|
1132
1155
|
break;
|
|
1133
1156
|
}
|
|
1134
|
-
return
|
|
1157
|
+
return _context22.a(2, Promise.resolve());
|
|
1135
1158
|
case 1:
|
|
1136
1159
|
if (!(!force && !this.disconnectAllowed)) {
|
|
1137
|
-
|
|
1160
|
+
_context22.n = 2;
|
|
1138
1161
|
break;
|
|
1139
1162
|
}
|
|
1140
|
-
return
|
|
1163
|
+
return _context22.a(2);
|
|
1141
1164
|
case 2:
|
|
1142
1165
|
api = isConfig(this._config) ? (_this$_config$apiOver2 = this._config.apiOverrides) === null || _this$_config$apiOver2 === void 0 ? void 0 : _this$_config$apiOver2[this._chain] : this._config; // Disconnect api only if it was created automatically
|
|
1143
1166
|
if (!(force || typeof api === 'string' || api === undefined)) {
|
|
1144
|
-
|
|
1167
|
+
_context22.n = 3;
|
|
1145
1168
|
break;
|
|
1146
1169
|
}
|
|
1147
|
-
|
|
1170
|
+
_context22.n = 3;
|
|
1148
1171
|
return this.api.disconnect();
|
|
1149
1172
|
case 3:
|
|
1150
|
-
return
|
|
1173
|
+
return _context22.a(2);
|
|
1151
1174
|
}
|
|
1152
|
-
},
|
|
1175
|
+
}, _callee22, this);
|
|
1153
1176
|
}));
|
|
1154
1177
|
function disconnect() {
|
|
1155
1178
|
return _disconnect.apply(this, arguments);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk-pjs",
|
|
3
|
-
"version": "11.8.
|
|
3
|
+
"version": "11.8.6",
|
|
4
4
|
"description": "Polkadot.js based SDK for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@snowbridge/api": "0.2.0",
|
|
27
27
|
"@snowbridge/contract-types": "0.2.0",
|
|
28
28
|
"ethers": "^6.15.0",
|
|
29
|
-
"viem": "^2.
|
|
30
|
-
"@paraspell/sdk-core": "11.8.
|
|
29
|
+
"viem": "^2.37.9",
|
|
30
|
+
"@paraspell/sdk-core": "11.8.6"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@polkadot/api": ">= 16.0 < 17",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"@rollup/plugin-json": "^6.1.0",
|
|
45
45
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
46
46
|
"@vitest/coverage-v8": "^3.2.4",
|
|
47
|
-
"axios": "^1.
|
|
48
|
-
"dotenv": "^17.2.
|
|
47
|
+
"axios": "^1.12.2",
|
|
48
|
+
"dotenv": "^17.2.3",
|
|
49
49
|
"prettier": "^3.6.2",
|
|
50
|
-
"rollup": "^4.
|
|
50
|
+
"rollup": "^4.52.3",
|
|
51
51
|
"rollup-plugin-dts": "^6.2.3",
|
|
52
52
|
"tslib": "^2.8.1"
|
|
53
53
|
},
|