@paraspell/sdk 5.4.2 → 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 +6 -0
- package/dist/index.cjs +937 -797
- package/dist/index.d.ts +29 -10
- package/dist/index.mjs +937 -797
- package/package.json +20 -21
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);
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
390
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
391
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
392
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
393
|
-
writable: false
|
|
394
|
-
});
|
|
395
|
-
return Constructor;
|
|
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";
|
|
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;
|
|
445
527
|
}
|
|
446
528
|
}
|
|
447
|
-
function _wrapNativeSuper(
|
|
448
|
-
var
|
|
449
|
-
_wrapNativeSuper = function
|
|
450
|
-
if (
|
|
451
|
-
if (typeof
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
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:
|
|
467
|
-
}
|
|
468
|
-
});
|
|
469
|
-
return _setPrototypeOf(Wrapper, Class);
|
|
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;
|
|
544
|
+
enumerable: !1,
|
|
545
|
+
writable: !0,
|
|
546
|
+
configurable: !0
|
|
591
547
|
}
|
|
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) {
|
|
@@ -642,11 +586,13 @@ exports.Version = void 0;
|
|
|
642
586
|
Version["V1"] = "V1";
|
|
643
587
|
Version["V2"] = "V2";
|
|
644
588
|
Version["V3"] = "V3";
|
|
589
|
+
Version["V4"] = "V4";
|
|
645
590
|
})(exports.Version || (exports.Version = {}));
|
|
646
591
|
exports.Parents = void 0;
|
|
647
592
|
(function (Parents) {
|
|
648
|
-
Parents[Parents["ONE"] = 1] = "ONE";
|
|
649
593
|
Parents[Parents["ZERO"] = 0] = "ZERO";
|
|
594
|
+
Parents[Parents["ONE"] = 1] = "ONE";
|
|
595
|
+
Parents[Parents["TWO"] = 2] = "TWO";
|
|
650
596
|
})(exports.Parents || (exports.Parents = {}));
|
|
651
597
|
|
|
652
598
|
// Used to inform user, that Parachain they wish to use has not yet implemented full XCM Support
|
|
@@ -845,6 +791,32 @@ var Acala$3 = {
|
|
|
845
791
|
}
|
|
846
792
|
]
|
|
847
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
|
+
};
|
|
848
820
|
var Astar$3 = {
|
|
849
821
|
paraId: 2006,
|
|
850
822
|
relayChainAssetSymbol: "DOT",
|
|
@@ -996,6 +968,11 @@ var Astar$3 = {
|
|
|
996
968
|
symbol: "TST",
|
|
997
969
|
decimals: 18
|
|
998
970
|
},
|
|
971
|
+
{
|
|
972
|
+
assetId: "18446744073709551637",
|
|
973
|
+
symbol: "vGLMR",
|
|
974
|
+
decimals: 18
|
|
975
|
+
},
|
|
999
976
|
{
|
|
1000
977
|
assetId: "18446744073709551624",
|
|
1001
978
|
symbol: "vDOT",
|
|
@@ -1031,6 +1008,11 @@ var Astar$3 = {
|
|
|
1031
1008
|
symbol: "TDOT",
|
|
1032
1009
|
decimals: 18
|
|
1033
1010
|
},
|
|
1011
|
+
{
|
|
1012
|
+
assetId: "18446744073709551640",
|
|
1013
|
+
symbol: "vFIL",
|
|
1014
|
+
decimals: 18
|
|
1015
|
+
},
|
|
1034
1016
|
{
|
|
1035
1017
|
assetId: "1329",
|
|
1036
1018
|
symbol: "PPC",
|
|
@@ -1061,6 +1043,11 @@ var Astar$3 = {
|
|
|
1061
1043
|
symbol: "EQ",
|
|
1062
1044
|
decimals: 9
|
|
1063
1045
|
},
|
|
1046
|
+
{
|
|
1047
|
+
assetId: "18446744073709551638",
|
|
1048
|
+
symbol: "vMANTA",
|
|
1049
|
+
decimals: 18
|
|
1050
|
+
},
|
|
1064
1051
|
{
|
|
1065
1052
|
assetId: "18446744073709551627",
|
|
1066
1053
|
symbol: "RING",
|
|
@@ -1085,6 +1072,11 @@ var Astar$3 = {
|
|
|
1085
1072
|
assetId: "1332",
|
|
1086
1073
|
symbol: "sDOT",
|
|
1087
1074
|
decimals: 10
|
|
1075
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
assetId: "18446744073709551639",
|
|
1078
|
+
symbol: "FIL",
|
|
1079
|
+
decimals: 18
|
|
1088
1080
|
}
|
|
1089
1081
|
]
|
|
1090
1082
|
};
|
|
@@ -1115,7 +1107,7 @@ var BifrostPolkadot$3 = {
|
|
|
1115
1107
|
},
|
|
1116
1108
|
{
|
|
1117
1109
|
symbol: "ETH",
|
|
1118
|
-
decimals:
|
|
1110
|
+
decimals: 10
|
|
1119
1111
|
},
|
|
1120
1112
|
{
|
|
1121
1113
|
symbol: "KAR",
|
|
@@ -1421,7 +1413,7 @@ var Darwinia$3 = {
|
|
|
1421
1413
|
otherAssets: [
|
|
1422
1414
|
]
|
|
1423
1415
|
};
|
|
1424
|
-
var
|
|
1416
|
+
var Hydration$3 = {
|
|
1425
1417
|
paraId: 2034,
|
|
1426
1418
|
relayChainAssetSymbol: "DOT",
|
|
1427
1419
|
nativeAssetSymbol: "HDX",
|
|
@@ -1507,6 +1499,11 @@ var HydraDX$3 = {
|
|
|
1507
1499
|
symbol: "WBTC",
|
|
1508
1500
|
decimals: 8
|
|
1509
1501
|
},
|
|
1502
|
+
{
|
|
1503
|
+
assetId: "31",
|
|
1504
|
+
symbol: "RING",
|
|
1505
|
+
decimals: 18
|
|
1506
|
+
},
|
|
1510
1507
|
{
|
|
1511
1508
|
assetId: "15",
|
|
1512
1509
|
symbol: "vDOT",
|
|
@@ -1522,6 +1519,11 @@ var HydraDX$3 = {
|
|
|
1522
1519
|
symbol: "CFG",
|
|
1523
1520
|
decimals: 18
|
|
1524
1521
|
},
|
|
1522
|
+
{
|
|
1523
|
+
assetId: "32",
|
|
1524
|
+
symbol: "AJUN",
|
|
1525
|
+
decimals: 12
|
|
1526
|
+
},
|
|
1525
1527
|
{
|
|
1526
1528
|
assetId: "27",
|
|
1527
1529
|
symbol: "CRU",
|
|
@@ -1579,7 +1581,7 @@ var HydraDX$3 = {
|
|
|
1579
1581
|
},
|
|
1580
1582
|
{
|
|
1581
1583
|
assetId: "1",
|
|
1582
|
-
symbol: "
|
|
1584
|
+
symbol: "H2O",
|
|
1583
1585
|
decimals: 12
|
|
1584
1586
|
},
|
|
1585
1587
|
{
|
|
@@ -1801,6 +1803,11 @@ var Moonbeam$3 = {
|
|
|
1801
1803
|
symbol: "EQ",
|
|
1802
1804
|
decimals: 9
|
|
1803
1805
|
},
|
|
1806
|
+
{
|
|
1807
|
+
assetId: "61295607754960722617854661686514597014",
|
|
1808
|
+
symbol: "WIFD",
|
|
1809
|
+
decimals: 10
|
|
1810
|
+
},
|
|
1804
1811
|
{
|
|
1805
1812
|
assetId: "141196559012917796508928734717797136690",
|
|
1806
1813
|
symbol: "ibcIST",
|
|
@@ -1938,7 +1945,7 @@ var Moonbeam$3 = {
|
|
|
1938
1945
|
},
|
|
1939
1946
|
{
|
|
1940
1947
|
assetId: "238111524681612888331172110363070489924",
|
|
1941
|
-
symbol: "
|
|
1948
|
+
symbol: "NEURO",
|
|
1942
1949
|
decimals: 12
|
|
1943
1950
|
},
|
|
1944
1951
|
{
|
|
@@ -2177,6 +2184,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2177
2184
|
symbol: "HUB",
|
|
2178
2185
|
decimals: 10
|
|
2179
2186
|
},
|
|
2187
|
+
{
|
|
2188
|
+
assetId: "81",
|
|
2189
|
+
symbol: "GVN",
|
|
2190
|
+
decimals: 6
|
|
2191
|
+
},
|
|
2180
2192
|
{
|
|
2181
2193
|
assetId: "200",
|
|
2182
2194
|
symbol: "MONA",
|
|
@@ -2192,6 +2204,16 @@ var AssetHubPolkadot$3 = {
|
|
|
2192
2204
|
symbol: "PLAY",
|
|
2193
2205
|
decimals: 10
|
|
2194
2206
|
},
|
|
2207
|
+
{
|
|
2208
|
+
assetId: "2222",
|
|
2209
|
+
symbol: "DUCK",
|
|
2210
|
+
decimals: 10
|
|
2211
|
+
},
|
|
2212
|
+
{
|
|
2213
|
+
assetId: "222",
|
|
2214
|
+
symbol: "SHL",
|
|
2215
|
+
decimals: 6
|
|
2216
|
+
},
|
|
2195
2217
|
{
|
|
2196
2218
|
assetId: "69420",
|
|
2197
2219
|
symbol: "GABE",
|
|
@@ -2212,6 +2234,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2212
2234
|
symbol: "BEEFY",
|
|
2213
2235
|
decimals: 2
|
|
2214
2236
|
},
|
|
2237
|
+
{
|
|
2238
|
+
assetId: "110",
|
|
2239
|
+
symbol: "SIX",
|
|
2240
|
+
decimals: 12
|
|
2241
|
+
},
|
|
2215
2242
|
{
|
|
2216
2243
|
assetId: "10",
|
|
2217
2244
|
symbol: "BEAST",
|
|
@@ -2227,6 +2254,21 @@ var AssetHubPolkadot$3 = {
|
|
|
2227
2254
|
symbol: "ICE",
|
|
2228
2255
|
decimals: 20
|
|
2229
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
|
+
},
|
|
2230
2272
|
{
|
|
2231
2273
|
assetId: "4",
|
|
2232
2274
|
symbol: "EFI",
|
|
@@ -2267,11 +2309,21 @@ var AssetHubPolkadot$3 = {
|
|
|
2267
2309
|
symbol: "DED",
|
|
2268
2310
|
decimals: 10
|
|
2269
2311
|
},
|
|
2312
|
+
{
|
|
2313
|
+
assetId: "39",
|
|
2314
|
+
symbol: "PEPE",
|
|
2315
|
+
decimals: 6
|
|
2316
|
+
},
|
|
2270
2317
|
{
|
|
2271
2318
|
assetId: "101",
|
|
2272
2319
|
symbol: "DOTMA",
|
|
2273
2320
|
decimals: 0
|
|
2274
2321
|
},
|
|
2322
|
+
{
|
|
2323
|
+
assetId: "38",
|
|
2324
|
+
symbol: "SHIB",
|
|
2325
|
+
decimals: 6
|
|
2326
|
+
},
|
|
2275
2327
|
{
|
|
2276
2328
|
assetId: "46",
|
|
2277
2329
|
symbol: "PEPE",
|
|
@@ -2307,6 +2359,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2307
2359
|
symbol: "DEMO",
|
|
2308
2360
|
decimals: 6
|
|
2309
2361
|
},
|
|
2362
|
+
{
|
|
2363
|
+
assetId: "122",
|
|
2364
|
+
symbol: "TESTING",
|
|
2365
|
+
decimals: 12
|
|
2366
|
+
},
|
|
2310
2367
|
{
|
|
2311
2368
|
assetId: "66",
|
|
2312
2369
|
symbol: "DOGE",
|
|
@@ -2357,6 +2414,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2357
2414
|
symbol: "JAM",
|
|
2358
2415
|
decimals: 10
|
|
2359
2416
|
},
|
|
2417
|
+
{
|
|
2418
|
+
assetId: "1212",
|
|
2419
|
+
symbol: "DOTTY",
|
|
2420
|
+
decimals: 10
|
|
2421
|
+
},
|
|
2360
2422
|
{
|
|
2361
2423
|
assetId: "77",
|
|
2362
2424
|
symbol: "TRQ",
|
|
@@ -2372,6 +2434,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2372
2434
|
symbol: "TAPE",
|
|
2373
2435
|
decimals: 10
|
|
2374
2436
|
},
|
|
2437
|
+
{
|
|
2438
|
+
assetId: "36",
|
|
2439
|
+
symbol: "CLAY",
|
|
2440
|
+
decimals: 10
|
|
2441
|
+
},
|
|
2375
2442
|
{
|
|
2376
2443
|
assetId: "420666",
|
|
2377
2444
|
symbol: "GIO",
|
|
@@ -2387,6 +2454,16 @@ var AssetHubPolkadot$3 = {
|
|
|
2387
2454
|
symbol: "COCOA",
|
|
2388
2455
|
decimals: 10
|
|
2389
2456
|
},
|
|
2457
|
+
{
|
|
2458
|
+
assetId: "301",
|
|
2459
|
+
symbol: "HORN",
|
|
2460
|
+
decimals: 6
|
|
2461
|
+
},
|
|
2462
|
+
{
|
|
2463
|
+
assetId: "2020",
|
|
2464
|
+
symbol: "HYDRA",
|
|
2465
|
+
decimals: 10
|
|
2466
|
+
},
|
|
2390
2467
|
{
|
|
2391
2468
|
assetId: "5318008",
|
|
2392
2469
|
symbol: "PXPS",
|
|
@@ -2397,16 +2474,36 @@ var AssetHubPolkadot$3 = {
|
|
|
2397
2474
|
symbol: "CATNIP",
|
|
2398
2475
|
decimals: 20
|
|
2399
2476
|
},
|
|
2477
|
+
{
|
|
2478
|
+
assetId: "37362",
|
|
2479
|
+
symbol: "TEST",
|
|
2480
|
+
decimals: 10
|
|
2481
|
+
},
|
|
2482
|
+
{
|
|
2483
|
+
assetId: "44",
|
|
2484
|
+
symbol: "SKL",
|
|
2485
|
+
decimals: 6
|
|
2486
|
+
},
|
|
2400
2487
|
{
|
|
2401
2488
|
assetId: "15",
|
|
2402
2489
|
symbol: "Meme",
|
|
2403
2490
|
decimals: 10
|
|
2404
2491
|
},
|
|
2492
|
+
{
|
|
2493
|
+
assetId: "9202",
|
|
2494
|
+
symbol: "BUG",
|
|
2495
|
+
decimals: 12
|
|
2496
|
+
},
|
|
2405
2497
|
{
|
|
2406
2498
|
assetId: "78",
|
|
2407
2499
|
symbol: "COCA",
|
|
2408
2500
|
decimals: 6
|
|
2409
2501
|
},
|
|
2502
|
+
{
|
|
2503
|
+
assetId: "61",
|
|
2504
|
+
symbol: "SUN",
|
|
2505
|
+
decimals: 6
|
|
2506
|
+
},
|
|
2410
2507
|
{
|
|
2411
2508
|
assetId: "40",
|
|
2412
2509
|
symbol: "PEPE",
|
|
@@ -2457,6 +2554,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2457
2554
|
symbol: "VSC",
|
|
2458
2555
|
decimals: 9
|
|
2459
2556
|
},
|
|
2557
|
+
{
|
|
2558
|
+
assetId: "1994",
|
|
2559
|
+
symbol: "CRT",
|
|
2560
|
+
decimals: 4
|
|
2561
|
+
},
|
|
2460
2562
|
{
|
|
2461
2563
|
assetId: "2829",
|
|
2462
2564
|
symbol: "JTO",
|
|
@@ -2467,11 +2569,21 @@ var AssetHubPolkadot$3 = {
|
|
|
2467
2569
|
symbol: "SHRIMP",
|
|
2468
2570
|
decimals: 10
|
|
2469
2571
|
},
|
|
2572
|
+
{
|
|
2573
|
+
assetId: "1970",
|
|
2574
|
+
symbol: "NIPS",
|
|
2575
|
+
decimals: 10
|
|
2576
|
+
},
|
|
2470
2577
|
{
|
|
2471
2578
|
assetId: "42",
|
|
2472
2579
|
symbol: "PJS",
|
|
2473
2580
|
decimals: 18
|
|
2474
2581
|
},
|
|
2582
|
+
{
|
|
2583
|
+
assetId: "2001",
|
|
2584
|
+
symbol: "DOTA",
|
|
2585
|
+
decimals: 6
|
|
2586
|
+
},
|
|
2475
2587
|
{
|
|
2476
2588
|
assetId: "5",
|
|
2477
2589
|
symbol: "PLX",
|
|
@@ -2492,6 +2604,16 @@ var AssetHubPolkadot$3 = {
|
|
|
2492
2604
|
symbol: "POKA",
|
|
2493
2605
|
decimals: 6
|
|
2494
2606
|
},
|
|
2607
|
+
{
|
|
2608
|
+
assetId: "1010",
|
|
2609
|
+
symbol: "ETH",
|
|
2610
|
+
decimals: 10
|
|
2611
|
+
},
|
|
2612
|
+
{
|
|
2613
|
+
assetId: "201",
|
|
2614
|
+
symbol: "WUD",
|
|
2615
|
+
decimals: 6
|
|
2616
|
+
},
|
|
2495
2617
|
{
|
|
2496
2618
|
assetId: "1984",
|
|
2497
2619
|
symbol: "USDt",
|
|
@@ -2507,11 +2629,26 @@ var AssetHubPolkadot$3 = {
|
|
|
2507
2629
|
symbol: "BORK",
|
|
2508
2630
|
decimals: 10
|
|
2509
2631
|
},
|
|
2632
|
+
{
|
|
2633
|
+
assetId: "33441",
|
|
2634
|
+
symbol: "MPACT",
|
|
2635
|
+
decimals: 8
|
|
2636
|
+
},
|
|
2637
|
+
{
|
|
2638
|
+
assetId: "777777",
|
|
2639
|
+
symbol: "HLG",
|
|
2640
|
+
decimals: 18
|
|
2641
|
+
},
|
|
2510
2642
|
{
|
|
2511
2643
|
assetId: "22",
|
|
2512
2644
|
symbol: "KNRY",
|
|
2513
2645
|
decimals: 10
|
|
2514
2646
|
},
|
|
2647
|
+
{
|
|
2648
|
+
assetId: "72",
|
|
2649
|
+
symbol: "NEHT",
|
|
2650
|
+
decimals: 12
|
|
2651
|
+
},
|
|
2515
2652
|
{
|
|
2516
2653
|
assetId: "79",
|
|
2517
2654
|
symbol: "PGOLD",
|
|
@@ -2532,6 +2669,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2532
2669
|
symbol: "HAM",
|
|
2533
2670
|
decimals: 10
|
|
2534
2671
|
},
|
|
2672
|
+
{
|
|
2673
|
+
assetId: "181",
|
|
2674
|
+
symbol: "RNET",
|
|
2675
|
+
decimals: 0
|
|
2676
|
+
},
|
|
2535
2677
|
{
|
|
2536
2678
|
assetId: "9003",
|
|
2537
2679
|
symbol: "KTRL",
|
|
@@ -2552,21 +2694,51 @@ var AssetHubPolkadot$3 = {
|
|
|
2552
2694
|
symbol: "dot",
|
|
2553
2695
|
decimals: 0
|
|
2554
2696
|
},
|
|
2697
|
+
{
|
|
2698
|
+
assetId: "90",
|
|
2699
|
+
symbol: "ATC",
|
|
2700
|
+
decimals: 6
|
|
2701
|
+
},
|
|
2555
2702
|
{
|
|
2556
2703
|
assetId: "80",
|
|
2557
2704
|
symbol: "GOVD",
|
|
2558
2705
|
decimals: 10
|
|
2559
2706
|
},
|
|
2707
|
+
{
|
|
2708
|
+
assetId: "1864",
|
|
2709
|
+
symbol: "JUNK",
|
|
2710
|
+
decimals: 10
|
|
2711
|
+
},
|
|
2560
2712
|
{
|
|
2561
2713
|
assetId: "8",
|
|
2562
2714
|
symbol: "JOE",
|
|
2563
2715
|
decimals: 9
|
|
2564
2716
|
},
|
|
2717
|
+
{
|
|
2718
|
+
assetId: "45",
|
|
2719
|
+
symbol: "HYDRA",
|
|
2720
|
+
decimals: 10
|
|
2721
|
+
},
|
|
2722
|
+
{
|
|
2723
|
+
assetId: "10000",
|
|
2724
|
+
symbol: "DOGE",
|
|
2725
|
+
decimals: 6
|
|
2726
|
+
},
|
|
2565
2727
|
{
|
|
2566
2728
|
assetId: "2820",
|
|
2567
2729
|
symbol: "HOOT",
|
|
2568
2730
|
decimals: 6
|
|
2569
2731
|
},
|
|
2732
|
+
{
|
|
2733
|
+
assetId: "51",
|
|
2734
|
+
symbol: "JAMA",
|
|
2735
|
+
decimals: 6
|
|
2736
|
+
},
|
|
2737
|
+
{
|
|
2738
|
+
assetId: "1234",
|
|
2739
|
+
symbol: "BUNS",
|
|
2740
|
+
decimals: 10
|
|
2741
|
+
},
|
|
2570
2742
|
{
|
|
2571
2743
|
assetId: "404",
|
|
2572
2744
|
symbol: "clay",
|
|
@@ -2582,6 +2754,16 @@ var AssetHubPolkadot$3 = {
|
|
|
2582
2754
|
symbol: "HOBO",
|
|
2583
2755
|
decimals: 2
|
|
2584
2756
|
},
|
|
2757
|
+
{
|
|
2758
|
+
assetId: "60",
|
|
2759
|
+
symbol: "ANT",
|
|
2760
|
+
decimals: 6
|
|
2761
|
+
},
|
|
2762
|
+
{
|
|
2763
|
+
assetId: "1992",
|
|
2764
|
+
symbol: "SITE",
|
|
2765
|
+
decimals: 10
|
|
2766
|
+
},
|
|
2585
2767
|
{
|
|
2586
2768
|
assetId: "6666",
|
|
2587
2769
|
symbol: "CHAOS",
|
|
@@ -2682,6 +2864,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2682
2864
|
symbol: "PINK",
|
|
2683
2865
|
decimals: 10
|
|
2684
2866
|
},
|
|
2867
|
+
{
|
|
2868
|
+
assetId: "37",
|
|
2869
|
+
symbol: "DODA",
|
|
2870
|
+
decimals: 6
|
|
2871
|
+
},
|
|
2685
2872
|
{
|
|
2686
2873
|
assetId: "5417",
|
|
2687
2874
|
symbol: "HASH",
|
|
@@ -2697,11 +2884,26 @@ var AssetHubPolkadot$3 = {
|
|
|
2697
2884
|
symbol: "EDU",
|
|
2698
2885
|
decimals: 10
|
|
2699
2886
|
},
|
|
2887
|
+
{
|
|
2888
|
+
assetId: "2025",
|
|
2889
|
+
symbol: "FLMG",
|
|
2890
|
+
decimals: 20
|
|
2891
|
+
},
|
|
2700
2892
|
{
|
|
2701
2893
|
assetId: "1980",
|
|
2702
2894
|
symbol: "GAVIN",
|
|
2703
2895
|
decimals: 0
|
|
2704
2896
|
},
|
|
2897
|
+
{
|
|
2898
|
+
assetId: "91",
|
|
2899
|
+
symbol: "WING",
|
|
2900
|
+
decimals: 6
|
|
2901
|
+
},
|
|
2902
|
+
{
|
|
2903
|
+
assetId: "77777",
|
|
2904
|
+
symbol: "WOOP",
|
|
2905
|
+
decimals: 12
|
|
2906
|
+
},
|
|
2705
2907
|
{
|
|
2706
2908
|
assetId: "4157",
|
|
2707
2909
|
symbol: "PDOG",
|
|
@@ -3507,184 +3709,6 @@ var Litmus$3 = {
|
|
|
3507
3709
|
otherAssets: [
|
|
3508
3710
|
]
|
|
3509
3711
|
};
|
|
3510
|
-
var Mangata$3 = {
|
|
3511
|
-
paraId: 2110,
|
|
3512
|
-
relayChainAssetSymbol: "KSM",
|
|
3513
|
-
nativeAssetSymbol: "MGX",
|
|
3514
|
-
nativeAssets: [
|
|
3515
|
-
{
|
|
3516
|
-
symbol: "MGX",
|
|
3517
|
-
decimals: 18
|
|
3518
|
-
}
|
|
3519
|
-
],
|
|
3520
|
-
otherAssets: [
|
|
3521
|
-
{
|
|
3522
|
-
assetId: "30",
|
|
3523
|
-
symbol: "USDT",
|
|
3524
|
-
decimals: 6
|
|
3525
|
-
},
|
|
3526
|
-
{
|
|
3527
|
-
assetId: "48",
|
|
3528
|
-
symbol: "TKN0x00000007-TKN0x0000000E",
|
|
3529
|
-
decimals: 18
|
|
3530
|
-
},
|
|
3531
|
-
{
|
|
3532
|
-
assetId: "7",
|
|
3533
|
-
symbol: "TUR",
|
|
3534
|
-
decimals: 10
|
|
3535
|
-
},
|
|
3536
|
-
{
|
|
3537
|
-
assetId: "13",
|
|
3538
|
-
symbol: "TKN0x0000000B-TKN0x00000004",
|
|
3539
|
-
decimals: 18
|
|
3540
|
-
},
|
|
3541
|
-
{
|
|
3542
|
-
assetId: "26",
|
|
3543
|
-
symbol: "ZLK",
|
|
3544
|
-
decimals: 18
|
|
3545
|
-
},
|
|
3546
|
-
{
|
|
3547
|
-
assetId: "5",
|
|
3548
|
-
symbol: "TKN0x00000004-TKN0x00000000",
|
|
3549
|
-
decimals: 18
|
|
3550
|
-
},
|
|
3551
|
-
{
|
|
3552
|
-
assetId: "8",
|
|
3553
|
-
symbol: "TKN0x00000000-TKN0x00000007",
|
|
3554
|
-
decimals: 18
|
|
3555
|
-
},
|
|
3556
|
-
{
|
|
3557
|
-
assetId: "33",
|
|
3558
|
-
symbol: "TKN0x00000000-TKN0x0000001F",
|
|
3559
|
-
decimals: 18
|
|
3560
|
-
},
|
|
3561
|
-
{
|
|
3562
|
-
assetId: "39",
|
|
3563
|
-
symbol: "MOVR",
|
|
3564
|
-
decimals: 18
|
|
3565
|
-
},
|
|
3566
|
-
{
|
|
3567
|
-
assetId: "1",
|
|
3568
|
-
symbol: "ETH",
|
|
3569
|
-
decimals: 18
|
|
3570
|
-
},
|
|
3571
|
-
{
|
|
3572
|
-
assetId: "19",
|
|
3573
|
-
symbol: "TKN0x00000010-TKN0x00000004",
|
|
3574
|
-
decimals: 18
|
|
3575
|
-
},
|
|
3576
|
-
{
|
|
3577
|
-
assetId: "45",
|
|
3578
|
-
symbol: "TKN0x0000000B-TKN0x00000007",
|
|
3579
|
-
decimals: 18
|
|
3580
|
-
},
|
|
3581
|
-
{
|
|
3582
|
-
assetId: "9",
|
|
3583
|
-
symbol: "TKN0x00000004-TKN0x00000007",
|
|
3584
|
-
decimals: 18
|
|
3585
|
-
},
|
|
3586
|
-
{
|
|
3587
|
-
assetId: "16",
|
|
3588
|
-
symbol: "vsKSM",
|
|
3589
|
-
decimals: 12
|
|
3590
|
-
},
|
|
3591
|
-
{
|
|
3592
|
-
assetId: "14",
|
|
3593
|
-
symbol: "BNC",
|
|
3594
|
-
decimals: 12
|
|
3595
|
-
},
|
|
3596
|
-
{
|
|
3597
|
-
assetId: "43",
|
|
3598
|
-
symbol: "TKN0x00000000-TKN0x00000027",
|
|
3599
|
-
decimals: 18
|
|
3600
|
-
},
|
|
3601
|
-
{
|
|
3602
|
-
assetId: "31",
|
|
3603
|
-
symbol: "RMRK",
|
|
3604
|
-
decimals: 10
|
|
3605
|
-
},
|
|
3606
|
-
{
|
|
3607
|
-
assetId: "21",
|
|
3608
|
-
symbol: "TKN0x0000000F-TKN0x00000004",
|
|
3609
|
-
decimals: 18
|
|
3610
|
-
},
|
|
3611
|
-
{
|
|
3612
|
-
assetId: "15",
|
|
3613
|
-
symbol: "vKSM",
|
|
3614
|
-
decimals: 12
|
|
3615
|
-
},
|
|
3616
|
-
{
|
|
3617
|
-
assetId: "47",
|
|
3618
|
-
symbol: "TKN0x0000001E-TKN0x00000000",
|
|
3619
|
-
decimals: 18
|
|
3620
|
-
},
|
|
3621
|
-
{
|
|
3622
|
-
assetId: "27",
|
|
3623
|
-
symbol: "TKN0x0000001A-TKN0x00000000",
|
|
3624
|
-
decimals: 18
|
|
3625
|
-
},
|
|
3626
|
-
{
|
|
3627
|
-
assetId: "28",
|
|
3628
|
-
symbol: "TKN0x00000004-TKN0x0000001A",
|
|
3629
|
-
decimals: 18
|
|
3630
|
-
},
|
|
3631
|
-
{
|
|
3632
|
-
assetId: "0",
|
|
3633
|
-
symbol: "MGX",
|
|
3634
|
-
decimals: 18
|
|
3635
|
-
},
|
|
3636
|
-
{
|
|
3637
|
-
assetId: "6",
|
|
3638
|
-
symbol: "KAR",
|
|
3639
|
-
decimals: 12
|
|
3640
|
-
},
|
|
3641
|
-
{
|
|
3642
|
-
assetId: "11",
|
|
3643
|
-
symbol: "IMBU",
|
|
3644
|
-
decimals: 12
|
|
3645
|
-
},
|
|
3646
|
-
{
|
|
3647
|
-
assetId: "3",
|
|
3648
|
-
symbol: "TKN0x00000000-TKN0x00000002",
|
|
3649
|
-
decimals: 18
|
|
3650
|
-
},
|
|
3651
|
-
{
|
|
3652
|
-
assetId: "17",
|
|
3653
|
-
symbol: "TKN0x00000000-TKN0x0000000E",
|
|
3654
|
-
decimals: 18
|
|
3655
|
-
},
|
|
3656
|
-
{
|
|
3657
|
-
assetId: "23",
|
|
3658
|
-
symbol: "vBNC",
|
|
3659
|
-
decimals: 12
|
|
3660
|
-
},
|
|
3661
|
-
{
|
|
3662
|
-
assetId: "4",
|
|
3663
|
-
symbol: "KSM",
|
|
3664
|
-
decimals: 12
|
|
3665
|
-
},
|
|
3666
|
-
{
|
|
3667
|
-
assetId: "34",
|
|
3668
|
-
symbol: "TKN0x00000004-TKN0x0000001F",
|
|
3669
|
-
decimals: 18
|
|
3670
|
-
},
|
|
3671
|
-
{
|
|
3672
|
-
assetId: "32",
|
|
3673
|
-
symbol: "TKN0x00000004-TKN0x0000001E",
|
|
3674
|
-
decimals: 18
|
|
3675
|
-
},
|
|
3676
|
-
{
|
|
3677
|
-
assetId: "12",
|
|
3678
|
-
symbol: "TKN0x00000000-TKN0x0000000B",
|
|
3679
|
-
decimals: 18
|
|
3680
|
-
},
|
|
3681
|
-
{
|
|
3682
|
-
assetId: "42",
|
|
3683
|
-
symbol: "TKN0x00000004-TKN0x0000000E",
|
|
3684
|
-
decimals: 18
|
|
3685
|
-
}
|
|
3686
|
-
]
|
|
3687
|
-
};
|
|
3688
3712
|
var Moonriver$3 = {
|
|
3689
3713
|
paraId: 2023,
|
|
3690
3714
|
relayChainAssetSymbol: "KSM",
|
|
@@ -4117,6 +4141,11 @@ var Picasso$3 = {
|
|
|
4117
4141
|
symbol: "kUSD",
|
|
4118
4142
|
decimals: 12
|
|
4119
4143
|
},
|
|
4144
|
+
{
|
|
4145
|
+
assetId: "3",
|
|
4146
|
+
symbol: "wSOL",
|
|
4147
|
+
decimals: 9
|
|
4148
|
+
},
|
|
4120
4149
|
{
|
|
4121
4150
|
assetId: "1088357900348863545351",
|
|
4122
4151
|
symbol: "USDT_OSMO_LPT",
|
|
@@ -4177,11 +4206,21 @@ var Picasso$3 = {
|
|
|
4177
4206
|
symbol: "DOT_TIA_LPT",
|
|
4178
4207
|
decimals: 12
|
|
4179
4208
|
},
|
|
4209
|
+
{
|
|
4210
|
+
assetId: "2",
|
|
4211
|
+
symbol: "ETH",
|
|
4212
|
+
decimals: 18
|
|
4213
|
+
},
|
|
4180
4214
|
{
|
|
4181
4215
|
assetId: "2011",
|
|
4182
4216
|
symbol: "EQ",
|
|
4183
4217
|
decimals: 9
|
|
4184
4218
|
},
|
|
4219
|
+
{
|
|
4220
|
+
assetId: "45",
|
|
4221
|
+
symbol: "XLM",
|
|
4222
|
+
decimals: 12
|
|
4223
|
+
},
|
|
4185
4224
|
{
|
|
4186
4225
|
assetId: "25",
|
|
4187
4226
|
symbol: "IST",
|
|
@@ -4307,6 +4346,11 @@ var Picasso$3 = {
|
|
|
4307
4346
|
symbol: "HUAHUA",
|
|
4308
4347
|
decimals: 6
|
|
4309
4348
|
},
|
|
4349
|
+
{
|
|
4350
|
+
assetId: "44",
|
|
4351
|
+
symbol: "AMPE",
|
|
4352
|
+
decimals: 12
|
|
4353
|
+
},
|
|
4310
4354
|
{
|
|
4311
4355
|
assetId: "1088357900348863545365",
|
|
4312
4356
|
symbol: "DOT_vDOT_LPT",
|
|
@@ -4648,7 +4692,12 @@ var AssetHubKusama$3 = {
|
|
|
4648
4692
|
decimals: 7
|
|
4649
4693
|
},
|
|
4650
4694
|
{
|
|
4651
|
-
assetId: "
|
|
4695
|
+
assetId: "1985",
|
|
4696
|
+
symbol: "web3",
|
|
4697
|
+
decimals: 16
|
|
4698
|
+
},
|
|
4699
|
+
{
|
|
4700
|
+
assetId: "20",
|
|
4652
4701
|
symbol: "BFKK",
|
|
4653
4702
|
decimals: 20
|
|
4654
4703
|
},
|
|
@@ -4852,11 +4901,6 @@ var AssetHubKusama$3 = {
|
|
|
4852
4901
|
symbol: "ki",
|
|
4853
4902
|
decimals: 18
|
|
4854
4903
|
},
|
|
4855
|
-
{
|
|
4856
|
-
assetId: "5797867",
|
|
4857
|
-
symbol: "TAKE",
|
|
4858
|
-
decimals: 0
|
|
4859
|
-
},
|
|
4860
4904
|
{
|
|
4861
4905
|
assetId: "33",
|
|
4862
4906
|
symbol: "BUSSY",
|
|
@@ -5337,6 +5381,11 @@ var AssetHubKusama$3 = {
|
|
|
5337
5381
|
symbol: "bLd",
|
|
5338
5382
|
decimals: 18
|
|
5339
5383
|
},
|
|
5384
|
+
{
|
|
5385
|
+
assetId: "2025",
|
|
5386
|
+
symbol: "FLMG",
|
|
5387
|
+
decimals: 10
|
|
5388
|
+
},
|
|
5340
5389
|
{
|
|
5341
5390
|
assetId: "91",
|
|
5342
5391
|
symbol: "TMJ",
|
|
@@ -5764,6 +5813,9 @@ var Polkadex$3 = {
|
|
|
5764
5813
|
symbol: "PHA",
|
|
5765
5814
|
decimals: 12
|
|
5766
5815
|
},
|
|
5816
|
+
{
|
|
5817
|
+
assetId: "130314105136721928300689838359167097187"
|
|
5818
|
+
},
|
|
5767
5819
|
{
|
|
5768
5820
|
assetId: "14826654563114266286226336203450732505"
|
|
5769
5821
|
},
|
|
@@ -6061,6 +6113,8 @@ var Khala$3 = {
|
|
|
6061
6113
|
};
|
|
6062
6114
|
var assets = {
|
|
6063
6115
|
Acala: Acala$3,
|
|
6116
|
+
BridgeHubPolkadot: BridgeHubPolkadot$3,
|
|
6117
|
+
BridgeHubKusama: BridgeHubKusama$3,
|
|
6064
6118
|
Astar: Astar$3,
|
|
6065
6119
|
BifrostPolkadot: BifrostPolkadot$3,
|
|
6066
6120
|
Bitgreen: Bitgreen$3,
|
|
@@ -6068,7 +6122,7 @@ var assets = {
|
|
|
6068
6122
|
Subsocial: Subsocial$3,
|
|
6069
6123
|
ComposableFinance: ComposableFinance$3,
|
|
6070
6124
|
Darwinia: Darwinia$3,
|
|
6071
|
-
|
|
6125
|
+
Hydration: Hydration$3,
|
|
6072
6126
|
Interlay: Interlay$3,
|
|
6073
6127
|
Litentry: Litentry$3,
|
|
6074
6128
|
Moonbeam: Moonbeam$3,
|
|
@@ -6091,7 +6145,6 @@ var assets = {
|
|
|
6091
6145
|
Karura: Karura$3,
|
|
6092
6146
|
Kintsugi: Kintsugi$3,
|
|
6093
6147
|
Litmus: Litmus$3,
|
|
6094
|
-
Mangata: Mangata$3,
|
|
6095
6148
|
Moonriver: Moonriver$3,
|
|
6096
6149
|
ParallelHeiko: ParallelHeiko$3,
|
|
6097
6150
|
Picasso: Picasso$3,
|
|
@@ -6128,6 +6181,8 @@ var assetsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6128
6181
|
BifrostKusama: BifrostKusama$3,
|
|
6129
6182
|
BifrostPolkadot: BifrostPolkadot$3,
|
|
6130
6183
|
Bitgreen: Bitgreen$3,
|
|
6184
|
+
BridgeHubKusama: BridgeHubKusama$3,
|
|
6185
|
+
BridgeHubPolkadot: BridgeHubPolkadot$3,
|
|
6131
6186
|
Calamari: Calamari$3,
|
|
6132
6187
|
Centrifuge: Centrifuge$3,
|
|
6133
6188
|
Collectives: Collectives$3,
|
|
@@ -6139,7 +6194,7 @@ var assetsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6139
6194
|
Curio: Curio$3,
|
|
6140
6195
|
Darwinia: Darwinia$3,
|
|
6141
6196
|
Encointer: Encointer$3,
|
|
6142
|
-
|
|
6197
|
+
Hydration: Hydration$3,
|
|
6143
6198
|
Imbue: Imbue$3,
|
|
6144
6199
|
Integritee: Integritee$3,
|
|
6145
6200
|
Interlay: Interlay$3,
|
|
@@ -6150,7 +6205,6 @@ var assetsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6150
6205
|
Kintsugi: Kintsugi$3,
|
|
6151
6206
|
Litentry: Litentry$3,
|
|
6152
6207
|
Litmus: Litmus$3,
|
|
6153
|
-
Mangata: Mangata$3,
|
|
6154
6208
|
Manta: Manta$3,
|
|
6155
6209
|
Moonbeam: Moonbeam$3,
|
|
6156
6210
|
Moonriver: Moonriver$3,
|
|
@@ -6327,7 +6381,7 @@ var Darwinia$2 = {
|
|
|
6327
6381
|
"XTokens"
|
|
6328
6382
|
]
|
|
6329
6383
|
};
|
|
6330
|
-
var
|
|
6384
|
+
var Hydration$2 = {
|
|
6331
6385
|
defaultPallet: "XTokens",
|
|
6332
6386
|
supportedPallets: [
|
|
6333
6387
|
"PolkadotXcm",
|
|
@@ -6390,9 +6444,10 @@ var Amplitude$2 = {
|
|
|
6390
6444
|
]
|
|
6391
6445
|
};
|
|
6392
6446
|
var Bajun$2 = {
|
|
6393
|
-
defaultPallet: "
|
|
6447
|
+
defaultPallet: "XTokens",
|
|
6394
6448
|
supportedPallets: [
|
|
6395
|
-
"PolkadotXcm"
|
|
6449
|
+
"PolkadotXcm",
|
|
6450
|
+
"XTokens"
|
|
6396
6451
|
]
|
|
6397
6452
|
};
|
|
6398
6453
|
var Basilisk$2 = {
|
|
@@ -6478,13 +6533,6 @@ var Litmus$2 = {
|
|
|
6478
6533
|
"XTokens"
|
|
6479
6534
|
]
|
|
6480
6535
|
};
|
|
6481
|
-
var Mangata$2 = {
|
|
6482
|
-
defaultPallet: "XTokens",
|
|
6483
|
-
supportedPallets: [
|
|
6484
|
-
"PolkadotXcm",
|
|
6485
|
-
"XTokens"
|
|
6486
|
-
]
|
|
6487
|
-
};
|
|
6488
6536
|
var Moonriver$2 = {
|
|
6489
6537
|
defaultPallet: "XTokens",
|
|
6490
6538
|
supportedPallets: [
|
|
@@ -6627,6 +6675,18 @@ var Curio$2 = {
|
|
|
6627
6675
|
"XTokens"
|
|
6628
6676
|
]
|
|
6629
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
|
+
};
|
|
6630
6690
|
var pallets = {
|
|
6631
6691
|
AssetHubPolkadot: AssetHubPolkadot$2,
|
|
6632
6692
|
Acala: Acala$2,
|
|
@@ -6637,7 +6697,7 @@ var pallets = {
|
|
|
6637
6697
|
Centrifuge: Centrifuge$2,
|
|
6638
6698
|
ComposableFinance: ComposableFinance$2,
|
|
6639
6699
|
Darwinia: Darwinia$2,
|
|
6640
|
-
|
|
6700
|
+
Hydration: Hydration$2,
|
|
6641
6701
|
Interlay: Interlay$2,
|
|
6642
6702
|
Litentry: Litentry$2,
|
|
6643
6703
|
Moonbeam: Moonbeam$2,
|
|
@@ -6659,7 +6719,6 @@ var pallets = {
|
|
|
6659
6719
|
Karura: Karura$2,
|
|
6660
6720
|
Kintsugi: Kintsugi$2,
|
|
6661
6721
|
Litmus: Litmus$2,
|
|
6662
|
-
Mangata: Mangata$2,
|
|
6663
6722
|
Moonriver: Moonriver$2,
|
|
6664
6723
|
ParallelHeiko: ParallelHeiko$2,
|
|
6665
6724
|
Picasso: Picasso$2,
|
|
@@ -6680,7 +6739,9 @@ var pallets = {
|
|
|
6680
6739
|
Phala: Phala$2,
|
|
6681
6740
|
Subsocial: Subsocial$2,
|
|
6682
6741
|
KiltSpiritnet: KiltSpiritnet$2,
|
|
6683
|
-
Curio: Curio$2
|
|
6742
|
+
Curio: Curio$2,
|
|
6743
|
+
BridgeHubPolkadot: BridgeHubPolkadot$2,
|
|
6744
|
+
BridgeHubKusama: BridgeHubKusama$2
|
|
6684
6745
|
};
|
|
6685
6746
|
|
|
6686
6747
|
var palletsMapJson = /*#__PURE__*/Object.freeze({
|
|
@@ -6696,6 +6757,8 @@ var palletsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6696
6757
|
BifrostKusama: BifrostKusama$2,
|
|
6697
6758
|
BifrostPolkadot: BifrostPolkadot$2,
|
|
6698
6759
|
Bitgreen: Bitgreen$2,
|
|
6760
|
+
BridgeHubKusama: BridgeHubKusama$2,
|
|
6761
|
+
BridgeHubPolkadot: BridgeHubPolkadot$2,
|
|
6699
6762
|
Calamari: Calamari$2,
|
|
6700
6763
|
Centrifuge: Centrifuge$2,
|
|
6701
6764
|
Collectives: Collectives$2,
|
|
@@ -6707,7 +6770,7 @@ var palletsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6707
6770
|
Curio: Curio$2,
|
|
6708
6771
|
Darwinia: Darwinia$2,
|
|
6709
6772
|
Encointer: Encointer$2,
|
|
6710
|
-
|
|
6773
|
+
Hydration: Hydration$2,
|
|
6711
6774
|
Imbue: Imbue$2,
|
|
6712
6775
|
Integritee: Integritee$2,
|
|
6713
6776
|
Interlay: Interlay$2,
|
|
@@ -6718,7 +6781,6 @@ var palletsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6718
6781
|
Kintsugi: Kintsugi$2,
|
|
6719
6782
|
Litentry: Litentry$2,
|
|
6720
6783
|
Litmus: Litmus$2,
|
|
6721
|
-
Mangata: Mangata$2,
|
|
6722
6784
|
Manta: Manta$2,
|
|
6723
6785
|
Moonbeam: Moonbeam$2,
|
|
6724
6786
|
Moonriver: Moonriver$2,
|
|
@@ -6770,11 +6832,29 @@ var isTMulti = function isTMulti(value) {
|
|
|
6770
6832
|
var isTMultiLocation = function isTMultiLocation(value) {
|
|
6771
6833
|
return value && typeof value.parents !== 'undefined' && typeof value.interior !== 'undefined';
|
|
6772
6834
|
};
|
|
6835
|
+
var createBridgeCurrencySpec = function createBridgeCurrencySpec(amount, ecosystem) {
|
|
6836
|
+
return _defineProperty({}, exports.Version.V4, [{
|
|
6837
|
+
id: {
|
|
6838
|
+
parents: exports.Parents.TWO,
|
|
6839
|
+
interior: {
|
|
6840
|
+
X1: [{
|
|
6841
|
+
GlobalConsensus: ecosystem
|
|
6842
|
+
}]
|
|
6843
|
+
}
|
|
6844
|
+
},
|
|
6845
|
+
fun: {
|
|
6846
|
+
Fungible: amount
|
|
6847
|
+
}
|
|
6848
|
+
}]);
|
|
6849
|
+
};
|
|
6773
6850
|
var createCurrencySpec = function createCurrencySpec(amount, version, parents, overriddenCurrency) {
|
|
6774
6851
|
var interior = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'Here';
|
|
6775
6852
|
if (!overriddenCurrency) {
|
|
6776
6853
|
return _defineProperty({}, version, [{
|
|
6777
|
-
id: {
|
|
6854
|
+
id: version === exports.Version.V4 ? {
|
|
6855
|
+
parents: parents,
|
|
6856
|
+
interior: interior
|
|
6857
|
+
} : {
|
|
6778
6858
|
Concrete: {
|
|
6779
6859
|
parents: parents,
|
|
6780
6860
|
interior: interior
|
|
@@ -6786,7 +6866,7 @@ var createCurrencySpec = function createCurrencySpec(amount, version, parents, o
|
|
|
6786
6866
|
}]);
|
|
6787
6867
|
}
|
|
6788
6868
|
return isTMultiLocation(overriddenCurrency) ? _defineProperty({}, version, [{
|
|
6789
|
-
id: {
|
|
6869
|
+
id: version === exports.Version.V4 ? overriddenCurrency : {
|
|
6790
6870
|
Concrete: overriddenCurrency
|
|
6791
6871
|
},
|
|
6792
6872
|
fun: {
|
|
@@ -6797,17 +6877,29 @@ var createCurrencySpec = function createCurrencySpec(amount, version, parents, o
|
|
|
6797
6877
|
};
|
|
6798
6878
|
var createPolkadotXcmHeader = function createPolkadotXcmHeader(scenario, version, destination, nodeId) {
|
|
6799
6879
|
var parents = scenario === 'RelayToPara' ? exports.Parents.ZERO : exports.Parents.ONE;
|
|
6800
|
-
var interior = scenario === 'ParaToRelay' ? 'Here' : {
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
}
|
|
6804
|
-
};
|
|
6880
|
+
var interior = scenario === 'ParaToRelay' ? 'Here' : createX1Payload(version, {
|
|
6881
|
+
Parachain: nodeId
|
|
6882
|
+
});
|
|
6805
6883
|
var isMultiLocationDestination = _typeof(destination) === 'object';
|
|
6806
|
-
return _defineProperty({},
|
|
6884
|
+
return _defineProperty({}, version, isMultiLocationDestination ? destination : {
|
|
6807
6885
|
parents: parents,
|
|
6808
6886
|
interior: interior
|
|
6809
6887
|
});
|
|
6810
6888
|
};
|
|
6889
|
+
var createBridgePolkadotXcmDest = function createBridgePolkadotXcmDest(version, ecosystem, destination, nodeId) {
|
|
6890
|
+
var multiLocation = {
|
|
6891
|
+
parents: exports.Parents.TWO,
|
|
6892
|
+
interior: {
|
|
6893
|
+
X2: [{
|
|
6894
|
+
GlobalConsensus: ecosystem
|
|
6895
|
+
}, {
|
|
6896
|
+
Parachain: nodeId
|
|
6897
|
+
}]
|
|
6898
|
+
}
|
|
6899
|
+
};
|
|
6900
|
+
var isMultiLocationDestination = _typeof(destination) === 'object';
|
|
6901
|
+
return _defineProperty({}, version, isMultiLocationDestination ? destination : multiLocation);
|
|
6902
|
+
};
|
|
6811
6903
|
var calculateTransactionFee$1 = function calculateTransactionFee(tx, address) {
|
|
6812
6904
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
6813
6905
|
var _yield$tx$paymentInfo, partialFee;
|
|
@@ -7002,7 +7094,7 @@ var Bitgreen$1 = "1000000000";
|
|
|
7002
7094
|
var Centrifuge$1 = "1000000000000";
|
|
7003
7095
|
var ComposableFinance$1 = "100000000000";
|
|
7004
7096
|
var Darwinia$1 = "0";
|
|
7005
|
-
var
|
|
7097
|
+
var Hydration$1 = "1000000000000";
|
|
7006
7098
|
var Litentry$1 = "100000000000";
|
|
7007
7099
|
var Moonbeam$1 = "0";
|
|
7008
7100
|
var Parallel$1 = "100000000000";
|
|
@@ -7042,13 +7134,14 @@ var Polkadot = "10000000000";
|
|
|
7042
7134
|
var Kusama = "333333333";
|
|
7043
7135
|
var Interlay$1 = "0";
|
|
7044
7136
|
var Kintsugi$1 = "0";
|
|
7045
|
-
var Mangata$1 = "0";
|
|
7046
7137
|
var Collectives$1 = "1000000000";
|
|
7047
7138
|
var Khala$1 = "10000000000";
|
|
7048
7139
|
var Phala$1 = "10000000000";
|
|
7049
7140
|
var Subsocial$1 = "100000000";
|
|
7050
7141
|
var KiltSpiritnet$1 = "10000000000000";
|
|
7051
7142
|
var Curio$1 = "10000000000000000";
|
|
7143
|
+
var BridgeHubPolkadot$1 = "1000000000";
|
|
7144
|
+
var BridgeHubKusama$1 = "33333333";
|
|
7052
7145
|
var existentialDeposits = {
|
|
7053
7146
|
AssetHubPolkadot: AssetHubPolkadot$1,
|
|
7054
7147
|
Acala: Acala$1,
|
|
@@ -7058,7 +7151,7 @@ var existentialDeposits = {
|
|
|
7058
7151
|
Centrifuge: Centrifuge$1,
|
|
7059
7152
|
ComposableFinance: ComposableFinance$1,
|
|
7060
7153
|
Darwinia: Darwinia$1,
|
|
7061
|
-
|
|
7154
|
+
Hydration: Hydration$1,
|
|
7062
7155
|
Litentry: Litentry$1,
|
|
7063
7156
|
Moonbeam: Moonbeam$1,
|
|
7064
7157
|
Parallel: Parallel$1,
|
|
@@ -7098,13 +7191,14 @@ var existentialDeposits = {
|
|
|
7098
7191
|
Kusama: Kusama,
|
|
7099
7192
|
Interlay: Interlay$1,
|
|
7100
7193
|
Kintsugi: Kintsugi$1,
|
|
7101
|
-
Mangata: Mangata$1,
|
|
7102
7194
|
Collectives: Collectives$1,
|
|
7103
7195
|
Khala: Khala$1,
|
|
7104
7196
|
Phala: Phala$1,
|
|
7105
7197
|
Subsocial: Subsocial$1,
|
|
7106
7198
|
KiltSpiritnet: KiltSpiritnet$1,
|
|
7107
|
-
Curio: Curio$1
|
|
7199
|
+
Curio: Curio$1,
|
|
7200
|
+
BridgeHubPolkadot: BridgeHubPolkadot$1,
|
|
7201
|
+
BridgeHubKusama: BridgeHubKusama$1
|
|
7108
7202
|
};
|
|
7109
7203
|
|
|
7110
7204
|
var edMapJson = /*#__PURE__*/Object.freeze({
|
|
@@ -7120,6 +7214,8 @@ var edMapJson = /*#__PURE__*/Object.freeze({
|
|
|
7120
7214
|
BifrostKusama: BifrostKusama$1,
|
|
7121
7215
|
BifrostPolkadot: BifrostPolkadot$1,
|
|
7122
7216
|
Bitgreen: Bitgreen$1,
|
|
7217
|
+
BridgeHubKusama: BridgeHubKusama$1,
|
|
7218
|
+
BridgeHubPolkadot: BridgeHubPolkadot$1,
|
|
7123
7219
|
Calamari: Calamari$1,
|
|
7124
7220
|
Centrifuge: Centrifuge$1,
|
|
7125
7221
|
Collectives: Collectives$1,
|
|
@@ -7131,7 +7227,7 @@ var edMapJson = /*#__PURE__*/Object.freeze({
|
|
|
7131
7227
|
Curio: Curio$1,
|
|
7132
7228
|
Darwinia: Darwinia$1,
|
|
7133
7229
|
Encointer: Encointer$1,
|
|
7134
|
-
|
|
7230
|
+
Hydration: Hydration$1,
|
|
7135
7231
|
Imbue: Imbue$1,
|
|
7136
7232
|
Integritee: Integritee$1,
|
|
7137
7233
|
Interlay: Interlay$1,
|
|
@@ -7143,7 +7239,6 @@ var edMapJson = /*#__PURE__*/Object.freeze({
|
|
|
7143
7239
|
Kusama: Kusama,
|
|
7144
7240
|
Litentry: Litentry$1,
|
|
7145
7241
|
Litmus: Litmus$1,
|
|
7146
|
-
Mangata: Mangata$1,
|
|
7147
7242
|
Manta: Manta$1,
|
|
7148
7243
|
Moonbeam: Moonbeam$1,
|
|
7149
7244
|
Moonriver: Moonriver$1,
|
|
@@ -7396,6 +7491,12 @@ var RelayToParaBuilder = /*#__PURE__*/function () {
|
|
|
7396
7491
|
this._destApi = destApi;
|
|
7397
7492
|
return this;
|
|
7398
7493
|
}
|
|
7494
|
+
}, {
|
|
7495
|
+
key: "xcmVersion",
|
|
7496
|
+
value: function xcmVersion(version) {
|
|
7497
|
+
this._version = version;
|
|
7498
|
+
return this;
|
|
7499
|
+
}
|
|
7399
7500
|
}, {
|
|
7400
7501
|
key: "buildOptions",
|
|
7401
7502
|
value: function buildOptions() {
|
|
@@ -7405,7 +7506,8 @@ var RelayToParaBuilder = /*#__PURE__*/function () {
|
|
|
7405
7506
|
amount: this._amount,
|
|
7406
7507
|
address: this._address,
|
|
7407
7508
|
paraIdTo: this.paraIdTo,
|
|
7408
|
-
destApiForKeepAlive: this._destApi
|
|
7509
|
+
destApiForKeepAlive: this._destApi,
|
|
7510
|
+
version: this._version
|
|
7409
7511
|
};
|
|
7410
7512
|
}
|
|
7411
7513
|
}, {
|
|
@@ -7489,6 +7591,12 @@ var ParaToParaBuilder = /*#__PURE__*/function () {
|
|
|
7489
7591
|
this._destApi = destApi;
|
|
7490
7592
|
return this;
|
|
7491
7593
|
}
|
|
7594
|
+
}, {
|
|
7595
|
+
key: "xcmVersion",
|
|
7596
|
+
value: function xcmVersion(version) {
|
|
7597
|
+
this._version = version;
|
|
7598
|
+
return this;
|
|
7599
|
+
}
|
|
7492
7600
|
}, {
|
|
7493
7601
|
key: "buildOptions",
|
|
7494
7602
|
value: function buildOptions() {
|
|
@@ -7501,7 +7609,8 @@ var ParaToParaBuilder = /*#__PURE__*/function () {
|
|
|
7501
7609
|
destination: this.to,
|
|
7502
7610
|
paraIdTo: this.paraIdTo,
|
|
7503
7611
|
feeAsset: this._feeAsset,
|
|
7504
|
-
destApiForKeepAlive: this._destApi
|
|
7612
|
+
destApiForKeepAlive: this._destApi,
|
|
7613
|
+
version: this._version
|
|
7505
7614
|
};
|
|
7506
7615
|
}
|
|
7507
7616
|
}, {
|
|
@@ -7572,6 +7681,12 @@ var ParaToRelayBuilder = /*#__PURE__*/function () {
|
|
|
7572
7681
|
this._destApi = destApi;
|
|
7573
7682
|
return this;
|
|
7574
7683
|
}
|
|
7684
|
+
}, {
|
|
7685
|
+
key: "xcmVersion",
|
|
7686
|
+
value: function xcmVersion(version) {
|
|
7687
|
+
this._version = version;
|
|
7688
|
+
return this;
|
|
7689
|
+
}
|
|
7575
7690
|
}, {
|
|
7576
7691
|
key: "buildOptions",
|
|
7577
7692
|
value: function buildOptions() {
|
|
@@ -7586,7 +7701,8 @@ var ParaToRelayBuilder = /*#__PURE__*/function () {
|
|
|
7586
7701
|
amount: this.amount,
|
|
7587
7702
|
address: this._address,
|
|
7588
7703
|
feeAsset: this.feeAsset,
|
|
7589
|
-
destApiForKeepAlive: this._destApi
|
|
7704
|
+
destApiForKeepAlive: this._destApi,
|
|
7705
|
+
version: this._version
|
|
7590
7706
|
};
|
|
7591
7707
|
}
|
|
7592
7708
|
}, {
|
|
@@ -7653,7 +7769,7 @@ var buildBeneficiaryInput = function buildBeneficiaryInput(api, address) {
|
|
|
7653
7769
|
if (isTMultiLocation(address)) {
|
|
7654
7770
|
return address;
|
|
7655
7771
|
}
|
|
7656
|
-
var isEthAddress = ethers.ethers.
|
|
7772
|
+
var isEthAddress = ethers.ethers.isAddress(address);
|
|
7657
7773
|
return {
|
|
7658
7774
|
parents: exports.Parents.ZERO,
|
|
7659
7775
|
interior: {
|
|
@@ -8209,6 +8325,11 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
8209
8325
|
get: function get() {
|
|
8210
8326
|
return this._assetCheckEnabled;
|
|
8211
8327
|
}
|
|
8328
|
+
}, {
|
|
8329
|
+
key: "canUseXTokens",
|
|
8330
|
+
value: function canUseXTokens(_) {
|
|
8331
|
+
return true;
|
|
8332
|
+
}
|
|
8212
8333
|
}, {
|
|
8213
8334
|
key: "transfer",
|
|
8214
8335
|
value: function transfer(options) {
|
|
@@ -8221,17 +8342,19 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
8221
8342
|
paraIdTo = options.paraIdTo,
|
|
8222
8343
|
overridedCurrencyMultiLocation = options.overridedCurrencyMultiLocation,
|
|
8223
8344
|
feeAsset = options.feeAsset,
|
|
8345
|
+
_options$version = options.version,
|
|
8346
|
+
version = _options$version === void 0 ? this.version : _options$version,
|
|
8224
8347
|
_options$serializedAp = options.serializedApiCallEnabled,
|
|
8225
8348
|
serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
|
|
8226
8349
|
var scenario = destination !== undefined ? 'ParaToPara' : 'ParaToRelay';
|
|
8227
8350
|
var paraId = destination !== undefined && _typeof(destination) !== 'object' ? paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination) : undefined;
|
|
8228
|
-
if (supportsXTokens(this)) {
|
|
8351
|
+
if (supportsXTokens(this) && this.canUseXTokens(options)) {
|
|
8229
8352
|
return this.transferXTokens({
|
|
8230
8353
|
api: api,
|
|
8231
8354
|
currency: currencySymbol,
|
|
8232
8355
|
currencyID: currencyId,
|
|
8233
8356
|
amount: amount,
|
|
8234
|
-
addressSelection: generateAddressPayload(api, scenario, 'XTokens', address,
|
|
8357
|
+
addressSelection: generateAddressPayload(api, scenario, 'XTokens', address, version, paraId),
|
|
8235
8358
|
fees: getFees(scenario),
|
|
8236
8359
|
origin: this.node,
|
|
8237
8360
|
scenario: scenario,
|
|
@@ -8257,12 +8380,18 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
8257
8380
|
} else if (supportsPolkadotXCM(this)) {
|
|
8258
8381
|
return this.transferPolkadotXCM({
|
|
8259
8382
|
api: api,
|
|
8260
|
-
header: this.createPolkadotXcmHeader(scenario, destination, paraId),
|
|
8261
|
-
addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address,
|
|
8262
|
-
|
|
8383
|
+
header: this.createPolkadotXcmHeader(scenario, version, destination, paraId),
|
|
8384
|
+
addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, version, paraId),
|
|
8385
|
+
address: address,
|
|
8386
|
+
amount: amount,
|
|
8387
|
+
currencySelection: this.createCurrencySpec(amount, scenario, version, currencyId, overridedCurrencyMultiLocation),
|
|
8388
|
+
currencyId: currencyId,
|
|
8263
8389
|
scenario: scenario,
|
|
8264
8390
|
currencySymbol: currencySymbol,
|
|
8265
8391
|
feeAsset: feeAsset,
|
|
8392
|
+
destination: destination,
|
|
8393
|
+
paraIdTo: paraId,
|
|
8394
|
+
overridedCurrency: overridedCurrencyMultiLocation,
|
|
8266
8395
|
serializedApiCallEnabled: serializedApiCallEnabled
|
|
8267
8396
|
});
|
|
8268
8397
|
} else {
|
|
@@ -8272,10 +8401,12 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
8272
8401
|
}, {
|
|
8273
8402
|
key: "transferRelayToPara",
|
|
8274
8403
|
value: function transferRelayToPara(options) {
|
|
8404
|
+
var _options$version2 = options.version,
|
|
8405
|
+
version = _options$version2 === void 0 ? exports.Version.V3 : _options$version2;
|
|
8275
8406
|
return {
|
|
8276
8407
|
module: 'xcmPallet',
|
|
8277
8408
|
section: 'reserveTransferAssets',
|
|
8278
|
-
parameters: constructRelayToParaParameters(options,
|
|
8409
|
+
parameters: constructRelayToParaParameters(options, version)
|
|
8279
8410
|
};
|
|
8280
8411
|
}
|
|
8281
8412
|
}, {
|
|
@@ -8308,8 +8439,8 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
8308
8439
|
}
|
|
8309
8440
|
}, {
|
|
8310
8441
|
key: "createPolkadotXcmHeader",
|
|
8311
|
-
value: function createPolkadotXcmHeader$1(scenario, destination, paraId) {
|
|
8312
|
-
return createPolkadotXcmHeader(scenario,
|
|
8442
|
+
value: function createPolkadotXcmHeader$1(scenario, version, destination, paraId) {
|
|
8443
|
+
return createPolkadotXcmHeader(scenario, version, destination, paraId);
|
|
8313
8444
|
}
|
|
8314
8445
|
}]);
|
|
8315
8446
|
}();
|
|
@@ -8536,13 +8667,13 @@ var ComposableFinance = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8536
8667
|
}]);
|
|
8537
8668
|
}(ParachainNode);
|
|
8538
8669
|
|
|
8539
|
-
var
|
|
8540
|
-
function
|
|
8541
|
-
_classCallCheck(this,
|
|
8542
|
-
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]);
|
|
8543
8674
|
}
|
|
8544
|
-
_inherits(
|
|
8545
|
-
return _createClass(
|
|
8675
|
+
_inherits(Hydration, _ParachainNode);
|
|
8676
|
+
return _createClass(Hydration, [{
|
|
8546
8677
|
key: "transferXTokens",
|
|
8547
8678
|
value: function transferXTokens(input) {
|
|
8548
8679
|
var currencyID = input.currencyID;
|
|
@@ -8605,12 +8736,19 @@ var Moonbeam = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8605
8736
|
}, {
|
|
8606
8737
|
key: "transferRelayToPara",
|
|
8607
8738
|
value: function transferRelayToPara(options) {
|
|
8739
|
+
var _options$version = options.version,
|
|
8740
|
+
version = _options$version === void 0 ? exports.Version.V3 : _options$version;
|
|
8608
8741
|
return {
|
|
8609
8742
|
module: 'xcmPallet',
|
|
8610
8743
|
section: 'limitedReserveTransferAssets',
|
|
8611
|
-
parameters: constructRelayToParaParameters(options,
|
|
8744
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
8612
8745
|
};
|
|
8613
8746
|
}
|
|
8747
|
+
}, {
|
|
8748
|
+
key: "getProvider",
|
|
8749
|
+
value: function getProvider() {
|
|
8750
|
+
return getAllNodeProviders(this.node)[2];
|
|
8751
|
+
}
|
|
8614
8752
|
}]);
|
|
8615
8753
|
}(ParachainNode);
|
|
8616
8754
|
|
|
@@ -8785,72 +8923,17 @@ var Moonriver = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8785
8923
|
}, {
|
|
8786
8924
|
key: "transferRelayToPara",
|
|
8787
8925
|
value: function transferRelayToPara(options) {
|
|
8926
|
+
var _options$version = options.version,
|
|
8927
|
+
version = _options$version === void 0 ? exports.Version.V3 : _options$version;
|
|
8788
8928
|
return {
|
|
8789
8929
|
module: 'xcmPallet',
|
|
8790
8930
|
section: 'limitedReserveTransferAssets',
|
|
8791
|
-
parameters: constructRelayToParaParameters(options,
|
|
8931
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
8792
8932
|
};
|
|
8793
8933
|
}
|
|
8794
8934
|
}]);
|
|
8795
8935
|
}(ParachainNode);
|
|
8796
8936
|
|
|
8797
|
-
var Mangata = /*#__PURE__*/function (_ParachainNode) {
|
|
8798
|
-
function Mangata() {
|
|
8799
|
-
_classCallCheck(this, Mangata);
|
|
8800
|
-
return _callSuper(this, Mangata, ['Mangata', 'mangata', 'kusama', exports.Version.V3]);
|
|
8801
|
-
}
|
|
8802
|
-
_inherits(Mangata, _ParachainNode);
|
|
8803
|
-
return _createClass(Mangata, [{
|
|
8804
|
-
key: "transferXTokens",
|
|
8805
|
-
value: function transferXTokens(input) {
|
|
8806
|
-
return XTokensTransferImpl.transferXTokens(input, input.currencyID);
|
|
8807
|
-
}
|
|
8808
|
-
}, {
|
|
8809
|
-
key: "createApiInstance",
|
|
8810
|
-
value: function createApiInstance() {
|
|
8811
|
-
return __awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
8812
|
-
var _yield$import, mTypes, mRpc, options, provider;
|
|
8813
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
8814
|
-
while (1) switch (_context.prev = _context.next) {
|
|
8815
|
-
case 0:
|
|
8816
|
-
_context.next = 2;
|
|
8817
|
-
return import('@mangata-finance/type-definitions');
|
|
8818
|
-
case 2:
|
|
8819
|
-
_yield$import = _context.sent;
|
|
8820
|
-
mTypes = _yield$import.mTypes;
|
|
8821
|
-
mRpc = _yield$import.mRpc;
|
|
8822
|
-
options = function options() {
|
|
8823
|
-
var _a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
8824
|
-
var _a$types = _a.types,
|
|
8825
|
-
types = _a$types === void 0 ? {} : _a$types,
|
|
8826
|
-
_a$rpc = _a.rpc,
|
|
8827
|
-
rpc = _a$rpc === void 0 ? {} : _a$rpc,
|
|
8828
|
-
otherOptions = __rest(_a, ["types", "rpc"]);
|
|
8829
|
-
return Object.assign({
|
|
8830
|
-
types: Object.assign(Object.assign({}, mTypes), types),
|
|
8831
|
-
rpc: Object.assign(Object.assign({}, mRpc), rpc)
|
|
8832
|
-
}, otherOptions);
|
|
8833
|
-
};
|
|
8834
|
-
provider = new api.WsProvider(this.getProvider());
|
|
8835
|
-
_context.next = 9;
|
|
8836
|
-
return api.ApiPromise.create(options({
|
|
8837
|
-
provider: provider,
|
|
8838
|
-
throwOnConnect: true,
|
|
8839
|
-
throwOnUnknown: true,
|
|
8840
|
-
noInitWarn: true
|
|
8841
|
-
}));
|
|
8842
|
-
case 9:
|
|
8843
|
-
return _context.abrupt("return", _context.sent);
|
|
8844
|
-
case 10:
|
|
8845
|
-
case "end":
|
|
8846
|
-
return _context.stop();
|
|
8847
|
-
}
|
|
8848
|
-
}, _callee, this);
|
|
8849
|
-
}));
|
|
8850
|
-
}
|
|
8851
|
-
}]);
|
|
8852
|
-
}(ParachainNode);
|
|
8853
|
-
|
|
8854
8937
|
var Litmus = /*#__PURE__*/function (_ParachainNode) {
|
|
8855
8938
|
function Litmus() {
|
|
8856
8939
|
_classCallCheck(this, Litmus);
|
|
@@ -8964,10 +9047,10 @@ var NodeNotSupportedError = /*#__PURE__*/function (_Error) {
|
|
|
8964
9047
|
|
|
8965
9048
|
// Used to inform user, that Parachain they wish to use does not support scenario they wish to use yet
|
|
8966
9049
|
var ScenarioNotSupportedError = /*#__PURE__*/function (_Error) {
|
|
8967
|
-
function ScenarioNotSupportedError(node, scenario) {
|
|
9050
|
+
function ScenarioNotSupportedError(node, scenario, message) {
|
|
8968
9051
|
var _this;
|
|
8969
9052
|
_classCallCheck(this, ScenarioNotSupportedError);
|
|
8970
|
-
_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)]);
|
|
8971
9054
|
_this.name = 'ScenarioNotSupported';
|
|
8972
9055
|
return _this;
|
|
8973
9056
|
}
|
|
@@ -9089,19 +9172,43 @@ var AssetHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9089
9172
|
}
|
|
9090
9173
|
_inherits(AssetHubPolkadot, _ParachainNode);
|
|
9091
9174
|
return _createClass(AssetHubPolkadot, [{
|
|
9175
|
+
key: "handleBridgeTransfer",
|
|
9176
|
+
value: function handleBridgeTransfer(input, targetChain) {
|
|
9177
|
+
if (targetChain === 'Kusama' && input.currencyId === 'KSM' || targetChain === 'Polkadot' && input.currencyId === 'DOT') {
|
|
9178
|
+
var modifiedInput = Object.assign(Object.assign({}, input), {
|
|
9179
|
+
header: createBridgePolkadotXcmDest(exports.Version.V4, targetChain, input.destination, input.paraIdTo),
|
|
9180
|
+
addressSelection: generateAddressMultiLocationV4(input.api, input.address),
|
|
9181
|
+
currencySelection: createBridgeCurrencySpec(input.amount, targetChain)
|
|
9182
|
+
});
|
|
9183
|
+
return PolkadotXCMTransferImpl.transferPolkadotXCM(modifiedInput, 'transferAssets', 'Unlimited');
|
|
9184
|
+
} else if (targetChain === 'Polkadot' && input.currencyId === 'KSM' || targetChain === 'Kusama' && input.currencyId === 'DOT') {
|
|
9185
|
+
var _modifiedInput = Object.assign(Object.assign({}, input), {
|
|
9186
|
+
header: createBridgePolkadotXcmDest(exports.Version.V3, targetChain, input.destination, input.paraIdTo),
|
|
9187
|
+
currencySelection: createCurrencySpec(input.amount, exports.Version.V3, exports.Parents.ONE, input.overridedCurrency)
|
|
9188
|
+
});
|
|
9189
|
+
return PolkadotXCMTransferImpl.transferPolkadotXCM(_modifiedInput, 'limitedReserveTransferAssets', 'Unlimited');
|
|
9190
|
+
}
|
|
9191
|
+
throw new InvalidCurrencyError('Polkadot <-> Kusama bridge does not support this currency');
|
|
9192
|
+
}
|
|
9193
|
+
}, {
|
|
9092
9194
|
key: "transferPolkadotXCM",
|
|
9093
9195
|
value: function transferPolkadotXCM(input) {
|
|
9094
9196
|
var scenario = input.scenario;
|
|
9197
|
+
if (input.destination === 'AssetHubKusama') {
|
|
9198
|
+
return this.handleBridgeTransfer(input, 'Kusama');
|
|
9199
|
+
}
|
|
9095
9200
|
var method = scenario === 'ParaToPara' ? 'limitedReserveTransferAssets' : 'limitedTeleportAssets';
|
|
9096
9201
|
return PolkadotXCMTransferImpl.transferPolkadotXCM(input, method, 'Unlimited');
|
|
9097
9202
|
}
|
|
9098
9203
|
}, {
|
|
9099
9204
|
key: "transferRelayToPara",
|
|
9100
9205
|
value: function transferRelayToPara(options) {
|
|
9206
|
+
var _options$version = options.version,
|
|
9207
|
+
version = _options$version === void 0 ? exports.Version.V3 : _options$version;
|
|
9101
9208
|
return {
|
|
9102
9209
|
module: 'xcmPallet',
|
|
9103
9210
|
section: 'limitedTeleportAssets',
|
|
9104
|
-
parameters: constructRelayToParaParameters(options,
|
|
9211
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
9105
9212
|
};
|
|
9106
9213
|
}
|
|
9107
9214
|
}, {
|
|
@@ -9137,6 +9244,9 @@ var AssetHubKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9137
9244
|
value: function transferPolkadotXCM(input) {
|
|
9138
9245
|
// TESTED https://kusama.subscan.io/xcm_message/kusama-ddc2a48f0d8e0337832d7aae26f6c3053e1f4ffd
|
|
9139
9246
|
// TESTED https://kusama.subscan.io/xcm_message/kusama-8e423130a4d8b61679af95dbea18a55124f99672
|
|
9247
|
+
if (input.destination === 'AssetHubPolkadot') {
|
|
9248
|
+
return getNode('AssetHubPolkadot').handleBridgeTransfer(input, 'Polkadot');
|
|
9249
|
+
}
|
|
9140
9250
|
var scenario = input.scenario;
|
|
9141
9251
|
var method = scenario === 'ParaToPara' ? 'limitedReserveTransferAssets' : 'limitedTeleportAssets';
|
|
9142
9252
|
return PolkadotXCMTransferImpl.transferPolkadotXCM(input, method, 'Unlimited');
|
|
@@ -9144,16 +9254,18 @@ var AssetHubKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9144
9254
|
}, {
|
|
9145
9255
|
key: "transferRelayToPara",
|
|
9146
9256
|
value: function transferRelayToPara(options) {
|
|
9257
|
+
var _options$version = options.version,
|
|
9258
|
+
version = _options$version === void 0 ? exports.Version.V3 : _options$version;
|
|
9147
9259
|
return {
|
|
9148
9260
|
module: 'xcmPallet',
|
|
9149
9261
|
section: 'limitedTeleportAssets',
|
|
9150
|
-
parameters: constructRelayToParaParameters(options,
|
|
9262
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
9151
9263
|
};
|
|
9152
9264
|
}
|
|
9153
9265
|
}, {
|
|
9154
9266
|
key: "createCurrencySpec",
|
|
9155
|
-
value: function createCurrencySpec(amount, scenario, version, currencyId) {
|
|
9156
|
-
return getNode('AssetHubPolkadot').createCurrencySpec(amount, scenario, version, currencyId);
|
|
9267
|
+
value: function createCurrencySpec(amount, scenario, version, currencyId, overridedMultiLocation) {
|
|
9268
|
+
return getNode('AssetHubPolkadot').createCurrencySpec(amount, scenario, version, currencyId, overridedMultiLocation);
|
|
9157
9269
|
}
|
|
9158
9270
|
}]);
|
|
9159
9271
|
}(ParachainNode);
|
|
@@ -9180,10 +9292,12 @@ var CoretimeKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9180
9292
|
value: function transferRelayToPara(options) {
|
|
9181
9293
|
// TESTED block hash on Rococo: 0x28929f7b2aeadbf3333f05d35bed18214a4b23dd270bd072f99e8a0131d22456
|
|
9182
9294
|
// https://rococo.subscan.io/extrinsic/0x469eec7dccb22696b0c95cf4f5eec4b367ad3dc23243a346cc2aad3cc9522800
|
|
9295
|
+
var _options$version = options.version,
|
|
9296
|
+
version = _options$version === void 0 ? exports.Version.V3 : _options$version;
|
|
9183
9297
|
return {
|
|
9184
9298
|
module: 'xcmPallet',
|
|
9185
9299
|
section: 'limitedTeleportAssets',
|
|
9186
|
-
parameters: constructRelayToParaParameters(options,
|
|
9300
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
9187
9301
|
};
|
|
9188
9302
|
}
|
|
9189
9303
|
}]);
|
|
@@ -9208,10 +9322,12 @@ var Encointer = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9208
9322
|
}, {
|
|
9209
9323
|
key: "transferRelayToPara",
|
|
9210
9324
|
value: function transferRelayToPara(options) {
|
|
9325
|
+
var _options$version = options.version,
|
|
9326
|
+
version = _options$version === void 0 ? exports.Version.V1 : _options$version;
|
|
9211
9327
|
return {
|
|
9212
9328
|
module: 'xcmPallet',
|
|
9213
9329
|
section: 'limitedTeleportAssets',
|
|
9214
|
-
parameters: constructRelayToParaParameters(options,
|
|
9330
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
9215
9331
|
};
|
|
9216
9332
|
}
|
|
9217
9333
|
}]);
|
|
@@ -9256,48 +9372,10 @@ var Astar = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9256
9372
|
return XTokensTransferImpl.transferXTokens(input, input.currencyID);
|
|
9257
9373
|
}
|
|
9258
9374
|
}, {
|
|
9259
|
-
key: "
|
|
9260
|
-
value: function
|
|
9261
|
-
var
|
|
9262
|
-
|
|
9263
|
-
currencyId = options.currencyId,
|
|
9264
|
-
amount = options.amount,
|
|
9265
|
-
address = options.address,
|
|
9266
|
-
destination = options.destination,
|
|
9267
|
-
paraIdTo = options.paraIdTo,
|
|
9268
|
-
overridedCurrencyMultiLocation = options.overridedCurrencyMultiLocation,
|
|
9269
|
-
_options$serializedAp = options.serializedApiCallEnabled,
|
|
9270
|
-
serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
|
|
9271
|
-
var scenario = destination !== undefined ? 'ParaToPara' : 'ParaToRelay';
|
|
9272
|
-
var paraId = destination !== undefined && _typeof(destination) !== 'object' ? paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination) : undefined;
|
|
9273
|
-
var node = this.node;
|
|
9274
|
-
if (supportsXTokens(this) && currencySymbol !== 'ASTR') {
|
|
9275
|
-
return this.transferXTokens({
|
|
9276
|
-
api: api,
|
|
9277
|
-
currency: currencySymbol,
|
|
9278
|
-
currencyID: currencyId,
|
|
9279
|
-
amount: amount,
|
|
9280
|
-
addressSelection: generateAddressPayload(api, scenario, 'XTokens', address, this.version, paraId),
|
|
9281
|
-
fees: getFees(scenario),
|
|
9282
|
-
origin: this.node,
|
|
9283
|
-
scenario: scenario,
|
|
9284
|
-
paraIdTo: paraId,
|
|
9285
|
-
destination: destination,
|
|
9286
|
-
overridedCurrencyMultiLocation: overridedCurrencyMultiLocation,
|
|
9287
|
-
serializedApiCallEnabled: serializedApiCallEnabled
|
|
9288
|
-
});
|
|
9289
|
-
} else if (supportsPolkadotXCM(this)) {
|
|
9290
|
-
return this.transferPolkadotXCM({
|
|
9291
|
-
api: api,
|
|
9292
|
-
header: this.createPolkadotXcmHeader(scenario, destination, paraId),
|
|
9293
|
-
addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, this.version, paraId),
|
|
9294
|
-
currencySelection: this.createCurrencySpec(amount, scenario, this.version, currencyId, overridedCurrencyMultiLocation),
|
|
9295
|
-
scenario: scenario,
|
|
9296
|
-
currencySymbol: currencySymbol,
|
|
9297
|
-
serializedApiCallEnabled: serializedApiCallEnabled
|
|
9298
|
-
});
|
|
9299
|
-
}
|
|
9300
|
-
throw new NoXCMSupportImplementedError(node);
|
|
9375
|
+
key: "canUseXTokens",
|
|
9376
|
+
value: function canUseXTokens(_ref) {
|
|
9377
|
+
var currencySymbol = _ref.currencySymbol;
|
|
9378
|
+
return currencySymbol !== 'ASTR';
|
|
9301
9379
|
}
|
|
9302
9380
|
}]);
|
|
9303
9381
|
}(ParachainNode);
|
|
@@ -9405,48 +9483,10 @@ var Shiden = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9405
9483
|
return XTokensTransferImpl.transferXTokens(input, input.currencyID);
|
|
9406
9484
|
}
|
|
9407
9485
|
}, {
|
|
9408
|
-
key: "
|
|
9409
|
-
value: function
|
|
9410
|
-
var
|
|
9411
|
-
|
|
9412
|
-
currencyId = options.currencyId,
|
|
9413
|
-
amount = options.amount,
|
|
9414
|
-
address = options.address,
|
|
9415
|
-
destination = options.destination,
|
|
9416
|
-
paraIdTo = options.paraIdTo,
|
|
9417
|
-
overridedCurrencyMultiLocation = options.overridedCurrencyMultiLocation,
|
|
9418
|
-
_options$serializedAp = options.serializedApiCallEnabled,
|
|
9419
|
-
serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
|
|
9420
|
-
var scenario = destination !== undefined ? 'ParaToPara' : 'ParaToRelay';
|
|
9421
|
-
var paraId = destination !== undefined && _typeof(destination) !== 'object' ? paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination) : undefined;
|
|
9422
|
-
var node = this.node;
|
|
9423
|
-
if (supportsXTokens(this) && currencySymbol !== 'SDN') {
|
|
9424
|
-
return this.transferXTokens({
|
|
9425
|
-
api: api,
|
|
9426
|
-
currency: currencySymbol,
|
|
9427
|
-
currencyID: currencyId,
|
|
9428
|
-
amount: amount,
|
|
9429
|
-
addressSelection: generateAddressPayload(api, scenario, 'XTokens', address, this.version, paraId),
|
|
9430
|
-
fees: getFees(scenario),
|
|
9431
|
-
origin: this.node,
|
|
9432
|
-
scenario: scenario,
|
|
9433
|
-
paraIdTo: paraId,
|
|
9434
|
-
destination: destination,
|
|
9435
|
-
overridedCurrencyMultiLocation: overridedCurrencyMultiLocation,
|
|
9436
|
-
serializedApiCallEnabled: serializedApiCallEnabled
|
|
9437
|
-
});
|
|
9438
|
-
} else if (supportsPolkadotXCM(this)) {
|
|
9439
|
-
return this.transferPolkadotXCM({
|
|
9440
|
-
api: api,
|
|
9441
|
-
header: this.createPolkadotXcmHeader(scenario, destination, paraId),
|
|
9442
|
-
addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, this.version, paraId),
|
|
9443
|
-
currencySelection: this.createCurrencySpec(amount, scenario, this.version, currencyId, overridedCurrencyMultiLocation),
|
|
9444
|
-
scenario: scenario,
|
|
9445
|
-
currencySymbol: currencySymbol,
|
|
9446
|
-
serializedApiCallEnabled: serializedApiCallEnabled
|
|
9447
|
-
});
|
|
9448
|
-
}
|
|
9449
|
-
throw new NoXCMSupportImplementedError(node);
|
|
9486
|
+
key: "canUseXTokens",
|
|
9487
|
+
value: function canUseXTokens(_ref) {
|
|
9488
|
+
var currencySymbol = _ref.currencySymbol;
|
|
9489
|
+
return currencySymbol !== 'SDN';
|
|
9450
9490
|
}
|
|
9451
9491
|
}]);
|
|
9452
9492
|
}(ParachainNode);
|
|
@@ -9587,10 +9627,12 @@ var Collectives = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9587
9627
|
}, {
|
|
9588
9628
|
key: "transferRelayToPara",
|
|
9589
9629
|
value: function transferRelayToPara(options) {
|
|
9630
|
+
var _options$version = options.version,
|
|
9631
|
+
version = _options$version === void 0 ? exports.Version.V3 : _options$version;
|
|
9590
9632
|
return {
|
|
9591
9633
|
module: 'xcmPallet',
|
|
9592
9634
|
section: 'limitedTeleportAssets',
|
|
9593
|
-
parameters: constructRelayToParaParameters(options,
|
|
9635
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
9594
9636
|
};
|
|
9595
9637
|
}
|
|
9596
9638
|
}, {
|
|
@@ -9612,7 +9654,7 @@ var determineDestWeight = function determineDestWeight(destNode) {
|
|
|
9612
9654
|
proofSize: '1000000'
|
|
9613
9655
|
};
|
|
9614
9656
|
}
|
|
9615
|
-
if (destNode === 'Moonbeam' || destNode === '
|
|
9657
|
+
if (destNode === 'Moonbeam' || destNode === 'Hydration') {
|
|
9616
9658
|
return {
|
|
9617
9659
|
refTime: '5000000000',
|
|
9618
9660
|
proofSize: '0'
|
|
@@ -9628,7 +9670,7 @@ var getDestination = function getDestination(_ref) {
|
|
|
9628
9670
|
if (isMultiLocation) {
|
|
9629
9671
|
return recipientAddress;
|
|
9630
9672
|
}
|
|
9631
|
-
var isEthAddress = ethers.ethers.
|
|
9673
|
+
var isEthAddress = ethers.ethers.isAddress(recipientAddress);
|
|
9632
9674
|
var addressJunction = isEthAddress ? {
|
|
9633
9675
|
AccountKey20: {
|
|
9634
9676
|
key: recipientAddress
|
|
@@ -9775,8 +9817,74 @@ var Curio = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9775
9817
|
}]);
|
|
9776
9818
|
}(ParachainNode);
|
|
9777
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
|
+
|
|
9778
9886
|
// Contains supported Parachains and exports supported XCM Pallets
|
|
9779
|
-
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'];
|
|
9780
9888
|
var NODES_WITH_RELAY_CHAINS = [].concat(NODE_NAMES, ['Polkadot', 'Kusama']);
|
|
9781
9889
|
var nodes = {
|
|
9782
9890
|
AssetHubPolkadot: new AssetHubPolkadot(),
|
|
@@ -9785,11 +9893,13 @@ var nodes = {
|
|
|
9785
9893
|
Unique: new Unique(),
|
|
9786
9894
|
Crust: new Crust(),
|
|
9787
9895
|
BifrostPolkadot: new BifrostPolkadot(),
|
|
9896
|
+
BridgeHubPolkadot: new BridgeHubPolkadot(),
|
|
9897
|
+
BridgeHubKusama: new BridgeHubKusama(),
|
|
9788
9898
|
Bitgreen: new Bitgreen(),
|
|
9789
9899
|
Centrifuge: new Centrifuge(),
|
|
9790
9900
|
ComposableFinance: new ComposableFinance(),
|
|
9791
9901
|
Darwinia: new Darwinia(),
|
|
9792
|
-
|
|
9902
|
+
Hydration: new Hydration(),
|
|
9793
9903
|
Interlay: new Interlay(),
|
|
9794
9904
|
Litentry: new Litentry(),
|
|
9795
9905
|
Moonbeam: new Moonbeam(),
|
|
@@ -9812,7 +9922,6 @@ var nodes = {
|
|
|
9812
9922
|
Karura: new Karura(),
|
|
9813
9923
|
Kintsugi: new Kintsugi(),
|
|
9814
9924
|
Litmus: new Litmus(),
|
|
9815
|
-
Mangata: new Mangata(),
|
|
9816
9925
|
Moonriver: new Moonriver(),
|
|
9817
9926
|
ParallelHeiko: new ParallelHeiko(),
|
|
9818
9927
|
Picasso: new Picasso(),
|
|
@@ -9849,24 +9958,54 @@ var getFees = function getFees(scenario) {
|
|
|
9849
9958
|
}
|
|
9850
9959
|
throw new Error("Fees for scenario ".concat(scenario, " are not defined."));
|
|
9851
9960
|
};
|
|
9961
|
+
var generateAddressMultiLocationV4 = function generateAddressMultiLocationV4(api, address) {
|
|
9962
|
+
var isMultiLocation = _typeof(address) === 'object';
|
|
9963
|
+
if (isMultiLocation) {
|
|
9964
|
+
return _defineProperty({}, exports.Version.V4, address);
|
|
9965
|
+
}
|
|
9966
|
+
var isEthAddress = ethers.ethers.isAddress(address);
|
|
9967
|
+
return _defineProperty({}, exports.Version.V4, {
|
|
9968
|
+
parents: exports.Parents.ZERO,
|
|
9969
|
+
interior: {
|
|
9970
|
+
X1: [isEthAddress ? {
|
|
9971
|
+
AccountKey20: {
|
|
9972
|
+
key: address
|
|
9973
|
+
}
|
|
9974
|
+
} : {
|
|
9975
|
+
AccountId32: {
|
|
9976
|
+
id: createAccID(api, address),
|
|
9977
|
+
network: null
|
|
9978
|
+
}
|
|
9979
|
+
}]
|
|
9980
|
+
}
|
|
9981
|
+
});
|
|
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
|
+
};
|
|
9852
9993
|
var generateAddressPayload = function generateAddressPayload(api, scenario, pallet, recipientAddress, version, nodeId) {
|
|
9853
9994
|
var isMultiLocation = _typeof(recipientAddress) === 'object';
|
|
9854
9995
|
if (isMultiLocation) {
|
|
9855
9996
|
return _defineProperty({}, version, recipientAddress);
|
|
9856
9997
|
}
|
|
9857
|
-
var isEthAddress = ethers.ethers.
|
|
9998
|
+
var isEthAddress = ethers.ethers.isAddress(recipientAddress);
|
|
9858
9999
|
if (scenario === 'ParaToRelay') {
|
|
9859
10000
|
return _defineProperty({}, version, {
|
|
9860
10001
|
parents: pallet === 'XTokens' ? exports.Parents.ONE : exports.Parents.ZERO,
|
|
9861
|
-
interior: {
|
|
9862
|
-
|
|
9863
|
-
|
|
9864
|
-
|
|
9865
|
-
|
|
9866
|
-
|
|
9867
|
-
|
|
9868
|
-
}
|
|
9869
|
-
}
|
|
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
|
+
})
|
|
9870
10009
|
});
|
|
9871
10010
|
}
|
|
9872
10011
|
if (scenario === 'ParaToPara' && pallet === 'XTokens') {
|
|
@@ -9894,36 +10033,32 @@ var generateAddressPayload = function generateAddressPayload(api, scenario, pall
|
|
|
9894
10033
|
if (scenario === 'ParaToPara' && pallet === 'PolkadotXcm') {
|
|
9895
10034
|
return _defineProperty({}, version, {
|
|
9896
10035
|
parents: exports.Parents.ZERO,
|
|
9897
|
-
interior: {
|
|
9898
|
-
|
|
9899
|
-
|
|
9900
|
-
|
|
9901
|
-
}), {
|
|
9902
|
-
key: recipientAddress
|
|
9903
|
-
})
|
|
9904
|
-
} : {
|
|
9905
|
-
AccountId32: Object.assign(Object.assign({}, version === exports.Version.V1 && {
|
|
9906
|
-
network: 'any'
|
|
9907
|
-
}), {
|
|
9908
|
-
id: createAccID(api, recipientAddress)
|
|
9909
|
-
})
|
|
9910
|
-
}
|
|
9911
|
-
}
|
|
9912
|
-
});
|
|
9913
|
-
}
|
|
9914
|
-
return _defineProperty({}, exports.Version.V3, {
|
|
9915
|
-
parents: exports.Parents.ZERO,
|
|
9916
|
-
interior: {
|
|
9917
|
-
X1: isEthAddress ? {
|
|
9918
|
-
AccountKey20: {
|
|
10036
|
+
interior: createX1Payload(version, isEthAddress ? {
|
|
10037
|
+
AccountKey20: Object.assign(Object.assign({}, version === exports.Version.V1 && {
|
|
10038
|
+
network: 'any'
|
|
10039
|
+
}), {
|
|
9919
10040
|
key: recipientAddress
|
|
9920
|
-
}
|
|
10041
|
+
})
|
|
9921
10042
|
} : {
|
|
9922
|
-
AccountId32: {
|
|
10043
|
+
AccountId32: Object.assign(Object.assign({}, version === exports.Version.V1 && {
|
|
10044
|
+
network: 'any'
|
|
10045
|
+
}), {
|
|
9923
10046
|
id: createAccID(api, recipientAddress)
|
|
9924
|
-
}
|
|
10047
|
+
})
|
|
10048
|
+
})
|
|
10049
|
+
});
|
|
10050
|
+
}
|
|
10051
|
+
return _defineProperty({}, version, {
|
|
10052
|
+
parents: exports.Parents.ZERO,
|
|
10053
|
+
interior: createX1Payload(version, isEthAddress ? {
|
|
10054
|
+
AccountKey20: {
|
|
10055
|
+
key: recipientAddress
|
|
9925
10056
|
}
|
|
9926
|
-
}
|
|
10057
|
+
} : {
|
|
10058
|
+
AccountId32: {
|
|
10059
|
+
id: createAccID(api, recipientAddress)
|
|
10060
|
+
}
|
|
10061
|
+
})
|
|
9927
10062
|
});
|
|
9928
10063
|
};
|
|
9929
10064
|
var getNode = function getNode(node) {
|
|
@@ -9933,8 +10068,8 @@ var getNodeEndpointOption = function getNodeEndpointOption(node) {
|
|
|
9933
10068
|
var _getNode = getNode(node),
|
|
9934
10069
|
type = _getNode.type,
|
|
9935
10070
|
name = _getNode.name;
|
|
9936
|
-
var
|
|
9937
|
-
linked =
|
|
10071
|
+
var _ref8 = type === 'polkadot' ? endpoints.prodRelayPolkadot : endpoints.prodRelayKusama,
|
|
10072
|
+
linked = _ref8.linked;
|
|
9938
10073
|
if (linked === undefined) return undefined;
|
|
9939
10074
|
var preferredOption = linked.find(function (o) {
|
|
9940
10075
|
return o.info === name && Object.values(o.providers).length > 0;
|
|
@@ -9945,8 +10080,8 @@ var getNodeEndpointOption = function getNodeEndpointOption(node) {
|
|
|
9945
10080
|
};
|
|
9946
10081
|
var getAllNodeProviders = function getAllNodeProviders(node) {
|
|
9947
10082
|
var _a;
|
|
9948
|
-
var
|
|
9949
|
-
providers =
|
|
10083
|
+
var _ref9 = (_a = getNodeEndpointOption(node)) !== null && _a !== void 0 ? _a : {},
|
|
10084
|
+
providers = _ref9.providers;
|
|
9950
10085
|
if (providers.length < 1) {
|
|
9951
10086
|
throw new Error("Node ".concat(node, " does not have any providers."));
|
|
9952
10087
|
}
|
|
@@ -9986,7 +10121,7 @@ var createApiInstanceForNode = function createApiInstanceForNode(node) {
|
|
|
9986
10121
|
break;
|
|
9987
10122
|
}
|
|
9988
10123
|
endpointOption = node === 'Polkadot' ? endpoints.prodRelayPolkadot : endpoints.prodRelayKusama;
|
|
9989
|
-
wsUrl = Object.values(endpointOption.providers)[
|
|
10124
|
+
wsUrl = Object.values(endpointOption.providers)[0];
|
|
9990
10125
|
_context2.next = 5;
|
|
9991
10126
|
return createApiInstance(wsUrl);
|
|
9992
10127
|
case 5:
|
|
@@ -10006,11 +10141,11 @@ var createApiInstanceForNode = function createApiInstanceForNode(node) {
|
|
|
10006
10141
|
var lowercaseFirstLetter = function lowercaseFirstLetter(str) {
|
|
10007
10142
|
return str.charAt(0).toLowerCase() + str.slice(1);
|
|
10008
10143
|
};
|
|
10009
|
-
var callPolkadotJsTxFunction = function callPolkadotJsTxFunction(api,
|
|
10144
|
+
var callPolkadotJsTxFunction = function callPolkadotJsTxFunction(api, _ref10) {
|
|
10010
10145
|
var _api$tx$module;
|
|
10011
|
-
var module =
|
|
10012
|
-
section =
|
|
10013
|
-
parameters =
|
|
10146
|
+
var module = _ref10.module,
|
|
10147
|
+
section = _ref10.section,
|
|
10148
|
+
parameters = _ref10.parameters;
|
|
10014
10149
|
return (_api$tx$module = api.tx[module])[section].apply(_api$tx$module, _toConsumableArray(parameters));
|
|
10015
10150
|
};
|
|
10016
10151
|
var determineRelayChain = function determineRelayChain(node) {
|
|
@@ -10085,115 +10220,117 @@ var createTx = function createTx(originApi, destApi, address, amount, currencySy
|
|
|
10085
10220
|
}, _callee);
|
|
10086
10221
|
}));
|
|
10087
10222
|
};
|
|
10088
|
-
var checkKeepAlive = function checkKeepAlive(
|
|
10089
|
-
|
|
10090
|
-
|
|
10091
|
-
|
|
10092
|
-
|
|
10093
|
-
|
|
10094
|
-
|
|
10095
|
-
|
|
10096
|
-
|
|
10097
|
-
|
|
10098
|
-
|
|
10099
|
-
|
|
10100
|
-
|
|
10101
|
-
|
|
10102
|
-
|
|
10103
|
-
|
|
10104
|
-
|
|
10105
|
-
|
|
10106
|
-
|
|
10107
|
-
|
|
10108
|
-
|
|
10109
|
-
|
|
10110
|
-
|
|
10111
|
-
|
|
10112
|
-
|
|
10113
|
-
|
|
10114
|
-
|
|
10115
|
-
|
|
10116
|
-
|
|
10117
|
-
|
|
10118
|
-
|
|
10119
|
-
|
|
10120
|
-
|
|
10121
|
-
|
|
10122
|
-
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
|
|
10133
|
-
|
|
10134
|
-
|
|
10135
|
-
|
|
10136
|
-
|
|
10137
|
-
|
|
10138
|
-
|
|
10139
|
-
|
|
10140
|
-
|
|
10141
|
-
|
|
10142
|
-
|
|
10143
|
-
|
|
10144
|
-
|
|
10145
|
-
|
|
10146
|
-
|
|
10147
|
-
|
|
10148
|
-
|
|
10149
|
-
|
|
10150
|
-
|
|
10151
|
-
|
|
10152
|
-
|
|
10153
|
-
|
|
10154
|
-
|
|
10155
|
-
|
|
10156
|
-
|
|
10157
|
-
|
|
10158
|
-
|
|
10159
|
-
|
|
10160
|
-
|
|
10161
|
-
|
|
10162
|
-
|
|
10163
|
-
|
|
10164
|
-
|
|
10165
|
-
|
|
10166
|
-
|
|
10167
|
-
|
|
10168
|
-
|
|
10169
|
-
|
|
10170
|
-
|
|
10171
|
-
|
|
10172
|
-
|
|
10173
|
-
|
|
10174
|
-
|
|
10175
|
-
|
|
10176
|
-
|
|
10177
|
-
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10181
|
-
|
|
10182
|
-
|
|
10183
|
-
|
|
10184
|
-
|
|
10185
|
-
|
|
10186
|
-
|
|
10187
|
-
|
|
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
|
+
});
|
|
10188
10325
|
};
|
|
10189
10326
|
|
|
10190
10327
|
var sendCommon = function sendCommon(options) {
|
|
10191
10328
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
10192
|
-
var _a, api, origin, currency, amount, address, destination, paraIdTo, destApiForKeepAlive, feeAsset, _options$serializedAp, serializedApiCallEnabled, asset, isMultiLocationDestination, isMultiLocationCurrency, originRelayChainSymbol, destinationRelayChainSymbol, 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;
|
|
10193
10330
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10194
10331
|
while (1) switch (_context.prev = _context.next) {
|
|
10195
10332
|
case 0:
|
|
10196
|
-
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;
|
|
10197
10334
|
if (!((!isTMulti(currency) || isTMultiLocation(currency)) && amount === null)) {
|
|
10198
10335
|
_context.next = 3;
|
|
10199
10336
|
break;
|
|
@@ -10247,71 +10384,72 @@ var sendCommon = function sendCommon(options) {
|
|
|
10247
10384
|
isMultiLocationDestination = _typeof(destination) === 'object';
|
|
10248
10385
|
isMultiLocationCurrency = _typeof(currency) === 'object';
|
|
10249
10386
|
if (!(destination !== undefined && !isMultiLocationDestination)) {
|
|
10250
|
-
_context.next =
|
|
10387
|
+
_context.next = 26;
|
|
10251
10388
|
break;
|
|
10252
10389
|
}
|
|
10253
10390
|
originRelayChainSymbol = getRelayChainSymbol(origin);
|
|
10254
10391
|
destinationRelayChainSymbol = getRelayChainSymbol(destination);
|
|
10255
|
-
|
|
10256
|
-
|
|
10392
|
+
supportsBridge = (origin === 'AssetHubPolkadot' || origin === 'AssetHubKusama') && (destination === 'AssetHubPolkadot' || destination === 'AssetHubKusama');
|
|
10393
|
+
if (!(!supportsBridge && originRelayChainSymbol !== destinationRelayChainSymbol)) {
|
|
10394
|
+
_context.next = 26;
|
|
10257
10395
|
break;
|
|
10258
10396
|
}
|
|
10259
10397
|
throw new IncompatibleNodesError();
|
|
10260
|
-
case
|
|
10398
|
+
case 26:
|
|
10261
10399
|
originNode = getNode(origin);
|
|
10262
10400
|
assetCheckEnabled = destination === 'AssetHubKusama' || destination === 'AssetHubPolkadot' || isMultiLocationCurrency ? false : originNode.assetCheckEnabled;
|
|
10263
10401
|
if (!(asset === null && assetCheckEnabled)) {
|
|
10264
|
-
_context.next =
|
|
10402
|
+
_context.next = 30;
|
|
10265
10403
|
break;
|
|
10266
10404
|
}
|
|
10267
10405
|
throw new InvalidCurrencyError("Origin node ".concat(origin, " does not support currency or currencyId ").concat(JSON.stringify(currency), "."));
|
|
10268
|
-
case
|
|
10406
|
+
case 30:
|
|
10269
10407
|
if (!(destination !== undefined && !isMultiLocationDestination && (asset === null || asset === void 0 ? void 0 : asset.symbol) !== undefined && assetCheckEnabled && !hasSupportForAsset(destination, asset.symbol))) {
|
|
10270
|
-
_context.next =
|
|
10408
|
+
_context.next = 32;
|
|
10271
10409
|
break;
|
|
10272
10410
|
}
|
|
10273
10411
|
throw new InvalidCurrencyError("Destination node ".concat(destination, " does not support currency or currencyId ").concat(JSON.stringify(currency), "."));
|
|
10274
|
-
case
|
|
10412
|
+
case 32:
|
|
10275
10413
|
if (!(api !== null && api !== void 0)) {
|
|
10276
|
-
_context.next =
|
|
10414
|
+
_context.next = 36;
|
|
10277
10415
|
break;
|
|
10278
10416
|
}
|
|
10279
10417
|
_context.t0 = api;
|
|
10280
|
-
_context.next =
|
|
10418
|
+
_context.next = 39;
|
|
10281
10419
|
break;
|
|
10282
|
-
case
|
|
10283
|
-
_context.next =
|
|
10420
|
+
case 36:
|
|
10421
|
+
_context.next = 38;
|
|
10284
10422
|
return createApiInstanceForNode(origin);
|
|
10285
|
-
case 37:
|
|
10286
|
-
_context.t0 = _context.sent;
|
|
10287
10423
|
case 38:
|
|
10424
|
+
_context.t0 = _context.sent;
|
|
10425
|
+
case 39:
|
|
10288
10426
|
apiWithFallback = _context.t0;
|
|
10289
10427
|
amountStr = amount === null || amount === void 0 ? void 0 : amount.toString();
|
|
10290
10428
|
if (!isTMulti(currency)) {
|
|
10291
|
-
_context.next =
|
|
10429
|
+
_context.next = 45;
|
|
10292
10430
|
break;
|
|
10293
10431
|
}
|
|
10294
10432
|
console.warn('Keep alive check is not supported when using MultiLocation as currency.');
|
|
10295
|
-
_context.next =
|
|
10433
|
+
_context.next = 55;
|
|
10296
10434
|
break;
|
|
10297
|
-
case
|
|
10435
|
+
case 45:
|
|
10298
10436
|
if (!(_typeof(address) === 'object')) {
|
|
10299
|
-
_context.next =
|
|
10437
|
+
_context.next = 49;
|
|
10300
10438
|
break;
|
|
10301
10439
|
}
|
|
10302
10440
|
console.warn('Keep alive check is not supported when using MultiLocation as address.');
|
|
10303
|
-
_context.next =
|
|
10441
|
+
_context.next = 55;
|
|
10304
10442
|
break;
|
|
10305
|
-
case
|
|
10443
|
+
case 49:
|
|
10306
10444
|
if (!(_typeof(destination) === 'object')) {
|
|
10307
|
-
_context.next =
|
|
10445
|
+
_context.next = 53;
|
|
10308
10446
|
break;
|
|
10309
10447
|
}
|
|
10310
10448
|
console.warn('Keep alive check is not supported when using MultiLocation as destination.');
|
|
10311
|
-
_context.next =
|
|
10449
|
+
_context.next = 55;
|
|
10312
10450
|
break;
|
|
10313
|
-
case
|
|
10314
|
-
_context.next =
|
|
10451
|
+
case 53:
|
|
10452
|
+
_context.next = 55;
|
|
10315
10453
|
return checkKeepAlive({
|
|
10316
10454
|
originApi: apiWithFallback,
|
|
10317
10455
|
address: address,
|
|
@@ -10321,7 +10459,7 @@ var sendCommon = function sendCommon(options) {
|
|
|
10321
10459
|
currencySymbol: (_a = asset === null || asset === void 0 ? void 0 : asset.symbol) !== null && _a !== void 0 ? _a : currency.toString(),
|
|
10322
10460
|
destNode: destination
|
|
10323
10461
|
});
|
|
10324
|
-
case
|
|
10462
|
+
case 55:
|
|
10325
10463
|
currencyStr = isTMulti(currency) ? undefined : currency.toString();
|
|
10326
10464
|
currencyId = assetCheckEnabled ? asset === null || asset === void 0 ? void 0 : asset.assetId : currencyStr;
|
|
10327
10465
|
return _context.abrupt("return", originNode.transfer({
|
|
@@ -10334,9 +10472,10 @@ var sendCommon = function sendCommon(options) {
|
|
|
10334
10472
|
paraIdTo: paraIdTo,
|
|
10335
10473
|
overridedCurrencyMultiLocation: isTMulti(currency) ? currency : undefined,
|
|
10336
10474
|
feeAsset: feeAsset,
|
|
10475
|
+
version: version,
|
|
10337
10476
|
serializedApiCallEnabled: serializedApiCallEnabled
|
|
10338
10477
|
}));
|
|
10339
|
-
case
|
|
10478
|
+
case 58:
|
|
10340
10479
|
case "end":
|
|
10341
10480
|
return _context.stop();
|
|
10342
10481
|
}
|
|
@@ -10379,11 +10518,11 @@ var send = function send(options) {
|
|
|
10379
10518
|
};
|
|
10380
10519
|
var transferRelayToParaCommon = function transferRelayToParaCommon(options) {
|
|
10381
10520
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
10382
|
-
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;
|
|
10383
10522
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
10384
10523
|
while (1) switch (_context4.prev = _context4.next) {
|
|
10385
10524
|
case 0:
|
|
10386
|
-
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;
|
|
10387
10526
|
isMultiLocationDestination = _typeof(destination) === 'object';
|
|
10388
10527
|
isAddressMultiLocation = _typeof(address) === 'object';
|
|
10389
10528
|
if (!(api === undefined && isMultiLocationDestination)) {
|
|
@@ -10439,7 +10578,8 @@ var transferRelayToParaCommon = function transferRelayToParaCommon(options) {
|
|
|
10439
10578
|
address: address,
|
|
10440
10579
|
amount: amountStr,
|
|
10441
10580
|
paraIdTo: paraIdTo,
|
|
10442
|
-
destApiForKeepAlive: destApiForKeepAlive
|
|
10581
|
+
destApiForKeepAlive: destApiForKeepAlive,
|
|
10582
|
+
version: version
|
|
10443
10583
|
});
|
|
10444
10584
|
if (!serializedApiCallEnabled) {
|
|
10445
10585
|
_context4.next = 27;
|