@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.mjs
CHANGED
|
@@ -4,9 +4,27 @@ import { prodRelayPolkadot, prodRelayKusama } from '@polkadot/apps-config/endpoi
|
|
|
4
4
|
import { u32 } from '@polkadot/types';
|
|
5
5
|
import { BN } from '@polkadot/util';
|
|
6
6
|
|
|
7
|
+
function _arrayLikeToArray(r, a) {
|
|
8
|
+
(null == a || a > r.length) && (a = r.length);
|
|
9
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
10
|
+
return n;
|
|
11
|
+
}
|
|
12
|
+
function _arrayWithHoles(r) {
|
|
13
|
+
if (Array.isArray(r)) return r;
|
|
14
|
+
}
|
|
15
|
+
function _arrayWithoutHoles(r) {
|
|
16
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
17
|
+
}
|
|
18
|
+
function _assertThisInitialized(e) {
|
|
19
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
20
|
+
return e;
|
|
21
|
+
}
|
|
7
22
|
function _callSuper(t, o, e) {
|
|
8
23
|
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
9
24
|
}
|
|
25
|
+
function _classCallCheck(a, n) {
|
|
26
|
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
27
|
+
}
|
|
10
28
|
function _construct(t, e, r) {
|
|
11
29
|
if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
|
|
12
30
|
var o = [null];
|
|
@@ -14,6 +32,106 @@ function _construct(t, e, r) {
|
|
|
14
32
|
var p = new (t.bind.apply(t, o))();
|
|
15
33
|
return r && _setPrototypeOf(p, r.prototype), p;
|
|
16
34
|
}
|
|
35
|
+
function _defineProperties(e, r) {
|
|
36
|
+
for (var t = 0; t < r.length; t++) {
|
|
37
|
+
var o = r[t];
|
|
38
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function _createClass(e, r, t) {
|
|
42
|
+
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
43
|
+
writable: !1
|
|
44
|
+
}), e;
|
|
45
|
+
}
|
|
46
|
+
function _createForOfIteratorHelper(r, e) {
|
|
47
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
48
|
+
if (!t) {
|
|
49
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e ) {
|
|
50
|
+
t && (r = t);
|
|
51
|
+
var n = 0,
|
|
52
|
+
F = function () {};
|
|
53
|
+
return {
|
|
54
|
+
s: F,
|
|
55
|
+
n: function () {
|
|
56
|
+
return n >= r.length ? {
|
|
57
|
+
done: !0
|
|
58
|
+
} : {
|
|
59
|
+
done: !1,
|
|
60
|
+
value: r[n++]
|
|
61
|
+
};
|
|
62
|
+
},
|
|
63
|
+
e: function (r) {
|
|
64
|
+
throw r;
|
|
65
|
+
},
|
|
66
|
+
f: F
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
70
|
+
}
|
|
71
|
+
var o,
|
|
72
|
+
a = !0,
|
|
73
|
+
u = !1;
|
|
74
|
+
return {
|
|
75
|
+
s: function () {
|
|
76
|
+
t = t.call(r);
|
|
77
|
+
},
|
|
78
|
+
n: function () {
|
|
79
|
+
var r = t.next();
|
|
80
|
+
return a = r.done, r;
|
|
81
|
+
},
|
|
82
|
+
e: function (r) {
|
|
83
|
+
u = !0, o = r;
|
|
84
|
+
},
|
|
85
|
+
f: function () {
|
|
86
|
+
try {
|
|
87
|
+
a || null == t.return || t.return();
|
|
88
|
+
} finally {
|
|
89
|
+
if (u) throw o;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
function _defineProperty(e, r, t) {
|
|
95
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
96
|
+
value: t,
|
|
97
|
+
enumerable: !0,
|
|
98
|
+
configurable: !0,
|
|
99
|
+
writable: !0
|
|
100
|
+
}) : e[r] = t, e;
|
|
101
|
+
}
|
|
102
|
+
function _get() {
|
|
103
|
+
return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {
|
|
104
|
+
var p = _superPropBase(e, t);
|
|
105
|
+
if (p) {
|
|
106
|
+
var n = Object.getOwnPropertyDescriptor(p, t);
|
|
107
|
+
return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;
|
|
108
|
+
}
|
|
109
|
+
}, _get.apply(null, arguments);
|
|
110
|
+
}
|
|
111
|
+
function _getPrototypeOf(t) {
|
|
112
|
+
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
113
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
114
|
+
}, _getPrototypeOf(t);
|
|
115
|
+
}
|
|
116
|
+
function _inherits(t, e) {
|
|
117
|
+
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
|
|
118
|
+
t.prototype = Object.create(e && e.prototype, {
|
|
119
|
+
constructor: {
|
|
120
|
+
value: t,
|
|
121
|
+
writable: !0,
|
|
122
|
+
configurable: !0
|
|
123
|
+
}
|
|
124
|
+
}), Object.defineProperty(t, "prototype", {
|
|
125
|
+
writable: !1
|
|
126
|
+
}), e && _setPrototypeOf(t, e);
|
|
127
|
+
}
|
|
128
|
+
function _isNativeFunction(t) {
|
|
129
|
+
try {
|
|
130
|
+
return -1 !== Function.toString.call(t).indexOf("[native code]");
|
|
131
|
+
} catch (n) {
|
|
132
|
+
return "function" == typeof t;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
17
135
|
function _isNativeReflectConstruct() {
|
|
18
136
|
try {
|
|
19
137
|
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
@@ -22,6 +140,9 @@ function _isNativeReflectConstruct() {
|
|
|
22
140
|
return !!t;
|
|
23
141
|
})();
|
|
24
142
|
}
|
|
143
|
+
function _iterableToArray(r) {
|
|
144
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
145
|
+
}
|
|
25
146
|
function _iterableToArrayLimit(r, l) {
|
|
26
147
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
27
148
|
if (null != t) {
|
|
@@ -46,6 +167,17 @@ function _iterableToArrayLimit(r, l) {
|
|
|
46
167
|
return a;
|
|
47
168
|
}
|
|
48
169
|
}
|
|
170
|
+
function _nonIterableRest() {
|
|
171
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
172
|
+
}
|
|
173
|
+
function _nonIterableSpread() {
|
|
174
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
175
|
+
}
|
|
176
|
+
function _possibleConstructorReturn(t, e) {
|
|
177
|
+
if (e && ("object" == typeof e || "function" == typeof e)) return e;
|
|
178
|
+
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
179
|
+
return _assertThisInitialized(t);
|
|
180
|
+
}
|
|
49
181
|
function _regeneratorRuntime() {
|
|
50
182
|
_regeneratorRuntime = function () {
|
|
51
183
|
return e;
|
|
@@ -347,6 +479,21 @@ function _regeneratorRuntime() {
|
|
|
347
479
|
}
|
|
348
480
|
}, e;
|
|
349
481
|
}
|
|
482
|
+
function _setPrototypeOf(t, e) {
|
|
483
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
484
|
+
return t.__proto__ = e, t;
|
|
485
|
+
}, _setPrototypeOf(t, e);
|
|
486
|
+
}
|
|
487
|
+
function _slicedToArray(r, e) {
|
|
488
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
489
|
+
}
|
|
490
|
+
function _superPropBase(t, o) {
|
|
491
|
+
for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););
|
|
492
|
+
return t;
|
|
493
|
+
}
|
|
494
|
+
function _toConsumableArray(r) {
|
|
495
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
496
|
+
}
|
|
350
497
|
function _toPrimitive(t, r) {
|
|
351
498
|
if ("object" != typeof t || !t) return t;
|
|
352
499
|
var e = t[Symbol.toPrimitive];
|
|
@@ -370,225 +517,34 @@ function _typeof(o) {
|
|
|
370
517
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
371
518
|
}, _typeof(o);
|
|
372
519
|
}
|
|
373
|
-
function
|
|
374
|
-
if (
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
function _defineProperties(target, props) {
|
|
379
|
-
for (var i = 0; i < props.length; i++) {
|
|
380
|
-
var descriptor = props[i];
|
|
381
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
382
|
-
descriptor.configurable = true;
|
|
383
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
384
|
-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
388
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
389
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
390
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
391
|
-
writable: false
|
|
392
|
-
});
|
|
393
|
-
return Constructor;
|
|
394
|
-
}
|
|
395
|
-
function _defineProperty(obj, key, value) {
|
|
396
|
-
key = _toPropertyKey(key);
|
|
397
|
-
if (key in obj) {
|
|
398
|
-
Object.defineProperty(obj, key, {
|
|
399
|
-
value: value,
|
|
400
|
-
enumerable: true,
|
|
401
|
-
configurable: true,
|
|
402
|
-
writable: true
|
|
403
|
-
});
|
|
404
|
-
} else {
|
|
405
|
-
obj[key] = value;
|
|
406
|
-
}
|
|
407
|
-
return obj;
|
|
408
|
-
}
|
|
409
|
-
function _inherits(subClass, superClass) {
|
|
410
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
411
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
412
|
-
}
|
|
413
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
414
|
-
constructor: {
|
|
415
|
-
value: subClass,
|
|
416
|
-
writable: true,
|
|
417
|
-
configurable: true
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
Object.defineProperty(subClass, "prototype", {
|
|
421
|
-
writable: false
|
|
422
|
-
});
|
|
423
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
424
|
-
}
|
|
425
|
-
function _getPrototypeOf(o) {
|
|
426
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
427
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
428
|
-
};
|
|
429
|
-
return _getPrototypeOf(o);
|
|
430
|
-
}
|
|
431
|
-
function _setPrototypeOf(o, p) {
|
|
432
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
433
|
-
o.__proto__ = p;
|
|
434
|
-
return o;
|
|
435
|
-
};
|
|
436
|
-
return _setPrototypeOf(o, p);
|
|
437
|
-
}
|
|
438
|
-
function _isNativeFunction(fn) {
|
|
439
|
-
try {
|
|
440
|
-
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
441
|
-
} catch (e) {
|
|
442
|
-
return typeof fn === "function";
|
|
520
|
+
function _unsupportedIterableToArray(r, a) {
|
|
521
|
+
if (r) {
|
|
522
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
523
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
524
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
443
525
|
}
|
|
444
526
|
}
|
|
445
|
-
function _wrapNativeSuper(
|
|
446
|
-
var
|
|
447
|
-
_wrapNativeSuper = function
|
|
448
|
-
if (
|
|
449
|
-
if (typeof
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
454
|
-
_cache.set(Class, Wrapper);
|
|
527
|
+
function _wrapNativeSuper(t) {
|
|
528
|
+
var r = "function" == typeof Map ? new Map() : void 0;
|
|
529
|
+
return _wrapNativeSuper = function (t) {
|
|
530
|
+
if (null === t || !_isNativeFunction(t)) return t;
|
|
531
|
+
if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
|
|
532
|
+
if (void 0 !== r) {
|
|
533
|
+
if (r.has(t)) return r.get(t);
|
|
534
|
+
r.set(t, Wrapper);
|
|
455
535
|
}
|
|
456
536
|
function Wrapper() {
|
|
457
|
-
return _construct(
|
|
537
|
+
return _construct(t, arguments, _getPrototypeOf(this).constructor);
|
|
458
538
|
}
|
|
459
|
-
Wrapper.prototype = Object.create(
|
|
539
|
+
return Wrapper.prototype = Object.create(t.prototype, {
|
|
460
540
|
constructor: {
|
|
461
541
|
value: Wrapper,
|
|
462
|
-
enumerable:
|
|
463
|
-
writable:
|
|
464
|
-
configurable:
|
|
465
|
-
}
|
|
466
|
-
});
|
|
467
|
-
return _setPrototypeOf(Wrapper, Class);
|
|
468
|
-
};
|
|
469
|
-
return _wrapNativeSuper(Class);
|
|
470
|
-
}
|
|
471
|
-
function _assertThisInitialized(self) {
|
|
472
|
-
if (self === void 0) {
|
|
473
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
474
|
-
}
|
|
475
|
-
return self;
|
|
476
|
-
}
|
|
477
|
-
function _possibleConstructorReturn(self, call) {
|
|
478
|
-
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
479
|
-
return call;
|
|
480
|
-
} else if (call !== void 0) {
|
|
481
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
482
|
-
}
|
|
483
|
-
return _assertThisInitialized(self);
|
|
484
|
-
}
|
|
485
|
-
function _superPropBase(object, property) {
|
|
486
|
-
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
|
487
|
-
object = _getPrototypeOf(object);
|
|
488
|
-
if (object === null) break;
|
|
489
|
-
}
|
|
490
|
-
return object;
|
|
491
|
-
}
|
|
492
|
-
function _get() {
|
|
493
|
-
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
494
|
-
_get = Reflect.get.bind();
|
|
495
|
-
} else {
|
|
496
|
-
_get = function _get(target, property, receiver) {
|
|
497
|
-
var base = _superPropBase(target, property);
|
|
498
|
-
if (!base) return;
|
|
499
|
-
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
500
|
-
if (desc.get) {
|
|
501
|
-
return desc.get.call(arguments.length < 3 ? target : receiver);
|
|
502
|
-
}
|
|
503
|
-
return desc.value;
|
|
504
|
-
};
|
|
505
|
-
}
|
|
506
|
-
return _get.apply(this, arguments);
|
|
507
|
-
}
|
|
508
|
-
function _slicedToArray(arr, i) {
|
|
509
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
510
|
-
}
|
|
511
|
-
function _toConsumableArray(arr) {
|
|
512
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
513
|
-
}
|
|
514
|
-
function _arrayWithoutHoles(arr) {
|
|
515
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
516
|
-
}
|
|
517
|
-
function _arrayWithHoles(arr) {
|
|
518
|
-
if (Array.isArray(arr)) return arr;
|
|
519
|
-
}
|
|
520
|
-
function _iterableToArray(iter) {
|
|
521
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
522
|
-
}
|
|
523
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
524
|
-
if (!o) return;
|
|
525
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
526
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
527
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
528
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
529
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
530
|
-
}
|
|
531
|
-
function _arrayLikeToArray(arr, len) {
|
|
532
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
533
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
534
|
-
return arr2;
|
|
535
|
-
}
|
|
536
|
-
function _nonIterableSpread() {
|
|
537
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
538
|
-
}
|
|
539
|
-
function _nonIterableRest() {
|
|
540
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
541
|
-
}
|
|
542
|
-
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
543
|
-
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
544
|
-
if (!it) {
|
|
545
|
-
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike ) {
|
|
546
|
-
if (it) o = it;
|
|
547
|
-
var i = 0;
|
|
548
|
-
var F = function () {};
|
|
549
|
-
return {
|
|
550
|
-
s: F,
|
|
551
|
-
n: function () {
|
|
552
|
-
if (i >= o.length) return {
|
|
553
|
-
done: true
|
|
554
|
-
};
|
|
555
|
-
return {
|
|
556
|
-
done: false,
|
|
557
|
-
value: o[i++]
|
|
558
|
-
};
|
|
559
|
-
},
|
|
560
|
-
e: function (e) {
|
|
561
|
-
throw e;
|
|
562
|
-
},
|
|
563
|
-
f: F
|
|
564
|
-
};
|
|
565
|
-
}
|
|
566
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
567
|
-
}
|
|
568
|
-
var normalCompletion = true,
|
|
569
|
-
didErr = false,
|
|
570
|
-
err;
|
|
571
|
-
return {
|
|
572
|
-
s: function () {
|
|
573
|
-
it = it.call(o);
|
|
574
|
-
},
|
|
575
|
-
n: function () {
|
|
576
|
-
var step = it.next();
|
|
577
|
-
normalCompletion = step.done;
|
|
578
|
-
return step;
|
|
579
|
-
},
|
|
580
|
-
e: function (e) {
|
|
581
|
-
didErr = true;
|
|
582
|
-
err = e;
|
|
583
|
-
},
|
|
584
|
-
f: function () {
|
|
585
|
-
try {
|
|
586
|
-
if (!normalCompletion && it.return != null) it.return();
|
|
587
|
-
} finally {
|
|
588
|
-
if (didErr) throw err;
|
|
542
|
+
enumerable: !1,
|
|
543
|
+
writable: !0,
|
|
544
|
+
configurable: !0
|
|
589
545
|
}
|
|
590
|
-
}
|
|
591
|
-
};
|
|
546
|
+
}), _setPrototypeOf(Wrapper, t);
|
|
547
|
+
}, _wrapNativeSuper(t);
|
|
592
548
|
}
|
|
593
549
|
|
|
594
550
|
/******************************************************************************
|
|
@@ -608,18 +564,6 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
608
564
|
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
609
565
|
|
|
610
566
|
|
|
611
|
-
function __rest(s, e) {
|
|
612
|
-
var t = {};
|
|
613
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
614
|
-
t[p] = s[p];
|
|
615
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
616
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
617
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
618
|
-
t[p[i]] = s[p[i]];
|
|
619
|
-
}
|
|
620
|
-
return t;
|
|
621
|
-
}
|
|
622
|
-
|
|
623
567
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
624
568
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
625
569
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -640,11 +584,13 @@ var Version;
|
|
|
640
584
|
Version["V1"] = "V1";
|
|
641
585
|
Version["V2"] = "V2";
|
|
642
586
|
Version["V3"] = "V3";
|
|
587
|
+
Version["V4"] = "V4";
|
|
643
588
|
})(Version || (Version = {}));
|
|
644
589
|
var Parents;
|
|
645
590
|
(function (Parents) {
|
|
646
|
-
Parents[Parents["ONE"] = 1] = "ONE";
|
|
647
591
|
Parents[Parents["ZERO"] = 0] = "ZERO";
|
|
592
|
+
Parents[Parents["ONE"] = 1] = "ONE";
|
|
593
|
+
Parents[Parents["TWO"] = 2] = "TWO";
|
|
648
594
|
})(Parents || (Parents = {}));
|
|
649
595
|
|
|
650
596
|
// Used to inform user, that Parachain they wish to use has not yet implemented full XCM Support
|
|
@@ -843,6 +789,32 @@ var Acala$3 = {
|
|
|
843
789
|
}
|
|
844
790
|
]
|
|
845
791
|
};
|
|
792
|
+
var BridgeHubPolkadot$3 = {
|
|
793
|
+
paraId: 1002,
|
|
794
|
+
relayChainAssetSymbol: "DOT",
|
|
795
|
+
nativeAssetSymbol: "DOT",
|
|
796
|
+
nativeAssets: [
|
|
797
|
+
{
|
|
798
|
+
symbol: "DOT",
|
|
799
|
+
decimals: 10
|
|
800
|
+
}
|
|
801
|
+
],
|
|
802
|
+
otherAssets: [
|
|
803
|
+
]
|
|
804
|
+
};
|
|
805
|
+
var BridgeHubKusama$3 = {
|
|
806
|
+
paraId: 1002,
|
|
807
|
+
relayChainAssetSymbol: "KSM",
|
|
808
|
+
nativeAssetSymbol: "KSM",
|
|
809
|
+
nativeAssets: [
|
|
810
|
+
{
|
|
811
|
+
symbol: "KSM",
|
|
812
|
+
decimals: 12
|
|
813
|
+
}
|
|
814
|
+
],
|
|
815
|
+
otherAssets: [
|
|
816
|
+
]
|
|
817
|
+
};
|
|
846
818
|
var Astar$3 = {
|
|
847
819
|
paraId: 2006,
|
|
848
820
|
relayChainAssetSymbol: "DOT",
|
|
@@ -994,6 +966,11 @@ var Astar$3 = {
|
|
|
994
966
|
symbol: "TST",
|
|
995
967
|
decimals: 18
|
|
996
968
|
},
|
|
969
|
+
{
|
|
970
|
+
assetId: "18446744073709551637",
|
|
971
|
+
symbol: "vGLMR",
|
|
972
|
+
decimals: 18
|
|
973
|
+
},
|
|
997
974
|
{
|
|
998
975
|
assetId: "18446744073709551624",
|
|
999
976
|
symbol: "vDOT",
|
|
@@ -1029,6 +1006,11 @@ var Astar$3 = {
|
|
|
1029
1006
|
symbol: "TDOT",
|
|
1030
1007
|
decimals: 18
|
|
1031
1008
|
},
|
|
1009
|
+
{
|
|
1010
|
+
assetId: "18446744073709551640",
|
|
1011
|
+
symbol: "vFIL",
|
|
1012
|
+
decimals: 18
|
|
1013
|
+
},
|
|
1032
1014
|
{
|
|
1033
1015
|
assetId: "1329",
|
|
1034
1016
|
symbol: "PPC",
|
|
@@ -1059,6 +1041,11 @@ var Astar$3 = {
|
|
|
1059
1041
|
symbol: "EQ",
|
|
1060
1042
|
decimals: 9
|
|
1061
1043
|
},
|
|
1044
|
+
{
|
|
1045
|
+
assetId: "18446744073709551638",
|
|
1046
|
+
symbol: "vMANTA",
|
|
1047
|
+
decimals: 18
|
|
1048
|
+
},
|
|
1062
1049
|
{
|
|
1063
1050
|
assetId: "18446744073709551627",
|
|
1064
1051
|
symbol: "RING",
|
|
@@ -1083,6 +1070,11 @@ var Astar$3 = {
|
|
|
1083
1070
|
assetId: "1332",
|
|
1084
1071
|
symbol: "sDOT",
|
|
1085
1072
|
decimals: 10
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
assetId: "18446744073709551639",
|
|
1076
|
+
symbol: "FIL",
|
|
1077
|
+
decimals: 18
|
|
1086
1078
|
}
|
|
1087
1079
|
]
|
|
1088
1080
|
};
|
|
@@ -1113,7 +1105,7 @@ var BifrostPolkadot$3 = {
|
|
|
1113
1105
|
},
|
|
1114
1106
|
{
|
|
1115
1107
|
symbol: "ETH",
|
|
1116
|
-
decimals:
|
|
1108
|
+
decimals: 10
|
|
1117
1109
|
},
|
|
1118
1110
|
{
|
|
1119
1111
|
symbol: "KAR",
|
|
@@ -1419,7 +1411,7 @@ var Darwinia$3 = {
|
|
|
1419
1411
|
otherAssets: [
|
|
1420
1412
|
]
|
|
1421
1413
|
};
|
|
1422
|
-
var
|
|
1414
|
+
var Hydration$3 = {
|
|
1423
1415
|
paraId: 2034,
|
|
1424
1416
|
relayChainAssetSymbol: "DOT",
|
|
1425
1417
|
nativeAssetSymbol: "HDX",
|
|
@@ -1505,6 +1497,11 @@ var HydraDX$3 = {
|
|
|
1505
1497
|
symbol: "WBTC",
|
|
1506
1498
|
decimals: 8
|
|
1507
1499
|
},
|
|
1500
|
+
{
|
|
1501
|
+
assetId: "31",
|
|
1502
|
+
symbol: "RING",
|
|
1503
|
+
decimals: 18
|
|
1504
|
+
},
|
|
1508
1505
|
{
|
|
1509
1506
|
assetId: "15",
|
|
1510
1507
|
symbol: "vDOT",
|
|
@@ -1520,6 +1517,11 @@ var HydraDX$3 = {
|
|
|
1520
1517
|
symbol: "CFG",
|
|
1521
1518
|
decimals: 18
|
|
1522
1519
|
},
|
|
1520
|
+
{
|
|
1521
|
+
assetId: "32",
|
|
1522
|
+
symbol: "AJUN",
|
|
1523
|
+
decimals: 12
|
|
1524
|
+
},
|
|
1523
1525
|
{
|
|
1524
1526
|
assetId: "27",
|
|
1525
1527
|
symbol: "CRU",
|
|
@@ -1577,7 +1579,7 @@ var HydraDX$3 = {
|
|
|
1577
1579
|
},
|
|
1578
1580
|
{
|
|
1579
1581
|
assetId: "1",
|
|
1580
|
-
symbol: "
|
|
1582
|
+
symbol: "H2O",
|
|
1581
1583
|
decimals: 12
|
|
1582
1584
|
},
|
|
1583
1585
|
{
|
|
@@ -1799,6 +1801,11 @@ var Moonbeam$3 = {
|
|
|
1799
1801
|
symbol: "EQ",
|
|
1800
1802
|
decimals: 9
|
|
1801
1803
|
},
|
|
1804
|
+
{
|
|
1805
|
+
assetId: "61295607754960722617854661686514597014",
|
|
1806
|
+
symbol: "WIFD",
|
|
1807
|
+
decimals: 10
|
|
1808
|
+
},
|
|
1802
1809
|
{
|
|
1803
1810
|
assetId: "141196559012917796508928734717797136690",
|
|
1804
1811
|
symbol: "ibcIST",
|
|
@@ -1936,7 +1943,7 @@ var Moonbeam$3 = {
|
|
|
1936
1943
|
},
|
|
1937
1944
|
{
|
|
1938
1945
|
assetId: "238111524681612888331172110363070489924",
|
|
1939
|
-
symbol: "
|
|
1946
|
+
symbol: "NEURO",
|
|
1940
1947
|
decimals: 12
|
|
1941
1948
|
},
|
|
1942
1949
|
{
|
|
@@ -2175,6 +2182,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2175
2182
|
symbol: "HUB",
|
|
2176
2183
|
decimals: 10
|
|
2177
2184
|
},
|
|
2185
|
+
{
|
|
2186
|
+
assetId: "81",
|
|
2187
|
+
symbol: "GVN",
|
|
2188
|
+
decimals: 6
|
|
2189
|
+
},
|
|
2178
2190
|
{
|
|
2179
2191
|
assetId: "200",
|
|
2180
2192
|
symbol: "MONA",
|
|
@@ -2190,6 +2202,16 @@ var AssetHubPolkadot$3 = {
|
|
|
2190
2202
|
symbol: "PLAY",
|
|
2191
2203
|
decimals: 10
|
|
2192
2204
|
},
|
|
2205
|
+
{
|
|
2206
|
+
assetId: "2222",
|
|
2207
|
+
symbol: "DUCK",
|
|
2208
|
+
decimals: 10
|
|
2209
|
+
},
|
|
2210
|
+
{
|
|
2211
|
+
assetId: "222",
|
|
2212
|
+
symbol: "SHL",
|
|
2213
|
+
decimals: 6
|
|
2214
|
+
},
|
|
2193
2215
|
{
|
|
2194
2216
|
assetId: "69420",
|
|
2195
2217
|
symbol: "GABE",
|
|
@@ -2210,6 +2232,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2210
2232
|
symbol: "BEEFY",
|
|
2211
2233
|
decimals: 2
|
|
2212
2234
|
},
|
|
2235
|
+
{
|
|
2236
|
+
assetId: "110",
|
|
2237
|
+
symbol: "SIX",
|
|
2238
|
+
decimals: 12
|
|
2239
|
+
},
|
|
2213
2240
|
{
|
|
2214
2241
|
assetId: "10",
|
|
2215
2242
|
symbol: "BEAST",
|
|
@@ -2225,6 +2252,21 @@ var AssetHubPolkadot$3 = {
|
|
|
2225
2252
|
symbol: "ICE",
|
|
2226
2253
|
decimals: 20
|
|
2227
2254
|
},
|
|
2255
|
+
{
|
|
2256
|
+
assetId: "1111",
|
|
2257
|
+
symbol: "TESTV2",
|
|
2258
|
+
decimals: 12
|
|
2259
|
+
},
|
|
2260
|
+
{
|
|
2261
|
+
assetId: "202406",
|
|
2262
|
+
symbol: "USDT",
|
|
2263
|
+
decimals: 16
|
|
2264
|
+
},
|
|
2265
|
+
{
|
|
2266
|
+
assetId: "300",
|
|
2267
|
+
symbol: "DOGE",
|
|
2268
|
+
decimals: 6
|
|
2269
|
+
},
|
|
2228
2270
|
{
|
|
2229
2271
|
assetId: "4",
|
|
2230
2272
|
symbol: "EFI",
|
|
@@ -2265,11 +2307,21 @@ var AssetHubPolkadot$3 = {
|
|
|
2265
2307
|
symbol: "DED",
|
|
2266
2308
|
decimals: 10
|
|
2267
2309
|
},
|
|
2310
|
+
{
|
|
2311
|
+
assetId: "39",
|
|
2312
|
+
symbol: "PEPE",
|
|
2313
|
+
decimals: 6
|
|
2314
|
+
},
|
|
2268
2315
|
{
|
|
2269
2316
|
assetId: "101",
|
|
2270
2317
|
symbol: "DOTMA",
|
|
2271
2318
|
decimals: 0
|
|
2272
2319
|
},
|
|
2320
|
+
{
|
|
2321
|
+
assetId: "38",
|
|
2322
|
+
symbol: "SHIB",
|
|
2323
|
+
decimals: 6
|
|
2324
|
+
},
|
|
2273
2325
|
{
|
|
2274
2326
|
assetId: "46",
|
|
2275
2327
|
symbol: "PEPE",
|
|
@@ -2305,6 +2357,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2305
2357
|
symbol: "DEMO",
|
|
2306
2358
|
decimals: 6
|
|
2307
2359
|
},
|
|
2360
|
+
{
|
|
2361
|
+
assetId: "122",
|
|
2362
|
+
symbol: "TESTING",
|
|
2363
|
+
decimals: 12
|
|
2364
|
+
},
|
|
2308
2365
|
{
|
|
2309
2366
|
assetId: "66",
|
|
2310
2367
|
symbol: "DOGE",
|
|
@@ -2355,6 +2412,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2355
2412
|
symbol: "JAM",
|
|
2356
2413
|
decimals: 10
|
|
2357
2414
|
},
|
|
2415
|
+
{
|
|
2416
|
+
assetId: "1212",
|
|
2417
|
+
symbol: "DOTTY",
|
|
2418
|
+
decimals: 10
|
|
2419
|
+
},
|
|
2358
2420
|
{
|
|
2359
2421
|
assetId: "77",
|
|
2360
2422
|
symbol: "TRQ",
|
|
@@ -2370,6 +2432,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2370
2432
|
symbol: "TAPE",
|
|
2371
2433
|
decimals: 10
|
|
2372
2434
|
},
|
|
2435
|
+
{
|
|
2436
|
+
assetId: "36",
|
|
2437
|
+
symbol: "CLAY",
|
|
2438
|
+
decimals: 10
|
|
2439
|
+
},
|
|
2373
2440
|
{
|
|
2374
2441
|
assetId: "420666",
|
|
2375
2442
|
symbol: "GIO",
|
|
@@ -2385,6 +2452,16 @@ var AssetHubPolkadot$3 = {
|
|
|
2385
2452
|
symbol: "COCOA",
|
|
2386
2453
|
decimals: 10
|
|
2387
2454
|
},
|
|
2455
|
+
{
|
|
2456
|
+
assetId: "301",
|
|
2457
|
+
symbol: "HORN",
|
|
2458
|
+
decimals: 6
|
|
2459
|
+
},
|
|
2460
|
+
{
|
|
2461
|
+
assetId: "2020",
|
|
2462
|
+
symbol: "HYDRA",
|
|
2463
|
+
decimals: 10
|
|
2464
|
+
},
|
|
2388
2465
|
{
|
|
2389
2466
|
assetId: "5318008",
|
|
2390
2467
|
symbol: "PXPS",
|
|
@@ -2395,16 +2472,36 @@ var AssetHubPolkadot$3 = {
|
|
|
2395
2472
|
symbol: "CATNIP",
|
|
2396
2473
|
decimals: 20
|
|
2397
2474
|
},
|
|
2475
|
+
{
|
|
2476
|
+
assetId: "37362",
|
|
2477
|
+
symbol: "TEST",
|
|
2478
|
+
decimals: 10
|
|
2479
|
+
},
|
|
2480
|
+
{
|
|
2481
|
+
assetId: "44",
|
|
2482
|
+
symbol: "SKL",
|
|
2483
|
+
decimals: 6
|
|
2484
|
+
},
|
|
2398
2485
|
{
|
|
2399
2486
|
assetId: "15",
|
|
2400
2487
|
symbol: "Meme",
|
|
2401
2488
|
decimals: 10
|
|
2402
2489
|
},
|
|
2490
|
+
{
|
|
2491
|
+
assetId: "9202",
|
|
2492
|
+
symbol: "BUG",
|
|
2493
|
+
decimals: 12
|
|
2494
|
+
},
|
|
2403
2495
|
{
|
|
2404
2496
|
assetId: "78",
|
|
2405
2497
|
symbol: "COCA",
|
|
2406
2498
|
decimals: 6
|
|
2407
2499
|
},
|
|
2500
|
+
{
|
|
2501
|
+
assetId: "61",
|
|
2502
|
+
symbol: "SUN",
|
|
2503
|
+
decimals: 6
|
|
2504
|
+
},
|
|
2408
2505
|
{
|
|
2409
2506
|
assetId: "40",
|
|
2410
2507
|
symbol: "PEPE",
|
|
@@ -2455,6 +2552,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2455
2552
|
symbol: "VSC",
|
|
2456
2553
|
decimals: 9
|
|
2457
2554
|
},
|
|
2555
|
+
{
|
|
2556
|
+
assetId: "1994",
|
|
2557
|
+
symbol: "CRT",
|
|
2558
|
+
decimals: 4
|
|
2559
|
+
},
|
|
2458
2560
|
{
|
|
2459
2561
|
assetId: "2829",
|
|
2460
2562
|
symbol: "JTO",
|
|
@@ -2465,11 +2567,21 @@ var AssetHubPolkadot$3 = {
|
|
|
2465
2567
|
symbol: "SHRIMP",
|
|
2466
2568
|
decimals: 10
|
|
2467
2569
|
},
|
|
2570
|
+
{
|
|
2571
|
+
assetId: "1970",
|
|
2572
|
+
symbol: "NIPS",
|
|
2573
|
+
decimals: 10
|
|
2574
|
+
},
|
|
2468
2575
|
{
|
|
2469
2576
|
assetId: "42",
|
|
2470
2577
|
symbol: "PJS",
|
|
2471
2578
|
decimals: 18
|
|
2472
2579
|
},
|
|
2580
|
+
{
|
|
2581
|
+
assetId: "2001",
|
|
2582
|
+
symbol: "DOTA",
|
|
2583
|
+
decimals: 6
|
|
2584
|
+
},
|
|
2473
2585
|
{
|
|
2474
2586
|
assetId: "5",
|
|
2475
2587
|
symbol: "PLX",
|
|
@@ -2490,6 +2602,16 @@ var AssetHubPolkadot$3 = {
|
|
|
2490
2602
|
symbol: "POKA",
|
|
2491
2603
|
decimals: 6
|
|
2492
2604
|
},
|
|
2605
|
+
{
|
|
2606
|
+
assetId: "1010",
|
|
2607
|
+
symbol: "ETH",
|
|
2608
|
+
decimals: 10
|
|
2609
|
+
},
|
|
2610
|
+
{
|
|
2611
|
+
assetId: "201",
|
|
2612
|
+
symbol: "WUD",
|
|
2613
|
+
decimals: 6
|
|
2614
|
+
},
|
|
2493
2615
|
{
|
|
2494
2616
|
assetId: "1984",
|
|
2495
2617
|
symbol: "USDt",
|
|
@@ -2505,11 +2627,26 @@ var AssetHubPolkadot$3 = {
|
|
|
2505
2627
|
symbol: "BORK",
|
|
2506
2628
|
decimals: 10
|
|
2507
2629
|
},
|
|
2630
|
+
{
|
|
2631
|
+
assetId: "33441",
|
|
2632
|
+
symbol: "MPACT",
|
|
2633
|
+
decimals: 8
|
|
2634
|
+
},
|
|
2635
|
+
{
|
|
2636
|
+
assetId: "777777",
|
|
2637
|
+
symbol: "HLG",
|
|
2638
|
+
decimals: 18
|
|
2639
|
+
},
|
|
2508
2640
|
{
|
|
2509
2641
|
assetId: "22",
|
|
2510
2642
|
symbol: "KNRY",
|
|
2511
2643
|
decimals: 10
|
|
2512
2644
|
},
|
|
2645
|
+
{
|
|
2646
|
+
assetId: "72",
|
|
2647
|
+
symbol: "NEHT",
|
|
2648
|
+
decimals: 12
|
|
2649
|
+
},
|
|
2513
2650
|
{
|
|
2514
2651
|
assetId: "79",
|
|
2515
2652
|
symbol: "PGOLD",
|
|
@@ -2530,6 +2667,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2530
2667
|
symbol: "HAM",
|
|
2531
2668
|
decimals: 10
|
|
2532
2669
|
},
|
|
2670
|
+
{
|
|
2671
|
+
assetId: "181",
|
|
2672
|
+
symbol: "RNET",
|
|
2673
|
+
decimals: 0
|
|
2674
|
+
},
|
|
2533
2675
|
{
|
|
2534
2676
|
assetId: "9003",
|
|
2535
2677
|
symbol: "KTRL",
|
|
@@ -2550,21 +2692,51 @@ var AssetHubPolkadot$3 = {
|
|
|
2550
2692
|
symbol: "dot",
|
|
2551
2693
|
decimals: 0
|
|
2552
2694
|
},
|
|
2695
|
+
{
|
|
2696
|
+
assetId: "90",
|
|
2697
|
+
symbol: "ATC",
|
|
2698
|
+
decimals: 6
|
|
2699
|
+
},
|
|
2553
2700
|
{
|
|
2554
2701
|
assetId: "80",
|
|
2555
2702
|
symbol: "GOVD",
|
|
2556
2703
|
decimals: 10
|
|
2557
2704
|
},
|
|
2705
|
+
{
|
|
2706
|
+
assetId: "1864",
|
|
2707
|
+
symbol: "JUNK",
|
|
2708
|
+
decimals: 10
|
|
2709
|
+
},
|
|
2558
2710
|
{
|
|
2559
2711
|
assetId: "8",
|
|
2560
2712
|
symbol: "JOE",
|
|
2561
2713
|
decimals: 9
|
|
2562
2714
|
},
|
|
2715
|
+
{
|
|
2716
|
+
assetId: "45",
|
|
2717
|
+
symbol: "HYDRA",
|
|
2718
|
+
decimals: 10
|
|
2719
|
+
},
|
|
2720
|
+
{
|
|
2721
|
+
assetId: "10000",
|
|
2722
|
+
symbol: "DOGE",
|
|
2723
|
+
decimals: 6
|
|
2724
|
+
},
|
|
2563
2725
|
{
|
|
2564
2726
|
assetId: "2820",
|
|
2565
2727
|
symbol: "HOOT",
|
|
2566
2728
|
decimals: 6
|
|
2567
2729
|
},
|
|
2730
|
+
{
|
|
2731
|
+
assetId: "51",
|
|
2732
|
+
symbol: "JAMA",
|
|
2733
|
+
decimals: 6
|
|
2734
|
+
},
|
|
2735
|
+
{
|
|
2736
|
+
assetId: "1234",
|
|
2737
|
+
symbol: "BUNS",
|
|
2738
|
+
decimals: 10
|
|
2739
|
+
},
|
|
2568
2740
|
{
|
|
2569
2741
|
assetId: "404",
|
|
2570
2742
|
symbol: "clay",
|
|
@@ -2580,6 +2752,16 @@ var AssetHubPolkadot$3 = {
|
|
|
2580
2752
|
symbol: "HOBO",
|
|
2581
2753
|
decimals: 2
|
|
2582
2754
|
},
|
|
2755
|
+
{
|
|
2756
|
+
assetId: "60",
|
|
2757
|
+
symbol: "ANT",
|
|
2758
|
+
decimals: 6
|
|
2759
|
+
},
|
|
2760
|
+
{
|
|
2761
|
+
assetId: "1992",
|
|
2762
|
+
symbol: "SITE",
|
|
2763
|
+
decimals: 10
|
|
2764
|
+
},
|
|
2583
2765
|
{
|
|
2584
2766
|
assetId: "6666",
|
|
2585
2767
|
symbol: "CHAOS",
|
|
@@ -2680,6 +2862,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2680
2862
|
symbol: "PINK",
|
|
2681
2863
|
decimals: 10
|
|
2682
2864
|
},
|
|
2865
|
+
{
|
|
2866
|
+
assetId: "37",
|
|
2867
|
+
symbol: "DODA",
|
|
2868
|
+
decimals: 6
|
|
2869
|
+
},
|
|
2683
2870
|
{
|
|
2684
2871
|
assetId: "5417",
|
|
2685
2872
|
symbol: "HASH",
|
|
@@ -2695,11 +2882,26 @@ var AssetHubPolkadot$3 = {
|
|
|
2695
2882
|
symbol: "EDU",
|
|
2696
2883
|
decimals: 10
|
|
2697
2884
|
},
|
|
2885
|
+
{
|
|
2886
|
+
assetId: "2025",
|
|
2887
|
+
symbol: "FLMG",
|
|
2888
|
+
decimals: 20
|
|
2889
|
+
},
|
|
2698
2890
|
{
|
|
2699
2891
|
assetId: "1980",
|
|
2700
2892
|
symbol: "GAVIN",
|
|
2701
2893
|
decimals: 0
|
|
2702
2894
|
},
|
|
2895
|
+
{
|
|
2896
|
+
assetId: "91",
|
|
2897
|
+
symbol: "WING",
|
|
2898
|
+
decimals: 6
|
|
2899
|
+
},
|
|
2900
|
+
{
|
|
2901
|
+
assetId: "77777",
|
|
2902
|
+
symbol: "WOOP",
|
|
2903
|
+
decimals: 12
|
|
2904
|
+
},
|
|
2703
2905
|
{
|
|
2704
2906
|
assetId: "4157",
|
|
2705
2907
|
symbol: "PDOG",
|
|
@@ -3505,184 +3707,6 @@ var Litmus$3 = {
|
|
|
3505
3707
|
otherAssets: [
|
|
3506
3708
|
]
|
|
3507
3709
|
};
|
|
3508
|
-
var Mangata$3 = {
|
|
3509
|
-
paraId: 2110,
|
|
3510
|
-
relayChainAssetSymbol: "KSM",
|
|
3511
|
-
nativeAssetSymbol: "MGX",
|
|
3512
|
-
nativeAssets: [
|
|
3513
|
-
{
|
|
3514
|
-
symbol: "MGX",
|
|
3515
|
-
decimals: 18
|
|
3516
|
-
}
|
|
3517
|
-
],
|
|
3518
|
-
otherAssets: [
|
|
3519
|
-
{
|
|
3520
|
-
assetId: "30",
|
|
3521
|
-
symbol: "USDT",
|
|
3522
|
-
decimals: 6
|
|
3523
|
-
},
|
|
3524
|
-
{
|
|
3525
|
-
assetId: "48",
|
|
3526
|
-
symbol: "TKN0x00000007-TKN0x0000000E",
|
|
3527
|
-
decimals: 18
|
|
3528
|
-
},
|
|
3529
|
-
{
|
|
3530
|
-
assetId: "7",
|
|
3531
|
-
symbol: "TUR",
|
|
3532
|
-
decimals: 10
|
|
3533
|
-
},
|
|
3534
|
-
{
|
|
3535
|
-
assetId: "13",
|
|
3536
|
-
symbol: "TKN0x0000000B-TKN0x00000004",
|
|
3537
|
-
decimals: 18
|
|
3538
|
-
},
|
|
3539
|
-
{
|
|
3540
|
-
assetId: "26",
|
|
3541
|
-
symbol: "ZLK",
|
|
3542
|
-
decimals: 18
|
|
3543
|
-
},
|
|
3544
|
-
{
|
|
3545
|
-
assetId: "5",
|
|
3546
|
-
symbol: "TKN0x00000004-TKN0x00000000",
|
|
3547
|
-
decimals: 18
|
|
3548
|
-
},
|
|
3549
|
-
{
|
|
3550
|
-
assetId: "8",
|
|
3551
|
-
symbol: "TKN0x00000000-TKN0x00000007",
|
|
3552
|
-
decimals: 18
|
|
3553
|
-
},
|
|
3554
|
-
{
|
|
3555
|
-
assetId: "33",
|
|
3556
|
-
symbol: "TKN0x00000000-TKN0x0000001F",
|
|
3557
|
-
decimals: 18
|
|
3558
|
-
},
|
|
3559
|
-
{
|
|
3560
|
-
assetId: "39",
|
|
3561
|
-
symbol: "MOVR",
|
|
3562
|
-
decimals: 18
|
|
3563
|
-
},
|
|
3564
|
-
{
|
|
3565
|
-
assetId: "1",
|
|
3566
|
-
symbol: "ETH",
|
|
3567
|
-
decimals: 18
|
|
3568
|
-
},
|
|
3569
|
-
{
|
|
3570
|
-
assetId: "19",
|
|
3571
|
-
symbol: "TKN0x00000010-TKN0x00000004",
|
|
3572
|
-
decimals: 18
|
|
3573
|
-
},
|
|
3574
|
-
{
|
|
3575
|
-
assetId: "45",
|
|
3576
|
-
symbol: "TKN0x0000000B-TKN0x00000007",
|
|
3577
|
-
decimals: 18
|
|
3578
|
-
},
|
|
3579
|
-
{
|
|
3580
|
-
assetId: "9",
|
|
3581
|
-
symbol: "TKN0x00000004-TKN0x00000007",
|
|
3582
|
-
decimals: 18
|
|
3583
|
-
},
|
|
3584
|
-
{
|
|
3585
|
-
assetId: "16",
|
|
3586
|
-
symbol: "vsKSM",
|
|
3587
|
-
decimals: 12
|
|
3588
|
-
},
|
|
3589
|
-
{
|
|
3590
|
-
assetId: "14",
|
|
3591
|
-
symbol: "BNC",
|
|
3592
|
-
decimals: 12
|
|
3593
|
-
},
|
|
3594
|
-
{
|
|
3595
|
-
assetId: "43",
|
|
3596
|
-
symbol: "TKN0x00000000-TKN0x00000027",
|
|
3597
|
-
decimals: 18
|
|
3598
|
-
},
|
|
3599
|
-
{
|
|
3600
|
-
assetId: "31",
|
|
3601
|
-
symbol: "RMRK",
|
|
3602
|
-
decimals: 10
|
|
3603
|
-
},
|
|
3604
|
-
{
|
|
3605
|
-
assetId: "21",
|
|
3606
|
-
symbol: "TKN0x0000000F-TKN0x00000004",
|
|
3607
|
-
decimals: 18
|
|
3608
|
-
},
|
|
3609
|
-
{
|
|
3610
|
-
assetId: "15",
|
|
3611
|
-
symbol: "vKSM",
|
|
3612
|
-
decimals: 12
|
|
3613
|
-
},
|
|
3614
|
-
{
|
|
3615
|
-
assetId: "47",
|
|
3616
|
-
symbol: "TKN0x0000001E-TKN0x00000000",
|
|
3617
|
-
decimals: 18
|
|
3618
|
-
},
|
|
3619
|
-
{
|
|
3620
|
-
assetId: "27",
|
|
3621
|
-
symbol: "TKN0x0000001A-TKN0x00000000",
|
|
3622
|
-
decimals: 18
|
|
3623
|
-
},
|
|
3624
|
-
{
|
|
3625
|
-
assetId: "28",
|
|
3626
|
-
symbol: "TKN0x00000004-TKN0x0000001A",
|
|
3627
|
-
decimals: 18
|
|
3628
|
-
},
|
|
3629
|
-
{
|
|
3630
|
-
assetId: "0",
|
|
3631
|
-
symbol: "MGX",
|
|
3632
|
-
decimals: 18
|
|
3633
|
-
},
|
|
3634
|
-
{
|
|
3635
|
-
assetId: "6",
|
|
3636
|
-
symbol: "KAR",
|
|
3637
|
-
decimals: 12
|
|
3638
|
-
},
|
|
3639
|
-
{
|
|
3640
|
-
assetId: "11",
|
|
3641
|
-
symbol: "IMBU",
|
|
3642
|
-
decimals: 12
|
|
3643
|
-
},
|
|
3644
|
-
{
|
|
3645
|
-
assetId: "3",
|
|
3646
|
-
symbol: "TKN0x00000000-TKN0x00000002",
|
|
3647
|
-
decimals: 18
|
|
3648
|
-
},
|
|
3649
|
-
{
|
|
3650
|
-
assetId: "17",
|
|
3651
|
-
symbol: "TKN0x00000000-TKN0x0000000E",
|
|
3652
|
-
decimals: 18
|
|
3653
|
-
},
|
|
3654
|
-
{
|
|
3655
|
-
assetId: "23",
|
|
3656
|
-
symbol: "vBNC",
|
|
3657
|
-
decimals: 12
|
|
3658
|
-
},
|
|
3659
|
-
{
|
|
3660
|
-
assetId: "4",
|
|
3661
|
-
symbol: "KSM",
|
|
3662
|
-
decimals: 12
|
|
3663
|
-
},
|
|
3664
|
-
{
|
|
3665
|
-
assetId: "34",
|
|
3666
|
-
symbol: "TKN0x00000004-TKN0x0000001F",
|
|
3667
|
-
decimals: 18
|
|
3668
|
-
},
|
|
3669
|
-
{
|
|
3670
|
-
assetId: "32",
|
|
3671
|
-
symbol: "TKN0x00000004-TKN0x0000001E",
|
|
3672
|
-
decimals: 18
|
|
3673
|
-
},
|
|
3674
|
-
{
|
|
3675
|
-
assetId: "12",
|
|
3676
|
-
symbol: "TKN0x00000000-TKN0x0000000B",
|
|
3677
|
-
decimals: 18
|
|
3678
|
-
},
|
|
3679
|
-
{
|
|
3680
|
-
assetId: "42",
|
|
3681
|
-
symbol: "TKN0x00000004-TKN0x0000000E",
|
|
3682
|
-
decimals: 18
|
|
3683
|
-
}
|
|
3684
|
-
]
|
|
3685
|
-
};
|
|
3686
3710
|
var Moonriver$3 = {
|
|
3687
3711
|
paraId: 2023,
|
|
3688
3712
|
relayChainAssetSymbol: "KSM",
|
|
@@ -4115,6 +4139,11 @@ var Picasso$3 = {
|
|
|
4115
4139
|
symbol: "kUSD",
|
|
4116
4140
|
decimals: 12
|
|
4117
4141
|
},
|
|
4142
|
+
{
|
|
4143
|
+
assetId: "3",
|
|
4144
|
+
symbol: "wSOL",
|
|
4145
|
+
decimals: 9
|
|
4146
|
+
},
|
|
4118
4147
|
{
|
|
4119
4148
|
assetId: "1088357900348863545351",
|
|
4120
4149
|
symbol: "USDT_OSMO_LPT",
|
|
@@ -4175,11 +4204,21 @@ var Picasso$3 = {
|
|
|
4175
4204
|
symbol: "DOT_TIA_LPT",
|
|
4176
4205
|
decimals: 12
|
|
4177
4206
|
},
|
|
4207
|
+
{
|
|
4208
|
+
assetId: "2",
|
|
4209
|
+
symbol: "ETH",
|
|
4210
|
+
decimals: 18
|
|
4211
|
+
},
|
|
4178
4212
|
{
|
|
4179
4213
|
assetId: "2011",
|
|
4180
4214
|
symbol: "EQ",
|
|
4181
4215
|
decimals: 9
|
|
4182
4216
|
},
|
|
4217
|
+
{
|
|
4218
|
+
assetId: "45",
|
|
4219
|
+
symbol: "XLM",
|
|
4220
|
+
decimals: 12
|
|
4221
|
+
},
|
|
4183
4222
|
{
|
|
4184
4223
|
assetId: "25",
|
|
4185
4224
|
symbol: "IST",
|
|
@@ -4305,6 +4344,11 @@ var Picasso$3 = {
|
|
|
4305
4344
|
symbol: "HUAHUA",
|
|
4306
4345
|
decimals: 6
|
|
4307
4346
|
},
|
|
4347
|
+
{
|
|
4348
|
+
assetId: "44",
|
|
4349
|
+
symbol: "AMPE",
|
|
4350
|
+
decimals: 12
|
|
4351
|
+
},
|
|
4308
4352
|
{
|
|
4309
4353
|
assetId: "1088357900348863545365",
|
|
4310
4354
|
symbol: "DOT_vDOT_LPT",
|
|
@@ -4646,7 +4690,12 @@ var AssetHubKusama$3 = {
|
|
|
4646
4690
|
decimals: 7
|
|
4647
4691
|
},
|
|
4648
4692
|
{
|
|
4649
|
-
assetId: "
|
|
4693
|
+
assetId: "1985",
|
|
4694
|
+
symbol: "web3",
|
|
4695
|
+
decimals: 16
|
|
4696
|
+
},
|
|
4697
|
+
{
|
|
4698
|
+
assetId: "20",
|
|
4650
4699
|
symbol: "BFKK",
|
|
4651
4700
|
decimals: 20
|
|
4652
4701
|
},
|
|
@@ -4850,11 +4899,6 @@ var AssetHubKusama$3 = {
|
|
|
4850
4899
|
symbol: "ki",
|
|
4851
4900
|
decimals: 18
|
|
4852
4901
|
},
|
|
4853
|
-
{
|
|
4854
|
-
assetId: "5797867",
|
|
4855
|
-
symbol: "TAKE",
|
|
4856
|
-
decimals: 0
|
|
4857
|
-
},
|
|
4858
4902
|
{
|
|
4859
4903
|
assetId: "33",
|
|
4860
4904
|
symbol: "BUSSY",
|
|
@@ -5335,6 +5379,11 @@ var AssetHubKusama$3 = {
|
|
|
5335
5379
|
symbol: "bLd",
|
|
5336
5380
|
decimals: 18
|
|
5337
5381
|
},
|
|
5382
|
+
{
|
|
5383
|
+
assetId: "2025",
|
|
5384
|
+
symbol: "FLMG",
|
|
5385
|
+
decimals: 10
|
|
5386
|
+
},
|
|
5338
5387
|
{
|
|
5339
5388
|
assetId: "91",
|
|
5340
5389
|
symbol: "TMJ",
|
|
@@ -5762,6 +5811,9 @@ var Polkadex$3 = {
|
|
|
5762
5811
|
symbol: "PHA",
|
|
5763
5812
|
decimals: 12
|
|
5764
5813
|
},
|
|
5814
|
+
{
|
|
5815
|
+
assetId: "130314105136721928300689838359167097187"
|
|
5816
|
+
},
|
|
5765
5817
|
{
|
|
5766
5818
|
assetId: "14826654563114266286226336203450732505"
|
|
5767
5819
|
},
|
|
@@ -6059,6 +6111,8 @@ var Khala$3 = {
|
|
|
6059
6111
|
};
|
|
6060
6112
|
var assets = {
|
|
6061
6113
|
Acala: Acala$3,
|
|
6114
|
+
BridgeHubPolkadot: BridgeHubPolkadot$3,
|
|
6115
|
+
BridgeHubKusama: BridgeHubKusama$3,
|
|
6062
6116
|
Astar: Astar$3,
|
|
6063
6117
|
BifrostPolkadot: BifrostPolkadot$3,
|
|
6064
6118
|
Bitgreen: Bitgreen$3,
|
|
@@ -6066,7 +6120,7 @@ var assets = {
|
|
|
6066
6120
|
Subsocial: Subsocial$3,
|
|
6067
6121
|
ComposableFinance: ComposableFinance$3,
|
|
6068
6122
|
Darwinia: Darwinia$3,
|
|
6069
|
-
|
|
6123
|
+
Hydration: Hydration$3,
|
|
6070
6124
|
Interlay: Interlay$3,
|
|
6071
6125
|
Litentry: Litentry$3,
|
|
6072
6126
|
Moonbeam: Moonbeam$3,
|
|
@@ -6089,7 +6143,6 @@ var assets = {
|
|
|
6089
6143
|
Karura: Karura$3,
|
|
6090
6144
|
Kintsugi: Kintsugi$3,
|
|
6091
6145
|
Litmus: Litmus$3,
|
|
6092
|
-
Mangata: Mangata$3,
|
|
6093
6146
|
Moonriver: Moonriver$3,
|
|
6094
6147
|
ParallelHeiko: ParallelHeiko$3,
|
|
6095
6148
|
Picasso: Picasso$3,
|
|
@@ -6126,6 +6179,8 @@ var assetsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6126
6179
|
BifrostKusama: BifrostKusama$3,
|
|
6127
6180
|
BifrostPolkadot: BifrostPolkadot$3,
|
|
6128
6181
|
Bitgreen: Bitgreen$3,
|
|
6182
|
+
BridgeHubKusama: BridgeHubKusama$3,
|
|
6183
|
+
BridgeHubPolkadot: BridgeHubPolkadot$3,
|
|
6129
6184
|
Calamari: Calamari$3,
|
|
6130
6185
|
Centrifuge: Centrifuge$3,
|
|
6131
6186
|
Collectives: Collectives$3,
|
|
@@ -6137,7 +6192,7 @@ var assetsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6137
6192
|
Curio: Curio$3,
|
|
6138
6193
|
Darwinia: Darwinia$3,
|
|
6139
6194
|
Encointer: Encointer$3,
|
|
6140
|
-
|
|
6195
|
+
Hydration: Hydration$3,
|
|
6141
6196
|
Imbue: Imbue$3,
|
|
6142
6197
|
Integritee: Integritee$3,
|
|
6143
6198
|
Interlay: Interlay$3,
|
|
@@ -6148,7 +6203,6 @@ var assetsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6148
6203
|
Kintsugi: Kintsugi$3,
|
|
6149
6204
|
Litentry: Litentry$3,
|
|
6150
6205
|
Litmus: Litmus$3,
|
|
6151
|
-
Mangata: Mangata$3,
|
|
6152
6206
|
Manta: Manta$3,
|
|
6153
6207
|
Moonbeam: Moonbeam$3,
|
|
6154
6208
|
Moonriver: Moonriver$3,
|
|
@@ -6325,7 +6379,7 @@ var Darwinia$2 = {
|
|
|
6325
6379
|
"XTokens"
|
|
6326
6380
|
]
|
|
6327
6381
|
};
|
|
6328
|
-
var
|
|
6382
|
+
var Hydration$2 = {
|
|
6329
6383
|
defaultPallet: "XTokens",
|
|
6330
6384
|
supportedPallets: [
|
|
6331
6385
|
"PolkadotXcm",
|
|
@@ -6388,9 +6442,10 @@ var Amplitude$2 = {
|
|
|
6388
6442
|
]
|
|
6389
6443
|
};
|
|
6390
6444
|
var Bajun$2 = {
|
|
6391
|
-
defaultPallet: "
|
|
6445
|
+
defaultPallet: "XTokens",
|
|
6392
6446
|
supportedPallets: [
|
|
6393
|
-
"PolkadotXcm"
|
|
6447
|
+
"PolkadotXcm",
|
|
6448
|
+
"XTokens"
|
|
6394
6449
|
]
|
|
6395
6450
|
};
|
|
6396
6451
|
var Basilisk$2 = {
|
|
@@ -6476,13 +6531,6 @@ var Litmus$2 = {
|
|
|
6476
6531
|
"XTokens"
|
|
6477
6532
|
]
|
|
6478
6533
|
};
|
|
6479
|
-
var Mangata$2 = {
|
|
6480
|
-
defaultPallet: "XTokens",
|
|
6481
|
-
supportedPallets: [
|
|
6482
|
-
"PolkadotXcm",
|
|
6483
|
-
"XTokens"
|
|
6484
|
-
]
|
|
6485
|
-
};
|
|
6486
6534
|
var Moonriver$2 = {
|
|
6487
6535
|
defaultPallet: "XTokens",
|
|
6488
6536
|
supportedPallets: [
|
|
@@ -6625,6 +6673,18 @@ var Curio$2 = {
|
|
|
6625
6673
|
"XTokens"
|
|
6626
6674
|
]
|
|
6627
6675
|
};
|
|
6676
|
+
var BridgeHubPolkadot$2 = {
|
|
6677
|
+
defaultPallet: "PolkadotXcm",
|
|
6678
|
+
supportedPallets: [
|
|
6679
|
+
"PolkadotXcm"
|
|
6680
|
+
]
|
|
6681
|
+
};
|
|
6682
|
+
var BridgeHubKusama$2 = {
|
|
6683
|
+
defaultPallet: "PolkadotXcm",
|
|
6684
|
+
supportedPallets: [
|
|
6685
|
+
"PolkadotXcm"
|
|
6686
|
+
]
|
|
6687
|
+
};
|
|
6628
6688
|
var pallets = {
|
|
6629
6689
|
AssetHubPolkadot: AssetHubPolkadot$2,
|
|
6630
6690
|
Acala: Acala$2,
|
|
@@ -6635,7 +6695,7 @@ var pallets = {
|
|
|
6635
6695
|
Centrifuge: Centrifuge$2,
|
|
6636
6696
|
ComposableFinance: ComposableFinance$2,
|
|
6637
6697
|
Darwinia: Darwinia$2,
|
|
6638
|
-
|
|
6698
|
+
Hydration: Hydration$2,
|
|
6639
6699
|
Interlay: Interlay$2,
|
|
6640
6700
|
Litentry: Litentry$2,
|
|
6641
6701
|
Moonbeam: Moonbeam$2,
|
|
@@ -6657,7 +6717,6 @@ var pallets = {
|
|
|
6657
6717
|
Karura: Karura$2,
|
|
6658
6718
|
Kintsugi: Kintsugi$2,
|
|
6659
6719
|
Litmus: Litmus$2,
|
|
6660
|
-
Mangata: Mangata$2,
|
|
6661
6720
|
Moonriver: Moonriver$2,
|
|
6662
6721
|
ParallelHeiko: ParallelHeiko$2,
|
|
6663
6722
|
Picasso: Picasso$2,
|
|
@@ -6678,7 +6737,9 @@ var pallets = {
|
|
|
6678
6737
|
Phala: Phala$2,
|
|
6679
6738
|
Subsocial: Subsocial$2,
|
|
6680
6739
|
KiltSpiritnet: KiltSpiritnet$2,
|
|
6681
|
-
Curio: Curio$2
|
|
6740
|
+
Curio: Curio$2,
|
|
6741
|
+
BridgeHubPolkadot: BridgeHubPolkadot$2,
|
|
6742
|
+
BridgeHubKusama: BridgeHubKusama$2
|
|
6682
6743
|
};
|
|
6683
6744
|
|
|
6684
6745
|
var palletsMapJson = /*#__PURE__*/Object.freeze({
|
|
@@ -6694,6 +6755,8 @@ var palletsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6694
6755
|
BifrostKusama: BifrostKusama$2,
|
|
6695
6756
|
BifrostPolkadot: BifrostPolkadot$2,
|
|
6696
6757
|
Bitgreen: Bitgreen$2,
|
|
6758
|
+
BridgeHubKusama: BridgeHubKusama$2,
|
|
6759
|
+
BridgeHubPolkadot: BridgeHubPolkadot$2,
|
|
6697
6760
|
Calamari: Calamari$2,
|
|
6698
6761
|
Centrifuge: Centrifuge$2,
|
|
6699
6762
|
Collectives: Collectives$2,
|
|
@@ -6705,7 +6768,7 @@ var palletsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6705
6768
|
Curio: Curio$2,
|
|
6706
6769
|
Darwinia: Darwinia$2,
|
|
6707
6770
|
Encointer: Encointer$2,
|
|
6708
|
-
|
|
6771
|
+
Hydration: Hydration$2,
|
|
6709
6772
|
Imbue: Imbue$2,
|
|
6710
6773
|
Integritee: Integritee$2,
|
|
6711
6774
|
Interlay: Interlay$2,
|
|
@@ -6716,7 +6779,6 @@ var palletsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6716
6779
|
Kintsugi: Kintsugi$2,
|
|
6717
6780
|
Litentry: Litentry$2,
|
|
6718
6781
|
Litmus: Litmus$2,
|
|
6719
|
-
Mangata: Mangata$2,
|
|
6720
6782
|
Manta: Manta$2,
|
|
6721
6783
|
Moonbeam: Moonbeam$2,
|
|
6722
6784
|
Moonriver: Moonriver$2,
|
|
@@ -6768,11 +6830,29 @@ var isTMulti = function isTMulti(value) {
|
|
|
6768
6830
|
var isTMultiLocation = function isTMultiLocation(value) {
|
|
6769
6831
|
return value && typeof value.parents !== 'undefined' && typeof value.interior !== 'undefined';
|
|
6770
6832
|
};
|
|
6833
|
+
var createBridgeCurrencySpec = function createBridgeCurrencySpec(amount, ecosystem) {
|
|
6834
|
+
return _defineProperty({}, Version.V4, [{
|
|
6835
|
+
id: {
|
|
6836
|
+
parents: Parents.TWO,
|
|
6837
|
+
interior: {
|
|
6838
|
+
X1: [{
|
|
6839
|
+
GlobalConsensus: ecosystem
|
|
6840
|
+
}]
|
|
6841
|
+
}
|
|
6842
|
+
},
|
|
6843
|
+
fun: {
|
|
6844
|
+
Fungible: amount
|
|
6845
|
+
}
|
|
6846
|
+
}]);
|
|
6847
|
+
};
|
|
6771
6848
|
var createCurrencySpec = function createCurrencySpec(amount, version, parents, overriddenCurrency) {
|
|
6772
6849
|
var interior = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'Here';
|
|
6773
6850
|
if (!overriddenCurrency) {
|
|
6774
6851
|
return _defineProperty({}, version, [{
|
|
6775
|
-
id: {
|
|
6852
|
+
id: version === Version.V4 ? {
|
|
6853
|
+
parents: parents,
|
|
6854
|
+
interior: interior
|
|
6855
|
+
} : {
|
|
6776
6856
|
Concrete: {
|
|
6777
6857
|
parents: parents,
|
|
6778
6858
|
interior: interior
|
|
@@ -6784,7 +6864,7 @@ var createCurrencySpec = function createCurrencySpec(amount, version, parents, o
|
|
|
6784
6864
|
}]);
|
|
6785
6865
|
}
|
|
6786
6866
|
return isTMultiLocation(overriddenCurrency) ? _defineProperty({}, version, [{
|
|
6787
|
-
id: {
|
|
6867
|
+
id: version === Version.V4 ? overriddenCurrency : {
|
|
6788
6868
|
Concrete: overriddenCurrency
|
|
6789
6869
|
},
|
|
6790
6870
|
fun: {
|
|
@@ -6795,17 +6875,29 @@ var createCurrencySpec = function createCurrencySpec(amount, version, parents, o
|
|
|
6795
6875
|
};
|
|
6796
6876
|
var createPolkadotXcmHeader = function createPolkadotXcmHeader(scenario, version, destination, nodeId) {
|
|
6797
6877
|
var parents = scenario === 'RelayToPara' ? Parents.ZERO : Parents.ONE;
|
|
6798
|
-
var interior = scenario === 'ParaToRelay' ? 'Here' : {
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
}
|
|
6802
|
-
};
|
|
6878
|
+
var interior = scenario === 'ParaToRelay' ? 'Here' : createX1Payload(version, {
|
|
6879
|
+
Parachain: nodeId
|
|
6880
|
+
});
|
|
6803
6881
|
var isMultiLocationDestination = _typeof(destination) === 'object';
|
|
6804
|
-
return _defineProperty({},
|
|
6882
|
+
return _defineProperty({}, version, isMultiLocationDestination ? destination : {
|
|
6805
6883
|
parents: parents,
|
|
6806
6884
|
interior: interior
|
|
6807
6885
|
});
|
|
6808
6886
|
};
|
|
6887
|
+
var createBridgePolkadotXcmDest = function createBridgePolkadotXcmDest(version, ecosystem, destination, nodeId) {
|
|
6888
|
+
var multiLocation = {
|
|
6889
|
+
parents: Parents.TWO,
|
|
6890
|
+
interior: {
|
|
6891
|
+
X2: [{
|
|
6892
|
+
GlobalConsensus: ecosystem
|
|
6893
|
+
}, {
|
|
6894
|
+
Parachain: nodeId
|
|
6895
|
+
}]
|
|
6896
|
+
}
|
|
6897
|
+
};
|
|
6898
|
+
var isMultiLocationDestination = _typeof(destination) === 'object';
|
|
6899
|
+
return _defineProperty({}, version, isMultiLocationDestination ? destination : multiLocation);
|
|
6900
|
+
};
|
|
6809
6901
|
var calculateTransactionFee$1 = function calculateTransactionFee(tx, address) {
|
|
6810
6902
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
6811
6903
|
var _yield$tx$paymentInfo, partialFee;
|
|
@@ -7000,7 +7092,7 @@ var Bitgreen$1 = "1000000000";
|
|
|
7000
7092
|
var Centrifuge$1 = "1000000000000";
|
|
7001
7093
|
var ComposableFinance$1 = "100000000000";
|
|
7002
7094
|
var Darwinia$1 = "0";
|
|
7003
|
-
var
|
|
7095
|
+
var Hydration$1 = "1000000000000";
|
|
7004
7096
|
var Litentry$1 = "100000000000";
|
|
7005
7097
|
var Moonbeam$1 = "0";
|
|
7006
7098
|
var Parallel$1 = "100000000000";
|
|
@@ -7040,13 +7132,14 @@ var Polkadot = "10000000000";
|
|
|
7040
7132
|
var Kusama = "333333333";
|
|
7041
7133
|
var Interlay$1 = "0";
|
|
7042
7134
|
var Kintsugi$1 = "0";
|
|
7043
|
-
var Mangata$1 = "0";
|
|
7044
7135
|
var Collectives$1 = "1000000000";
|
|
7045
7136
|
var Khala$1 = "10000000000";
|
|
7046
7137
|
var Phala$1 = "10000000000";
|
|
7047
7138
|
var Subsocial$1 = "100000000";
|
|
7048
7139
|
var KiltSpiritnet$1 = "10000000000000";
|
|
7049
7140
|
var Curio$1 = "10000000000000000";
|
|
7141
|
+
var BridgeHubPolkadot$1 = "1000000000";
|
|
7142
|
+
var BridgeHubKusama$1 = "33333333";
|
|
7050
7143
|
var existentialDeposits = {
|
|
7051
7144
|
AssetHubPolkadot: AssetHubPolkadot$1,
|
|
7052
7145
|
Acala: Acala$1,
|
|
@@ -7056,7 +7149,7 @@ var existentialDeposits = {
|
|
|
7056
7149
|
Centrifuge: Centrifuge$1,
|
|
7057
7150
|
ComposableFinance: ComposableFinance$1,
|
|
7058
7151
|
Darwinia: Darwinia$1,
|
|
7059
|
-
|
|
7152
|
+
Hydration: Hydration$1,
|
|
7060
7153
|
Litentry: Litentry$1,
|
|
7061
7154
|
Moonbeam: Moonbeam$1,
|
|
7062
7155
|
Parallel: Parallel$1,
|
|
@@ -7096,13 +7189,14 @@ var existentialDeposits = {
|
|
|
7096
7189
|
Kusama: Kusama,
|
|
7097
7190
|
Interlay: Interlay$1,
|
|
7098
7191
|
Kintsugi: Kintsugi$1,
|
|
7099
|
-
Mangata: Mangata$1,
|
|
7100
7192
|
Collectives: Collectives$1,
|
|
7101
7193
|
Khala: Khala$1,
|
|
7102
7194
|
Phala: Phala$1,
|
|
7103
7195
|
Subsocial: Subsocial$1,
|
|
7104
7196
|
KiltSpiritnet: KiltSpiritnet$1,
|
|
7105
|
-
Curio: Curio$1
|
|
7197
|
+
Curio: Curio$1,
|
|
7198
|
+
BridgeHubPolkadot: BridgeHubPolkadot$1,
|
|
7199
|
+
BridgeHubKusama: BridgeHubKusama$1
|
|
7106
7200
|
};
|
|
7107
7201
|
|
|
7108
7202
|
var edMapJson = /*#__PURE__*/Object.freeze({
|
|
@@ -7118,6 +7212,8 @@ var edMapJson = /*#__PURE__*/Object.freeze({
|
|
|
7118
7212
|
BifrostKusama: BifrostKusama$1,
|
|
7119
7213
|
BifrostPolkadot: BifrostPolkadot$1,
|
|
7120
7214
|
Bitgreen: Bitgreen$1,
|
|
7215
|
+
BridgeHubKusama: BridgeHubKusama$1,
|
|
7216
|
+
BridgeHubPolkadot: BridgeHubPolkadot$1,
|
|
7121
7217
|
Calamari: Calamari$1,
|
|
7122
7218
|
Centrifuge: Centrifuge$1,
|
|
7123
7219
|
Collectives: Collectives$1,
|
|
@@ -7129,7 +7225,7 @@ var edMapJson = /*#__PURE__*/Object.freeze({
|
|
|
7129
7225
|
Curio: Curio$1,
|
|
7130
7226
|
Darwinia: Darwinia$1,
|
|
7131
7227
|
Encointer: Encointer$1,
|
|
7132
|
-
|
|
7228
|
+
Hydration: Hydration$1,
|
|
7133
7229
|
Imbue: Imbue$1,
|
|
7134
7230
|
Integritee: Integritee$1,
|
|
7135
7231
|
Interlay: Interlay$1,
|
|
@@ -7141,7 +7237,6 @@ var edMapJson = /*#__PURE__*/Object.freeze({
|
|
|
7141
7237
|
Kusama: Kusama,
|
|
7142
7238
|
Litentry: Litentry$1,
|
|
7143
7239
|
Litmus: Litmus$1,
|
|
7144
|
-
Mangata: Mangata$1,
|
|
7145
7240
|
Manta: Manta$1,
|
|
7146
7241
|
Moonbeam: Moonbeam$1,
|
|
7147
7242
|
Moonriver: Moonriver$1,
|
|
@@ -7394,6 +7489,12 @@ var RelayToParaBuilder = /*#__PURE__*/function () {
|
|
|
7394
7489
|
this._destApi = destApi;
|
|
7395
7490
|
return this;
|
|
7396
7491
|
}
|
|
7492
|
+
}, {
|
|
7493
|
+
key: "xcmVersion",
|
|
7494
|
+
value: function xcmVersion(version) {
|
|
7495
|
+
this._version = version;
|
|
7496
|
+
return this;
|
|
7497
|
+
}
|
|
7397
7498
|
}, {
|
|
7398
7499
|
key: "buildOptions",
|
|
7399
7500
|
value: function buildOptions() {
|
|
@@ -7403,7 +7504,8 @@ var RelayToParaBuilder = /*#__PURE__*/function () {
|
|
|
7403
7504
|
amount: this._amount,
|
|
7404
7505
|
address: this._address,
|
|
7405
7506
|
paraIdTo: this.paraIdTo,
|
|
7406
|
-
destApiForKeepAlive: this._destApi
|
|
7507
|
+
destApiForKeepAlive: this._destApi,
|
|
7508
|
+
version: this._version
|
|
7407
7509
|
};
|
|
7408
7510
|
}
|
|
7409
7511
|
}, {
|
|
@@ -7487,6 +7589,12 @@ var ParaToParaBuilder = /*#__PURE__*/function () {
|
|
|
7487
7589
|
this._destApi = destApi;
|
|
7488
7590
|
return this;
|
|
7489
7591
|
}
|
|
7592
|
+
}, {
|
|
7593
|
+
key: "xcmVersion",
|
|
7594
|
+
value: function xcmVersion(version) {
|
|
7595
|
+
this._version = version;
|
|
7596
|
+
return this;
|
|
7597
|
+
}
|
|
7490
7598
|
}, {
|
|
7491
7599
|
key: "buildOptions",
|
|
7492
7600
|
value: function buildOptions() {
|
|
@@ -7499,7 +7607,8 @@ var ParaToParaBuilder = /*#__PURE__*/function () {
|
|
|
7499
7607
|
destination: this.to,
|
|
7500
7608
|
paraIdTo: this.paraIdTo,
|
|
7501
7609
|
feeAsset: this._feeAsset,
|
|
7502
|
-
destApiForKeepAlive: this._destApi
|
|
7610
|
+
destApiForKeepAlive: this._destApi,
|
|
7611
|
+
version: this._version
|
|
7503
7612
|
};
|
|
7504
7613
|
}
|
|
7505
7614
|
}, {
|
|
@@ -7570,6 +7679,12 @@ var ParaToRelayBuilder = /*#__PURE__*/function () {
|
|
|
7570
7679
|
this._destApi = destApi;
|
|
7571
7680
|
return this;
|
|
7572
7681
|
}
|
|
7682
|
+
}, {
|
|
7683
|
+
key: "xcmVersion",
|
|
7684
|
+
value: function xcmVersion(version) {
|
|
7685
|
+
this._version = version;
|
|
7686
|
+
return this;
|
|
7687
|
+
}
|
|
7573
7688
|
}, {
|
|
7574
7689
|
key: "buildOptions",
|
|
7575
7690
|
value: function buildOptions() {
|
|
@@ -7584,7 +7699,8 @@ var ParaToRelayBuilder = /*#__PURE__*/function () {
|
|
|
7584
7699
|
amount: this.amount,
|
|
7585
7700
|
address: this._address,
|
|
7586
7701
|
feeAsset: this.feeAsset,
|
|
7587
|
-
destApiForKeepAlive: this._destApi
|
|
7702
|
+
destApiForKeepAlive: this._destApi,
|
|
7703
|
+
version: this._version
|
|
7588
7704
|
};
|
|
7589
7705
|
}
|
|
7590
7706
|
}, {
|
|
@@ -7651,7 +7767,7 @@ var buildBeneficiaryInput = function buildBeneficiaryInput(api, address) {
|
|
|
7651
7767
|
if (isTMultiLocation(address)) {
|
|
7652
7768
|
return address;
|
|
7653
7769
|
}
|
|
7654
|
-
var isEthAddress = ethers.
|
|
7770
|
+
var isEthAddress = ethers.isAddress(address);
|
|
7655
7771
|
return {
|
|
7656
7772
|
parents: Parents.ZERO,
|
|
7657
7773
|
interior: {
|
|
@@ -8207,6 +8323,11 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
8207
8323
|
get: function get() {
|
|
8208
8324
|
return this._assetCheckEnabled;
|
|
8209
8325
|
}
|
|
8326
|
+
}, {
|
|
8327
|
+
key: "canUseXTokens",
|
|
8328
|
+
value: function canUseXTokens(_) {
|
|
8329
|
+
return true;
|
|
8330
|
+
}
|
|
8210
8331
|
}, {
|
|
8211
8332
|
key: "transfer",
|
|
8212
8333
|
value: function transfer(options) {
|
|
@@ -8219,17 +8340,19 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
8219
8340
|
paraIdTo = options.paraIdTo,
|
|
8220
8341
|
overridedCurrencyMultiLocation = options.overridedCurrencyMultiLocation,
|
|
8221
8342
|
feeAsset = options.feeAsset,
|
|
8343
|
+
_options$version = options.version,
|
|
8344
|
+
version = _options$version === void 0 ? this.version : _options$version,
|
|
8222
8345
|
_options$serializedAp = options.serializedApiCallEnabled,
|
|
8223
8346
|
serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
|
|
8224
8347
|
var scenario = destination !== undefined ? 'ParaToPara' : 'ParaToRelay';
|
|
8225
8348
|
var paraId = destination !== undefined && _typeof(destination) !== 'object' ? paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination) : undefined;
|
|
8226
|
-
if (supportsXTokens(this)) {
|
|
8349
|
+
if (supportsXTokens(this) && this.canUseXTokens(options)) {
|
|
8227
8350
|
return this.transferXTokens({
|
|
8228
8351
|
api: api,
|
|
8229
8352
|
currency: currencySymbol,
|
|
8230
8353
|
currencyID: currencyId,
|
|
8231
8354
|
amount: amount,
|
|
8232
|
-
addressSelection: generateAddressPayload(api, scenario, 'XTokens', address,
|
|
8355
|
+
addressSelection: generateAddressPayload(api, scenario, 'XTokens', address, version, paraId),
|
|
8233
8356
|
fees: getFees(scenario),
|
|
8234
8357
|
origin: this.node,
|
|
8235
8358
|
scenario: scenario,
|
|
@@ -8255,12 +8378,18 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
8255
8378
|
} else if (supportsPolkadotXCM(this)) {
|
|
8256
8379
|
return this.transferPolkadotXCM({
|
|
8257
8380
|
api: api,
|
|
8258
|
-
header: this.createPolkadotXcmHeader(scenario, destination, paraId),
|
|
8259
|
-
addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address,
|
|
8260
|
-
|
|
8381
|
+
header: this.createPolkadotXcmHeader(scenario, version, destination, paraId),
|
|
8382
|
+
addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, version, paraId),
|
|
8383
|
+
address: address,
|
|
8384
|
+
amount: amount,
|
|
8385
|
+
currencySelection: this.createCurrencySpec(amount, scenario, version, currencyId, overridedCurrencyMultiLocation),
|
|
8386
|
+
currencyId: currencyId,
|
|
8261
8387
|
scenario: scenario,
|
|
8262
8388
|
currencySymbol: currencySymbol,
|
|
8263
8389
|
feeAsset: feeAsset,
|
|
8390
|
+
destination: destination,
|
|
8391
|
+
paraIdTo: paraId,
|
|
8392
|
+
overridedCurrency: overridedCurrencyMultiLocation,
|
|
8264
8393
|
serializedApiCallEnabled: serializedApiCallEnabled
|
|
8265
8394
|
});
|
|
8266
8395
|
} else {
|
|
@@ -8270,10 +8399,12 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
8270
8399
|
}, {
|
|
8271
8400
|
key: "transferRelayToPara",
|
|
8272
8401
|
value: function transferRelayToPara(options) {
|
|
8402
|
+
var _options$version2 = options.version,
|
|
8403
|
+
version = _options$version2 === void 0 ? Version.V3 : _options$version2;
|
|
8273
8404
|
return {
|
|
8274
8405
|
module: 'xcmPallet',
|
|
8275
8406
|
section: 'reserveTransferAssets',
|
|
8276
|
-
parameters: constructRelayToParaParameters(options,
|
|
8407
|
+
parameters: constructRelayToParaParameters(options, version)
|
|
8277
8408
|
};
|
|
8278
8409
|
}
|
|
8279
8410
|
}, {
|
|
@@ -8306,8 +8437,8 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
8306
8437
|
}
|
|
8307
8438
|
}, {
|
|
8308
8439
|
key: "createPolkadotXcmHeader",
|
|
8309
|
-
value: function createPolkadotXcmHeader$1(scenario, destination, paraId) {
|
|
8310
|
-
return createPolkadotXcmHeader(scenario,
|
|
8440
|
+
value: function createPolkadotXcmHeader$1(scenario, version, destination, paraId) {
|
|
8441
|
+
return createPolkadotXcmHeader(scenario, version, destination, paraId);
|
|
8311
8442
|
}
|
|
8312
8443
|
}]);
|
|
8313
8444
|
}();
|
|
@@ -8534,13 +8665,13 @@ var ComposableFinance = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8534
8665
|
}]);
|
|
8535
8666
|
}(ParachainNode);
|
|
8536
8667
|
|
|
8537
|
-
var
|
|
8538
|
-
function
|
|
8539
|
-
_classCallCheck(this,
|
|
8540
|
-
return _callSuper(this,
|
|
8668
|
+
var Hydration = /*#__PURE__*/function (_ParachainNode) {
|
|
8669
|
+
function Hydration() {
|
|
8670
|
+
_classCallCheck(this, Hydration);
|
|
8671
|
+
return _callSuper(this, Hydration, ['Hydration', 'hydradx', 'polkadot', Version.V3]);
|
|
8541
8672
|
}
|
|
8542
|
-
_inherits(
|
|
8543
|
-
return _createClass(
|
|
8673
|
+
_inherits(Hydration, _ParachainNode);
|
|
8674
|
+
return _createClass(Hydration, [{
|
|
8544
8675
|
key: "transferXTokens",
|
|
8545
8676
|
value: function transferXTokens(input) {
|
|
8546
8677
|
var currencyID = input.currencyID;
|
|
@@ -8603,12 +8734,19 @@ var Moonbeam = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8603
8734
|
}, {
|
|
8604
8735
|
key: "transferRelayToPara",
|
|
8605
8736
|
value: function transferRelayToPara(options) {
|
|
8737
|
+
var _options$version = options.version,
|
|
8738
|
+
version = _options$version === void 0 ? Version.V3 : _options$version;
|
|
8606
8739
|
return {
|
|
8607
8740
|
module: 'xcmPallet',
|
|
8608
8741
|
section: 'limitedReserveTransferAssets',
|
|
8609
|
-
parameters: constructRelayToParaParameters(options,
|
|
8742
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
8610
8743
|
};
|
|
8611
8744
|
}
|
|
8745
|
+
}, {
|
|
8746
|
+
key: "getProvider",
|
|
8747
|
+
value: function getProvider() {
|
|
8748
|
+
return getAllNodeProviders(this.node)[2];
|
|
8749
|
+
}
|
|
8612
8750
|
}]);
|
|
8613
8751
|
}(ParachainNode);
|
|
8614
8752
|
|
|
@@ -8783,72 +8921,17 @@ var Moonriver = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8783
8921
|
}, {
|
|
8784
8922
|
key: "transferRelayToPara",
|
|
8785
8923
|
value: function transferRelayToPara(options) {
|
|
8924
|
+
var _options$version = options.version,
|
|
8925
|
+
version = _options$version === void 0 ? Version.V3 : _options$version;
|
|
8786
8926
|
return {
|
|
8787
8927
|
module: 'xcmPallet',
|
|
8788
8928
|
section: 'limitedReserveTransferAssets',
|
|
8789
|
-
parameters: constructRelayToParaParameters(options,
|
|
8929
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
8790
8930
|
};
|
|
8791
8931
|
}
|
|
8792
8932
|
}]);
|
|
8793
8933
|
}(ParachainNode);
|
|
8794
8934
|
|
|
8795
|
-
var Mangata = /*#__PURE__*/function (_ParachainNode) {
|
|
8796
|
-
function Mangata() {
|
|
8797
|
-
_classCallCheck(this, Mangata);
|
|
8798
|
-
return _callSuper(this, Mangata, ['Mangata', 'mangata', 'kusama', Version.V3]);
|
|
8799
|
-
}
|
|
8800
|
-
_inherits(Mangata, _ParachainNode);
|
|
8801
|
-
return _createClass(Mangata, [{
|
|
8802
|
-
key: "transferXTokens",
|
|
8803
|
-
value: function transferXTokens(input) {
|
|
8804
|
-
return XTokensTransferImpl.transferXTokens(input, input.currencyID);
|
|
8805
|
-
}
|
|
8806
|
-
}, {
|
|
8807
|
-
key: "createApiInstance",
|
|
8808
|
-
value: function createApiInstance() {
|
|
8809
|
-
return __awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
8810
|
-
var _yield$import, mTypes, mRpc, options, provider;
|
|
8811
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
8812
|
-
while (1) switch (_context.prev = _context.next) {
|
|
8813
|
-
case 0:
|
|
8814
|
-
_context.next = 2;
|
|
8815
|
-
return import('@mangata-finance/type-definitions');
|
|
8816
|
-
case 2:
|
|
8817
|
-
_yield$import = _context.sent;
|
|
8818
|
-
mTypes = _yield$import.mTypes;
|
|
8819
|
-
mRpc = _yield$import.mRpc;
|
|
8820
|
-
options = function options() {
|
|
8821
|
-
var _a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
8822
|
-
var _a$types = _a.types,
|
|
8823
|
-
types = _a$types === void 0 ? {} : _a$types,
|
|
8824
|
-
_a$rpc = _a.rpc,
|
|
8825
|
-
rpc = _a$rpc === void 0 ? {} : _a$rpc,
|
|
8826
|
-
otherOptions = __rest(_a, ["types", "rpc"]);
|
|
8827
|
-
return Object.assign({
|
|
8828
|
-
types: Object.assign(Object.assign({}, mTypes), types),
|
|
8829
|
-
rpc: Object.assign(Object.assign({}, mRpc), rpc)
|
|
8830
|
-
}, otherOptions);
|
|
8831
|
-
};
|
|
8832
|
-
provider = new WsProvider(this.getProvider());
|
|
8833
|
-
_context.next = 9;
|
|
8834
|
-
return ApiPromise.create(options({
|
|
8835
|
-
provider: provider,
|
|
8836
|
-
throwOnConnect: true,
|
|
8837
|
-
throwOnUnknown: true,
|
|
8838
|
-
noInitWarn: true
|
|
8839
|
-
}));
|
|
8840
|
-
case 9:
|
|
8841
|
-
return _context.abrupt("return", _context.sent);
|
|
8842
|
-
case 10:
|
|
8843
|
-
case "end":
|
|
8844
|
-
return _context.stop();
|
|
8845
|
-
}
|
|
8846
|
-
}, _callee, this);
|
|
8847
|
-
}));
|
|
8848
|
-
}
|
|
8849
|
-
}]);
|
|
8850
|
-
}(ParachainNode);
|
|
8851
|
-
|
|
8852
8935
|
var Litmus = /*#__PURE__*/function (_ParachainNode) {
|
|
8853
8936
|
function Litmus() {
|
|
8854
8937
|
_classCallCheck(this, Litmus);
|
|
@@ -8962,10 +9045,10 @@ var NodeNotSupportedError = /*#__PURE__*/function (_Error) {
|
|
|
8962
9045
|
|
|
8963
9046
|
// Used to inform user, that Parachain they wish to use does not support scenario they wish to use yet
|
|
8964
9047
|
var ScenarioNotSupportedError = /*#__PURE__*/function (_Error) {
|
|
8965
|
-
function ScenarioNotSupportedError(node, scenario) {
|
|
9048
|
+
function ScenarioNotSupportedError(node, scenario, message) {
|
|
8966
9049
|
var _this;
|
|
8967
9050
|
_classCallCheck(this, ScenarioNotSupportedError);
|
|
8968
|
-
_this = _callSuper(this, ScenarioNotSupportedError, ["Scenario ".concat(scenario, " not supported for node ").concat(node)]);
|
|
9051
|
+
_this = _callSuper(this, ScenarioNotSupportedError, [message !== null && message !== void 0 ? message : "Scenario ".concat(scenario, " not supported for node ").concat(node)]);
|
|
8969
9052
|
_this.name = 'ScenarioNotSupported';
|
|
8970
9053
|
return _this;
|
|
8971
9054
|
}
|
|
@@ -9087,19 +9170,43 @@ var AssetHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9087
9170
|
}
|
|
9088
9171
|
_inherits(AssetHubPolkadot, _ParachainNode);
|
|
9089
9172
|
return _createClass(AssetHubPolkadot, [{
|
|
9173
|
+
key: "handleBridgeTransfer",
|
|
9174
|
+
value: function handleBridgeTransfer(input, targetChain) {
|
|
9175
|
+
if (targetChain === 'Kusama' && input.currencyId === 'KSM' || targetChain === 'Polkadot' && input.currencyId === 'DOT') {
|
|
9176
|
+
var modifiedInput = Object.assign(Object.assign({}, input), {
|
|
9177
|
+
header: createBridgePolkadotXcmDest(Version.V4, targetChain, input.destination, input.paraIdTo),
|
|
9178
|
+
addressSelection: generateAddressMultiLocationV4(input.api, input.address),
|
|
9179
|
+
currencySelection: createBridgeCurrencySpec(input.amount, targetChain)
|
|
9180
|
+
});
|
|
9181
|
+
return PolkadotXCMTransferImpl.transferPolkadotXCM(modifiedInput, 'transferAssets', 'Unlimited');
|
|
9182
|
+
} else if (targetChain === 'Polkadot' && input.currencyId === 'KSM' || targetChain === 'Kusama' && input.currencyId === 'DOT') {
|
|
9183
|
+
var _modifiedInput = Object.assign(Object.assign({}, input), {
|
|
9184
|
+
header: createBridgePolkadotXcmDest(Version.V3, targetChain, input.destination, input.paraIdTo),
|
|
9185
|
+
currencySelection: createCurrencySpec(input.amount, Version.V3, Parents.ONE, input.overridedCurrency)
|
|
9186
|
+
});
|
|
9187
|
+
return PolkadotXCMTransferImpl.transferPolkadotXCM(_modifiedInput, 'limitedReserveTransferAssets', 'Unlimited');
|
|
9188
|
+
}
|
|
9189
|
+
throw new InvalidCurrencyError('Polkadot <-> Kusama bridge does not support this currency');
|
|
9190
|
+
}
|
|
9191
|
+
}, {
|
|
9090
9192
|
key: "transferPolkadotXCM",
|
|
9091
9193
|
value: function transferPolkadotXCM(input) {
|
|
9092
9194
|
var scenario = input.scenario;
|
|
9195
|
+
if (input.destination === 'AssetHubKusama') {
|
|
9196
|
+
return this.handleBridgeTransfer(input, 'Kusama');
|
|
9197
|
+
}
|
|
9093
9198
|
var method = scenario === 'ParaToPara' ? 'limitedReserveTransferAssets' : 'limitedTeleportAssets';
|
|
9094
9199
|
return PolkadotXCMTransferImpl.transferPolkadotXCM(input, method, 'Unlimited');
|
|
9095
9200
|
}
|
|
9096
9201
|
}, {
|
|
9097
9202
|
key: "transferRelayToPara",
|
|
9098
9203
|
value: function transferRelayToPara(options) {
|
|
9204
|
+
var _options$version = options.version,
|
|
9205
|
+
version = _options$version === void 0 ? Version.V3 : _options$version;
|
|
9099
9206
|
return {
|
|
9100
9207
|
module: 'xcmPallet',
|
|
9101
9208
|
section: 'limitedTeleportAssets',
|
|
9102
|
-
parameters: constructRelayToParaParameters(options,
|
|
9209
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
9103
9210
|
};
|
|
9104
9211
|
}
|
|
9105
9212
|
}, {
|
|
@@ -9135,6 +9242,9 @@ var AssetHubKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9135
9242
|
value: function transferPolkadotXCM(input) {
|
|
9136
9243
|
// TESTED https://kusama.subscan.io/xcm_message/kusama-ddc2a48f0d8e0337832d7aae26f6c3053e1f4ffd
|
|
9137
9244
|
// TESTED https://kusama.subscan.io/xcm_message/kusama-8e423130a4d8b61679af95dbea18a55124f99672
|
|
9245
|
+
if (input.destination === 'AssetHubPolkadot') {
|
|
9246
|
+
return getNode('AssetHubPolkadot').handleBridgeTransfer(input, 'Polkadot');
|
|
9247
|
+
}
|
|
9138
9248
|
var scenario = input.scenario;
|
|
9139
9249
|
var method = scenario === 'ParaToPara' ? 'limitedReserveTransferAssets' : 'limitedTeleportAssets';
|
|
9140
9250
|
return PolkadotXCMTransferImpl.transferPolkadotXCM(input, method, 'Unlimited');
|
|
@@ -9142,16 +9252,18 @@ var AssetHubKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9142
9252
|
}, {
|
|
9143
9253
|
key: "transferRelayToPara",
|
|
9144
9254
|
value: function transferRelayToPara(options) {
|
|
9255
|
+
var _options$version = options.version,
|
|
9256
|
+
version = _options$version === void 0 ? Version.V3 : _options$version;
|
|
9145
9257
|
return {
|
|
9146
9258
|
module: 'xcmPallet',
|
|
9147
9259
|
section: 'limitedTeleportAssets',
|
|
9148
|
-
parameters: constructRelayToParaParameters(options,
|
|
9260
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
9149
9261
|
};
|
|
9150
9262
|
}
|
|
9151
9263
|
}, {
|
|
9152
9264
|
key: "createCurrencySpec",
|
|
9153
|
-
value: function createCurrencySpec(amount, scenario, version, currencyId) {
|
|
9154
|
-
return getNode('AssetHubPolkadot').createCurrencySpec(amount, scenario, version, currencyId);
|
|
9265
|
+
value: function createCurrencySpec(amount, scenario, version, currencyId, overridedMultiLocation) {
|
|
9266
|
+
return getNode('AssetHubPolkadot').createCurrencySpec(amount, scenario, version, currencyId, overridedMultiLocation);
|
|
9155
9267
|
}
|
|
9156
9268
|
}]);
|
|
9157
9269
|
}(ParachainNode);
|
|
@@ -9178,10 +9290,12 @@ var CoretimeKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9178
9290
|
value: function transferRelayToPara(options) {
|
|
9179
9291
|
// TESTED block hash on Rococo: 0x28929f7b2aeadbf3333f05d35bed18214a4b23dd270bd072f99e8a0131d22456
|
|
9180
9292
|
// https://rococo.subscan.io/extrinsic/0x469eec7dccb22696b0c95cf4f5eec4b367ad3dc23243a346cc2aad3cc9522800
|
|
9293
|
+
var _options$version = options.version,
|
|
9294
|
+
version = _options$version === void 0 ? Version.V3 : _options$version;
|
|
9181
9295
|
return {
|
|
9182
9296
|
module: 'xcmPallet',
|
|
9183
9297
|
section: 'limitedTeleportAssets',
|
|
9184
|
-
parameters: constructRelayToParaParameters(options,
|
|
9298
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
9185
9299
|
};
|
|
9186
9300
|
}
|
|
9187
9301
|
}]);
|
|
@@ -9206,10 +9320,12 @@ var Encointer = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9206
9320
|
}, {
|
|
9207
9321
|
key: "transferRelayToPara",
|
|
9208
9322
|
value: function transferRelayToPara(options) {
|
|
9323
|
+
var _options$version = options.version,
|
|
9324
|
+
version = _options$version === void 0 ? Version.V1 : _options$version;
|
|
9209
9325
|
return {
|
|
9210
9326
|
module: 'xcmPallet',
|
|
9211
9327
|
section: 'limitedTeleportAssets',
|
|
9212
|
-
parameters: constructRelayToParaParameters(options,
|
|
9328
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
9213
9329
|
};
|
|
9214
9330
|
}
|
|
9215
9331
|
}]);
|
|
@@ -9254,48 +9370,10 @@ var Astar = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9254
9370
|
return XTokensTransferImpl.transferXTokens(input, input.currencyID);
|
|
9255
9371
|
}
|
|
9256
9372
|
}, {
|
|
9257
|
-
key: "
|
|
9258
|
-
value: function
|
|
9259
|
-
var
|
|
9260
|
-
|
|
9261
|
-
currencyId = options.currencyId,
|
|
9262
|
-
amount = options.amount,
|
|
9263
|
-
address = options.address,
|
|
9264
|
-
destination = options.destination,
|
|
9265
|
-
paraIdTo = options.paraIdTo,
|
|
9266
|
-
overridedCurrencyMultiLocation = options.overridedCurrencyMultiLocation,
|
|
9267
|
-
_options$serializedAp = options.serializedApiCallEnabled,
|
|
9268
|
-
serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
|
|
9269
|
-
var scenario = destination !== undefined ? 'ParaToPara' : 'ParaToRelay';
|
|
9270
|
-
var paraId = destination !== undefined && _typeof(destination) !== 'object' ? paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination) : undefined;
|
|
9271
|
-
var node = this.node;
|
|
9272
|
-
if (supportsXTokens(this) && currencySymbol !== 'ASTR') {
|
|
9273
|
-
return this.transferXTokens({
|
|
9274
|
-
api: api,
|
|
9275
|
-
currency: currencySymbol,
|
|
9276
|
-
currencyID: currencyId,
|
|
9277
|
-
amount: amount,
|
|
9278
|
-
addressSelection: generateAddressPayload(api, scenario, 'XTokens', address, this.version, paraId),
|
|
9279
|
-
fees: getFees(scenario),
|
|
9280
|
-
origin: this.node,
|
|
9281
|
-
scenario: scenario,
|
|
9282
|
-
paraIdTo: paraId,
|
|
9283
|
-
destination: destination,
|
|
9284
|
-
overridedCurrencyMultiLocation: overridedCurrencyMultiLocation,
|
|
9285
|
-
serializedApiCallEnabled: serializedApiCallEnabled
|
|
9286
|
-
});
|
|
9287
|
-
} else if (supportsPolkadotXCM(this)) {
|
|
9288
|
-
return this.transferPolkadotXCM({
|
|
9289
|
-
api: api,
|
|
9290
|
-
header: this.createPolkadotXcmHeader(scenario, destination, paraId),
|
|
9291
|
-
addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, this.version, paraId),
|
|
9292
|
-
currencySelection: this.createCurrencySpec(amount, scenario, this.version, currencyId, overridedCurrencyMultiLocation),
|
|
9293
|
-
scenario: scenario,
|
|
9294
|
-
currencySymbol: currencySymbol,
|
|
9295
|
-
serializedApiCallEnabled: serializedApiCallEnabled
|
|
9296
|
-
});
|
|
9297
|
-
}
|
|
9298
|
-
throw new NoXCMSupportImplementedError(node);
|
|
9373
|
+
key: "canUseXTokens",
|
|
9374
|
+
value: function canUseXTokens(_ref) {
|
|
9375
|
+
var currencySymbol = _ref.currencySymbol;
|
|
9376
|
+
return currencySymbol !== 'ASTR';
|
|
9299
9377
|
}
|
|
9300
9378
|
}]);
|
|
9301
9379
|
}(ParachainNode);
|
|
@@ -9403,48 +9481,10 @@ var Shiden = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9403
9481
|
return XTokensTransferImpl.transferXTokens(input, input.currencyID);
|
|
9404
9482
|
}
|
|
9405
9483
|
}, {
|
|
9406
|
-
key: "
|
|
9407
|
-
value: function
|
|
9408
|
-
var
|
|
9409
|
-
|
|
9410
|
-
currencyId = options.currencyId,
|
|
9411
|
-
amount = options.amount,
|
|
9412
|
-
address = options.address,
|
|
9413
|
-
destination = options.destination,
|
|
9414
|
-
paraIdTo = options.paraIdTo,
|
|
9415
|
-
overridedCurrencyMultiLocation = options.overridedCurrencyMultiLocation,
|
|
9416
|
-
_options$serializedAp = options.serializedApiCallEnabled,
|
|
9417
|
-
serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
|
|
9418
|
-
var scenario = destination !== undefined ? 'ParaToPara' : 'ParaToRelay';
|
|
9419
|
-
var paraId = destination !== undefined && _typeof(destination) !== 'object' ? paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination) : undefined;
|
|
9420
|
-
var node = this.node;
|
|
9421
|
-
if (supportsXTokens(this) && currencySymbol !== 'SDN') {
|
|
9422
|
-
return this.transferXTokens({
|
|
9423
|
-
api: api,
|
|
9424
|
-
currency: currencySymbol,
|
|
9425
|
-
currencyID: currencyId,
|
|
9426
|
-
amount: amount,
|
|
9427
|
-
addressSelection: generateAddressPayload(api, scenario, 'XTokens', address, this.version, paraId),
|
|
9428
|
-
fees: getFees(scenario),
|
|
9429
|
-
origin: this.node,
|
|
9430
|
-
scenario: scenario,
|
|
9431
|
-
paraIdTo: paraId,
|
|
9432
|
-
destination: destination,
|
|
9433
|
-
overridedCurrencyMultiLocation: overridedCurrencyMultiLocation,
|
|
9434
|
-
serializedApiCallEnabled: serializedApiCallEnabled
|
|
9435
|
-
});
|
|
9436
|
-
} else if (supportsPolkadotXCM(this)) {
|
|
9437
|
-
return this.transferPolkadotXCM({
|
|
9438
|
-
api: api,
|
|
9439
|
-
header: this.createPolkadotXcmHeader(scenario, destination, paraId),
|
|
9440
|
-
addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, this.version, paraId),
|
|
9441
|
-
currencySelection: this.createCurrencySpec(amount, scenario, this.version, currencyId, overridedCurrencyMultiLocation),
|
|
9442
|
-
scenario: scenario,
|
|
9443
|
-
currencySymbol: currencySymbol,
|
|
9444
|
-
serializedApiCallEnabled: serializedApiCallEnabled
|
|
9445
|
-
});
|
|
9446
|
-
}
|
|
9447
|
-
throw new NoXCMSupportImplementedError(node);
|
|
9484
|
+
key: "canUseXTokens",
|
|
9485
|
+
value: function canUseXTokens(_ref) {
|
|
9486
|
+
var currencySymbol = _ref.currencySymbol;
|
|
9487
|
+
return currencySymbol !== 'SDN';
|
|
9448
9488
|
}
|
|
9449
9489
|
}]);
|
|
9450
9490
|
}(ParachainNode);
|
|
@@ -9585,10 +9625,12 @@ var Collectives = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9585
9625
|
}, {
|
|
9586
9626
|
key: "transferRelayToPara",
|
|
9587
9627
|
value: function transferRelayToPara(options) {
|
|
9628
|
+
var _options$version = options.version,
|
|
9629
|
+
version = _options$version === void 0 ? Version.V3 : _options$version;
|
|
9588
9630
|
return {
|
|
9589
9631
|
module: 'xcmPallet',
|
|
9590
9632
|
section: 'limitedTeleportAssets',
|
|
9591
|
-
parameters: constructRelayToParaParameters(options,
|
|
9633
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
9592
9634
|
};
|
|
9593
9635
|
}
|
|
9594
9636
|
}, {
|
|
@@ -9610,7 +9652,7 @@ var determineDestWeight = function determineDestWeight(destNode) {
|
|
|
9610
9652
|
proofSize: '1000000'
|
|
9611
9653
|
};
|
|
9612
9654
|
}
|
|
9613
|
-
if (destNode === 'Moonbeam' || destNode === '
|
|
9655
|
+
if (destNode === 'Moonbeam' || destNode === 'Hydration') {
|
|
9614
9656
|
return {
|
|
9615
9657
|
refTime: '5000000000',
|
|
9616
9658
|
proofSize: '0'
|
|
@@ -9626,7 +9668,7 @@ var getDestination = function getDestination(_ref) {
|
|
|
9626
9668
|
if (isMultiLocation) {
|
|
9627
9669
|
return recipientAddress;
|
|
9628
9670
|
}
|
|
9629
|
-
var isEthAddress = ethers.
|
|
9671
|
+
var isEthAddress = ethers.isAddress(recipientAddress);
|
|
9630
9672
|
var addressJunction = isEthAddress ? {
|
|
9631
9673
|
AccountKey20: {
|
|
9632
9674
|
key: recipientAddress
|
|
@@ -9773,8 +9815,74 @@ var Curio = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9773
9815
|
}]);
|
|
9774
9816
|
}(ParachainNode);
|
|
9775
9817
|
|
|
9818
|
+
var BridgeHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
9819
|
+
function BridgeHubPolkadot() {
|
|
9820
|
+
var _this;
|
|
9821
|
+
_classCallCheck(this, BridgeHubPolkadot);
|
|
9822
|
+
_this = _callSuper(this, BridgeHubPolkadot, ['BridgeHubPolkadot', 'polkadotBridgeHub', 'polkadot', Version.V3]);
|
|
9823
|
+
_this._assetCheckEnabled = false;
|
|
9824
|
+
return _this;
|
|
9825
|
+
}
|
|
9826
|
+
_inherits(BridgeHubPolkadot, _ParachainNode);
|
|
9827
|
+
return _createClass(BridgeHubPolkadot, [{
|
|
9828
|
+
key: "transferPolkadotXCM",
|
|
9829
|
+
value: function transferPolkadotXCM(input) {
|
|
9830
|
+
var scenario = input.scenario;
|
|
9831
|
+
if (scenario === 'ParaToPara') {
|
|
9832
|
+
throw new ScenarioNotSupportedError(this.node, scenario, 'Unable to use bridge hub for transfers to other Parachains. Please move your currency to AssetHub to transfer to other Parachains.');
|
|
9833
|
+
}
|
|
9834
|
+
var method = 'limitedTeleportAssets';
|
|
9835
|
+
return PolkadotXCMTransferImpl.transferPolkadotXCM(input, method, 'Unlimited');
|
|
9836
|
+
}
|
|
9837
|
+
}, {
|
|
9838
|
+
key: "transferRelayToPara",
|
|
9839
|
+
value: function transferRelayToPara(options) {
|
|
9840
|
+
var _options$version = options.version,
|
|
9841
|
+
version = _options$version === void 0 ? Version.V3 : _options$version;
|
|
9842
|
+
return {
|
|
9843
|
+
module: 'xcmPallet',
|
|
9844
|
+
section: 'limitedTeleportAssets',
|
|
9845
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
9846
|
+
};
|
|
9847
|
+
}
|
|
9848
|
+
}]);
|
|
9849
|
+
}(ParachainNode);
|
|
9850
|
+
|
|
9851
|
+
var BridgeHubKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
9852
|
+
function BridgeHubKusama() {
|
|
9853
|
+
var _this;
|
|
9854
|
+
_classCallCheck(this, BridgeHubKusama);
|
|
9855
|
+
_this = _callSuper(this, BridgeHubKusama, ['BridgeHubKusama', 'kusamaBridgeHub', 'kusama', Version.V3]);
|
|
9856
|
+
_this._assetCheckEnabled = false;
|
|
9857
|
+
return _this;
|
|
9858
|
+
}
|
|
9859
|
+
_inherits(BridgeHubKusama, _ParachainNode);
|
|
9860
|
+
return _createClass(BridgeHubKusama, [{
|
|
9861
|
+
key: "transferPolkadotXCM",
|
|
9862
|
+
value: function transferPolkadotXCM(input) {
|
|
9863
|
+
var scenario = input.scenario;
|
|
9864
|
+
if (scenario === 'ParaToPara') {
|
|
9865
|
+
throw new ScenarioNotSupportedError(this.node, scenario, 'Unable to use bridge hub for transfers to other Parachains. Please move your currency to AssetHub to transfer to other Parachains.');
|
|
9866
|
+
}
|
|
9867
|
+
var method = 'limitedTeleportAssets';
|
|
9868
|
+
return PolkadotXCMTransferImpl.transferPolkadotXCM(input, method, 'Unlimited');
|
|
9869
|
+
}
|
|
9870
|
+
}, {
|
|
9871
|
+
key: "transferRelayToPara",
|
|
9872
|
+
value: function transferRelayToPara(options) {
|
|
9873
|
+
var _options$version = options.version,
|
|
9874
|
+
version = _options$version === void 0 ? Version.V3 : _options$version;
|
|
9875
|
+
return {
|
|
9876
|
+
module: 'xcmPallet',
|
|
9877
|
+
section: 'limitedTeleportAssets',
|
|
9878
|
+
parameters: constructRelayToParaParameters(options, version, true)
|
|
9879
|
+
};
|
|
9880
|
+
}
|
|
9881
|
+
}]);
|
|
9882
|
+
}(ParachainNode);
|
|
9883
|
+
|
|
9776
9884
|
// Contains supported Parachains and exports supported XCM Pallets
|
|
9777
|
-
var NODE_NAMES = ['AssetHubPolkadot', 'Acala', 'Astar', 'BifrostPolkadot', 'Bitgreen', 'Centrifuge', 'ComposableFinance', 'Darwinia', '
|
|
9885
|
+
var NODE_NAMES = ['AssetHubPolkadot', 'Acala', 'Astar', 'BifrostPolkadot', 'Bitgreen', 'BridgeHubPolkadot', 'BridgeHubKusama', 'Centrifuge', 'ComposableFinance', 'Darwinia', 'Hydration', 'Interlay', 'Litentry', 'Moonbeam', 'Parallel', 'AssetHubKusama', 'CoretimeKusama', 'Encointer', 'Altair', 'Amplitude', 'Bajun', 'Basilisk', 'BifrostKusama', 'Pioneer', 'Calamari', 'CrustShadow', 'Crab', 'Imbue', 'Integritee', 'InvArchTinker', 'Karura', 'Kintsugi', 'Litmus', 'Moonriver', 'ParallelHeiko', 'Picasso', 'Quartz', 'Robonomics', 'Shiden', 'Turing', 'Unique', 'Crust', 'Manta', 'Nodle', 'NeuroWeb', 'Pendulum', 'Polkadex', 'Zeitgeist', 'Collectives', 'Khala', 'Phala', 'Subsocial', 'KiltSpiritnet', 'Curio'];
|
|
9778
9886
|
var NODES_WITH_RELAY_CHAINS = [].concat(NODE_NAMES, ['Polkadot', 'Kusama']);
|
|
9779
9887
|
var nodes = {
|
|
9780
9888
|
AssetHubPolkadot: new AssetHubPolkadot(),
|
|
@@ -9783,11 +9891,13 @@ var nodes = {
|
|
|
9783
9891
|
Unique: new Unique(),
|
|
9784
9892
|
Crust: new Crust(),
|
|
9785
9893
|
BifrostPolkadot: new BifrostPolkadot(),
|
|
9894
|
+
BridgeHubPolkadot: new BridgeHubPolkadot(),
|
|
9895
|
+
BridgeHubKusama: new BridgeHubKusama(),
|
|
9786
9896
|
Bitgreen: new Bitgreen(),
|
|
9787
9897
|
Centrifuge: new Centrifuge(),
|
|
9788
9898
|
ComposableFinance: new ComposableFinance(),
|
|
9789
9899
|
Darwinia: new Darwinia(),
|
|
9790
|
-
|
|
9900
|
+
Hydration: new Hydration(),
|
|
9791
9901
|
Interlay: new Interlay(),
|
|
9792
9902
|
Litentry: new Litentry(),
|
|
9793
9903
|
Moonbeam: new Moonbeam(),
|
|
@@ -9810,7 +9920,6 @@ var nodes = {
|
|
|
9810
9920
|
Karura: new Karura(),
|
|
9811
9921
|
Kintsugi: new Kintsugi(),
|
|
9812
9922
|
Litmus: new Litmus(),
|
|
9813
|
-
Mangata: new Mangata(),
|
|
9814
9923
|
Moonriver: new Moonriver(),
|
|
9815
9924
|
ParallelHeiko: new ParallelHeiko(),
|
|
9816
9925
|
Picasso: new Picasso(),
|
|
@@ -9847,24 +9956,54 @@ var getFees = function getFees(scenario) {
|
|
|
9847
9956
|
}
|
|
9848
9957
|
throw new Error("Fees for scenario ".concat(scenario, " are not defined."));
|
|
9849
9958
|
};
|
|
9959
|
+
var generateAddressMultiLocationV4 = function generateAddressMultiLocationV4(api, address) {
|
|
9960
|
+
var isMultiLocation = _typeof(address) === 'object';
|
|
9961
|
+
if (isMultiLocation) {
|
|
9962
|
+
return _defineProperty({}, Version.V4, address);
|
|
9963
|
+
}
|
|
9964
|
+
var isEthAddress = ethers.isAddress(address);
|
|
9965
|
+
return _defineProperty({}, Version.V4, {
|
|
9966
|
+
parents: Parents.ZERO,
|
|
9967
|
+
interior: {
|
|
9968
|
+
X1: [isEthAddress ? {
|
|
9969
|
+
AccountKey20: {
|
|
9970
|
+
key: address
|
|
9971
|
+
}
|
|
9972
|
+
} : {
|
|
9973
|
+
AccountId32: {
|
|
9974
|
+
id: createAccID(api, address),
|
|
9975
|
+
network: null
|
|
9976
|
+
}
|
|
9977
|
+
}]
|
|
9978
|
+
}
|
|
9979
|
+
});
|
|
9980
|
+
};
|
|
9981
|
+
var createX1Payload = function createX1Payload(version, junction) {
|
|
9982
|
+
if (version === Version.V4) {
|
|
9983
|
+
return {
|
|
9984
|
+
X1: [junction]
|
|
9985
|
+
};
|
|
9986
|
+
}
|
|
9987
|
+
return {
|
|
9988
|
+
X1: junction
|
|
9989
|
+
};
|
|
9990
|
+
};
|
|
9850
9991
|
var generateAddressPayload = function generateAddressPayload(api, scenario, pallet, recipientAddress, version, nodeId) {
|
|
9851
9992
|
var isMultiLocation = _typeof(recipientAddress) === 'object';
|
|
9852
9993
|
if (isMultiLocation) {
|
|
9853
9994
|
return _defineProperty({}, version, recipientAddress);
|
|
9854
9995
|
}
|
|
9855
|
-
var isEthAddress = ethers.
|
|
9996
|
+
var isEthAddress = ethers.isAddress(recipientAddress);
|
|
9856
9997
|
if (scenario === 'ParaToRelay') {
|
|
9857
9998
|
return _defineProperty({}, version, {
|
|
9858
9999
|
parents: pallet === 'XTokens' ? Parents.ONE : Parents.ZERO,
|
|
9859
|
-
interior: {
|
|
9860
|
-
|
|
9861
|
-
|
|
9862
|
-
|
|
9863
|
-
|
|
9864
|
-
|
|
9865
|
-
|
|
9866
|
-
}
|
|
9867
|
-
}
|
|
10000
|
+
interior: createX1Payload(version, {
|
|
10001
|
+
AccountId32: Object.assign(Object.assign({}, version === Version.V1 && {
|
|
10002
|
+
network: 'any'
|
|
10003
|
+
}), {
|
|
10004
|
+
id: createAccID(api, recipientAddress)
|
|
10005
|
+
})
|
|
10006
|
+
})
|
|
9868
10007
|
});
|
|
9869
10008
|
}
|
|
9870
10009
|
if (scenario === 'ParaToPara' && pallet === 'XTokens') {
|
|
@@ -9892,36 +10031,32 @@ var generateAddressPayload = function generateAddressPayload(api, scenario, pall
|
|
|
9892
10031
|
if (scenario === 'ParaToPara' && pallet === 'PolkadotXcm') {
|
|
9893
10032
|
return _defineProperty({}, version, {
|
|
9894
10033
|
parents: Parents.ZERO,
|
|
9895
|
-
interior: {
|
|
9896
|
-
|
|
9897
|
-
|
|
9898
|
-
|
|
9899
|
-
}), {
|
|
9900
|
-
key: recipientAddress
|
|
9901
|
-
})
|
|
9902
|
-
} : {
|
|
9903
|
-
AccountId32: Object.assign(Object.assign({}, version === Version.V1 && {
|
|
9904
|
-
network: 'any'
|
|
9905
|
-
}), {
|
|
9906
|
-
id: createAccID(api, recipientAddress)
|
|
9907
|
-
})
|
|
9908
|
-
}
|
|
9909
|
-
}
|
|
9910
|
-
});
|
|
9911
|
-
}
|
|
9912
|
-
return _defineProperty({}, Version.V3, {
|
|
9913
|
-
parents: Parents.ZERO,
|
|
9914
|
-
interior: {
|
|
9915
|
-
X1: isEthAddress ? {
|
|
9916
|
-
AccountKey20: {
|
|
10034
|
+
interior: createX1Payload(version, isEthAddress ? {
|
|
10035
|
+
AccountKey20: Object.assign(Object.assign({}, version === Version.V1 && {
|
|
10036
|
+
network: 'any'
|
|
10037
|
+
}), {
|
|
9917
10038
|
key: recipientAddress
|
|
9918
|
-
}
|
|
10039
|
+
})
|
|
9919
10040
|
} : {
|
|
9920
|
-
AccountId32: {
|
|
10041
|
+
AccountId32: Object.assign(Object.assign({}, version === Version.V1 && {
|
|
10042
|
+
network: 'any'
|
|
10043
|
+
}), {
|
|
9921
10044
|
id: createAccID(api, recipientAddress)
|
|
9922
|
-
}
|
|
10045
|
+
})
|
|
10046
|
+
})
|
|
10047
|
+
});
|
|
10048
|
+
}
|
|
10049
|
+
return _defineProperty({}, version, {
|
|
10050
|
+
parents: Parents.ZERO,
|
|
10051
|
+
interior: createX1Payload(version, isEthAddress ? {
|
|
10052
|
+
AccountKey20: {
|
|
10053
|
+
key: recipientAddress
|
|
9923
10054
|
}
|
|
9924
|
-
}
|
|
10055
|
+
} : {
|
|
10056
|
+
AccountId32: {
|
|
10057
|
+
id: createAccID(api, recipientAddress)
|
|
10058
|
+
}
|
|
10059
|
+
})
|
|
9925
10060
|
});
|
|
9926
10061
|
};
|
|
9927
10062
|
var getNode = function getNode(node) {
|
|
@@ -9931,8 +10066,8 @@ var getNodeEndpointOption = function getNodeEndpointOption(node) {
|
|
|
9931
10066
|
var _getNode = getNode(node),
|
|
9932
10067
|
type = _getNode.type,
|
|
9933
10068
|
name = _getNode.name;
|
|
9934
|
-
var
|
|
9935
|
-
linked =
|
|
10069
|
+
var _ref8 = type === 'polkadot' ? prodRelayPolkadot : prodRelayKusama,
|
|
10070
|
+
linked = _ref8.linked;
|
|
9936
10071
|
if (linked === undefined) return undefined;
|
|
9937
10072
|
var preferredOption = linked.find(function (o) {
|
|
9938
10073
|
return o.info === name && Object.values(o.providers).length > 0;
|
|
@@ -9943,8 +10078,8 @@ var getNodeEndpointOption = function getNodeEndpointOption(node) {
|
|
|
9943
10078
|
};
|
|
9944
10079
|
var getAllNodeProviders = function getAllNodeProviders(node) {
|
|
9945
10080
|
var _a;
|
|
9946
|
-
var
|
|
9947
|
-
providers =
|
|
10081
|
+
var _ref9 = (_a = getNodeEndpointOption(node)) !== null && _a !== void 0 ? _a : {},
|
|
10082
|
+
providers = _ref9.providers;
|
|
9948
10083
|
if (providers.length < 1) {
|
|
9949
10084
|
throw new Error("Node ".concat(node, " does not have any providers."));
|
|
9950
10085
|
}
|
|
@@ -9984,7 +10119,7 @@ var createApiInstanceForNode = function createApiInstanceForNode(node) {
|
|
|
9984
10119
|
break;
|
|
9985
10120
|
}
|
|
9986
10121
|
endpointOption = node === 'Polkadot' ? prodRelayPolkadot : prodRelayKusama;
|
|
9987
|
-
wsUrl = Object.values(endpointOption.providers)[
|
|
10122
|
+
wsUrl = Object.values(endpointOption.providers)[0];
|
|
9988
10123
|
_context2.next = 5;
|
|
9989
10124
|
return createApiInstance(wsUrl);
|
|
9990
10125
|
case 5:
|
|
@@ -10004,11 +10139,11 @@ var createApiInstanceForNode = function createApiInstanceForNode(node) {
|
|
|
10004
10139
|
var lowercaseFirstLetter = function lowercaseFirstLetter(str) {
|
|
10005
10140
|
return str.charAt(0).toLowerCase() + str.slice(1);
|
|
10006
10141
|
};
|
|
10007
|
-
var callPolkadotJsTxFunction = function callPolkadotJsTxFunction(api,
|
|
10142
|
+
var callPolkadotJsTxFunction = function callPolkadotJsTxFunction(api, _ref10) {
|
|
10008
10143
|
var _api$tx$module;
|
|
10009
|
-
var module =
|
|
10010
|
-
section =
|
|
10011
|
-
parameters =
|
|
10144
|
+
var module = _ref10.module,
|
|
10145
|
+
section = _ref10.section,
|
|
10146
|
+
parameters = _ref10.parameters;
|
|
10012
10147
|
return (_api$tx$module = api.tx[module])[section].apply(_api$tx$module, _toConsumableArray(parameters));
|
|
10013
10148
|
};
|
|
10014
10149
|
var determineRelayChain = function determineRelayChain(node) {
|
|
@@ -10083,115 +10218,117 @@ var createTx = function createTx(originApi, destApi, address, amount, currencySy
|
|
|
10083
10218
|
}, _callee);
|
|
10084
10219
|
}));
|
|
10085
10220
|
};
|
|
10086
|
-
var checkKeepAlive = function checkKeepAlive(
|
|
10087
|
-
|
|
10088
|
-
|
|
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
|
-
|
|
10221
|
+
var checkKeepAlive = function checkKeepAlive(_a) {
|
|
10222
|
+
return __awaiter(void 0, [_a], void 0, function (_ref) {
|
|
10223
|
+
var originApi = _ref.originApi,
|
|
10224
|
+
address = _ref.address,
|
|
10225
|
+
amount = _ref.amount,
|
|
10226
|
+
originNode = _ref.originNode,
|
|
10227
|
+
destApi = _ref.destApi,
|
|
10228
|
+
currencySymbol = _ref.currencySymbol,
|
|
10229
|
+
destNode = _ref.destNode;
|
|
10230
|
+
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
10231
|
+
var _yield$destApi$query$, data, balance, _yield$originApi$quer, originData, balanceOrigin, amountBN, ed, edOrigin, tx, xcmFee, amountBNWithoutFee, amountOriginBNWithoutFee;
|
|
10232
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
10233
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
10234
|
+
case 0:
|
|
10235
|
+
if (!(destApi === undefined)) {
|
|
10236
|
+
_context2.next = 2;
|
|
10237
|
+
break;
|
|
10238
|
+
}
|
|
10239
|
+
return _context2.abrupt("return");
|
|
10240
|
+
case 2:
|
|
10241
|
+
if (!(currencySymbol === undefined)) {
|
|
10242
|
+
_context2.next = 4;
|
|
10243
|
+
break;
|
|
10244
|
+
}
|
|
10245
|
+
throw new KeepAliveError('Currency symbol not found for this asset. Cannot check keep alive.');
|
|
10246
|
+
case 4:
|
|
10247
|
+
if (!(originNode !== undefined && destNode !== undefined && currencySymbol !== getAssetsObject(destNode).nativeAssetSymbol)) {
|
|
10248
|
+
_context2.next = 6;
|
|
10249
|
+
break;
|
|
10250
|
+
}
|
|
10251
|
+
throw new KeepAliveError('Keep alive check is only supported when sending native asset of destination parachain.');
|
|
10252
|
+
case 6:
|
|
10253
|
+
_context2.next = 8;
|
|
10254
|
+
return destApi.query.system.account(address);
|
|
10255
|
+
case 8:
|
|
10256
|
+
_yield$destApi$query$ = _context2.sent;
|
|
10257
|
+
data = _yield$destApi$query$.data;
|
|
10258
|
+
balance = data.free.toBn();
|
|
10259
|
+
_context2.next = 13;
|
|
10260
|
+
return originApi.query.system.account(address);
|
|
10261
|
+
case 13:
|
|
10262
|
+
_yield$originApi$quer = _context2.sent;
|
|
10263
|
+
originData = _yield$originApi$quer.data;
|
|
10264
|
+
balanceOrigin = originData.free.toBn();
|
|
10265
|
+
amountBN = new BN(amount);
|
|
10266
|
+
ed = getExistentialDeposit(destNode !== null && destNode !== void 0 ? destNode : determineRelayChain(originNode));
|
|
10267
|
+
edOrigin = getExistentialDeposit(originNode !== null && originNode !== void 0 ? originNode : determineRelayChain(destNode));
|
|
10268
|
+
_context2.next = 21;
|
|
10269
|
+
return createTx(originApi, destApi, address, amount, currencySymbol, originNode, destNode);
|
|
10270
|
+
case 21:
|
|
10271
|
+
tx = _context2.sent;
|
|
10272
|
+
if (!(tx === null)) {
|
|
10273
|
+
_context2.next = 24;
|
|
10274
|
+
break;
|
|
10275
|
+
}
|
|
10276
|
+
throw new KeepAliveError('Transaction for XCM fee calculation could not be created.');
|
|
10277
|
+
case 24:
|
|
10278
|
+
_context2.next = 26;
|
|
10279
|
+
return calculateTransactionFee$1(tx, address);
|
|
10280
|
+
case 26:
|
|
10281
|
+
xcmFee = _context2.sent;
|
|
10282
|
+
if (!(ed === null)) {
|
|
10283
|
+
_context2.next = 29;
|
|
10284
|
+
break;
|
|
10285
|
+
}
|
|
10286
|
+
throw new KeepAliveError('Existential deposit not found for destination parachain.');
|
|
10287
|
+
case 29:
|
|
10288
|
+
if (!(edOrigin === null)) {
|
|
10289
|
+
_context2.next = 31;
|
|
10290
|
+
break;
|
|
10291
|
+
}
|
|
10292
|
+
throw new KeepAliveError('Existential deposit not found for origin parachain.');
|
|
10293
|
+
case 31:
|
|
10294
|
+
console.log('XCM FEE: ', xcmFee.toString());
|
|
10295
|
+
console.log('EXISTENTIAL DEPOSIT: ', ed.toString());
|
|
10296
|
+
console.log('EXISTENTIAL DEPOSIT ORIGIN: ', edOrigin.toString());
|
|
10297
|
+
console.log('BALANCE: ', balance.toString());
|
|
10298
|
+
console.log('ORIGIN BALANCE: ', balanceOrigin.toString());
|
|
10299
|
+
console.log('AMOUNT: ', amountBN.toString());
|
|
10300
|
+
console.log('AMOUNT WITHOUT FEE: ', amountBN.sub(xcmFee.mul(new BN(1.5))).toString());
|
|
10301
|
+
console.log('BALANCE + AMOUNT WITHOUT FEE: ', balance.add(amountBN.sub(xcmFee.mul(new BN(1.5)))).toString());
|
|
10302
|
+
console.log('ORIGIN BALANCE - AMOUNT WITH FEE: ', balanceOrigin.sub(amountBN.sub(xcmFee.mul(new BN(1.5)))).toString());
|
|
10303
|
+
amountBNWithoutFee = amountBN.sub(xcmFee.mul(new BN(1.5)));
|
|
10304
|
+
if (!balance.add(amountBNWithoutFee).lt(new BN(ed))) {
|
|
10305
|
+
_context2.next = 43;
|
|
10306
|
+
break;
|
|
10307
|
+
}
|
|
10308
|
+
throw new KeepAliveError("Keep alive check failed: Sending ".concat(amount, " ").concat(currencySymbol, " to ").concat(destNode, " would result in an account balance below the required existential deposit.\n Please increase the amount to meet the minimum balance requirement of the destination chain."));
|
|
10309
|
+
case 43:
|
|
10310
|
+
amountOriginBNWithoutFee = amountBN.sub(xcmFee.mul(new BN(1.5)));
|
|
10311
|
+
if (!((currencySymbol === 'DOT' || currencySymbol === 'KSM') && balanceOrigin.sub(amountOriginBNWithoutFee).lt(new BN(edOrigin)))) {
|
|
10312
|
+
_context2.next = 46;
|
|
10313
|
+
break;
|
|
10314
|
+
}
|
|
10315
|
+
throw new KeepAliveError("Keep alive check failed: Sending ".concat(amount, " ").concat(currencySymbol, " to ").concat(destNode, " would result in an account balance below the required existential deposit on origin.\n Please decrease the amount to meet the minimum balance requirement of the origin chain."));
|
|
10316
|
+
case 46:
|
|
10317
|
+
case "end":
|
|
10318
|
+
return _context2.stop();
|
|
10319
|
+
}
|
|
10320
|
+
}, _callee2);
|
|
10321
|
+
})();
|
|
10322
|
+
});
|
|
10186
10323
|
};
|
|
10187
10324
|
|
|
10188
10325
|
var sendCommon = function sendCommon(options) {
|
|
10189
10326
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
10190
|
-
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;
|
|
10327
|
+
var _a, api, origin, currency, amount, address, destination, paraIdTo, destApiForKeepAlive, feeAsset, version, _options$serializedAp, serializedApiCallEnabled, asset, isMultiLocationDestination, isMultiLocationCurrency, originRelayChainSymbol, destinationRelayChainSymbol, supportsBridge, originNode, assetCheckEnabled, apiWithFallback, amountStr, currencyStr, currencyId;
|
|
10191
10328
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10192
10329
|
while (1) switch (_context.prev = _context.next) {
|
|
10193
10330
|
case 0:
|
|
10194
|
-
api = options.api, origin = options.origin, currency = options.currency, amount = options.amount, address = options.address, destination = options.destination, paraIdTo = options.paraIdTo, destApiForKeepAlive = options.destApiForKeepAlive, feeAsset = options.feeAsset, _options$serializedAp = options.serializedApiCallEnabled, serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
|
|
10331
|
+
api = options.api, origin = options.origin, currency = options.currency, amount = options.amount, address = options.address, destination = options.destination, paraIdTo = options.paraIdTo, destApiForKeepAlive = options.destApiForKeepAlive, feeAsset = options.feeAsset, version = options.version, _options$serializedAp = options.serializedApiCallEnabled, serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
|
|
10195
10332
|
if (!((!isTMulti(currency) || isTMultiLocation(currency)) && amount === null)) {
|
|
10196
10333
|
_context.next = 3;
|
|
10197
10334
|
break;
|
|
@@ -10245,71 +10382,72 @@ var sendCommon = function sendCommon(options) {
|
|
|
10245
10382
|
isMultiLocationDestination = _typeof(destination) === 'object';
|
|
10246
10383
|
isMultiLocationCurrency = _typeof(currency) === 'object';
|
|
10247
10384
|
if (!(destination !== undefined && !isMultiLocationDestination)) {
|
|
10248
|
-
_context.next =
|
|
10385
|
+
_context.next = 26;
|
|
10249
10386
|
break;
|
|
10250
10387
|
}
|
|
10251
10388
|
originRelayChainSymbol = getRelayChainSymbol(origin);
|
|
10252
10389
|
destinationRelayChainSymbol = getRelayChainSymbol(destination);
|
|
10253
|
-
|
|
10254
|
-
|
|
10390
|
+
supportsBridge = (origin === 'AssetHubPolkadot' || origin === 'AssetHubKusama') && (destination === 'AssetHubPolkadot' || destination === 'AssetHubKusama');
|
|
10391
|
+
if (!(!supportsBridge && originRelayChainSymbol !== destinationRelayChainSymbol)) {
|
|
10392
|
+
_context.next = 26;
|
|
10255
10393
|
break;
|
|
10256
10394
|
}
|
|
10257
10395
|
throw new IncompatibleNodesError();
|
|
10258
|
-
case
|
|
10396
|
+
case 26:
|
|
10259
10397
|
originNode = getNode(origin);
|
|
10260
10398
|
assetCheckEnabled = destination === 'AssetHubKusama' || destination === 'AssetHubPolkadot' || isMultiLocationCurrency ? false : originNode.assetCheckEnabled;
|
|
10261
10399
|
if (!(asset === null && assetCheckEnabled)) {
|
|
10262
|
-
_context.next =
|
|
10400
|
+
_context.next = 30;
|
|
10263
10401
|
break;
|
|
10264
10402
|
}
|
|
10265
10403
|
throw new InvalidCurrencyError("Origin node ".concat(origin, " does not support currency or currencyId ").concat(JSON.stringify(currency), "."));
|
|
10266
|
-
case
|
|
10404
|
+
case 30:
|
|
10267
10405
|
if (!(destination !== undefined && !isMultiLocationDestination && (asset === null || asset === void 0 ? void 0 : asset.symbol) !== undefined && assetCheckEnabled && !hasSupportForAsset(destination, asset.symbol))) {
|
|
10268
|
-
_context.next =
|
|
10406
|
+
_context.next = 32;
|
|
10269
10407
|
break;
|
|
10270
10408
|
}
|
|
10271
10409
|
throw new InvalidCurrencyError("Destination node ".concat(destination, " does not support currency or currencyId ").concat(JSON.stringify(currency), "."));
|
|
10272
|
-
case
|
|
10410
|
+
case 32:
|
|
10273
10411
|
if (!(api !== null && api !== void 0)) {
|
|
10274
|
-
_context.next =
|
|
10412
|
+
_context.next = 36;
|
|
10275
10413
|
break;
|
|
10276
10414
|
}
|
|
10277
10415
|
_context.t0 = api;
|
|
10278
|
-
_context.next =
|
|
10416
|
+
_context.next = 39;
|
|
10279
10417
|
break;
|
|
10280
|
-
case
|
|
10281
|
-
_context.next =
|
|
10418
|
+
case 36:
|
|
10419
|
+
_context.next = 38;
|
|
10282
10420
|
return createApiInstanceForNode(origin);
|
|
10283
|
-
case 37:
|
|
10284
|
-
_context.t0 = _context.sent;
|
|
10285
10421
|
case 38:
|
|
10422
|
+
_context.t0 = _context.sent;
|
|
10423
|
+
case 39:
|
|
10286
10424
|
apiWithFallback = _context.t0;
|
|
10287
10425
|
amountStr = amount === null || amount === void 0 ? void 0 : amount.toString();
|
|
10288
10426
|
if (!isTMulti(currency)) {
|
|
10289
|
-
_context.next =
|
|
10427
|
+
_context.next = 45;
|
|
10290
10428
|
break;
|
|
10291
10429
|
}
|
|
10292
10430
|
console.warn('Keep alive check is not supported when using MultiLocation as currency.');
|
|
10293
|
-
_context.next =
|
|
10431
|
+
_context.next = 55;
|
|
10294
10432
|
break;
|
|
10295
|
-
case
|
|
10433
|
+
case 45:
|
|
10296
10434
|
if (!(_typeof(address) === 'object')) {
|
|
10297
|
-
_context.next =
|
|
10435
|
+
_context.next = 49;
|
|
10298
10436
|
break;
|
|
10299
10437
|
}
|
|
10300
10438
|
console.warn('Keep alive check is not supported when using MultiLocation as address.');
|
|
10301
|
-
_context.next =
|
|
10439
|
+
_context.next = 55;
|
|
10302
10440
|
break;
|
|
10303
|
-
case
|
|
10441
|
+
case 49:
|
|
10304
10442
|
if (!(_typeof(destination) === 'object')) {
|
|
10305
|
-
_context.next =
|
|
10443
|
+
_context.next = 53;
|
|
10306
10444
|
break;
|
|
10307
10445
|
}
|
|
10308
10446
|
console.warn('Keep alive check is not supported when using MultiLocation as destination.');
|
|
10309
|
-
_context.next =
|
|
10447
|
+
_context.next = 55;
|
|
10310
10448
|
break;
|
|
10311
|
-
case
|
|
10312
|
-
_context.next =
|
|
10449
|
+
case 53:
|
|
10450
|
+
_context.next = 55;
|
|
10313
10451
|
return checkKeepAlive({
|
|
10314
10452
|
originApi: apiWithFallback,
|
|
10315
10453
|
address: address,
|
|
@@ -10319,7 +10457,7 @@ var sendCommon = function sendCommon(options) {
|
|
|
10319
10457
|
currencySymbol: (_a = asset === null || asset === void 0 ? void 0 : asset.symbol) !== null && _a !== void 0 ? _a : currency.toString(),
|
|
10320
10458
|
destNode: destination
|
|
10321
10459
|
});
|
|
10322
|
-
case
|
|
10460
|
+
case 55:
|
|
10323
10461
|
currencyStr = isTMulti(currency) ? undefined : currency.toString();
|
|
10324
10462
|
currencyId = assetCheckEnabled ? asset === null || asset === void 0 ? void 0 : asset.assetId : currencyStr;
|
|
10325
10463
|
return _context.abrupt("return", originNode.transfer({
|
|
@@ -10332,9 +10470,10 @@ var sendCommon = function sendCommon(options) {
|
|
|
10332
10470
|
paraIdTo: paraIdTo,
|
|
10333
10471
|
overridedCurrencyMultiLocation: isTMulti(currency) ? currency : undefined,
|
|
10334
10472
|
feeAsset: feeAsset,
|
|
10473
|
+
version: version,
|
|
10335
10474
|
serializedApiCallEnabled: serializedApiCallEnabled
|
|
10336
10475
|
}));
|
|
10337
|
-
case
|
|
10476
|
+
case 58:
|
|
10338
10477
|
case "end":
|
|
10339
10478
|
return _context.stop();
|
|
10340
10479
|
}
|
|
@@ -10377,11 +10516,11 @@ var send = function send(options) {
|
|
|
10377
10516
|
};
|
|
10378
10517
|
var transferRelayToParaCommon = function transferRelayToParaCommon(options) {
|
|
10379
10518
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
10380
|
-
var api, destination, amount, address, paraIdTo, destApiForKeepAlive, _options$serializedAp2, serializedApiCallEnabled, isMultiLocationDestination, isAddressMultiLocation, apiWithFallback, amountStr, serializedApiCall;
|
|
10519
|
+
var api, destination, amount, address, paraIdTo, destApiForKeepAlive, version, _options$serializedAp2, serializedApiCallEnabled, isMultiLocationDestination, isAddressMultiLocation, apiWithFallback, amountStr, serializedApiCall;
|
|
10381
10520
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
10382
10521
|
while (1) switch (_context4.prev = _context4.next) {
|
|
10383
10522
|
case 0:
|
|
10384
|
-
api = options.api, destination = options.destination, amount = options.amount, address = options.address, paraIdTo = options.paraIdTo, destApiForKeepAlive = options.destApiForKeepAlive, _options$serializedAp2 = options.serializedApiCallEnabled, serializedApiCallEnabled = _options$serializedAp2 === void 0 ? false : _options$serializedAp2;
|
|
10523
|
+
api = options.api, destination = options.destination, amount = options.amount, address = options.address, paraIdTo = options.paraIdTo, destApiForKeepAlive = options.destApiForKeepAlive, version = options.version, _options$serializedAp2 = options.serializedApiCallEnabled, serializedApiCallEnabled = _options$serializedAp2 === void 0 ? false : _options$serializedAp2;
|
|
10385
10524
|
isMultiLocationDestination = _typeof(destination) === 'object';
|
|
10386
10525
|
isAddressMultiLocation = _typeof(address) === 'object';
|
|
10387
10526
|
if (!(api === undefined && isMultiLocationDestination)) {
|
|
@@ -10437,7 +10576,8 @@ var transferRelayToParaCommon = function transferRelayToParaCommon(options) {
|
|
|
10437
10576
|
address: address,
|
|
10438
10577
|
amount: amountStr,
|
|
10439
10578
|
paraIdTo: paraIdTo,
|
|
10440
|
-
destApiForKeepAlive: destApiForKeepAlive
|
|
10579
|
+
destApiForKeepAlive: destApiForKeepAlive,
|
|
10580
|
+
version: version
|
|
10441
10581
|
});
|
|
10442
10582
|
if (!serializedApiCallEnabled) {
|
|
10443
10583
|
_context4.next = 27;
|