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