@paraspell/sdk-pjs 11.1.1 → 11.2.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 CHANGED
@@ -417,6 +417,11 @@ var PolkadotJsApi = /*#__PURE__*/function () {
417
417
  var method = mode === sdkCore.BatchMode.BATCH_ALL ? 'batchAll' : 'batch';
418
418
  return this.api.tx.utility[method](calls);
419
419
  }
420
+ }, {
421
+ key: "callDispatchAsMethod",
422
+ value: function callDispatchAsMethod(call, address) {
423
+ return this.api.tx.utility.dispatchAs(address, call);
424
+ }
420
425
  }, {
421
426
  key: "objectToHex",
422
427
  value: function objectToHex(obj, typeName) {
@@ -478,6 +483,11 @@ var PolkadotJsApi = /*#__PURE__*/function () {
478
483
  }
479
484
  return quoteAhPrice;
480
485
  }()
486
+ }, {
487
+ key: "getEvmStorage",
488
+ value: function getEvmStorage(contract, slot) {
489
+ return Promise.resolve(this.api.query.evm.accountStorages.key(contract, slot));
490
+ }
481
491
  }, {
482
492
  key: "getBalanceNative",
483
493
  value: function () {
@@ -832,12 +842,12 @@ var PolkadotJsApi = /*#__PURE__*/function () {
832
842
  key: "getXcmPaymentApiFee",
833
843
  value: function () {
834
844
  var _getXcmPaymentApiFee = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee16(chain, xcm, asset) {
835
- var weight, localizedLocation, feeResult;
845
+ var weight, localizedLocation, feeResult, res;
836
846
  return _regenerator().w(function (_context16) {
837
847
  while (1) switch (_context16.n) {
838
848
  case 0:
839
849
  _context16.n = 1;
840
- return this.api.call.xcmPaymentApi.queryXcmWeight(xcm);
850
+ return this.getXcmWeight(xcm);
841
851
  case 1:
842
852
  weight = _context16.v;
843
853
  sdkCore.assertHasLocation(asset);
@@ -846,7 +856,8 @@ var PolkadotJsApi = /*#__PURE__*/function () {
846
856
  return this.api.call.xcmPaymentApi.queryWeightToAssetFee(weight, sdkCore.addXcmVersionHeader(localizedLocation, sdkCore.Version.V4));
847
857
  case 2:
848
858
  feeResult = _context16.v;
849
- return _context16.a(2, BigInt(feeResult.toString()));
859
+ res = feeResult.toJSON();
860
+ return _context16.a(2, BigInt(res.ok));
850
861
  }
851
862
  }, _callee16, this);
852
863
  }));
package/dist/index.mjs CHANGED
@@ -416,6 +416,11 @@ var PolkadotJsApi = /*#__PURE__*/function () {
416
416
  var method = mode === BatchMode.BATCH_ALL ? 'batchAll' : 'batch';
417
417
  return this.api.tx.utility[method](calls);
418
418
  }
419
+ }, {
420
+ key: "callDispatchAsMethod",
421
+ value: function callDispatchAsMethod(call, address) {
422
+ return this.api.tx.utility.dispatchAs(address, call);
423
+ }
419
424
  }, {
420
425
  key: "objectToHex",
421
426
  value: function objectToHex(obj, typeName) {
@@ -477,6 +482,11 @@ var PolkadotJsApi = /*#__PURE__*/function () {
477
482
  }
478
483
  return quoteAhPrice;
479
484
  }()
485
+ }, {
486
+ key: "getEvmStorage",
487
+ value: function getEvmStorage(contract, slot) {
488
+ return Promise.resolve(this.api.query.evm.accountStorages.key(contract, slot));
489
+ }
480
490
  }, {
481
491
  key: "getBalanceNative",
482
492
  value: function () {
@@ -831,12 +841,12 @@ var PolkadotJsApi = /*#__PURE__*/function () {
831
841
  key: "getXcmPaymentApiFee",
832
842
  value: function () {
833
843
  var _getXcmPaymentApiFee = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee16(chain, xcm, asset) {
834
- var weight, localizedLocation, feeResult;
844
+ var weight, localizedLocation, feeResult, res;
835
845
  return _regenerator().w(function (_context16) {
836
846
  while (1) switch (_context16.n) {
837
847
  case 0:
838
848
  _context16.n = 1;
839
- return this.api.call.xcmPaymentApi.queryXcmWeight(xcm);
849
+ return this.getXcmWeight(xcm);
840
850
  case 1:
841
851
  weight = _context16.v;
842
852
  assertHasLocation(asset);
@@ -845,7 +855,8 @@ var PolkadotJsApi = /*#__PURE__*/function () {
845
855
  return this.api.call.xcmPaymentApi.queryWeightToAssetFee(weight, addXcmVersionHeader(localizedLocation, Version.V4));
846
856
  case 2:
847
857
  feeResult = _context16.v;
848
- return _context16.a(2, BigInt(feeResult.toString()));
858
+ res = feeResult.toJSON();
859
+ return _context16.a(2, BigInt(res.ok));
849
860
  }
850
861
  }, _callee16, this);
851
862
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk-pjs",
3
- "version": "11.1.1",
3
+ "version": "11.2.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.64",
28
28
  "ethers": "^6.15.0",
29
29
  "viem": "^2.33.2",
30
- "@paraspell/sdk-core": "11.1.1"
30
+ "@paraspell/sdk-core": "11.2.1"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@polkadot/api": ">= 16.0 < 17",