@paraspell/sdk 5.5.0 → 5.6.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.mjs CHANGED
@@ -4,9 +4,27 @@ import { prodRelayPolkadot, prodRelayKusama } from '@polkadot/apps-config/endpoi
4
4
  import { u32 } from '@polkadot/types';
5
5
  import { BN } from '@polkadot/util';
6
6
 
7
+ function _arrayLikeToArray(r, a) {
8
+ (null == a || a > r.length) && (a = r.length);
9
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
10
+ return n;
11
+ }
12
+ function _arrayWithHoles(r) {
13
+ if (Array.isArray(r)) return r;
14
+ }
15
+ function _arrayWithoutHoles(r) {
16
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
17
+ }
18
+ function _assertThisInitialized(e) {
19
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
20
+ return e;
21
+ }
7
22
  function _callSuper(t, o, e) {
8
23
  return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
9
24
  }
25
+ function _classCallCheck(a, n) {
26
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
27
+ }
10
28
  function _construct(t, e, r) {
11
29
  if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
12
30
  var o = [null];
@@ -14,6 +32,106 @@ function _construct(t, e, r) {
14
32
  var p = new (t.bind.apply(t, o))();
15
33
  return r && _setPrototypeOf(p, r.prototype), p;
16
34
  }
35
+ function _defineProperties(e, r) {
36
+ for (var t = 0; t < r.length; t++) {
37
+ var o = r[t];
38
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
39
+ }
40
+ }
41
+ function _createClass(e, r, t) {
42
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
43
+ writable: !1
44
+ }), e;
45
+ }
46
+ function _createForOfIteratorHelper(r, e) {
47
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
48
+ if (!t) {
49
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e ) {
50
+ t && (r = t);
51
+ var n = 0,
52
+ F = function () {};
53
+ return {
54
+ s: F,
55
+ n: function () {
56
+ return n >= r.length ? {
57
+ done: !0
58
+ } : {
59
+ done: !1,
60
+ value: r[n++]
61
+ };
62
+ },
63
+ e: function (r) {
64
+ throw r;
65
+ },
66
+ f: F
67
+ };
68
+ }
69
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
70
+ }
71
+ var o,
72
+ a = !0,
73
+ u = !1;
74
+ return {
75
+ s: function () {
76
+ t = t.call(r);
77
+ },
78
+ n: function () {
79
+ var r = t.next();
80
+ return a = r.done, r;
81
+ },
82
+ e: function (r) {
83
+ u = !0, o = r;
84
+ },
85
+ f: function () {
86
+ try {
87
+ a || null == t.return || t.return();
88
+ } finally {
89
+ if (u) throw o;
90
+ }
91
+ }
92
+ };
93
+ }
94
+ function _defineProperty(e, r, t) {
95
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
96
+ value: t,
97
+ enumerable: !0,
98
+ configurable: !0,
99
+ writable: !0
100
+ }) : e[r] = t, e;
101
+ }
102
+ function _get() {
103
+ return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {
104
+ var p = _superPropBase(e, t);
105
+ if (p) {
106
+ var n = Object.getOwnPropertyDescriptor(p, t);
107
+ return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;
108
+ }
109
+ }, _get.apply(null, arguments);
110
+ }
111
+ function _getPrototypeOf(t) {
112
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
113
+ return t.__proto__ || Object.getPrototypeOf(t);
114
+ }, _getPrototypeOf(t);
115
+ }
116
+ function _inherits(t, e) {
117
+ if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
118
+ t.prototype = Object.create(e && e.prototype, {
119
+ constructor: {
120
+ value: t,
121
+ writable: !0,
122
+ configurable: !0
123
+ }
124
+ }), Object.defineProperty(t, "prototype", {
125
+ writable: !1
126
+ }), e && _setPrototypeOf(t, e);
127
+ }
128
+ function _isNativeFunction(t) {
129
+ try {
130
+ return -1 !== Function.toString.call(t).indexOf("[native code]");
131
+ } catch (n) {
132
+ return "function" == typeof t;
133
+ }
134
+ }
17
135
  function _isNativeReflectConstruct() {
18
136
  try {
19
137
  var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
@@ -22,6 +140,9 @@ function _isNativeReflectConstruct() {
22
140
  return !!t;
23
141
  })();
24
142
  }
143
+ function _iterableToArray(r) {
144
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
145
+ }
25
146
  function _iterableToArrayLimit(r, l) {
26
147
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
27
148
  if (null != t) {
@@ -46,6 +167,17 @@ function _iterableToArrayLimit(r, l) {
46
167
  return a;
47
168
  }
48
169
  }
170
+ function _nonIterableRest() {
171
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
172
+ }
173
+ function _nonIterableSpread() {
174
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
175
+ }
176
+ function _possibleConstructorReturn(t, e) {
177
+ if (e && ("object" == typeof e || "function" == typeof e)) return e;
178
+ if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
179
+ return _assertThisInitialized(t);
180
+ }
49
181
  function _regeneratorRuntime() {
50
182
  _regeneratorRuntime = function () {
51
183
  return e;
@@ -347,6 +479,21 @@ function _regeneratorRuntime() {
347
479
  }
348
480
  }, e;
349
481
  }
482
+ function _setPrototypeOf(t, e) {
483
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
484
+ return t.__proto__ = e, t;
485
+ }, _setPrototypeOf(t, e);
486
+ }
487
+ function _slicedToArray(r, e) {
488
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
489
+ }
490
+ function _superPropBase(t, o) {
491
+ for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););
492
+ return t;
493
+ }
494
+ function _toConsumableArray(r) {
495
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
496
+ }
350
497
  function _toPrimitive(t, r) {
351
498
  if ("object" != typeof t || !t) return t;
352
499
  var e = t[Symbol.toPrimitive];
@@ -370,225 +517,34 @@ function _typeof(o) {
370
517
  return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
371
518
  }, _typeof(o);
372
519
  }
373
- function _classCallCheck(instance, Constructor) {
374
- if (!(instance instanceof Constructor)) {
375
- throw new TypeError("Cannot call a class as a function");
376
- }
377
- }
378
- function _defineProperties(target, props) {
379
- for (var i = 0; i < props.length; i++) {
380
- var descriptor = props[i];
381
- descriptor.enumerable = descriptor.enumerable || false;
382
- descriptor.configurable = true;
383
- if ("value" in descriptor) descriptor.writable = true;
384
- Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
520
+ function _unsupportedIterableToArray(r, a) {
521
+ if (r) {
522
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
523
+ var t = {}.toString.call(r).slice(8, -1);
524
+ 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;
385
525
  }
386
526
  }
387
- function _createClass(Constructor, protoProps, staticProps) {
388
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
389
- if (staticProps) _defineProperties(Constructor, staticProps);
390
- Object.defineProperty(Constructor, "prototype", {
391
- writable: false
392
- });
393
- return Constructor;
394
- }
395
- function _defineProperty(obj, key, value) {
396
- key = _toPropertyKey(key);
397
- if (key in obj) {
398
- Object.defineProperty(obj, key, {
399
- value: value,
400
- enumerable: true,
401
- configurable: true,
402
- writable: true
403
- });
404
- } else {
405
- obj[key] = value;
406
- }
407
- return obj;
408
- }
409
- function _inherits(subClass, superClass) {
410
- if (typeof superClass !== "function" && superClass !== null) {
411
- throw new TypeError("Super expression must either be null or a function");
412
- }
413
- subClass.prototype = Object.create(superClass && superClass.prototype, {
414
- constructor: {
415
- value: subClass,
416
- writable: true,
417
- configurable: true
418
- }
419
- });
420
- Object.defineProperty(subClass, "prototype", {
421
- writable: false
422
- });
423
- if (superClass) _setPrototypeOf(subClass, superClass);
424
- }
425
- function _getPrototypeOf(o) {
426
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
427
- return o.__proto__ || Object.getPrototypeOf(o);
428
- };
429
- return _getPrototypeOf(o);
430
- }
431
- function _setPrototypeOf(o, p) {
432
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
433
- o.__proto__ = p;
434
- return o;
435
- };
436
- return _setPrototypeOf(o, p);
437
- }
438
- function _isNativeFunction(fn) {
439
- try {
440
- return Function.toString.call(fn).indexOf("[native code]") !== -1;
441
- } catch (e) {
442
- return typeof fn === "function";
443
- }
444
- }
445
- function _wrapNativeSuper(Class) {
446
- var _cache = typeof Map === "function" ? new Map() : undefined;
447
- _wrapNativeSuper = function _wrapNativeSuper(Class) {
448
- if (Class === null || !_isNativeFunction(Class)) return Class;
449
- if (typeof Class !== "function") {
450
- throw new TypeError("Super expression must either be null or a function");
451
- }
452
- if (typeof _cache !== "undefined") {
453
- if (_cache.has(Class)) return _cache.get(Class);
454
- _cache.set(Class, Wrapper);
527
+ function _wrapNativeSuper(t) {
528
+ var r = "function" == typeof Map ? new Map() : void 0;
529
+ return _wrapNativeSuper = function (t) {
530
+ if (null === t || !_isNativeFunction(t)) return t;
531
+ if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
532
+ if (void 0 !== r) {
533
+ if (r.has(t)) return r.get(t);
534
+ r.set(t, Wrapper);
455
535
  }
456
536
  function Wrapper() {
457
- return _construct(Class, arguments, _getPrototypeOf(this).constructor);
537
+ return _construct(t, arguments, _getPrototypeOf(this).constructor);
458
538
  }
459
- Wrapper.prototype = Object.create(Class.prototype, {
539
+ return Wrapper.prototype = Object.create(t.prototype, {
460
540
  constructor: {
461
541
  value: Wrapper,
462
- enumerable: false,
463
- writable: true,
464
- configurable: true
542
+ enumerable: !1,
543
+ writable: !0,
544
+ configurable: !0
465
545
  }
466
- });
467
- return _setPrototypeOf(Wrapper, Class);
468
- };
469
- return _wrapNativeSuper(Class);
470
- }
471
- function _assertThisInitialized(self) {
472
- if (self === void 0) {
473
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
474
- }
475
- return self;
476
- }
477
- function _possibleConstructorReturn(self, call) {
478
- if (call && (typeof call === "object" || typeof call === "function")) {
479
- return call;
480
- } else if (call !== void 0) {
481
- throw new TypeError("Derived constructors may only return object or undefined");
482
- }
483
- return _assertThisInitialized(self);
484
- }
485
- function _superPropBase(object, property) {
486
- while (!Object.prototype.hasOwnProperty.call(object, property)) {
487
- object = _getPrototypeOf(object);
488
- if (object === null) break;
489
- }
490
- return object;
491
- }
492
- function _get() {
493
- if (typeof Reflect !== "undefined" && Reflect.get) {
494
- _get = Reflect.get.bind();
495
- } else {
496
- _get = function _get(target, property, receiver) {
497
- var base = _superPropBase(target, property);
498
- if (!base) return;
499
- var desc = Object.getOwnPropertyDescriptor(base, property);
500
- if (desc.get) {
501
- return desc.get.call(arguments.length < 3 ? target : receiver);
502
- }
503
- return desc.value;
504
- };
505
- }
506
- return _get.apply(this, arguments);
507
- }
508
- function _slicedToArray(arr, i) {
509
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
510
- }
511
- function _toConsumableArray(arr) {
512
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
513
- }
514
- function _arrayWithoutHoles(arr) {
515
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
516
- }
517
- function _arrayWithHoles(arr) {
518
- if (Array.isArray(arr)) return arr;
519
- }
520
- function _iterableToArray(iter) {
521
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
522
- }
523
- function _unsupportedIterableToArray(o, minLen) {
524
- if (!o) return;
525
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
526
- var n = Object.prototype.toString.call(o).slice(8, -1);
527
- if (n === "Object" && o.constructor) n = o.constructor.name;
528
- if (n === "Map" || n === "Set") return Array.from(o);
529
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
530
- }
531
- function _arrayLikeToArray(arr, len) {
532
- if (len == null || len > arr.length) len = arr.length;
533
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
534
- return arr2;
535
- }
536
- function _nonIterableSpread() {
537
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
538
- }
539
- function _nonIterableRest() {
540
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
541
- }
542
- function _createForOfIteratorHelper(o, allowArrayLike) {
543
- var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
544
- if (!it) {
545
- if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike ) {
546
- if (it) o = it;
547
- var i = 0;
548
- var F = function () {};
549
- return {
550
- s: F,
551
- n: function () {
552
- if (i >= o.length) return {
553
- done: true
554
- };
555
- return {
556
- done: false,
557
- value: o[i++]
558
- };
559
- },
560
- e: function (e) {
561
- throw e;
562
- },
563
- f: F
564
- };
565
- }
566
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
567
- }
568
- var normalCompletion = true,
569
- didErr = false,
570
- err;
571
- return {
572
- s: function () {
573
- it = it.call(o);
574
- },
575
- n: function () {
576
- var step = it.next();
577
- normalCompletion = step.done;
578
- return step;
579
- },
580
- e: function (e) {
581
- didErr = true;
582
- err = e;
583
- },
584
- f: function () {
585
- try {
586
- if (!normalCompletion && it.return != null) it.return();
587
- } finally {
588
- if (didErr) throw err;
589
- }
590
- }
591
- };
546
+ }), _setPrototypeOf(Wrapper, t);
547
+ }, _wrapNativeSuper(t);
592
548
  }
593
549
 
594
550
  /******************************************************************************
@@ -608,18 +564,6 @@ PERFORMANCE OF THIS SOFTWARE.
608
564
  /* global Reflect, Promise, SuppressedError, Symbol */
609
565
 
610
566
 
611
- function __rest(s, e) {
612
- var t = {};
613
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
614
- t[p] = s[p];
615
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
616
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
617
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
618
- t[p[i]] = s[p[i]];
619
- }
620
- return t;
621
- }
622
-
623
567
  function __awaiter(thisArg, _arguments, P, generator) {
624
568
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
625
569
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -845,6 +789,32 @@ var Acala$3 = {
845
789
  }
846
790
  ]
847
791
  };
792
+ var BridgeHubPolkadot$3 = {
793
+ paraId: 1002,
794
+ relayChainAssetSymbol: "DOT",
795
+ nativeAssetSymbol: "DOT",
796
+ nativeAssets: [
797
+ {
798
+ symbol: "DOT",
799
+ decimals: 10
800
+ }
801
+ ],
802
+ otherAssets: [
803
+ ]
804
+ };
805
+ var BridgeHubKusama$3 = {
806
+ paraId: 1002,
807
+ relayChainAssetSymbol: "KSM",
808
+ nativeAssetSymbol: "KSM",
809
+ nativeAssets: [
810
+ {
811
+ symbol: "KSM",
812
+ decimals: 12
813
+ }
814
+ ],
815
+ otherAssets: [
816
+ ]
817
+ };
848
818
  var Astar$3 = {
849
819
  paraId: 2006,
850
820
  relayChainAssetSymbol: "DOT",
@@ -1135,7 +1105,7 @@ var BifrostPolkadot$3 = {
1135
1105
  },
1136
1106
  {
1137
1107
  symbol: "ETH",
1138
- decimals: 18
1108
+ decimals: 10
1139
1109
  },
1140
1110
  {
1141
1111
  symbol: "KAR",
@@ -1441,7 +1411,7 @@ var Darwinia$3 = {
1441
1411
  otherAssets: [
1442
1412
  ]
1443
1413
  };
1444
- var HydraDX$3 = {
1414
+ var Hydration$3 = {
1445
1415
  paraId: 2034,
1446
1416
  relayChainAssetSymbol: "DOT",
1447
1417
  nativeAssetSymbol: "HDX",
@@ -1547,6 +1517,11 @@ var HydraDX$3 = {
1547
1517
  symbol: "CFG",
1548
1518
  decimals: 18
1549
1519
  },
1520
+ {
1521
+ assetId: "32",
1522
+ symbol: "AJUN",
1523
+ decimals: 12
1524
+ },
1550
1525
  {
1551
1526
  assetId: "27",
1552
1527
  symbol: "CRU",
@@ -2207,6 +2182,11 @@ var AssetHubPolkadot$3 = {
2207
2182
  symbol: "HUB",
2208
2183
  decimals: 10
2209
2184
  },
2185
+ {
2186
+ assetId: "81",
2187
+ symbol: "GVN",
2188
+ decimals: 6
2189
+ },
2210
2190
  {
2211
2191
  assetId: "200",
2212
2192
  symbol: "MONA",
@@ -2222,6 +2202,16 @@ var AssetHubPolkadot$3 = {
2222
2202
  symbol: "PLAY",
2223
2203
  decimals: 10
2224
2204
  },
2205
+ {
2206
+ assetId: "2222",
2207
+ symbol: "DUCK",
2208
+ decimals: 10
2209
+ },
2210
+ {
2211
+ assetId: "222",
2212
+ symbol: "SHL",
2213
+ decimals: 6
2214
+ },
2225
2215
  {
2226
2216
  assetId: "69420",
2227
2217
  symbol: "GABE",
@@ -2242,6 +2232,11 @@ var AssetHubPolkadot$3 = {
2242
2232
  symbol: "BEEFY",
2243
2233
  decimals: 2
2244
2234
  },
2235
+ {
2236
+ assetId: "110",
2237
+ symbol: "SIX",
2238
+ decimals: 12
2239
+ },
2245
2240
  {
2246
2241
  assetId: "10",
2247
2242
  symbol: "BEAST",
@@ -2257,6 +2252,21 @@ var AssetHubPolkadot$3 = {
2257
2252
  symbol: "ICE",
2258
2253
  decimals: 20
2259
2254
  },
2255
+ {
2256
+ assetId: "1111",
2257
+ symbol: "TESTV2",
2258
+ decimals: 12
2259
+ },
2260
+ {
2261
+ assetId: "202406",
2262
+ symbol: "USDT",
2263
+ decimals: 16
2264
+ },
2265
+ {
2266
+ assetId: "300",
2267
+ symbol: "DOGE",
2268
+ decimals: 6
2269
+ },
2260
2270
  {
2261
2271
  assetId: "4",
2262
2272
  symbol: "EFI",
@@ -2297,11 +2307,21 @@ var AssetHubPolkadot$3 = {
2297
2307
  symbol: "DED",
2298
2308
  decimals: 10
2299
2309
  },
2310
+ {
2311
+ assetId: "39",
2312
+ symbol: "PEPE",
2313
+ decimals: 6
2314
+ },
2300
2315
  {
2301
2316
  assetId: "101",
2302
2317
  symbol: "DOTMA",
2303
2318
  decimals: 0
2304
2319
  },
2320
+ {
2321
+ assetId: "38",
2322
+ symbol: "SHIB",
2323
+ decimals: 6
2324
+ },
2305
2325
  {
2306
2326
  assetId: "46",
2307
2327
  symbol: "PEPE",
@@ -2337,6 +2357,11 @@ var AssetHubPolkadot$3 = {
2337
2357
  symbol: "DEMO",
2338
2358
  decimals: 6
2339
2359
  },
2360
+ {
2361
+ assetId: "122",
2362
+ symbol: "TESTING",
2363
+ decimals: 12
2364
+ },
2340
2365
  {
2341
2366
  assetId: "66",
2342
2367
  symbol: "DOGE",
@@ -2427,6 +2452,11 @@ var AssetHubPolkadot$3 = {
2427
2452
  symbol: "COCOA",
2428
2453
  decimals: 10
2429
2454
  },
2455
+ {
2456
+ assetId: "301",
2457
+ symbol: "HORN",
2458
+ decimals: 6
2459
+ },
2430
2460
  {
2431
2461
  assetId: "2020",
2432
2462
  symbol: "HYDRA",
@@ -2442,16 +2472,36 @@ var AssetHubPolkadot$3 = {
2442
2472
  symbol: "CATNIP",
2443
2473
  decimals: 20
2444
2474
  },
2475
+ {
2476
+ assetId: "37362",
2477
+ symbol: "TEST",
2478
+ decimals: 10
2479
+ },
2480
+ {
2481
+ assetId: "44",
2482
+ symbol: "SKL",
2483
+ decimals: 6
2484
+ },
2445
2485
  {
2446
2486
  assetId: "15",
2447
2487
  symbol: "Meme",
2448
2488
  decimals: 10
2449
2489
  },
2490
+ {
2491
+ assetId: "9202",
2492
+ symbol: "BUG",
2493
+ decimals: 12
2494
+ },
2450
2495
  {
2451
2496
  assetId: "78",
2452
2497
  symbol: "COCA",
2453
2498
  decimals: 6
2454
2499
  },
2500
+ {
2501
+ assetId: "61",
2502
+ symbol: "SUN",
2503
+ decimals: 6
2504
+ },
2455
2505
  {
2456
2506
  assetId: "40",
2457
2507
  symbol: "PEPE",
@@ -2502,6 +2552,11 @@ var AssetHubPolkadot$3 = {
2502
2552
  symbol: "VSC",
2503
2553
  decimals: 9
2504
2554
  },
2555
+ {
2556
+ assetId: "1994",
2557
+ symbol: "CRT",
2558
+ decimals: 4
2559
+ },
2505
2560
  {
2506
2561
  assetId: "2829",
2507
2562
  symbol: "JTO",
@@ -2522,6 +2577,11 @@ var AssetHubPolkadot$3 = {
2522
2577
  symbol: "PJS",
2523
2578
  decimals: 18
2524
2579
  },
2580
+ {
2581
+ assetId: "2001",
2582
+ symbol: "DOTA",
2583
+ decimals: 6
2584
+ },
2525
2585
  {
2526
2586
  assetId: "5",
2527
2587
  symbol: "PLX",
@@ -2542,6 +2602,16 @@ var AssetHubPolkadot$3 = {
2542
2602
  symbol: "POKA",
2543
2603
  decimals: 6
2544
2604
  },
2605
+ {
2606
+ assetId: "1010",
2607
+ symbol: "ETH",
2608
+ decimals: 10
2609
+ },
2610
+ {
2611
+ assetId: "201",
2612
+ symbol: "WUD",
2613
+ decimals: 6
2614
+ },
2545
2615
  {
2546
2616
  assetId: "1984",
2547
2617
  symbol: "USDt",
@@ -2562,6 +2632,11 @@ var AssetHubPolkadot$3 = {
2562
2632
  symbol: "MPACT",
2563
2633
  decimals: 8
2564
2634
  },
2635
+ {
2636
+ assetId: "777777",
2637
+ symbol: "HLG",
2638
+ decimals: 18
2639
+ },
2565
2640
  {
2566
2641
  assetId: "22",
2567
2642
  symbol: "KNRY",
@@ -2592,6 +2667,11 @@ var AssetHubPolkadot$3 = {
2592
2667
  symbol: "HAM",
2593
2668
  decimals: 10
2594
2669
  },
2670
+ {
2671
+ assetId: "181",
2672
+ symbol: "RNET",
2673
+ decimals: 0
2674
+ },
2595
2675
  {
2596
2676
  assetId: "9003",
2597
2677
  symbol: "KTRL",
@@ -2612,11 +2692,21 @@ var AssetHubPolkadot$3 = {
2612
2692
  symbol: "dot",
2613
2693
  decimals: 0
2614
2694
  },
2695
+ {
2696
+ assetId: "90",
2697
+ symbol: "ATC",
2698
+ decimals: 6
2699
+ },
2615
2700
  {
2616
2701
  assetId: "80",
2617
2702
  symbol: "GOVD",
2618
2703
  decimals: 10
2619
2704
  },
2705
+ {
2706
+ assetId: "1864",
2707
+ symbol: "JUNK",
2708
+ decimals: 10
2709
+ },
2620
2710
  {
2621
2711
  assetId: "8",
2622
2712
  symbol: "JOE",
@@ -2627,11 +2717,26 @@ var AssetHubPolkadot$3 = {
2627
2717
  symbol: "HYDRA",
2628
2718
  decimals: 10
2629
2719
  },
2720
+ {
2721
+ assetId: "10000",
2722
+ symbol: "DOGE",
2723
+ decimals: 6
2724
+ },
2630
2725
  {
2631
2726
  assetId: "2820",
2632
2727
  symbol: "HOOT",
2633
2728
  decimals: 6
2634
2729
  },
2730
+ {
2731
+ assetId: "51",
2732
+ symbol: "JAMA",
2733
+ decimals: 6
2734
+ },
2735
+ {
2736
+ assetId: "1234",
2737
+ symbol: "BUNS",
2738
+ decimals: 10
2739
+ },
2635
2740
  {
2636
2741
  assetId: "404",
2637
2742
  symbol: "clay",
@@ -2647,6 +2752,16 @@ var AssetHubPolkadot$3 = {
2647
2752
  symbol: "HOBO",
2648
2753
  decimals: 2
2649
2754
  },
2755
+ {
2756
+ assetId: "60",
2757
+ symbol: "ANT",
2758
+ decimals: 6
2759
+ },
2760
+ {
2761
+ assetId: "1992",
2762
+ symbol: "SITE",
2763
+ decimals: 10
2764
+ },
2650
2765
  {
2651
2766
  assetId: "6666",
2652
2767
  symbol: "CHAOS",
@@ -2747,6 +2862,11 @@ var AssetHubPolkadot$3 = {
2747
2862
  symbol: "PINK",
2748
2863
  decimals: 10
2749
2864
  },
2865
+ {
2866
+ assetId: "37",
2867
+ symbol: "DODA",
2868
+ decimals: 6
2869
+ },
2750
2870
  {
2751
2871
  assetId: "5417",
2752
2872
  symbol: "HASH",
@@ -2772,6 +2892,16 @@ var AssetHubPolkadot$3 = {
2772
2892
  symbol: "GAVIN",
2773
2893
  decimals: 0
2774
2894
  },
2895
+ {
2896
+ assetId: "91",
2897
+ symbol: "WING",
2898
+ decimals: 6
2899
+ },
2900
+ {
2901
+ assetId: "77777",
2902
+ symbol: "WOOP",
2903
+ decimals: 12
2904
+ },
2775
2905
  {
2776
2906
  assetId: "4157",
2777
2907
  symbol: "PDOG",
@@ -3577,184 +3707,6 @@ var Litmus$3 = {
3577
3707
  otherAssets: [
3578
3708
  ]
3579
3709
  };
3580
- var Mangata$3 = {
3581
- paraId: 2110,
3582
- relayChainAssetSymbol: "KSM",
3583
- nativeAssetSymbol: "MGX",
3584
- nativeAssets: [
3585
- {
3586
- symbol: "MGX",
3587
- decimals: 18
3588
- }
3589
- ],
3590
- otherAssets: [
3591
- {
3592
- assetId: "30",
3593
- symbol: "USDT",
3594
- decimals: 6
3595
- },
3596
- {
3597
- assetId: "48",
3598
- symbol: "TKN0x00000007-TKN0x0000000E",
3599
- decimals: 18
3600
- },
3601
- {
3602
- assetId: "7",
3603
- symbol: "TUR",
3604
- decimals: 10
3605
- },
3606
- {
3607
- assetId: "13",
3608
- symbol: "TKN0x0000000B-TKN0x00000004",
3609
- decimals: 18
3610
- },
3611
- {
3612
- assetId: "26",
3613
- symbol: "ZLK",
3614
- decimals: 18
3615
- },
3616
- {
3617
- assetId: "5",
3618
- symbol: "TKN0x00000004-TKN0x00000000",
3619
- decimals: 18
3620
- },
3621
- {
3622
- assetId: "8",
3623
- symbol: "TKN0x00000000-TKN0x00000007",
3624
- decimals: 18
3625
- },
3626
- {
3627
- assetId: "33",
3628
- symbol: "TKN0x00000000-TKN0x0000001F",
3629
- decimals: 18
3630
- },
3631
- {
3632
- assetId: "39",
3633
- symbol: "MOVR",
3634
- decimals: 18
3635
- },
3636
- {
3637
- assetId: "1",
3638
- symbol: "ETH",
3639
- decimals: 18
3640
- },
3641
- {
3642
- assetId: "19",
3643
- symbol: "TKN0x00000010-TKN0x00000004",
3644
- decimals: 18
3645
- },
3646
- {
3647
- assetId: "45",
3648
- symbol: "TKN0x0000000B-TKN0x00000007",
3649
- decimals: 18
3650
- },
3651
- {
3652
- assetId: "9",
3653
- symbol: "TKN0x00000004-TKN0x00000007",
3654
- decimals: 18
3655
- },
3656
- {
3657
- assetId: "16",
3658
- symbol: "vsKSM",
3659
- decimals: 12
3660
- },
3661
- {
3662
- assetId: "14",
3663
- symbol: "BNC",
3664
- decimals: 12
3665
- },
3666
- {
3667
- assetId: "43",
3668
- symbol: "TKN0x00000000-TKN0x00000027",
3669
- decimals: 18
3670
- },
3671
- {
3672
- assetId: "31",
3673
- symbol: "RMRK",
3674
- decimals: 10
3675
- },
3676
- {
3677
- assetId: "21",
3678
- symbol: "TKN0x0000000F-TKN0x00000004",
3679
- decimals: 18
3680
- },
3681
- {
3682
- assetId: "15",
3683
- symbol: "vKSM",
3684
- decimals: 12
3685
- },
3686
- {
3687
- assetId: "47",
3688
- symbol: "TKN0x0000001E-TKN0x00000000",
3689
- decimals: 18
3690
- },
3691
- {
3692
- assetId: "27",
3693
- symbol: "TKN0x0000001A-TKN0x00000000",
3694
- decimals: 18
3695
- },
3696
- {
3697
- assetId: "28",
3698
- symbol: "TKN0x00000004-TKN0x0000001A",
3699
- decimals: 18
3700
- },
3701
- {
3702
- assetId: "0",
3703
- symbol: "MGX",
3704
- decimals: 18
3705
- },
3706
- {
3707
- assetId: "6",
3708
- symbol: "KAR",
3709
- decimals: 12
3710
- },
3711
- {
3712
- assetId: "11",
3713
- symbol: "IMBU",
3714
- decimals: 12
3715
- },
3716
- {
3717
- assetId: "3",
3718
- symbol: "TKN0x00000000-TKN0x00000002",
3719
- decimals: 18
3720
- },
3721
- {
3722
- assetId: "17",
3723
- symbol: "TKN0x00000000-TKN0x0000000E",
3724
- decimals: 18
3725
- },
3726
- {
3727
- assetId: "23",
3728
- symbol: "vBNC",
3729
- decimals: 12
3730
- },
3731
- {
3732
- assetId: "4",
3733
- symbol: "KSM",
3734
- decimals: 12
3735
- },
3736
- {
3737
- assetId: "34",
3738
- symbol: "TKN0x00000004-TKN0x0000001F",
3739
- decimals: 18
3740
- },
3741
- {
3742
- assetId: "32",
3743
- symbol: "TKN0x00000004-TKN0x0000001E",
3744
- decimals: 18
3745
- },
3746
- {
3747
- assetId: "12",
3748
- symbol: "TKN0x00000000-TKN0x0000000B",
3749
- decimals: 18
3750
- },
3751
- {
3752
- assetId: "42",
3753
- symbol: "TKN0x00000004-TKN0x0000000E",
3754
- decimals: 18
3755
- }
3756
- ]
3757
- };
3758
3710
  var Moonriver$3 = {
3759
3711
  paraId: 2023,
3760
3712
  relayChainAssetSymbol: "KSM",
@@ -4947,11 +4899,6 @@ var AssetHubKusama$3 = {
4947
4899
  symbol: "ki",
4948
4900
  decimals: 18
4949
4901
  },
4950
- {
4951
- assetId: "5797867",
4952
- symbol: "TAKE",
4953
- decimals: 0
4954
- },
4955
4902
  {
4956
4903
  assetId: "33",
4957
4904
  symbol: "BUSSY",
@@ -6164,6 +6111,8 @@ var Khala$3 = {
6164
6111
  };
6165
6112
  var assets = {
6166
6113
  Acala: Acala$3,
6114
+ BridgeHubPolkadot: BridgeHubPolkadot$3,
6115
+ BridgeHubKusama: BridgeHubKusama$3,
6167
6116
  Astar: Astar$3,
6168
6117
  BifrostPolkadot: BifrostPolkadot$3,
6169
6118
  Bitgreen: Bitgreen$3,
@@ -6171,7 +6120,7 @@ var assets = {
6171
6120
  Subsocial: Subsocial$3,
6172
6121
  ComposableFinance: ComposableFinance$3,
6173
6122
  Darwinia: Darwinia$3,
6174
- HydraDX: HydraDX$3,
6123
+ Hydration: Hydration$3,
6175
6124
  Interlay: Interlay$3,
6176
6125
  Litentry: Litentry$3,
6177
6126
  Moonbeam: Moonbeam$3,
@@ -6194,7 +6143,6 @@ var assets = {
6194
6143
  Karura: Karura$3,
6195
6144
  Kintsugi: Kintsugi$3,
6196
6145
  Litmus: Litmus$3,
6197
- Mangata: Mangata$3,
6198
6146
  Moonriver: Moonriver$3,
6199
6147
  ParallelHeiko: ParallelHeiko$3,
6200
6148
  Picasso: Picasso$3,
@@ -6231,6 +6179,8 @@ var assetsMapJson = /*#__PURE__*/Object.freeze({
6231
6179
  BifrostKusama: BifrostKusama$3,
6232
6180
  BifrostPolkadot: BifrostPolkadot$3,
6233
6181
  Bitgreen: Bitgreen$3,
6182
+ BridgeHubKusama: BridgeHubKusama$3,
6183
+ BridgeHubPolkadot: BridgeHubPolkadot$3,
6234
6184
  Calamari: Calamari$3,
6235
6185
  Centrifuge: Centrifuge$3,
6236
6186
  Collectives: Collectives$3,
@@ -6242,7 +6192,7 @@ var assetsMapJson = /*#__PURE__*/Object.freeze({
6242
6192
  Curio: Curio$3,
6243
6193
  Darwinia: Darwinia$3,
6244
6194
  Encointer: Encointer$3,
6245
- HydraDX: HydraDX$3,
6195
+ Hydration: Hydration$3,
6246
6196
  Imbue: Imbue$3,
6247
6197
  Integritee: Integritee$3,
6248
6198
  Interlay: Interlay$3,
@@ -6253,7 +6203,6 @@ var assetsMapJson = /*#__PURE__*/Object.freeze({
6253
6203
  Kintsugi: Kintsugi$3,
6254
6204
  Litentry: Litentry$3,
6255
6205
  Litmus: Litmus$3,
6256
- Mangata: Mangata$3,
6257
6206
  Manta: Manta$3,
6258
6207
  Moonbeam: Moonbeam$3,
6259
6208
  Moonriver: Moonriver$3,
@@ -6430,7 +6379,7 @@ var Darwinia$2 = {
6430
6379
  "XTokens"
6431
6380
  ]
6432
6381
  };
6433
- var HydraDX$2 = {
6382
+ var Hydration$2 = {
6434
6383
  defaultPallet: "XTokens",
6435
6384
  supportedPallets: [
6436
6385
  "PolkadotXcm",
@@ -6493,9 +6442,10 @@ var Amplitude$2 = {
6493
6442
  ]
6494
6443
  };
6495
6444
  var Bajun$2 = {
6496
- defaultPallet: "PolkadotXcm",
6445
+ defaultPallet: "XTokens",
6497
6446
  supportedPallets: [
6498
- "PolkadotXcm"
6447
+ "PolkadotXcm",
6448
+ "XTokens"
6499
6449
  ]
6500
6450
  };
6501
6451
  var Basilisk$2 = {
@@ -6581,13 +6531,6 @@ var Litmus$2 = {
6581
6531
  "XTokens"
6582
6532
  ]
6583
6533
  };
6584
- var Mangata$2 = {
6585
- defaultPallet: "XTokens",
6586
- supportedPallets: [
6587
- "PolkadotXcm",
6588
- "XTokens"
6589
- ]
6590
- };
6591
6534
  var Moonriver$2 = {
6592
6535
  defaultPallet: "XTokens",
6593
6536
  supportedPallets: [
@@ -6730,6 +6673,18 @@ var Curio$2 = {
6730
6673
  "XTokens"
6731
6674
  ]
6732
6675
  };
6676
+ var BridgeHubPolkadot$2 = {
6677
+ defaultPallet: "PolkadotXcm",
6678
+ supportedPallets: [
6679
+ "PolkadotXcm"
6680
+ ]
6681
+ };
6682
+ var BridgeHubKusama$2 = {
6683
+ defaultPallet: "PolkadotXcm",
6684
+ supportedPallets: [
6685
+ "PolkadotXcm"
6686
+ ]
6687
+ };
6733
6688
  var pallets = {
6734
6689
  AssetHubPolkadot: AssetHubPolkadot$2,
6735
6690
  Acala: Acala$2,
@@ -6740,7 +6695,7 @@ var pallets = {
6740
6695
  Centrifuge: Centrifuge$2,
6741
6696
  ComposableFinance: ComposableFinance$2,
6742
6697
  Darwinia: Darwinia$2,
6743
- HydraDX: HydraDX$2,
6698
+ Hydration: Hydration$2,
6744
6699
  Interlay: Interlay$2,
6745
6700
  Litentry: Litentry$2,
6746
6701
  Moonbeam: Moonbeam$2,
@@ -6762,7 +6717,6 @@ var pallets = {
6762
6717
  Karura: Karura$2,
6763
6718
  Kintsugi: Kintsugi$2,
6764
6719
  Litmus: Litmus$2,
6765
- Mangata: Mangata$2,
6766
6720
  Moonriver: Moonriver$2,
6767
6721
  ParallelHeiko: ParallelHeiko$2,
6768
6722
  Picasso: Picasso$2,
@@ -6783,7 +6737,9 @@ var pallets = {
6783
6737
  Phala: Phala$2,
6784
6738
  Subsocial: Subsocial$2,
6785
6739
  KiltSpiritnet: KiltSpiritnet$2,
6786
- Curio: Curio$2
6740
+ Curio: Curio$2,
6741
+ BridgeHubPolkadot: BridgeHubPolkadot$2,
6742
+ BridgeHubKusama: BridgeHubKusama$2
6787
6743
  };
6788
6744
 
6789
6745
  var palletsMapJson = /*#__PURE__*/Object.freeze({
@@ -6799,6 +6755,8 @@ var palletsMapJson = /*#__PURE__*/Object.freeze({
6799
6755
  BifrostKusama: BifrostKusama$2,
6800
6756
  BifrostPolkadot: BifrostPolkadot$2,
6801
6757
  Bitgreen: Bitgreen$2,
6758
+ BridgeHubKusama: BridgeHubKusama$2,
6759
+ BridgeHubPolkadot: BridgeHubPolkadot$2,
6802
6760
  Calamari: Calamari$2,
6803
6761
  Centrifuge: Centrifuge$2,
6804
6762
  Collectives: Collectives$2,
@@ -6810,7 +6768,7 @@ var palletsMapJson = /*#__PURE__*/Object.freeze({
6810
6768
  Curio: Curio$2,
6811
6769
  Darwinia: Darwinia$2,
6812
6770
  Encointer: Encointer$2,
6813
- HydraDX: HydraDX$2,
6771
+ Hydration: Hydration$2,
6814
6772
  Imbue: Imbue$2,
6815
6773
  Integritee: Integritee$2,
6816
6774
  Interlay: Interlay$2,
@@ -6821,7 +6779,6 @@ var palletsMapJson = /*#__PURE__*/Object.freeze({
6821
6779
  Kintsugi: Kintsugi$2,
6822
6780
  Litentry: Litentry$2,
6823
6781
  Litmus: Litmus$2,
6824
- Mangata: Mangata$2,
6825
6782
  Manta: Manta$2,
6826
6783
  Moonbeam: Moonbeam$2,
6827
6784
  Moonriver: Moonriver$2,
@@ -6892,7 +6849,10 @@ var createCurrencySpec = function createCurrencySpec(amount, version, parents, o
6892
6849
  var interior = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'Here';
6893
6850
  if (!overriddenCurrency) {
6894
6851
  return _defineProperty({}, version, [{
6895
- id: {
6852
+ id: version === Version.V4 ? {
6853
+ parents: parents,
6854
+ interior: interior
6855
+ } : {
6896
6856
  Concrete: {
6897
6857
  parents: parents,
6898
6858
  interior: interior
@@ -6904,7 +6864,7 @@ var createCurrencySpec = function createCurrencySpec(amount, version, parents, o
6904
6864
  }]);
6905
6865
  }
6906
6866
  return isTMultiLocation(overriddenCurrency) ? _defineProperty({}, version, [{
6907
- id: {
6867
+ id: version === Version.V4 ? overriddenCurrency : {
6908
6868
  Concrete: overriddenCurrency
6909
6869
  },
6910
6870
  fun: {
@@ -6915,13 +6875,11 @@ var createCurrencySpec = function createCurrencySpec(amount, version, parents, o
6915
6875
  };
6916
6876
  var createPolkadotXcmHeader = function createPolkadotXcmHeader(scenario, version, destination, nodeId) {
6917
6877
  var parents = scenario === 'RelayToPara' ? Parents.ZERO : Parents.ONE;
6918
- var interior = scenario === 'ParaToRelay' ? 'Here' : {
6919
- X1: {
6920
- Parachain: nodeId
6921
- }
6922
- };
6878
+ var interior = scenario === 'ParaToRelay' ? 'Here' : createX1Payload(version, {
6879
+ Parachain: nodeId
6880
+ });
6923
6881
  var isMultiLocationDestination = _typeof(destination) === 'object';
6924
- return _defineProperty({}, scenario === 'RelayToPara' ? Version.V3 : version, isMultiLocationDestination ? destination : {
6882
+ return _defineProperty({}, version, isMultiLocationDestination ? destination : {
6925
6883
  parents: parents,
6926
6884
  interior: interior
6927
6885
  });
@@ -7134,7 +7092,7 @@ var Bitgreen$1 = "1000000000";
7134
7092
  var Centrifuge$1 = "1000000000000";
7135
7093
  var ComposableFinance$1 = "100000000000";
7136
7094
  var Darwinia$1 = "0";
7137
- var HydraDX$1 = "1000000000000";
7095
+ var Hydration$1 = "1000000000000";
7138
7096
  var Litentry$1 = "100000000000";
7139
7097
  var Moonbeam$1 = "0";
7140
7098
  var Parallel$1 = "100000000000";
@@ -7174,13 +7132,14 @@ var Polkadot = "10000000000";
7174
7132
  var Kusama = "333333333";
7175
7133
  var Interlay$1 = "0";
7176
7134
  var Kintsugi$1 = "0";
7177
- var Mangata$1 = "0";
7178
7135
  var Collectives$1 = "1000000000";
7179
7136
  var Khala$1 = "10000000000";
7180
7137
  var Phala$1 = "10000000000";
7181
7138
  var Subsocial$1 = "100000000";
7182
7139
  var KiltSpiritnet$1 = "10000000000000";
7183
7140
  var Curio$1 = "10000000000000000";
7141
+ var BridgeHubPolkadot$1 = "1000000000";
7142
+ var BridgeHubKusama$1 = "33333333";
7184
7143
  var existentialDeposits = {
7185
7144
  AssetHubPolkadot: AssetHubPolkadot$1,
7186
7145
  Acala: Acala$1,
@@ -7190,7 +7149,7 @@ var existentialDeposits = {
7190
7149
  Centrifuge: Centrifuge$1,
7191
7150
  ComposableFinance: ComposableFinance$1,
7192
7151
  Darwinia: Darwinia$1,
7193
- HydraDX: HydraDX$1,
7152
+ Hydration: Hydration$1,
7194
7153
  Litentry: Litentry$1,
7195
7154
  Moonbeam: Moonbeam$1,
7196
7155
  Parallel: Parallel$1,
@@ -7230,13 +7189,14 @@ var existentialDeposits = {
7230
7189
  Kusama: Kusama,
7231
7190
  Interlay: Interlay$1,
7232
7191
  Kintsugi: Kintsugi$1,
7233
- Mangata: Mangata$1,
7234
7192
  Collectives: Collectives$1,
7235
7193
  Khala: Khala$1,
7236
7194
  Phala: Phala$1,
7237
7195
  Subsocial: Subsocial$1,
7238
7196
  KiltSpiritnet: KiltSpiritnet$1,
7239
- Curio: Curio$1
7197
+ Curio: Curio$1,
7198
+ BridgeHubPolkadot: BridgeHubPolkadot$1,
7199
+ BridgeHubKusama: BridgeHubKusama$1
7240
7200
  };
7241
7201
 
7242
7202
  var edMapJson = /*#__PURE__*/Object.freeze({
@@ -7252,6 +7212,8 @@ var edMapJson = /*#__PURE__*/Object.freeze({
7252
7212
  BifrostKusama: BifrostKusama$1,
7253
7213
  BifrostPolkadot: BifrostPolkadot$1,
7254
7214
  Bitgreen: Bitgreen$1,
7215
+ BridgeHubKusama: BridgeHubKusama$1,
7216
+ BridgeHubPolkadot: BridgeHubPolkadot$1,
7255
7217
  Calamari: Calamari$1,
7256
7218
  Centrifuge: Centrifuge$1,
7257
7219
  Collectives: Collectives$1,
@@ -7263,7 +7225,7 @@ var edMapJson = /*#__PURE__*/Object.freeze({
7263
7225
  Curio: Curio$1,
7264
7226
  Darwinia: Darwinia$1,
7265
7227
  Encointer: Encointer$1,
7266
- HydraDX: HydraDX$1,
7228
+ Hydration: Hydration$1,
7267
7229
  Imbue: Imbue$1,
7268
7230
  Integritee: Integritee$1,
7269
7231
  Interlay: Interlay$1,
@@ -7275,7 +7237,6 @@ var edMapJson = /*#__PURE__*/Object.freeze({
7275
7237
  Kusama: Kusama,
7276
7238
  Litentry: Litentry$1,
7277
7239
  Litmus: Litmus$1,
7278
- Mangata: Mangata$1,
7279
7240
  Manta: Manta$1,
7280
7241
  Moonbeam: Moonbeam$1,
7281
7242
  Moonriver: Moonriver$1,
@@ -7528,6 +7489,12 @@ var RelayToParaBuilder = /*#__PURE__*/function () {
7528
7489
  this._destApi = destApi;
7529
7490
  return this;
7530
7491
  }
7492
+ }, {
7493
+ key: "xcmVersion",
7494
+ value: function xcmVersion(version) {
7495
+ this._version = version;
7496
+ return this;
7497
+ }
7531
7498
  }, {
7532
7499
  key: "buildOptions",
7533
7500
  value: function buildOptions() {
@@ -7537,7 +7504,8 @@ var RelayToParaBuilder = /*#__PURE__*/function () {
7537
7504
  amount: this._amount,
7538
7505
  address: this._address,
7539
7506
  paraIdTo: this.paraIdTo,
7540
- destApiForKeepAlive: this._destApi
7507
+ destApiForKeepAlive: this._destApi,
7508
+ version: this._version
7541
7509
  };
7542
7510
  }
7543
7511
  }, {
@@ -7621,6 +7589,12 @@ var ParaToParaBuilder = /*#__PURE__*/function () {
7621
7589
  this._destApi = destApi;
7622
7590
  return this;
7623
7591
  }
7592
+ }, {
7593
+ key: "xcmVersion",
7594
+ value: function xcmVersion(version) {
7595
+ this._version = version;
7596
+ return this;
7597
+ }
7624
7598
  }, {
7625
7599
  key: "buildOptions",
7626
7600
  value: function buildOptions() {
@@ -7633,7 +7607,8 @@ var ParaToParaBuilder = /*#__PURE__*/function () {
7633
7607
  destination: this.to,
7634
7608
  paraIdTo: this.paraIdTo,
7635
7609
  feeAsset: this._feeAsset,
7636
- destApiForKeepAlive: this._destApi
7610
+ destApiForKeepAlive: this._destApi,
7611
+ version: this._version
7637
7612
  };
7638
7613
  }
7639
7614
  }, {
@@ -7704,6 +7679,12 @@ var ParaToRelayBuilder = /*#__PURE__*/function () {
7704
7679
  this._destApi = destApi;
7705
7680
  return this;
7706
7681
  }
7682
+ }, {
7683
+ key: "xcmVersion",
7684
+ value: function xcmVersion(version) {
7685
+ this._version = version;
7686
+ return this;
7687
+ }
7707
7688
  }, {
7708
7689
  key: "buildOptions",
7709
7690
  value: function buildOptions() {
@@ -7718,7 +7699,8 @@ var ParaToRelayBuilder = /*#__PURE__*/function () {
7718
7699
  amount: this.amount,
7719
7700
  address: this._address,
7720
7701
  feeAsset: this.feeAsset,
7721
- destApiForKeepAlive: this._destApi
7702
+ destApiForKeepAlive: this._destApi,
7703
+ version: this._version
7722
7704
  };
7723
7705
  }
7724
7706
  }, {
@@ -7785,7 +7767,7 @@ var buildBeneficiaryInput = function buildBeneficiaryInput(api, address) {
7785
7767
  if (isTMultiLocation(address)) {
7786
7768
  return address;
7787
7769
  }
7788
- var isEthAddress = ethers.utils.isAddress(address);
7770
+ var isEthAddress = ethers.isAddress(address);
7789
7771
  return {
7790
7772
  parents: Parents.ZERO,
7791
7773
  interior: {
@@ -8341,6 +8323,11 @@ var ParachainNode = /*#__PURE__*/function () {
8341
8323
  get: function get() {
8342
8324
  return this._assetCheckEnabled;
8343
8325
  }
8326
+ }, {
8327
+ key: "canUseXTokens",
8328
+ value: function canUseXTokens(_) {
8329
+ return true;
8330
+ }
8344
8331
  }, {
8345
8332
  key: "transfer",
8346
8333
  value: function transfer(options) {
@@ -8353,17 +8340,19 @@ var ParachainNode = /*#__PURE__*/function () {
8353
8340
  paraIdTo = options.paraIdTo,
8354
8341
  overridedCurrencyMultiLocation = options.overridedCurrencyMultiLocation,
8355
8342
  feeAsset = options.feeAsset,
8343
+ _options$version = options.version,
8344
+ version = _options$version === void 0 ? this.version : _options$version,
8356
8345
  _options$serializedAp = options.serializedApiCallEnabled,
8357
8346
  serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
8358
8347
  var scenario = destination !== undefined ? 'ParaToPara' : 'ParaToRelay';
8359
8348
  var paraId = destination !== undefined && _typeof(destination) !== 'object' ? paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination) : undefined;
8360
- if (supportsXTokens(this)) {
8349
+ if (supportsXTokens(this) && this.canUseXTokens(options)) {
8361
8350
  return this.transferXTokens({
8362
8351
  api: api,
8363
8352
  currency: currencySymbol,
8364
8353
  currencyID: currencyId,
8365
8354
  amount: amount,
8366
- addressSelection: generateAddressPayload(api, scenario, 'XTokens', address, this.version, paraId),
8355
+ addressSelection: generateAddressPayload(api, scenario, 'XTokens', address, version, paraId),
8367
8356
  fees: getFees(scenario),
8368
8357
  origin: this.node,
8369
8358
  scenario: scenario,
@@ -8389,11 +8378,11 @@ var ParachainNode = /*#__PURE__*/function () {
8389
8378
  } else if (supportsPolkadotXCM(this)) {
8390
8379
  return this.transferPolkadotXCM({
8391
8380
  api: api,
8392
- header: this.createPolkadotXcmHeader(scenario, destination, paraId),
8393
- addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, this.version, paraId),
8381
+ header: this.createPolkadotXcmHeader(scenario, version, destination, paraId),
8382
+ addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, version, paraId),
8394
8383
  address: address,
8395
8384
  amount: amount,
8396
- currencySelection: this.createCurrencySpec(amount, scenario, this.version, currencyId, overridedCurrencyMultiLocation),
8385
+ currencySelection: this.createCurrencySpec(amount, scenario, version, currencyId, overridedCurrencyMultiLocation),
8397
8386
  currencyId: currencyId,
8398
8387
  scenario: scenario,
8399
8388
  currencySymbol: currencySymbol,
@@ -8410,10 +8399,12 @@ var ParachainNode = /*#__PURE__*/function () {
8410
8399
  }, {
8411
8400
  key: "transferRelayToPara",
8412
8401
  value: function transferRelayToPara(options) {
8402
+ var _options$version2 = options.version,
8403
+ version = _options$version2 === void 0 ? Version.V3 : _options$version2;
8413
8404
  return {
8414
8405
  module: 'xcmPallet',
8415
8406
  section: 'reserveTransferAssets',
8416
- parameters: constructRelayToParaParameters(options, Version.V3)
8407
+ parameters: constructRelayToParaParameters(options, version)
8417
8408
  };
8418
8409
  }
8419
8410
  }, {
@@ -8446,8 +8437,8 @@ var ParachainNode = /*#__PURE__*/function () {
8446
8437
  }
8447
8438
  }, {
8448
8439
  key: "createPolkadotXcmHeader",
8449
- value: function createPolkadotXcmHeader$1(scenario, destination, paraId) {
8450
- return createPolkadotXcmHeader(scenario, this.version, destination, paraId);
8440
+ value: function createPolkadotXcmHeader$1(scenario, version, destination, paraId) {
8441
+ return createPolkadotXcmHeader(scenario, version, destination, paraId);
8451
8442
  }
8452
8443
  }]);
8453
8444
  }();
@@ -8674,13 +8665,13 @@ var ComposableFinance = /*#__PURE__*/function (_ParachainNode) {
8674
8665
  }]);
8675
8666
  }(ParachainNode);
8676
8667
 
8677
- var HydraDX = /*#__PURE__*/function (_ParachainNode) {
8678
- function HydraDX() {
8679
- _classCallCheck(this, HydraDX);
8680
- return _callSuper(this, HydraDX, ['HydraDX', 'hydradx', 'polkadot', Version.V3]);
8668
+ var Hydration = /*#__PURE__*/function (_ParachainNode) {
8669
+ function Hydration() {
8670
+ _classCallCheck(this, Hydration);
8671
+ return _callSuper(this, Hydration, ['Hydration', 'hydradx', 'polkadot', Version.V3]);
8681
8672
  }
8682
- _inherits(HydraDX, _ParachainNode);
8683
- return _createClass(HydraDX, [{
8673
+ _inherits(Hydration, _ParachainNode);
8674
+ return _createClass(Hydration, [{
8684
8675
  key: "transferXTokens",
8685
8676
  value: function transferXTokens(input) {
8686
8677
  var currencyID = input.currencyID;
@@ -8743,12 +8734,19 @@ var Moonbeam = /*#__PURE__*/function (_ParachainNode) {
8743
8734
  }, {
8744
8735
  key: "transferRelayToPara",
8745
8736
  value: function transferRelayToPara(options) {
8737
+ var _options$version = options.version,
8738
+ version = _options$version === void 0 ? Version.V3 : _options$version;
8746
8739
  return {
8747
8740
  module: 'xcmPallet',
8748
8741
  section: 'limitedReserveTransferAssets',
8749
- parameters: constructRelayToParaParameters(options, Version.V3, true)
8742
+ parameters: constructRelayToParaParameters(options, version, true)
8750
8743
  };
8751
8744
  }
8745
+ }, {
8746
+ key: "getProvider",
8747
+ value: function getProvider() {
8748
+ return getAllNodeProviders(this.node)[2];
8749
+ }
8752
8750
  }]);
8753
8751
  }(ParachainNode);
8754
8752
 
@@ -8923,72 +8921,17 @@ var Moonriver = /*#__PURE__*/function (_ParachainNode) {
8923
8921
  }, {
8924
8922
  key: "transferRelayToPara",
8925
8923
  value: function transferRelayToPara(options) {
8924
+ var _options$version = options.version,
8925
+ version = _options$version === void 0 ? Version.V3 : _options$version;
8926
8926
  return {
8927
8927
  module: 'xcmPallet',
8928
8928
  section: 'limitedReserveTransferAssets',
8929
- parameters: constructRelayToParaParameters(options, Version.V3, true)
8929
+ parameters: constructRelayToParaParameters(options, version, true)
8930
8930
  };
8931
8931
  }
8932
8932
  }]);
8933
8933
  }(ParachainNode);
8934
8934
 
8935
- var Mangata = /*#__PURE__*/function (_ParachainNode) {
8936
- function Mangata() {
8937
- _classCallCheck(this, Mangata);
8938
- return _callSuper(this, Mangata, ['Mangata', 'mangata', 'kusama', Version.V3]);
8939
- }
8940
- _inherits(Mangata, _ParachainNode);
8941
- return _createClass(Mangata, [{
8942
- key: "transferXTokens",
8943
- value: function transferXTokens(input) {
8944
- return XTokensTransferImpl.transferXTokens(input, input.currencyID);
8945
- }
8946
- }, {
8947
- key: "createApiInstance",
8948
- value: function createApiInstance() {
8949
- return __awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
8950
- var _yield$import, mTypes, mRpc, options, provider;
8951
- return _regeneratorRuntime().wrap(function _callee$(_context) {
8952
- while (1) switch (_context.prev = _context.next) {
8953
- case 0:
8954
- _context.next = 2;
8955
- return import('@mangata-finance/type-definitions');
8956
- case 2:
8957
- _yield$import = _context.sent;
8958
- mTypes = _yield$import.mTypes;
8959
- mRpc = _yield$import.mRpc;
8960
- options = function options() {
8961
- var _a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8962
- var _a$types = _a.types,
8963
- types = _a$types === void 0 ? {} : _a$types,
8964
- _a$rpc = _a.rpc,
8965
- rpc = _a$rpc === void 0 ? {} : _a$rpc,
8966
- otherOptions = __rest(_a, ["types", "rpc"]);
8967
- return Object.assign({
8968
- types: Object.assign(Object.assign({}, mTypes), types),
8969
- rpc: Object.assign(Object.assign({}, mRpc), rpc)
8970
- }, otherOptions);
8971
- };
8972
- provider = new WsProvider(this.getProvider());
8973
- _context.next = 9;
8974
- return ApiPromise.create(options({
8975
- provider: provider,
8976
- throwOnConnect: true,
8977
- throwOnUnknown: true,
8978
- noInitWarn: true
8979
- }));
8980
- case 9:
8981
- return _context.abrupt("return", _context.sent);
8982
- case 10:
8983
- case "end":
8984
- return _context.stop();
8985
- }
8986
- }, _callee, this);
8987
- }));
8988
- }
8989
- }]);
8990
- }(ParachainNode);
8991
-
8992
8935
  var Litmus = /*#__PURE__*/function (_ParachainNode) {
8993
8936
  function Litmus() {
8994
8937
  _classCallCheck(this, Litmus);
@@ -9102,10 +9045,10 @@ var NodeNotSupportedError = /*#__PURE__*/function (_Error) {
9102
9045
 
9103
9046
  // Used to inform user, that Parachain they wish to use does not support scenario they wish to use yet
9104
9047
  var ScenarioNotSupportedError = /*#__PURE__*/function (_Error) {
9105
- function ScenarioNotSupportedError(node, scenario) {
9048
+ function ScenarioNotSupportedError(node, scenario, message) {
9106
9049
  var _this;
9107
9050
  _classCallCheck(this, ScenarioNotSupportedError);
9108
- _this = _callSuper(this, ScenarioNotSupportedError, ["Scenario ".concat(scenario, " not supported for node ").concat(node)]);
9051
+ _this = _callSuper(this, ScenarioNotSupportedError, [message !== null && message !== void 0 ? message : "Scenario ".concat(scenario, " not supported for node ").concat(node)]);
9109
9052
  _this.name = 'ScenarioNotSupported';
9110
9053
  return _this;
9111
9054
  }
@@ -9258,10 +9201,12 @@ var AssetHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
9258
9201
  }, {
9259
9202
  key: "transferRelayToPara",
9260
9203
  value: function transferRelayToPara(options) {
9204
+ var _options$version = options.version,
9205
+ version = _options$version === void 0 ? Version.V3 : _options$version;
9261
9206
  return {
9262
9207
  module: 'xcmPallet',
9263
9208
  section: 'limitedTeleportAssets',
9264
- parameters: constructRelayToParaParameters(options, Version.V3, true)
9209
+ parameters: constructRelayToParaParameters(options, version, true)
9265
9210
  };
9266
9211
  }
9267
9212
  }, {
@@ -9307,10 +9252,12 @@ var AssetHubKusama = /*#__PURE__*/function (_ParachainNode) {
9307
9252
  }, {
9308
9253
  key: "transferRelayToPara",
9309
9254
  value: function transferRelayToPara(options) {
9255
+ var _options$version = options.version,
9256
+ version = _options$version === void 0 ? Version.V3 : _options$version;
9310
9257
  return {
9311
9258
  module: 'xcmPallet',
9312
9259
  section: 'limitedTeleportAssets',
9313
- parameters: constructRelayToParaParameters(options, Version.V3, true)
9260
+ parameters: constructRelayToParaParameters(options, version, true)
9314
9261
  };
9315
9262
  }
9316
9263
  }, {
@@ -9343,10 +9290,12 @@ var CoretimeKusama = /*#__PURE__*/function (_ParachainNode) {
9343
9290
  value: function transferRelayToPara(options) {
9344
9291
  // TESTED block hash on Rococo: 0x28929f7b2aeadbf3333f05d35bed18214a4b23dd270bd072f99e8a0131d22456
9345
9292
  // https://rococo.subscan.io/extrinsic/0x469eec7dccb22696b0c95cf4f5eec4b367ad3dc23243a346cc2aad3cc9522800
9293
+ var _options$version = options.version,
9294
+ version = _options$version === void 0 ? Version.V3 : _options$version;
9346
9295
  return {
9347
9296
  module: 'xcmPallet',
9348
9297
  section: 'limitedTeleportAssets',
9349
- parameters: constructRelayToParaParameters(options, Version.V3, true)
9298
+ parameters: constructRelayToParaParameters(options, version, true)
9350
9299
  };
9351
9300
  }
9352
9301
  }]);
@@ -9371,10 +9320,12 @@ var Encointer = /*#__PURE__*/function (_ParachainNode) {
9371
9320
  }, {
9372
9321
  key: "transferRelayToPara",
9373
9322
  value: function transferRelayToPara(options) {
9323
+ var _options$version = options.version,
9324
+ version = _options$version === void 0 ? Version.V1 : _options$version;
9374
9325
  return {
9375
9326
  module: 'xcmPallet',
9376
9327
  section: 'limitedTeleportAssets',
9377
- parameters: constructRelayToParaParameters(options, Version.V1, true)
9328
+ parameters: constructRelayToParaParameters(options, version, true)
9378
9329
  };
9379
9330
  }
9380
9331
  }]);
@@ -9419,56 +9370,10 @@ var Astar = /*#__PURE__*/function (_ParachainNode) {
9419
9370
  return XTokensTransferImpl.transferXTokens(input, input.currencyID);
9420
9371
  }
9421
9372
  }, {
9422
- key: "transfer",
9423
- value: function transfer(options) {
9424
- var api = options.api,
9425
- currencySymbol = options.currencySymbol,
9426
- currencyId = options.currencyId,
9427
- amount = options.amount,
9428
- address = options.address,
9429
- destination = options.destination,
9430
- paraIdTo = options.paraIdTo,
9431
- feeAsset = options.feeAsset,
9432
- overridedCurrencyMultiLocation = options.overridedCurrencyMultiLocation,
9433
- _options$serializedAp = options.serializedApiCallEnabled,
9434
- serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
9435
- var scenario = destination !== undefined ? 'ParaToPara' : 'ParaToRelay';
9436
- var paraId = destination !== undefined && _typeof(destination) !== 'object' ? paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination) : undefined;
9437
- var node = this.node;
9438
- if (supportsXTokens(this) && currencySymbol !== 'ASTR') {
9439
- return this.transferXTokens({
9440
- api: api,
9441
- currency: currencySymbol,
9442
- currencyID: currencyId,
9443
- amount: amount,
9444
- addressSelection: generateAddressPayload(api, scenario, 'XTokens', address, this.version, paraId),
9445
- fees: getFees(scenario),
9446
- origin: this.node,
9447
- scenario: scenario,
9448
- paraIdTo: paraId,
9449
- destination: destination,
9450
- overridedCurrencyMultiLocation: overridedCurrencyMultiLocation,
9451
- serializedApiCallEnabled: serializedApiCallEnabled
9452
- });
9453
- } else if (supportsPolkadotXCM(this)) {
9454
- return this.transferPolkadotXCM({
9455
- api: api,
9456
- header: this.createPolkadotXcmHeader(scenario, destination, paraId),
9457
- addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, this.version, paraId),
9458
- address: address,
9459
- amount: amount,
9460
- currencySelection: this.createCurrencySpec(amount, scenario, this.version, currencyId, overridedCurrencyMultiLocation),
9461
- currencyId: currencyId,
9462
- scenario: scenario,
9463
- currencySymbol: currencySymbol,
9464
- feeAsset: feeAsset,
9465
- destination: destination,
9466
- paraIdTo: paraIdTo,
9467
- overridedCurrency: overridedCurrencyMultiLocation,
9468
- serializedApiCallEnabled: serializedApiCallEnabled
9469
- });
9470
- }
9471
- throw new NoXCMSupportImplementedError(node);
9373
+ key: "canUseXTokens",
9374
+ value: function canUseXTokens(_ref) {
9375
+ var currencySymbol = _ref.currencySymbol;
9376
+ return currencySymbol !== 'ASTR';
9472
9377
  }
9473
9378
  }]);
9474
9379
  }(ParachainNode);
@@ -9576,56 +9481,10 @@ var Shiden = /*#__PURE__*/function (_ParachainNode) {
9576
9481
  return XTokensTransferImpl.transferXTokens(input, input.currencyID);
9577
9482
  }
9578
9483
  }, {
9579
- key: "transfer",
9580
- value: function transfer(options) {
9581
- var api = options.api,
9582
- currencySymbol = options.currencySymbol,
9583
- currencyId = options.currencyId,
9584
- amount = options.amount,
9585
- address = options.address,
9586
- destination = options.destination,
9587
- paraIdTo = options.paraIdTo,
9588
- feeAsset = options.feeAsset,
9589
- overridedCurrencyMultiLocation = options.overridedCurrencyMultiLocation,
9590
- _options$serializedAp = options.serializedApiCallEnabled,
9591
- serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
9592
- var scenario = destination !== undefined ? 'ParaToPara' : 'ParaToRelay';
9593
- var paraId = destination !== undefined && _typeof(destination) !== 'object' ? paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination) : undefined;
9594
- var node = this.node;
9595
- if (supportsXTokens(this) && currencySymbol !== 'SDN') {
9596
- return this.transferXTokens({
9597
- api: api,
9598
- currency: currencySymbol,
9599
- currencyID: currencyId,
9600
- amount: amount,
9601
- addressSelection: generateAddressPayload(api, scenario, 'XTokens', address, this.version, paraId),
9602
- fees: getFees(scenario),
9603
- origin: this.node,
9604
- scenario: scenario,
9605
- paraIdTo: paraId,
9606
- destination: destination,
9607
- overridedCurrencyMultiLocation: overridedCurrencyMultiLocation,
9608
- serializedApiCallEnabled: serializedApiCallEnabled
9609
- });
9610
- } else if (supportsPolkadotXCM(this)) {
9611
- return this.transferPolkadotXCM({
9612
- api: api,
9613
- header: this.createPolkadotXcmHeader(scenario, destination, paraId),
9614
- addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, this.version, paraId),
9615
- address: address,
9616
- amount: amount,
9617
- currencySelection: this.createCurrencySpec(amount, scenario, this.version, currencyId, overridedCurrencyMultiLocation),
9618
- currencyId: currencyId,
9619
- scenario: scenario,
9620
- currencySymbol: currencySymbol,
9621
- feeAsset: feeAsset,
9622
- destination: destination,
9623
- paraIdTo: paraIdTo,
9624
- overridedCurrency: overridedCurrencyMultiLocation,
9625
- serializedApiCallEnabled: serializedApiCallEnabled
9626
- });
9627
- }
9628
- throw new NoXCMSupportImplementedError(node);
9484
+ key: "canUseXTokens",
9485
+ value: function canUseXTokens(_ref) {
9486
+ var currencySymbol = _ref.currencySymbol;
9487
+ return currencySymbol !== 'SDN';
9629
9488
  }
9630
9489
  }]);
9631
9490
  }(ParachainNode);
@@ -9766,10 +9625,12 @@ var Collectives = /*#__PURE__*/function (_ParachainNode) {
9766
9625
  }, {
9767
9626
  key: "transferRelayToPara",
9768
9627
  value: function transferRelayToPara(options) {
9628
+ var _options$version = options.version,
9629
+ version = _options$version === void 0 ? Version.V3 : _options$version;
9769
9630
  return {
9770
9631
  module: 'xcmPallet',
9771
9632
  section: 'limitedTeleportAssets',
9772
- parameters: constructRelayToParaParameters(options, Version.V3, true)
9633
+ parameters: constructRelayToParaParameters(options, version, true)
9773
9634
  };
9774
9635
  }
9775
9636
  }, {
@@ -9791,7 +9652,7 @@ var determineDestWeight = function determineDestWeight(destNode) {
9791
9652
  proofSize: '1000000'
9792
9653
  };
9793
9654
  }
9794
- if (destNode === 'Moonbeam' || destNode === 'HydraDX') {
9655
+ if (destNode === 'Moonbeam' || destNode === 'Hydration') {
9795
9656
  return {
9796
9657
  refTime: '5000000000',
9797
9658
  proofSize: '0'
@@ -9807,7 +9668,7 @@ var getDestination = function getDestination(_ref) {
9807
9668
  if (isMultiLocation) {
9808
9669
  return recipientAddress;
9809
9670
  }
9810
- var isEthAddress = ethers.utils.isAddress(recipientAddress);
9671
+ var isEthAddress = ethers.isAddress(recipientAddress);
9811
9672
  var addressJunction = isEthAddress ? {
9812
9673
  AccountKey20: {
9813
9674
  key: recipientAddress
@@ -9954,8 +9815,74 @@ var Curio = /*#__PURE__*/function (_ParachainNode) {
9954
9815
  }]);
9955
9816
  }(ParachainNode);
9956
9817
 
9818
+ var BridgeHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
9819
+ function BridgeHubPolkadot() {
9820
+ var _this;
9821
+ _classCallCheck(this, BridgeHubPolkadot);
9822
+ _this = _callSuper(this, BridgeHubPolkadot, ['BridgeHubPolkadot', 'polkadotBridgeHub', 'polkadot', Version.V3]);
9823
+ _this._assetCheckEnabled = false;
9824
+ return _this;
9825
+ }
9826
+ _inherits(BridgeHubPolkadot, _ParachainNode);
9827
+ return _createClass(BridgeHubPolkadot, [{
9828
+ key: "transferPolkadotXCM",
9829
+ value: function transferPolkadotXCM(input) {
9830
+ var scenario = input.scenario;
9831
+ if (scenario === 'ParaToPara') {
9832
+ throw new ScenarioNotSupportedError(this.node, scenario, 'Unable to use bridge hub for transfers to other Parachains. Please move your currency to AssetHub to transfer to other Parachains.');
9833
+ }
9834
+ var method = 'limitedTeleportAssets';
9835
+ return PolkadotXCMTransferImpl.transferPolkadotXCM(input, method, 'Unlimited');
9836
+ }
9837
+ }, {
9838
+ key: "transferRelayToPara",
9839
+ value: function transferRelayToPara(options) {
9840
+ var _options$version = options.version,
9841
+ version = _options$version === void 0 ? Version.V3 : _options$version;
9842
+ return {
9843
+ module: 'xcmPallet',
9844
+ section: 'limitedTeleportAssets',
9845
+ parameters: constructRelayToParaParameters(options, version, true)
9846
+ };
9847
+ }
9848
+ }]);
9849
+ }(ParachainNode);
9850
+
9851
+ var BridgeHubKusama = /*#__PURE__*/function (_ParachainNode) {
9852
+ function BridgeHubKusama() {
9853
+ var _this;
9854
+ _classCallCheck(this, BridgeHubKusama);
9855
+ _this = _callSuper(this, BridgeHubKusama, ['BridgeHubKusama', 'kusamaBridgeHub', 'kusama', Version.V3]);
9856
+ _this._assetCheckEnabled = false;
9857
+ return _this;
9858
+ }
9859
+ _inherits(BridgeHubKusama, _ParachainNode);
9860
+ return _createClass(BridgeHubKusama, [{
9861
+ key: "transferPolkadotXCM",
9862
+ value: function transferPolkadotXCM(input) {
9863
+ var scenario = input.scenario;
9864
+ if (scenario === 'ParaToPara') {
9865
+ throw new ScenarioNotSupportedError(this.node, scenario, 'Unable to use bridge hub for transfers to other Parachains. Please move your currency to AssetHub to transfer to other Parachains.');
9866
+ }
9867
+ var method = 'limitedTeleportAssets';
9868
+ return PolkadotXCMTransferImpl.transferPolkadotXCM(input, method, 'Unlimited');
9869
+ }
9870
+ }, {
9871
+ key: "transferRelayToPara",
9872
+ value: function transferRelayToPara(options) {
9873
+ var _options$version = options.version,
9874
+ version = _options$version === void 0 ? Version.V3 : _options$version;
9875
+ return {
9876
+ module: 'xcmPallet',
9877
+ section: 'limitedTeleportAssets',
9878
+ parameters: constructRelayToParaParameters(options, version, true)
9879
+ };
9880
+ }
9881
+ }]);
9882
+ }(ParachainNode);
9883
+
9957
9884
  // Contains supported Parachains and exports supported XCM Pallets
9958
- var NODE_NAMES = ['AssetHubPolkadot', 'Acala', 'Astar', 'BifrostPolkadot', 'Bitgreen', 'Centrifuge', 'ComposableFinance', 'Darwinia', 'HydraDX', 'Interlay', 'Litentry', 'Moonbeam', 'Parallel', 'AssetHubKusama', 'CoretimeKusama', 'Encointer', 'Altair', 'Amplitude', 'Bajun', 'Basilisk', 'BifrostKusama', 'Pioneer', 'Calamari', 'CrustShadow', 'Crab', 'Imbue', 'Integritee', 'InvArchTinker', 'Karura', 'Kintsugi', 'Litmus', 'Mangata', 'Moonriver', 'ParallelHeiko', 'Picasso', 'Quartz', 'Robonomics', 'Shiden', 'Turing', 'Unique', 'Crust', 'Manta', 'Nodle', 'NeuroWeb', 'Pendulum', 'Polkadex', 'Zeitgeist', 'Collectives', 'Khala', 'Phala', 'Subsocial', 'KiltSpiritnet', 'Curio'];
9885
+ var NODE_NAMES = ['AssetHubPolkadot', 'Acala', 'Astar', 'BifrostPolkadot', 'Bitgreen', 'BridgeHubPolkadot', 'BridgeHubKusama', 'Centrifuge', 'ComposableFinance', 'Darwinia', 'Hydration', 'Interlay', 'Litentry', 'Moonbeam', 'Parallel', 'AssetHubKusama', 'CoretimeKusama', 'Encointer', 'Altair', 'Amplitude', 'Bajun', 'Basilisk', 'BifrostKusama', 'Pioneer', 'Calamari', 'CrustShadow', 'Crab', 'Imbue', 'Integritee', 'InvArchTinker', 'Karura', 'Kintsugi', 'Litmus', 'Moonriver', 'ParallelHeiko', 'Picasso', 'Quartz', 'Robonomics', 'Shiden', 'Turing', 'Unique', 'Crust', 'Manta', 'Nodle', 'NeuroWeb', 'Pendulum', 'Polkadex', 'Zeitgeist', 'Collectives', 'Khala', 'Phala', 'Subsocial', 'KiltSpiritnet', 'Curio'];
9959
9886
  var NODES_WITH_RELAY_CHAINS = [].concat(NODE_NAMES, ['Polkadot', 'Kusama']);
9960
9887
  var nodes = {
9961
9888
  AssetHubPolkadot: new AssetHubPolkadot(),
@@ -9964,11 +9891,13 @@ var nodes = {
9964
9891
  Unique: new Unique(),
9965
9892
  Crust: new Crust(),
9966
9893
  BifrostPolkadot: new BifrostPolkadot(),
9894
+ BridgeHubPolkadot: new BridgeHubPolkadot(),
9895
+ BridgeHubKusama: new BridgeHubKusama(),
9967
9896
  Bitgreen: new Bitgreen(),
9968
9897
  Centrifuge: new Centrifuge(),
9969
9898
  ComposableFinance: new ComposableFinance(),
9970
9899
  Darwinia: new Darwinia(),
9971
- HydraDX: new HydraDX(),
9900
+ Hydration: new Hydration(),
9972
9901
  Interlay: new Interlay(),
9973
9902
  Litentry: new Litentry(),
9974
9903
  Moonbeam: new Moonbeam(),
@@ -9991,7 +9920,6 @@ var nodes = {
9991
9920
  Karura: new Karura(),
9992
9921
  Kintsugi: new Kintsugi(),
9993
9922
  Litmus: new Litmus(),
9994
- Mangata: new Mangata(),
9995
9923
  Moonriver: new Moonriver(),
9996
9924
  ParallelHeiko: new ParallelHeiko(),
9997
9925
  Picasso: new Picasso(),
@@ -10033,7 +9961,7 @@ var generateAddressMultiLocationV4 = function generateAddressMultiLocationV4(api
10033
9961
  if (isMultiLocation) {
10034
9962
  return _defineProperty({}, Version.V4, address);
10035
9963
  }
10036
- var isEthAddress = ethers.utils.isAddress(address);
9964
+ var isEthAddress = ethers.isAddress(address);
10037
9965
  return _defineProperty({}, Version.V4, {
10038
9966
  parents: Parents.ZERO,
10039
9967
  interior: {
@@ -10050,24 +9978,32 @@ var generateAddressMultiLocationV4 = function generateAddressMultiLocationV4(api
10050
9978
  }
10051
9979
  });
10052
9980
  };
9981
+ var createX1Payload = function createX1Payload(version, junction) {
9982
+ if (version === Version.V4) {
9983
+ return {
9984
+ X1: [junction]
9985
+ };
9986
+ }
9987
+ return {
9988
+ X1: junction
9989
+ };
9990
+ };
10053
9991
  var generateAddressPayload = function generateAddressPayload(api, scenario, pallet, recipientAddress, version, nodeId) {
10054
9992
  var isMultiLocation = _typeof(recipientAddress) === 'object';
10055
9993
  if (isMultiLocation) {
10056
9994
  return _defineProperty({}, version, recipientAddress);
10057
9995
  }
10058
- var isEthAddress = ethers.utils.isAddress(recipientAddress);
9996
+ var isEthAddress = ethers.isAddress(recipientAddress);
10059
9997
  if (scenario === 'ParaToRelay') {
10060
9998
  return _defineProperty({}, version, {
10061
9999
  parents: pallet === 'XTokens' ? Parents.ONE : Parents.ZERO,
10062
- interior: {
10063
- X1: {
10064
- AccountId32: Object.assign(Object.assign({}, version === Version.V1 && {
10065
- network: 'any'
10066
- }), {
10067
- id: createAccID(api, recipientAddress)
10068
- })
10069
- }
10070
- }
10000
+ interior: createX1Payload(version, {
10001
+ AccountId32: Object.assign(Object.assign({}, version === Version.V1 && {
10002
+ network: 'any'
10003
+ }), {
10004
+ id: createAccID(api, recipientAddress)
10005
+ })
10006
+ })
10071
10007
  });
10072
10008
  }
10073
10009
  if (scenario === 'ParaToPara' && pallet === 'XTokens') {
@@ -10095,36 +10031,32 @@ var generateAddressPayload = function generateAddressPayload(api, scenario, pall
10095
10031
  if (scenario === 'ParaToPara' && pallet === 'PolkadotXcm') {
10096
10032
  return _defineProperty({}, version, {
10097
10033
  parents: Parents.ZERO,
10098
- interior: {
10099
- X1: isEthAddress ? {
10100
- AccountKey20: Object.assign(Object.assign({}, version === Version.V1 && {
10101
- network: 'any'
10102
- }), {
10103
- key: recipientAddress
10104
- })
10105
- } : {
10106
- AccountId32: Object.assign(Object.assign({}, version === Version.V1 && {
10107
- network: 'any'
10108
- }), {
10109
- id: createAccID(api, recipientAddress)
10110
- })
10111
- }
10112
- }
10113
- });
10114
- }
10115
- return _defineProperty({}, Version.V3, {
10116
- parents: Parents.ZERO,
10117
- interior: {
10118
- X1: isEthAddress ? {
10119
- AccountKey20: {
10034
+ interior: createX1Payload(version, isEthAddress ? {
10035
+ AccountKey20: Object.assign(Object.assign({}, version === Version.V1 && {
10036
+ network: 'any'
10037
+ }), {
10120
10038
  key: recipientAddress
10121
- }
10039
+ })
10122
10040
  } : {
10123
- AccountId32: {
10041
+ AccountId32: Object.assign(Object.assign({}, version === Version.V1 && {
10042
+ network: 'any'
10043
+ }), {
10124
10044
  id: createAccID(api, recipientAddress)
10125
- }
10045
+ })
10046
+ })
10047
+ });
10048
+ }
10049
+ return _defineProperty({}, version, {
10050
+ parents: Parents.ZERO,
10051
+ interior: createX1Payload(version, isEthAddress ? {
10052
+ AccountKey20: {
10053
+ key: recipientAddress
10126
10054
  }
10127
- }
10055
+ } : {
10056
+ AccountId32: {
10057
+ id: createAccID(api, recipientAddress)
10058
+ }
10059
+ })
10128
10060
  });
10129
10061
  };
10130
10062
  var getNode = function getNode(node) {
@@ -10187,7 +10119,7 @@ var createApiInstanceForNode = function createApiInstanceForNode(node) {
10187
10119
  break;
10188
10120
  }
10189
10121
  endpointOption = node === 'Polkadot' ? prodRelayPolkadot : prodRelayKusama;
10190
- wsUrl = Object.values(endpointOption.providers)[1];
10122
+ wsUrl = Object.values(endpointOption.providers)[0];
10191
10123
  _context2.next = 5;
10192
10124
  return createApiInstance(wsUrl);
10193
10125
  case 5:
@@ -10286,115 +10218,117 @@ var createTx = function createTx(originApi, destApi, address, amount, currencySy
10286
10218
  }, _callee);
10287
10219
  }));
10288
10220
  };
10289
- var checkKeepAlive = function checkKeepAlive(_ref) {
10290
- var originApi = _ref.originApi,
10291
- address = _ref.address,
10292
- amount = _ref.amount,
10293
- originNode = _ref.originNode,
10294
- destApi = _ref.destApi,
10295
- currencySymbol = _ref.currencySymbol,
10296
- destNode = _ref.destNode;
10297
- return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
10298
- var _yield$destApi$query$, data, balance, _yield$originApi$quer, originData, balanceOrigin, amountBN, ed, edOrigin, tx, xcmFee, amountBNWithoutFee, amountOriginBNWithoutFee;
10299
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
10300
- while (1) switch (_context2.prev = _context2.next) {
10301
- case 0:
10302
- if (!(destApi === undefined)) {
10303
- _context2.next = 2;
10304
- break;
10305
- }
10306
- return _context2.abrupt("return");
10307
- case 2:
10308
- if (!(currencySymbol === undefined)) {
10309
- _context2.next = 4;
10310
- break;
10311
- }
10312
- throw new KeepAliveError('Currency symbol not found for this asset. Cannot check keep alive.');
10313
- case 4:
10314
- if (!(originNode !== undefined && destNode !== undefined && currencySymbol !== getAssetsObject(destNode).nativeAssetSymbol)) {
10315
- _context2.next = 6;
10316
- break;
10317
- }
10318
- throw new KeepAliveError('Keep alive check is only supported when sending native asset of destination parachain.');
10319
- case 6:
10320
- _context2.next = 8;
10321
- return destApi.query.system.account(address);
10322
- case 8:
10323
- _yield$destApi$query$ = _context2.sent;
10324
- data = _yield$destApi$query$.data;
10325
- balance = data.free.toBn();
10326
- _context2.next = 13;
10327
- return originApi.query.system.account(address);
10328
- case 13:
10329
- _yield$originApi$quer = _context2.sent;
10330
- originData = _yield$originApi$quer.data;
10331
- balanceOrigin = originData.free.toBn();
10332
- amountBN = new BN(amount);
10333
- ed = getExistentialDeposit(destNode !== null && destNode !== void 0 ? destNode : determineRelayChain(originNode));
10334
- edOrigin = getExistentialDeposit(originNode !== null && originNode !== void 0 ? originNode : determineRelayChain(destNode));
10335
- _context2.next = 21;
10336
- return createTx(originApi, destApi, address, amount, currencySymbol, originNode, destNode);
10337
- case 21:
10338
- tx = _context2.sent;
10339
- if (!(tx === null)) {
10340
- _context2.next = 24;
10341
- break;
10342
- }
10343
- throw new KeepAliveError('Transaction for XCM fee calculation could not be created.');
10344
- case 24:
10345
- _context2.next = 26;
10346
- return calculateTransactionFee$1(tx, address);
10347
- case 26:
10348
- xcmFee = _context2.sent;
10349
- if (!(ed === null)) {
10350
- _context2.next = 29;
10351
- break;
10352
- }
10353
- throw new KeepAliveError('Existential deposit not found for destination parachain.');
10354
- case 29:
10355
- if (!(edOrigin === null)) {
10356
- _context2.next = 31;
10357
- break;
10358
- }
10359
- throw new KeepAliveError('Existential deposit not found for origin parachain.');
10360
- case 31:
10361
- console.log('XCM FEE: ', xcmFee.toString());
10362
- console.log('EXISTENTIAL DEPOSIT: ', ed.toString());
10363
- console.log('EXISTENTIAL DEPOSIT ORIGIN: ', edOrigin.toString());
10364
- console.log('BALANCE: ', balance.toString());
10365
- console.log('ORIGIN BALANCE: ', balanceOrigin.toString());
10366
- console.log('AMOUNT: ', amountBN.toString());
10367
- console.log('AMOUNT WITHOUT FEE: ', amountBN.sub(xcmFee.mul(new BN(1.5))).toString());
10368
- console.log('BALANCE + AMOUNT WITHOUT FEE: ', balance.add(amountBN.sub(xcmFee.mul(new BN(1.5)))).toString());
10369
- console.log('ORIGIN BALANCE - AMOUNT WITH FEE: ', balanceOrigin.sub(amountBN.sub(xcmFee.mul(new BN(1.5)))).toString());
10370
- amountBNWithoutFee = amountBN.sub(xcmFee.mul(new BN(1.5)));
10371
- if (!balance.add(amountBNWithoutFee).lt(new BN(ed))) {
10372
- _context2.next = 43;
10373
- break;
10374
- }
10375
- throw new KeepAliveError("Keep alive check failed: Sending ".concat(amount, " ").concat(currencySymbol, " to ").concat(destNode, " would result in an account balance below the required existential deposit.\n Please increase the amount to meet the minimum balance requirement of the destination chain."));
10376
- case 43:
10377
- amountOriginBNWithoutFee = amountBN.sub(xcmFee.mul(new BN(1.5)));
10378
- if (!((currencySymbol === 'DOT' || currencySymbol === 'KSM') && balanceOrigin.sub(amountOriginBNWithoutFee).lt(new BN(edOrigin)))) {
10379
- _context2.next = 46;
10380
- break;
10381
- }
10382
- throw new KeepAliveError("Keep alive check failed: Sending ".concat(amount, " ").concat(currencySymbol, " to ").concat(destNode, " would result in an account balance below the required existential deposit on origin.\n Please decrease the amount to meet the minimum balance requirement of the origin chain."));
10383
- case 46:
10384
- case "end":
10385
- return _context2.stop();
10386
- }
10387
- }, _callee2);
10388
- }));
10221
+ var checkKeepAlive = function checkKeepAlive(_a) {
10222
+ return __awaiter(void 0, [_a], void 0, function (_ref) {
10223
+ var originApi = _ref.originApi,
10224
+ address = _ref.address,
10225
+ amount = _ref.amount,
10226
+ originNode = _ref.originNode,
10227
+ destApi = _ref.destApi,
10228
+ currencySymbol = _ref.currencySymbol,
10229
+ destNode = _ref.destNode;
10230
+ return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
10231
+ var _yield$destApi$query$, data, balance, _yield$originApi$quer, originData, balanceOrigin, amountBN, ed, edOrigin, tx, xcmFee, amountBNWithoutFee, amountOriginBNWithoutFee;
10232
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
10233
+ while (1) switch (_context2.prev = _context2.next) {
10234
+ case 0:
10235
+ if (!(destApi === undefined)) {
10236
+ _context2.next = 2;
10237
+ break;
10238
+ }
10239
+ return _context2.abrupt("return");
10240
+ case 2:
10241
+ if (!(currencySymbol === undefined)) {
10242
+ _context2.next = 4;
10243
+ break;
10244
+ }
10245
+ throw new KeepAliveError('Currency symbol not found for this asset. Cannot check keep alive.');
10246
+ case 4:
10247
+ if (!(originNode !== undefined && destNode !== undefined && currencySymbol !== getAssetsObject(destNode).nativeAssetSymbol)) {
10248
+ _context2.next = 6;
10249
+ break;
10250
+ }
10251
+ throw new KeepAliveError('Keep alive check is only supported when sending native asset of destination parachain.');
10252
+ case 6:
10253
+ _context2.next = 8;
10254
+ return destApi.query.system.account(address);
10255
+ case 8:
10256
+ _yield$destApi$query$ = _context2.sent;
10257
+ data = _yield$destApi$query$.data;
10258
+ balance = data.free.toBn();
10259
+ _context2.next = 13;
10260
+ return originApi.query.system.account(address);
10261
+ case 13:
10262
+ _yield$originApi$quer = _context2.sent;
10263
+ originData = _yield$originApi$quer.data;
10264
+ balanceOrigin = originData.free.toBn();
10265
+ amountBN = new BN(amount);
10266
+ ed = getExistentialDeposit(destNode !== null && destNode !== void 0 ? destNode : determineRelayChain(originNode));
10267
+ edOrigin = getExistentialDeposit(originNode !== null && originNode !== void 0 ? originNode : determineRelayChain(destNode));
10268
+ _context2.next = 21;
10269
+ return createTx(originApi, destApi, address, amount, currencySymbol, originNode, destNode);
10270
+ case 21:
10271
+ tx = _context2.sent;
10272
+ if (!(tx === null)) {
10273
+ _context2.next = 24;
10274
+ break;
10275
+ }
10276
+ throw new KeepAliveError('Transaction for XCM fee calculation could not be created.');
10277
+ case 24:
10278
+ _context2.next = 26;
10279
+ return calculateTransactionFee$1(tx, address);
10280
+ case 26:
10281
+ xcmFee = _context2.sent;
10282
+ if (!(ed === null)) {
10283
+ _context2.next = 29;
10284
+ break;
10285
+ }
10286
+ throw new KeepAliveError('Existential deposit not found for destination parachain.');
10287
+ case 29:
10288
+ if (!(edOrigin === null)) {
10289
+ _context2.next = 31;
10290
+ break;
10291
+ }
10292
+ throw new KeepAliveError('Existential deposit not found for origin parachain.');
10293
+ case 31:
10294
+ console.log('XCM FEE: ', xcmFee.toString());
10295
+ console.log('EXISTENTIAL DEPOSIT: ', ed.toString());
10296
+ console.log('EXISTENTIAL DEPOSIT ORIGIN: ', edOrigin.toString());
10297
+ console.log('BALANCE: ', balance.toString());
10298
+ console.log('ORIGIN BALANCE: ', balanceOrigin.toString());
10299
+ console.log('AMOUNT: ', amountBN.toString());
10300
+ console.log('AMOUNT WITHOUT FEE: ', amountBN.sub(xcmFee.mul(new BN(1.5))).toString());
10301
+ console.log('BALANCE + AMOUNT WITHOUT FEE: ', balance.add(amountBN.sub(xcmFee.mul(new BN(1.5)))).toString());
10302
+ console.log('ORIGIN BALANCE - AMOUNT WITH FEE: ', balanceOrigin.sub(amountBN.sub(xcmFee.mul(new BN(1.5)))).toString());
10303
+ amountBNWithoutFee = amountBN.sub(xcmFee.mul(new BN(1.5)));
10304
+ if (!balance.add(amountBNWithoutFee).lt(new BN(ed))) {
10305
+ _context2.next = 43;
10306
+ break;
10307
+ }
10308
+ throw new KeepAliveError("Keep alive check failed: Sending ".concat(amount, " ").concat(currencySymbol, " to ").concat(destNode, " would result in an account balance below the required existential deposit.\n Please increase the amount to meet the minimum balance requirement of the destination chain."));
10309
+ case 43:
10310
+ amountOriginBNWithoutFee = amountBN.sub(xcmFee.mul(new BN(1.5)));
10311
+ if (!((currencySymbol === 'DOT' || currencySymbol === 'KSM') && balanceOrigin.sub(amountOriginBNWithoutFee).lt(new BN(edOrigin)))) {
10312
+ _context2.next = 46;
10313
+ break;
10314
+ }
10315
+ throw new KeepAliveError("Keep alive check failed: Sending ".concat(amount, " ").concat(currencySymbol, " to ").concat(destNode, " would result in an account balance below the required existential deposit on origin.\n Please decrease the amount to meet the minimum balance requirement of the origin chain."));
10316
+ case 46:
10317
+ case "end":
10318
+ return _context2.stop();
10319
+ }
10320
+ }, _callee2);
10321
+ })();
10322
+ });
10389
10323
  };
10390
10324
 
10391
10325
  var sendCommon = function sendCommon(options) {
10392
10326
  return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
10393
- var _a, api, origin, currency, amount, address, destination, paraIdTo, destApiForKeepAlive, feeAsset, _options$serializedAp, serializedApiCallEnabled, asset, isMultiLocationDestination, isMultiLocationCurrency, originRelayChainSymbol, destinationRelayChainSymbol, supportsBridge, originNode, assetCheckEnabled, apiWithFallback, amountStr, currencyStr, currencyId;
10327
+ var _a, api, origin, currency, amount, address, destination, paraIdTo, destApiForKeepAlive, feeAsset, version, _options$serializedAp, serializedApiCallEnabled, asset, isMultiLocationDestination, isMultiLocationCurrency, originRelayChainSymbol, destinationRelayChainSymbol, supportsBridge, originNode, assetCheckEnabled, apiWithFallback, amountStr, currencyStr, currencyId;
10394
10328
  return _regeneratorRuntime().wrap(function _callee$(_context) {
10395
10329
  while (1) switch (_context.prev = _context.next) {
10396
10330
  case 0:
10397
- api = options.api, origin = options.origin, currency = options.currency, amount = options.amount, address = options.address, destination = options.destination, paraIdTo = options.paraIdTo, destApiForKeepAlive = options.destApiForKeepAlive, feeAsset = options.feeAsset, _options$serializedAp = options.serializedApiCallEnabled, serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
10331
+ api = options.api, origin = options.origin, currency = options.currency, amount = options.amount, address = options.address, destination = options.destination, paraIdTo = options.paraIdTo, destApiForKeepAlive = options.destApiForKeepAlive, feeAsset = options.feeAsset, version = options.version, _options$serializedAp = options.serializedApiCallEnabled, serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
10398
10332
  if (!((!isTMulti(currency) || isTMultiLocation(currency)) && amount === null)) {
10399
10333
  _context.next = 3;
10400
10334
  break;
@@ -10536,6 +10470,7 @@ var sendCommon = function sendCommon(options) {
10536
10470
  paraIdTo: paraIdTo,
10537
10471
  overridedCurrencyMultiLocation: isTMulti(currency) ? currency : undefined,
10538
10472
  feeAsset: feeAsset,
10473
+ version: version,
10539
10474
  serializedApiCallEnabled: serializedApiCallEnabled
10540
10475
  }));
10541
10476
  case 58:
@@ -10581,11 +10516,11 @@ var send = function send(options) {
10581
10516
  };
10582
10517
  var transferRelayToParaCommon = function transferRelayToParaCommon(options) {
10583
10518
  return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
10584
- var api, destination, amount, address, paraIdTo, destApiForKeepAlive, _options$serializedAp2, serializedApiCallEnabled, isMultiLocationDestination, isAddressMultiLocation, apiWithFallback, amountStr, serializedApiCall;
10519
+ var api, destination, amount, address, paraIdTo, destApiForKeepAlive, version, _options$serializedAp2, serializedApiCallEnabled, isMultiLocationDestination, isAddressMultiLocation, apiWithFallback, amountStr, serializedApiCall;
10585
10520
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
10586
10521
  while (1) switch (_context4.prev = _context4.next) {
10587
10522
  case 0:
10588
- api = options.api, destination = options.destination, amount = options.amount, address = options.address, paraIdTo = options.paraIdTo, destApiForKeepAlive = options.destApiForKeepAlive, _options$serializedAp2 = options.serializedApiCallEnabled, serializedApiCallEnabled = _options$serializedAp2 === void 0 ? false : _options$serializedAp2;
10523
+ api = options.api, destination = options.destination, amount = options.amount, address = options.address, paraIdTo = options.paraIdTo, destApiForKeepAlive = options.destApiForKeepAlive, version = options.version, _options$serializedAp2 = options.serializedApiCallEnabled, serializedApiCallEnabled = _options$serializedAp2 === void 0 ? false : _options$serializedAp2;
10589
10524
  isMultiLocationDestination = _typeof(destination) === 'object';
10590
10525
  isAddressMultiLocation = _typeof(address) === 'object';
10591
10526
  if (!(api === undefined && isMultiLocationDestination)) {
@@ -10641,7 +10576,8 @@ var transferRelayToParaCommon = function transferRelayToParaCommon(options) {
10641
10576
  address: address,
10642
10577
  amount: amountStr,
10643
10578
  paraIdTo: paraIdTo,
10644
- destApiForKeepAlive: destApiForKeepAlive
10579
+ destApiForKeepAlive: destApiForKeepAlive,
10580
+ version: version
10645
10581
  });
10646
10582
  if (!serializedApiCallEnabled) {
10647
10583
  _context4.next = 27;