@paraspell/sdk-pjs 8.1.0 → 8.2.0

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
@@ -15,9 +15,6 @@ function _arrayLikeToArray(r, a) {
15
15
  function _arrayWithHoles(r) {
16
16
  if (Array.isArray(r)) return r;
17
17
  }
18
- function _arrayWithoutHoles(r) {
19
- if (Array.isArray(r)) return _arrayLikeToArray(r);
20
- }
21
18
  function asyncGeneratorStep(n, t, e, r, o, a, c) {
22
19
  try {
23
20
  var i = n[a](c),
@@ -39,7 +36,7 @@ function _asyncToGenerator(n) {
39
36
  function _throw(n) {
40
37
  asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
41
38
  }
42
- _next(void 0);
39
+ _next(undefined);
43
40
  });
44
41
  };
45
42
  }
@@ -49,25 +46,22 @@ function _classCallCheck(a, n) {
49
46
  function _defineProperties(e, r) {
50
47
  for (var t = 0; t < r.length; t++) {
51
48
  var o = r[t];
52
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
49
+ o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
53
50
  }
54
51
  }
55
52
  function _createClass(e, r, t) {
56
53
  return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
57
- writable: !1
54
+ writable: false
58
55
  }), e;
59
56
  }
60
57
  function _defineProperty(e, r, t) {
61
58
  return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
62
59
  value: t,
63
- enumerable: !0,
64
- configurable: !0,
65
- writable: !0
60
+ enumerable: true,
61
+ configurable: true,
62
+ writable: true
66
63
  }) : e[r] = t, e;
67
64
  }
68
- function _iterableToArray(r) {
69
- if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
70
- }
71
65
  function _iterableToArrayLimit(r, l) {
72
66
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
73
67
  if (null != t) {
@@ -76,12 +70,12 @@ function _iterableToArrayLimit(r, l) {
76
70
  i,
77
71
  u,
78
72
  a = [],
79
- f = !0,
80
- o = !1;
73
+ f = true,
74
+ o = false;
81
75
  try {
82
76
  if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
83
77
  } catch (r) {
84
- o = !0, n = r;
78
+ o = true, n = r;
85
79
  } finally {
86
80
  try {
87
81
  if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
@@ -95,9 +89,6 @@ function _iterableToArrayLimit(r, l) {
95
89
  function _nonIterableRest() {
96
90
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
97
91
  }
98
- function _nonIterableSpread() {
99
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
100
- }
101
92
  function ownKeys(e, r) {
102
93
  var t = Object.keys(e);
103
94
  if (Object.getOwnPropertySymbols) {
@@ -111,7 +102,7 @@ function ownKeys(e, r) {
111
102
  function _objectSpread2(e) {
112
103
  for (var r = 1; r < arguments.length; r++) {
113
104
  var t = null != arguments[r] ? arguments[r] : {};
114
- r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
105
+ r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
115
106
  _defineProperty(e, r, t[r]);
116
107
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
117
108
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
@@ -137,9 +128,9 @@ function _regeneratorRuntime() {
137
128
  function define(t, e, r) {
138
129
  return Object.defineProperty(t, e, {
139
130
  value: r,
140
- enumerable: !0,
141
- configurable: !0,
142
- writable: !0
131
+ enumerable: true,
132
+ configurable: true,
133
+ writable: true
143
134
  }), t[e];
144
135
  }
145
136
  try {
@@ -232,7 +223,7 @@ function _regeneratorRuntime() {
232
223
  if ("throw" === i) throw a;
233
224
  return {
234
225
  value: t,
235
- done: !0
226
+ done: true
236
227
  };
237
228
  }
238
229
  for (n.method = i, n.arg = a;;) {
@@ -283,7 +274,7 @@ function _regeneratorRuntime() {
283
274
  function Context(t) {
284
275
  this.tryEntries = [{
285
276
  tryLoc: "root"
286
- }], t.forEach(pushTryEntry, this), this.reset(!0);
277
+ }], t.forEach(pushTryEntry, this), this.reset(true);
287
278
  }
288
279
  function values(e) {
289
280
  if (e || "" === e) {
@@ -293,8 +284,8 @@ function _regeneratorRuntime() {
293
284
  if (!isNaN(e.length)) {
294
285
  var o = -1,
295
286
  i = function next() {
296
- for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
297
- return next.value = t, next.done = !0, next;
287
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = false, next;
288
+ return next.value = t, next.done = true, next;
298
289
  };
299
290
  return i.next = i;
300
291
  }
@@ -303,10 +294,10 @@ function _regeneratorRuntime() {
303
294
  }
304
295
  return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
305
296
  value: GeneratorFunctionPrototype,
306
- configurable: !0
297
+ configurable: true
307
298
  }), o(GeneratorFunctionPrototype, "constructor", {
308
299
  value: GeneratorFunction,
309
- configurable: !0
300
+ configurable: true
310
301
  }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
311
302
  var e = "function" == typeof t && t.constructor;
312
303
  return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
@@ -319,7 +310,7 @@ function _regeneratorRuntime() {
319
310
  }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
320
311
  return this;
321
312
  }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
322
- void 0 === i && (i = Promise);
313
+ undefined === i && (i = Promise);
323
314
  var a = new AsyncIterator(wrap(t, r, n, o), i);
324
315
  return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
325
316
  return t.done ? t.value : a.next();
@@ -335,17 +326,17 @@ function _regeneratorRuntime() {
335
326
  return r.reverse(), function next() {
336
327
  for (; r.length;) {
337
328
  var t = r.pop();
338
- if (t in e) return next.value = t, next.done = !1, next;
329
+ if (t in e) return next.value = t, next.done = false, next;
339
330
  }
340
- return next.done = !0, next;
331
+ return next.done = true, next;
341
332
  };
342
333
  }, e.values = values, Context.prototype = {
343
334
  constructor: Context,
344
335
  reset: function (e) {
345
- if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
336
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = false, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
346
337
  },
347
338
  stop: function () {
348
- this.done = !0;
339
+ this.done = true;
349
340
  var t = this.tryEntries[0].completion;
350
341
  if ("throw" === t.type) throw t.arg;
351
342
  return this.rval;
@@ -364,10 +355,10 @@ function _regeneratorRuntime() {
364
355
  var c = n.call(i, "catchLoc"),
365
356
  u = n.call(i, "finallyLoc");
366
357
  if (c && u) {
367
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
358
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
368
359
  if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
369
360
  } else if (c) {
370
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
361
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
371
362
  } else {
372
363
  if (!u) throw Error("try statement without catch or finally");
373
364
  if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
@@ -423,13 +414,10 @@ function _regeneratorRuntime() {
423
414
  function _slicedToArray(r, e) {
424
415
  return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
425
416
  }
426
- function _toConsumableArray(r) {
427
- return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
428
- }
429
417
  function _toPrimitive(t, r) {
430
418
  if ("object" != typeof t || !t) return t;
431
419
  var e = t[Symbol.toPrimitive];
432
- if (void 0 !== e) {
420
+ if (undefined !== e) {
433
421
  var i = e.call(t, r || "default");
434
422
  if ("object" != typeof i) return i;
435
423
  throw new TypeError("@@toPrimitive must return a primitive value.");
@@ -453,7 +441,7 @@ function _unsupportedIterableToArray(r, a) {
453
441
  if (r) {
454
442
  if ("string" == typeof r) return _arrayLikeToArray(r, a);
455
443
  var t = {}.toString.call(r).slice(8, -1);
456
- return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
444
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : undefined;
457
445
  }
458
446
  }
459
447
 
@@ -714,7 +702,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
714
702
  _context.next = 16;
715
703
  break;
716
704
  case 8:
717
- if (!((_this$_api = this._api) !== null && _this$_api !== void 0)) {
705
+ if (!((_this$_api = this._api) !== null && _this$_api !== undefined)) {
718
706
  _context.next = 12;
719
707
  break;
720
708
  }
@@ -779,18 +767,20 @@ var PolkadotJsApi = /*#__PURE__*/function () {
779
767
  }, {
780
768
  key: "callTxMethod",
781
769
  value: function callTxMethod(_ref) {
782
- var _this$api$tx$moduleLo2;
770
+ var _this$api$tx$moduleLo;
783
771
  var module = _ref.module,
784
772
  section = _ref.section,
785
773
  parameters = _ref.parameters;
786
774
  var values = Object.values(parameters);
787
775
  var moduleLowerCase = lowercaseFirstLetter(module);
788
776
  var sectionCamelCase = snakeToCamel(section);
789
- if (module === 'Utility') {
790
- var _this$api$tx$moduleLo;
791
- return (_this$api$tx$moduleLo = this.api.tx[moduleLowerCase])[sectionCamelCase].apply(_this$api$tx$moduleLo, _toConsumableArray(values[0]));
792
- }
793
- return (_this$api$tx$moduleLo2 = this.api.tx[moduleLowerCase])[sectionCamelCase].apply(_this$api$tx$moduleLo2, values);
777
+ return (_this$api$tx$moduleLo = this.api.tx[moduleLowerCase])[sectionCamelCase].apply(_this$api$tx$moduleLo, values);
778
+ }
779
+ }, {
780
+ key: "callBatchMethod",
781
+ value: function callBatchMethod(calls, mode) {
782
+ var section = mode === sdkCore.BatchMode.BATCH_ALL ? 'batchAll' : 'batch';
783
+ return this.api.tx.utility[section](calls);
794
784
  }
795
785
  }, {
796
786
  key: "calculateTransactionFee",
@@ -1019,7 +1009,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
1019
1009
  var assetItem = _ref3$0$args[1];
1020
1010
  _ref3[1];
1021
1011
  var assetSymbol = assetItem.toString().toLowerCase();
1022
- return assetSymbol === ((_asset$symbol = asset.symbol) === null || _asset$symbol === void 0 ? void 0 : _asset$symbol.toLowerCase()) || sdkCore.isForeignAsset(asset) && assetSymbol === ((_asset$assetId = asset.assetId) === null || _asset$assetId === void 0 ? void 0 : _asset$assetId.toLowerCase()) || Object.values((_assetItem$toHuman = assetItem.toHuman()) !== null && _assetItem$toHuman !== void 0 ? _assetItem$toHuman : {}).toString().toLowerCase() === ((_asset$symbol2 = asset.symbol) === null || _asset$symbol2 === void 0 ? void 0 : _asset$symbol2.toLowerCase()) || sdkCore.isForeignAsset(asset) && Object.values((_assetItem$toHuman2 = assetItem.toHuman()) !== null && _assetItem$toHuman2 !== void 0 ? _assetItem$toHuman2 : {}).toString().toLowerCase() === ((_asset$assetId2 = asset.assetId) === null || _asset$assetId2 === void 0 ? void 0 : _asset$assetId2.toLowerCase());
1012
+ return assetSymbol === ((_asset$symbol = asset.symbol) === null || _asset$symbol === undefined ? undefined : _asset$symbol.toLowerCase()) || sdkCore.isForeignAsset(asset) && assetSymbol === ((_asset$assetId = asset.assetId) === null || _asset$assetId === undefined ? undefined : _asset$assetId.toLowerCase()) || Object.values((_assetItem$toHuman = assetItem.toHuman()) !== null && _assetItem$toHuman !== undefined ? _assetItem$toHuman : {}).toString().toLowerCase() === ((_asset$symbol2 = asset.symbol) === null || _asset$symbol2 === undefined ? undefined : _asset$symbol2.toLowerCase()) || sdkCore.isForeignAsset(asset) && Object.values((_assetItem$toHuman2 = assetItem.toHuman()) !== null && _assetItem$toHuman2 !== undefined ? _assetItem$toHuman2 : {}).toString().toLowerCase() === ((_asset$assetId2 = asset.assetId) === null || _asset$assetId2 === undefined ? undefined : _asset$assetId2.toLowerCase());
1023
1013
  });
1024
1014
  accountData = entry ? entry[1] : null;
1025
1015
  return _context11.abrupt("return", accountData ? BigInt(accountData.free.toString()) : 0n);
@@ -1451,13 +1441,13 @@ var EvmBuilderClass = /*#__PURE__*/function () {
1451
1441
  _context.next = 19;
1452
1442
  break;
1453
1443
  }
1454
- _context.t1 = _yield$transferEthToP2 === void 0;
1444
+ _context.t1 = _yield$transferEthToP2 === undefined;
1455
1445
  case 19:
1456
1446
  if (!_context.t1) {
1457
1447
  _context.next = 23;
1458
1448
  break;
1459
1449
  }
1460
- _context.t3 = void 0;
1450
+ _context.t3 = undefined;
1461
1451
  _context.next = 24;
1462
1452
  break;
1463
1453
  case 23:
@@ -1469,7 +1459,7 @@ var EvmBuilderClass = /*#__PURE__*/function () {
1469
1459
  _context.next = 28;
1470
1460
  break;
1471
1461
  }
1472
- _context.t0 = _yield$transferEthToP !== void 0;
1462
+ _context.t0 = _yield$transferEthToP !== undefined;
1473
1463
  case 28:
1474
1464
  if (!_context.t0) {
1475
1465
  _context.next = 32;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { getParaId, isForeignAsset, InvalidCurrencyError, getAssetBySymbolOrId, isOverrideMultiLocationSpecifier, createApiInstanceForNode as createApiInstanceForNode$1, getNode, computeFeeFromDryRunPjs, resolveModuleError, getAssetsObject, send as send$1, getDryRun as getDryRun$1, getBalanceNative as getBalanceNative$1, getBalanceForeign as getBalanceForeign$1, getTransferInfo as getTransferInfo$1, getAssetBalance as getAssetBalance$1, claimAssets as claimAssets$1, getOriginFeeDetails as getOriginFeeDetails$1, getMaxNativeTransferableAmount as getMaxNativeTransferableAmount$1, getMaxForeignTransferableAmount as getMaxForeignTransferableAmount$1, getTransferableAmount as getTransferableAmount$1, Foreign, ForeignAbstract, Native, Override, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTNode, hasSupportForAsset, isNodeEvm, transferMoonbeamEvm, Builder as Builder$1, GeneralBuilder as GeneralBuilder$1 } from '@paraspell/sdk-core';
1
+ import { getParaId, isForeignAsset, InvalidCurrencyError, getAssetBySymbolOrId, isOverrideMultiLocationSpecifier, BatchMode, createApiInstanceForNode as createApiInstanceForNode$1, getNode, computeFeeFromDryRunPjs, resolveModuleError, getAssetsObject, send as send$1, getDryRun as getDryRun$1, getBalanceNative as getBalanceNative$1, getBalanceForeign as getBalanceForeign$1, getTransferInfo as getTransferInfo$1, getAssetBalance as getAssetBalance$1, claimAssets as claimAssets$1, getOriginFeeDetails as getOriginFeeDetails$1, getMaxNativeTransferableAmount as getMaxNativeTransferableAmount$1, getMaxForeignTransferableAmount as getMaxForeignTransferableAmount$1, getTransferableAmount as getTransferableAmount$1, Foreign, ForeignAbstract, Native, Override, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTNode, hasSupportForAsset, isNodeEvm, transferMoonbeamEvm, Builder as Builder$1, GeneralBuilder as GeneralBuilder$1 } from '@paraspell/sdk-core';
2
2
  export * from '@paraspell/sdk-core';
3
3
  import { contextFactory, toPolkadot, environment } from '@snowbridge/api';
4
4
  import { WsProvider, ApiPromise } from '@polkadot/api';
@@ -14,9 +14,6 @@ function _arrayLikeToArray(r, a) {
14
14
  function _arrayWithHoles(r) {
15
15
  if (Array.isArray(r)) return r;
16
16
  }
17
- function _arrayWithoutHoles(r) {
18
- if (Array.isArray(r)) return _arrayLikeToArray(r);
19
- }
20
17
  function asyncGeneratorStep(n, t, e, r, o, a, c) {
21
18
  try {
22
19
  var i = n[a](c),
@@ -38,7 +35,7 @@ function _asyncToGenerator(n) {
38
35
  function _throw(n) {
39
36
  asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
40
37
  }
41
- _next(void 0);
38
+ _next(undefined);
42
39
  });
43
40
  };
44
41
  }
@@ -48,25 +45,22 @@ function _classCallCheck(a, n) {
48
45
  function _defineProperties(e, r) {
49
46
  for (var t = 0; t < r.length; t++) {
50
47
  var o = r[t];
51
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
48
+ o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
52
49
  }
53
50
  }
54
51
  function _createClass(e, r, t) {
55
52
  return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
56
- writable: !1
53
+ writable: false
57
54
  }), e;
58
55
  }
59
56
  function _defineProperty(e, r, t) {
60
57
  return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
61
58
  value: t,
62
- enumerable: !0,
63
- configurable: !0,
64
- writable: !0
59
+ enumerable: true,
60
+ configurable: true,
61
+ writable: true
65
62
  }) : e[r] = t, e;
66
63
  }
67
- function _iterableToArray(r) {
68
- if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
69
- }
70
64
  function _iterableToArrayLimit(r, l) {
71
65
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
72
66
  if (null != t) {
@@ -75,12 +69,12 @@ function _iterableToArrayLimit(r, l) {
75
69
  i,
76
70
  u,
77
71
  a = [],
78
- f = !0,
79
- o = !1;
72
+ f = true,
73
+ o = false;
80
74
  try {
81
75
  if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
82
76
  } catch (r) {
83
- o = !0, n = r;
77
+ o = true, n = r;
84
78
  } finally {
85
79
  try {
86
80
  if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
@@ -94,9 +88,6 @@ function _iterableToArrayLimit(r, l) {
94
88
  function _nonIterableRest() {
95
89
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
96
90
  }
97
- function _nonIterableSpread() {
98
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
99
- }
100
91
  function ownKeys(e, r) {
101
92
  var t = Object.keys(e);
102
93
  if (Object.getOwnPropertySymbols) {
@@ -110,7 +101,7 @@ function ownKeys(e, r) {
110
101
  function _objectSpread2(e) {
111
102
  for (var r = 1; r < arguments.length; r++) {
112
103
  var t = null != arguments[r] ? arguments[r] : {};
113
- r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
104
+ r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
114
105
  _defineProperty(e, r, t[r]);
115
106
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
116
107
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
@@ -136,9 +127,9 @@ function _regeneratorRuntime() {
136
127
  function define(t, e, r) {
137
128
  return Object.defineProperty(t, e, {
138
129
  value: r,
139
- enumerable: !0,
140
- configurable: !0,
141
- writable: !0
130
+ enumerable: true,
131
+ configurable: true,
132
+ writable: true
142
133
  }), t[e];
143
134
  }
144
135
  try {
@@ -231,7 +222,7 @@ function _regeneratorRuntime() {
231
222
  if ("throw" === i) throw a;
232
223
  return {
233
224
  value: t,
234
- done: !0
225
+ done: true
235
226
  };
236
227
  }
237
228
  for (n.method = i, n.arg = a;;) {
@@ -282,7 +273,7 @@ function _regeneratorRuntime() {
282
273
  function Context(t) {
283
274
  this.tryEntries = [{
284
275
  tryLoc: "root"
285
- }], t.forEach(pushTryEntry, this), this.reset(!0);
276
+ }], t.forEach(pushTryEntry, this), this.reset(true);
286
277
  }
287
278
  function values(e) {
288
279
  if (e || "" === e) {
@@ -292,8 +283,8 @@ function _regeneratorRuntime() {
292
283
  if (!isNaN(e.length)) {
293
284
  var o = -1,
294
285
  i = function next() {
295
- for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
296
- return next.value = t, next.done = !0, next;
286
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = false, next;
287
+ return next.value = t, next.done = true, next;
297
288
  };
298
289
  return i.next = i;
299
290
  }
@@ -302,10 +293,10 @@ function _regeneratorRuntime() {
302
293
  }
303
294
  return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
304
295
  value: GeneratorFunctionPrototype,
305
- configurable: !0
296
+ configurable: true
306
297
  }), o(GeneratorFunctionPrototype, "constructor", {
307
298
  value: GeneratorFunction,
308
- configurable: !0
299
+ configurable: true
309
300
  }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
310
301
  var e = "function" == typeof t && t.constructor;
311
302
  return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
@@ -318,7 +309,7 @@ function _regeneratorRuntime() {
318
309
  }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
319
310
  return this;
320
311
  }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
321
- void 0 === i && (i = Promise);
312
+ undefined === i && (i = Promise);
322
313
  var a = new AsyncIterator(wrap(t, r, n, o), i);
323
314
  return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
324
315
  return t.done ? t.value : a.next();
@@ -334,17 +325,17 @@ function _regeneratorRuntime() {
334
325
  return r.reverse(), function next() {
335
326
  for (; r.length;) {
336
327
  var t = r.pop();
337
- if (t in e) return next.value = t, next.done = !1, next;
328
+ if (t in e) return next.value = t, next.done = false, next;
338
329
  }
339
- return next.done = !0, next;
330
+ return next.done = true, next;
340
331
  };
341
332
  }, e.values = values, Context.prototype = {
342
333
  constructor: Context,
343
334
  reset: function (e) {
344
- if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
335
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = false, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
345
336
  },
346
337
  stop: function () {
347
- this.done = !0;
338
+ this.done = true;
348
339
  var t = this.tryEntries[0].completion;
349
340
  if ("throw" === t.type) throw t.arg;
350
341
  return this.rval;
@@ -363,10 +354,10 @@ function _regeneratorRuntime() {
363
354
  var c = n.call(i, "catchLoc"),
364
355
  u = n.call(i, "finallyLoc");
365
356
  if (c && u) {
366
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
357
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
367
358
  if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
368
359
  } else if (c) {
369
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
360
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
370
361
  } else {
371
362
  if (!u) throw Error("try statement without catch or finally");
372
363
  if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
@@ -422,13 +413,10 @@ function _regeneratorRuntime() {
422
413
  function _slicedToArray(r, e) {
423
414
  return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
424
415
  }
425
- function _toConsumableArray(r) {
426
- return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
427
- }
428
416
  function _toPrimitive(t, r) {
429
417
  if ("object" != typeof t || !t) return t;
430
418
  var e = t[Symbol.toPrimitive];
431
- if (void 0 !== e) {
419
+ if (undefined !== e) {
432
420
  var i = e.call(t, r || "default");
433
421
  if ("object" != typeof i) return i;
434
422
  throw new TypeError("@@toPrimitive must return a primitive value.");
@@ -452,7 +440,7 @@ function _unsupportedIterableToArray(r, a) {
452
440
  if (r) {
453
441
  if ("string" == typeof r) return _arrayLikeToArray(r, a);
454
442
  var t = {}.toString.call(r).slice(8, -1);
455
- return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
443
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : undefined;
456
444
  }
457
445
  }
458
446
 
@@ -713,7 +701,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
713
701
  _context.next = 16;
714
702
  break;
715
703
  case 8:
716
- if (!((_this$_api = this._api) !== null && _this$_api !== void 0)) {
704
+ if (!((_this$_api = this._api) !== null && _this$_api !== undefined)) {
717
705
  _context.next = 12;
718
706
  break;
719
707
  }
@@ -778,18 +766,20 @@ var PolkadotJsApi = /*#__PURE__*/function () {
778
766
  }, {
779
767
  key: "callTxMethod",
780
768
  value: function callTxMethod(_ref) {
781
- var _this$api$tx$moduleLo2;
769
+ var _this$api$tx$moduleLo;
782
770
  var module = _ref.module,
783
771
  section = _ref.section,
784
772
  parameters = _ref.parameters;
785
773
  var values = Object.values(parameters);
786
774
  var moduleLowerCase = lowercaseFirstLetter(module);
787
775
  var sectionCamelCase = snakeToCamel(section);
788
- if (module === 'Utility') {
789
- var _this$api$tx$moduleLo;
790
- return (_this$api$tx$moduleLo = this.api.tx[moduleLowerCase])[sectionCamelCase].apply(_this$api$tx$moduleLo, _toConsumableArray(values[0]));
791
- }
792
- return (_this$api$tx$moduleLo2 = this.api.tx[moduleLowerCase])[sectionCamelCase].apply(_this$api$tx$moduleLo2, values);
776
+ return (_this$api$tx$moduleLo = this.api.tx[moduleLowerCase])[sectionCamelCase].apply(_this$api$tx$moduleLo, values);
777
+ }
778
+ }, {
779
+ key: "callBatchMethod",
780
+ value: function callBatchMethod(calls, mode) {
781
+ var section = mode === BatchMode.BATCH_ALL ? 'batchAll' : 'batch';
782
+ return this.api.tx.utility[section](calls);
793
783
  }
794
784
  }, {
795
785
  key: "calculateTransactionFee",
@@ -1018,7 +1008,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
1018
1008
  var assetItem = _ref3$0$args[1];
1019
1009
  _ref3[1];
1020
1010
  var assetSymbol = assetItem.toString().toLowerCase();
1021
- return assetSymbol === ((_asset$symbol = asset.symbol) === null || _asset$symbol === void 0 ? void 0 : _asset$symbol.toLowerCase()) || isForeignAsset(asset) && assetSymbol === ((_asset$assetId = asset.assetId) === null || _asset$assetId === void 0 ? void 0 : _asset$assetId.toLowerCase()) || Object.values((_assetItem$toHuman = assetItem.toHuman()) !== null && _assetItem$toHuman !== void 0 ? _assetItem$toHuman : {}).toString().toLowerCase() === ((_asset$symbol2 = asset.symbol) === null || _asset$symbol2 === void 0 ? void 0 : _asset$symbol2.toLowerCase()) || isForeignAsset(asset) && Object.values((_assetItem$toHuman2 = assetItem.toHuman()) !== null && _assetItem$toHuman2 !== void 0 ? _assetItem$toHuman2 : {}).toString().toLowerCase() === ((_asset$assetId2 = asset.assetId) === null || _asset$assetId2 === void 0 ? void 0 : _asset$assetId2.toLowerCase());
1011
+ return assetSymbol === ((_asset$symbol = asset.symbol) === null || _asset$symbol === undefined ? undefined : _asset$symbol.toLowerCase()) || isForeignAsset(asset) && assetSymbol === ((_asset$assetId = asset.assetId) === null || _asset$assetId === undefined ? undefined : _asset$assetId.toLowerCase()) || Object.values((_assetItem$toHuman = assetItem.toHuman()) !== null && _assetItem$toHuman !== undefined ? _assetItem$toHuman : {}).toString().toLowerCase() === ((_asset$symbol2 = asset.symbol) === null || _asset$symbol2 === undefined ? undefined : _asset$symbol2.toLowerCase()) || isForeignAsset(asset) && Object.values((_assetItem$toHuman2 = assetItem.toHuman()) !== null && _assetItem$toHuman2 !== undefined ? _assetItem$toHuman2 : {}).toString().toLowerCase() === ((_asset$assetId2 = asset.assetId) === null || _asset$assetId2 === undefined ? undefined : _asset$assetId2.toLowerCase());
1022
1012
  });
1023
1013
  accountData = entry ? entry[1] : null;
1024
1014
  return _context11.abrupt("return", accountData ? BigInt(accountData.free.toString()) : 0n);
@@ -1450,13 +1440,13 @@ var EvmBuilderClass = /*#__PURE__*/function () {
1450
1440
  _context.next = 19;
1451
1441
  break;
1452
1442
  }
1453
- _context.t1 = _yield$transferEthToP2 === void 0;
1443
+ _context.t1 = _yield$transferEthToP2 === undefined;
1454
1444
  case 19:
1455
1445
  if (!_context.t1) {
1456
1446
  _context.next = 23;
1457
1447
  break;
1458
1448
  }
1459
- _context.t3 = void 0;
1449
+ _context.t3 = undefined;
1460
1450
  _context.next = 24;
1461
1451
  break;
1462
1452
  case 23:
@@ -1468,7 +1458,7 @@ var EvmBuilderClass = /*#__PURE__*/function () {
1468
1458
  _context.next = 28;
1469
1459
  break;
1470
1460
  }
1471
- _context.t0 = _yield$transferEthToP !== void 0;
1461
+ _context.t0 = _yield$transferEthToP !== undefined;
1472
1462
  case 28:
1473
1463
  if (!_context.t0) {
1474
1464
  _context.next = 32;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk-pjs",
3
- "version": "8.1.0",
3
+ "version": "8.2.0",
4
4
  "description": "Polkadot.js based SDK for ParaSpell XCM/XCMP tool for developers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,10 +23,10 @@
23
23
  "dist"
24
24
  ],
25
25
  "dependencies": {
26
- "@snowbridge/api": "^0.1.25",
27
- "ethers": "^6.13.4",
28
- "viem": "^2.21.58",
29
- "@paraspell/sdk-core": "8.1.0"
26
+ "@snowbridge/api": "^0.1.28",
27
+ "ethers": "^6.13.5",
28
+ "viem": "^2.22.13",
29
+ "@paraspell/sdk-core": "8.2.0"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "@polkadot/api": ">= 15.0 < 16",
@@ -37,16 +37,16 @@
37
37
  },
38
38
  "devDependencies": {
39
39
  "@babel/plugin-syntax-import-attributes": "^7.26.0",
40
- "@babel/preset-env": "^7.26.0",
41
- "@codecov/rollup-plugin": "^1.7.0",
40
+ "@babel/preset-env": "^7.26.7",
41
+ "@codecov/rollup-plugin": "^1.8.0",
42
42
  "@rollup/plugin-babel": "^6.0.4",
43
43
  "@rollup/plugin-json": "^6.1.0",
44
44
  "@rollup/plugin-typescript": "^12.1.2",
45
- "@vitest/coverage-v8": "^2.1.8",
45
+ "@vitest/coverage-v8": "^3.0.4",
46
46
  "axios": "^1.7.9",
47
47
  "dotenv": "^16.4.7",
48
48
  "prettier": "^3.4.2",
49
- "rollup": "^4.29.1",
49
+ "rollup": "^4.32.0",
50
50
  "rollup-plugin-dts": "^6.1.1",
51
51
  "tslib": "^2.8.1"
52
52
  },