@paraspell/sdk 3.0.6 → 3.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +584 -104
- package/dist/index.d.ts +7 -2
- package/dist/index.mjs +583 -105
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,308 @@
|
|
|
1
|
-
import '@polkadot/api';
|
|
1
|
+
import { WsProvider, ApiPromise } from '@polkadot/api';
|
|
2
2
|
import { ethers } from 'ethers';
|
|
3
3
|
import { prodRelayPolkadot, prodRelayKusama } from '@polkadot/apps-config/endpoints';
|
|
4
4
|
|
|
5
|
+
function _regeneratorRuntime() {
|
|
6
|
+
_regeneratorRuntime = function () {
|
|
7
|
+
return e;
|
|
8
|
+
};
|
|
9
|
+
var t,
|
|
10
|
+
e = {},
|
|
11
|
+
r = Object.prototype,
|
|
12
|
+
n = r.hasOwnProperty,
|
|
13
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
14
|
+
t[e] = r.value;
|
|
15
|
+
},
|
|
16
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
17
|
+
a = i.iterator || "@@iterator",
|
|
18
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
19
|
+
u = i.toStringTag || "@@toStringTag";
|
|
20
|
+
function define(t, e, r) {
|
|
21
|
+
return Object.defineProperty(t, e, {
|
|
22
|
+
value: r,
|
|
23
|
+
enumerable: !0,
|
|
24
|
+
configurable: !0,
|
|
25
|
+
writable: !0
|
|
26
|
+
}), t[e];
|
|
27
|
+
}
|
|
28
|
+
try {
|
|
29
|
+
define({}, "");
|
|
30
|
+
} catch (t) {
|
|
31
|
+
define = function (t, e, r) {
|
|
32
|
+
return t[e] = r;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function wrap(t, e, r, n) {
|
|
36
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
37
|
+
a = Object.create(i.prototype),
|
|
38
|
+
c = new Context(n || []);
|
|
39
|
+
return o(a, "_invoke", {
|
|
40
|
+
value: makeInvokeMethod(t, r, c)
|
|
41
|
+
}), a;
|
|
42
|
+
}
|
|
43
|
+
function tryCatch(t, e, r) {
|
|
44
|
+
try {
|
|
45
|
+
return {
|
|
46
|
+
type: "normal",
|
|
47
|
+
arg: t.call(e, r)
|
|
48
|
+
};
|
|
49
|
+
} catch (t) {
|
|
50
|
+
return {
|
|
51
|
+
type: "throw",
|
|
52
|
+
arg: t
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
e.wrap = wrap;
|
|
57
|
+
var h = "suspendedStart",
|
|
58
|
+
l = "suspendedYield",
|
|
59
|
+
f = "executing",
|
|
60
|
+
s = "completed",
|
|
61
|
+
y = {};
|
|
62
|
+
function Generator() {}
|
|
63
|
+
function GeneratorFunction() {}
|
|
64
|
+
function GeneratorFunctionPrototype() {}
|
|
65
|
+
var p = {};
|
|
66
|
+
define(p, a, function () {
|
|
67
|
+
return this;
|
|
68
|
+
});
|
|
69
|
+
var d = Object.getPrototypeOf,
|
|
70
|
+
v = d && d(d(values([])));
|
|
71
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
72
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
73
|
+
function defineIteratorMethods(t) {
|
|
74
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
75
|
+
define(t, e, function (t) {
|
|
76
|
+
return this._invoke(e, t);
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function AsyncIterator(t, e) {
|
|
81
|
+
function invoke(r, o, i, a) {
|
|
82
|
+
var c = tryCatch(t[r], t, o);
|
|
83
|
+
if ("throw" !== c.type) {
|
|
84
|
+
var u = c.arg,
|
|
85
|
+
h = u.value;
|
|
86
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
87
|
+
invoke("next", t, i, a);
|
|
88
|
+
}, function (t) {
|
|
89
|
+
invoke("throw", t, i, a);
|
|
90
|
+
}) : e.resolve(h).then(function (t) {
|
|
91
|
+
u.value = t, i(u);
|
|
92
|
+
}, function (t) {
|
|
93
|
+
return invoke("throw", t, i, a);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
a(c.arg);
|
|
97
|
+
}
|
|
98
|
+
var r;
|
|
99
|
+
o(this, "_invoke", {
|
|
100
|
+
value: function (t, n) {
|
|
101
|
+
function callInvokeWithMethodAndArg() {
|
|
102
|
+
return new e(function (e, r) {
|
|
103
|
+
invoke(t, n, e, r);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function makeInvokeMethod(e, r, n) {
|
|
111
|
+
var o = h;
|
|
112
|
+
return function (i, a) {
|
|
113
|
+
if (o === f) throw new Error("Generator is already running");
|
|
114
|
+
if (o === s) {
|
|
115
|
+
if ("throw" === i) throw a;
|
|
116
|
+
return {
|
|
117
|
+
value: t,
|
|
118
|
+
done: !0
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
for (n.method = i, n.arg = a;;) {
|
|
122
|
+
var c = n.delegate;
|
|
123
|
+
if (c) {
|
|
124
|
+
var u = maybeInvokeDelegate(c, n);
|
|
125
|
+
if (u) {
|
|
126
|
+
if (u === y) continue;
|
|
127
|
+
return u;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
131
|
+
if (o === h) throw o = s, n.arg;
|
|
132
|
+
n.dispatchException(n.arg);
|
|
133
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
134
|
+
o = f;
|
|
135
|
+
var p = tryCatch(e, r, n);
|
|
136
|
+
if ("normal" === p.type) {
|
|
137
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
138
|
+
return {
|
|
139
|
+
value: p.arg,
|
|
140
|
+
done: n.done
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
function maybeInvokeDelegate(e, r) {
|
|
148
|
+
var n = r.method,
|
|
149
|
+
o = e.iterator[n];
|
|
150
|
+
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
151
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
152
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
153
|
+
var a = i.arg;
|
|
154
|
+
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
155
|
+
}
|
|
156
|
+
function pushTryEntry(t) {
|
|
157
|
+
var e = {
|
|
158
|
+
tryLoc: t[0]
|
|
159
|
+
};
|
|
160
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
161
|
+
}
|
|
162
|
+
function resetTryEntry(t) {
|
|
163
|
+
var e = t.completion || {};
|
|
164
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
165
|
+
}
|
|
166
|
+
function Context(t) {
|
|
167
|
+
this.tryEntries = [{
|
|
168
|
+
tryLoc: "root"
|
|
169
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
170
|
+
}
|
|
171
|
+
function values(e) {
|
|
172
|
+
if (e || "" === e) {
|
|
173
|
+
var r = e[a];
|
|
174
|
+
if (r) return r.call(e);
|
|
175
|
+
if ("function" == typeof e.next) return e;
|
|
176
|
+
if (!isNaN(e.length)) {
|
|
177
|
+
var o = -1,
|
|
178
|
+
i = function next() {
|
|
179
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
180
|
+
return next.value = t, next.done = !0, next;
|
|
181
|
+
};
|
|
182
|
+
return i.next = i;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
186
|
+
}
|
|
187
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
188
|
+
value: GeneratorFunctionPrototype,
|
|
189
|
+
configurable: !0
|
|
190
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
191
|
+
value: GeneratorFunction,
|
|
192
|
+
configurable: !0
|
|
193
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
194
|
+
var e = "function" == typeof t && t.constructor;
|
|
195
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
196
|
+
}, e.mark = function (t) {
|
|
197
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
198
|
+
}, e.awrap = function (t) {
|
|
199
|
+
return {
|
|
200
|
+
__await: t
|
|
201
|
+
};
|
|
202
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
203
|
+
return this;
|
|
204
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
205
|
+
void 0 === i && (i = Promise);
|
|
206
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
207
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
208
|
+
return t.done ? t.value : a.next();
|
|
209
|
+
});
|
|
210
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
211
|
+
return this;
|
|
212
|
+
}), define(g, "toString", function () {
|
|
213
|
+
return "[object Generator]";
|
|
214
|
+
}), e.keys = function (t) {
|
|
215
|
+
var e = Object(t),
|
|
216
|
+
r = [];
|
|
217
|
+
for (var n in e) r.push(n);
|
|
218
|
+
return r.reverse(), function next() {
|
|
219
|
+
for (; r.length;) {
|
|
220
|
+
var t = r.pop();
|
|
221
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
222
|
+
}
|
|
223
|
+
return next.done = !0, next;
|
|
224
|
+
};
|
|
225
|
+
}, e.values = values, Context.prototype = {
|
|
226
|
+
constructor: Context,
|
|
227
|
+
reset: function (e) {
|
|
228
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
229
|
+
},
|
|
230
|
+
stop: function () {
|
|
231
|
+
this.done = !0;
|
|
232
|
+
var t = this.tryEntries[0].completion;
|
|
233
|
+
if ("throw" === t.type) throw t.arg;
|
|
234
|
+
return this.rval;
|
|
235
|
+
},
|
|
236
|
+
dispatchException: function (e) {
|
|
237
|
+
if (this.done) throw e;
|
|
238
|
+
var r = this;
|
|
239
|
+
function handle(n, o) {
|
|
240
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
241
|
+
}
|
|
242
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
243
|
+
var i = this.tryEntries[o],
|
|
244
|
+
a = i.completion;
|
|
245
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
246
|
+
if (i.tryLoc <= this.prev) {
|
|
247
|
+
var c = n.call(i, "catchLoc"),
|
|
248
|
+
u = n.call(i, "finallyLoc");
|
|
249
|
+
if (c && u) {
|
|
250
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
251
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
252
|
+
} else if (c) {
|
|
253
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
254
|
+
} else {
|
|
255
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
256
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
abrupt: function (t, e) {
|
|
262
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
263
|
+
var o = this.tryEntries[r];
|
|
264
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
265
|
+
var i = o;
|
|
266
|
+
break;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
270
|
+
var a = i ? i.completion : {};
|
|
271
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
272
|
+
},
|
|
273
|
+
complete: function (t, e) {
|
|
274
|
+
if ("throw" === t.type) throw t.arg;
|
|
275
|
+
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
276
|
+
},
|
|
277
|
+
finish: function (t) {
|
|
278
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
279
|
+
var r = this.tryEntries[e];
|
|
280
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
catch: function (t) {
|
|
284
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
285
|
+
var r = this.tryEntries[e];
|
|
286
|
+
if (r.tryLoc === t) {
|
|
287
|
+
var n = r.completion;
|
|
288
|
+
if ("throw" === n.type) {
|
|
289
|
+
var o = n.arg;
|
|
290
|
+
resetTryEntry(r);
|
|
291
|
+
}
|
|
292
|
+
return o;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
throw new Error("illegal catch attempt");
|
|
296
|
+
},
|
|
297
|
+
delegateYield: function (e, r, n) {
|
|
298
|
+
return this.delegate = {
|
|
299
|
+
iterator: values(e),
|
|
300
|
+
resultName: r,
|
|
301
|
+
nextLoc: n
|
|
302
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
303
|
+
}
|
|
304
|
+
}, e;
|
|
305
|
+
}
|
|
5
306
|
function _toPrimitive(t, r) {
|
|
6
307
|
if ("object" != typeof t || !t) return t;
|
|
7
308
|
var e = t[Symbol.toPrimitive];
|
|
@@ -211,6 +512,16 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
211
512
|
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
212
513
|
|
|
213
514
|
|
|
515
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
516
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
517
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
518
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
519
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
520
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
521
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
|
|
214
525
|
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
215
526
|
var e = new Error(message);
|
|
216
527
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
@@ -834,6 +1145,11 @@ var ComposableFinance$2 = {
|
|
|
834
1145
|
symbol: "BNC Kusama",
|
|
835
1146
|
decimals: 12
|
|
836
1147
|
},
|
|
1148
|
+
{
|
|
1149
|
+
assetId: "79228162514264337593543950355",
|
|
1150
|
+
symbol: "TIA",
|
|
1151
|
+
decimals: 6
|
|
1152
|
+
},
|
|
837
1153
|
{
|
|
838
1154
|
assetId: "79228162514264337593543950338",
|
|
839
1155
|
symbol: "LAYR",
|
|
@@ -854,6 +1170,16 @@ var ComposableFinance$2 = {
|
|
|
854
1170
|
symbol: "OSMO",
|
|
855
1171
|
decimals: 6
|
|
856
1172
|
},
|
|
1173
|
+
{
|
|
1174
|
+
assetId: "79228162514264337593543950359",
|
|
1175
|
+
symbol: "MOVR",
|
|
1176
|
+
decimals: 18
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
assetId: "79228162514264337593543950361",
|
|
1180
|
+
symbol: "IST",
|
|
1181
|
+
decimals: 6
|
|
1182
|
+
},
|
|
857
1183
|
{
|
|
858
1184
|
assetId: "79228162514264337593543950463",
|
|
859
1185
|
symbol: "EQD",
|
|
@@ -883,6 +1209,11 @@ var ComposableFinance$2 = {
|
|
|
883
1209
|
assetId: "79228162514264337593543950369",
|
|
884
1210
|
symbol: "BNC Polkadot",
|
|
885
1211
|
decimals: 10
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
assetId: "79228162514264337593543950354",
|
|
1215
|
+
symbol: "BLD",
|
|
1216
|
+
decimals: 6
|
|
886
1217
|
}
|
|
887
1218
|
]
|
|
888
1219
|
};
|
|
@@ -928,6 +1259,11 @@ var HydraDX$2 = {
|
|
|
928
1259
|
symbol: "DOT",
|
|
929
1260
|
decimals: 10
|
|
930
1261
|
},
|
|
1262
|
+
{
|
|
1263
|
+
assetId: "100",
|
|
1264
|
+
symbol: "4-Pool",
|
|
1265
|
+
decimals: 18
|
|
1266
|
+
},
|
|
931
1267
|
{
|
|
932
1268
|
assetId: "8",
|
|
933
1269
|
symbol: "PHA",
|
|
@@ -968,6 +1304,11 @@ var HydraDX$2 = {
|
|
|
968
1304
|
symbol: "vDOT",
|
|
969
1305
|
decimals: 10
|
|
970
1306
|
},
|
|
1307
|
+
{
|
|
1308
|
+
assetId: "24",
|
|
1309
|
+
symbol: "SUB",
|
|
1310
|
+
decimals: 10
|
|
1311
|
+
},
|
|
971
1312
|
{
|
|
972
1313
|
assetId: "22",
|
|
973
1314
|
symbol: "USDC",
|
|
@@ -1161,6 +1502,11 @@ var Moonbeam$2 = {
|
|
|
1161
1502
|
symbol: "ZTG",
|
|
1162
1503
|
decimals: 10
|
|
1163
1504
|
},
|
|
1505
|
+
{
|
|
1506
|
+
assetId: "90225766094594282577230355136633846906",
|
|
1507
|
+
symbol: "PDEX",
|
|
1508
|
+
decimals: 12
|
|
1509
|
+
},
|
|
1164
1510
|
{
|
|
1165
1511
|
assetId: "144012926827374458669278577633504620722",
|
|
1166
1512
|
symbol: "FIL",
|
|
@@ -1196,6 +1542,11 @@ var Moonbeam$2 = {
|
|
|
1196
1542
|
symbol: "vDOT",
|
|
1197
1543
|
decimals: 10
|
|
1198
1544
|
},
|
|
1545
|
+
{
|
|
1546
|
+
assetId: "225719522181998468294117309041779353812",
|
|
1547
|
+
symbol: "LDOT",
|
|
1548
|
+
decimals: 10
|
|
1549
|
+
},
|
|
1199
1550
|
{
|
|
1200
1551
|
assetId: "224077081838586484055667086558292981199",
|
|
1201
1552
|
symbol: "ASTR",
|
|
@@ -1261,6 +1612,11 @@ var Moonbeam$2 = {
|
|
|
1261
1612
|
symbol: "DOT",
|
|
1262
1613
|
decimals: 10
|
|
1263
1614
|
},
|
|
1615
|
+
{
|
|
1616
|
+
assetId: "45647473099451451833602657905356404688",
|
|
1617
|
+
symbol: "PEN",
|
|
1618
|
+
decimals: 12
|
|
1619
|
+
},
|
|
1264
1620
|
{
|
|
1265
1621
|
assetId: "224821240862170613278369189818311486111",
|
|
1266
1622
|
symbol: "ACA",
|
|
@@ -1515,6 +1871,11 @@ var AssetHubPolkadot$2 = {
|
|
|
1515
1871
|
symbol: "WBTC",
|
|
1516
1872
|
decimals: 8
|
|
1517
1873
|
},
|
|
1874
|
+
{
|
|
1875
|
+
assetId: "20",
|
|
1876
|
+
symbol: "StabCP",
|
|
1877
|
+
decimals: 10
|
|
1878
|
+
},
|
|
1518
1879
|
{
|
|
1519
1880
|
assetId: "999",
|
|
1520
1881
|
symbol: "gold",
|
|
@@ -1560,11 +1921,6 @@ var AssetHubPolkadot$2 = {
|
|
|
1560
1921
|
symbol: "VSC",
|
|
1561
1922
|
decimals: 9
|
|
1562
1923
|
},
|
|
1563
|
-
{
|
|
1564
|
-
assetId: "19760401",
|
|
1565
|
-
symbol: "APPL",
|
|
1566
|
-
decimals: 0
|
|
1567
|
-
},
|
|
1568
1924
|
{
|
|
1569
1925
|
assetId: "5",
|
|
1570
1926
|
symbol: "PLX",
|
|
@@ -1585,11 +1941,21 @@ var AssetHubPolkadot$2 = {
|
|
|
1585
1941
|
symbol: "BTC",
|
|
1586
1942
|
decimals: 20
|
|
1587
1943
|
},
|
|
1944
|
+
{
|
|
1945
|
+
assetId: "79",
|
|
1946
|
+
symbol: "PGOLD",
|
|
1947
|
+
decimals: 7
|
|
1948
|
+
},
|
|
1588
1949
|
{
|
|
1589
1950
|
assetId: "777",
|
|
1590
1951
|
symbol: "777",
|
|
1591
1952
|
decimals: 20
|
|
1592
1953
|
},
|
|
1954
|
+
{
|
|
1955
|
+
assetId: "2023",
|
|
1956
|
+
symbol: "dot",
|
|
1957
|
+
decimals: 0
|
|
1958
|
+
},
|
|
1593
1959
|
{
|
|
1594
1960
|
assetId: "8",
|
|
1595
1961
|
symbol: "JOE",
|
|
@@ -1600,11 +1966,6 @@ var AssetHubPolkadot$2 = {
|
|
|
1600
1966
|
symbol: "BRZ",
|
|
1601
1967
|
decimals: 6
|
|
1602
1968
|
},
|
|
1603
|
-
{
|
|
1604
|
-
assetId: "19120101",
|
|
1605
|
-
symbol: "NTDC",
|
|
1606
|
-
decimals: 0
|
|
1607
|
-
},
|
|
1608
1969
|
{
|
|
1609
1970
|
assetId: "1",
|
|
1610
1971
|
symbol: "no1",
|
|
@@ -1630,6 +1991,11 @@ var AssetHubPolkadot$2 = {
|
|
|
1630
1991
|
symbol: "DANGER",
|
|
1631
1992
|
decimals: 8
|
|
1632
1993
|
},
|
|
1994
|
+
{
|
|
1995
|
+
assetId: "23",
|
|
1996
|
+
symbol: "PINK",
|
|
1997
|
+
decimals: 10
|
|
1998
|
+
},
|
|
1633
1999
|
{
|
|
1634
2000
|
assetId: "9",
|
|
1635
2001
|
symbol: "PINT",
|
|
@@ -2356,8 +2722,8 @@ var Mangata$2 = {
|
|
|
2356
2722
|
decimals: 6
|
|
2357
2723
|
},
|
|
2358
2724
|
{
|
|
2359
|
-
assetId: "
|
|
2360
|
-
symbol: "
|
|
2725
|
+
assetId: "48",
|
|
2726
|
+
symbol: "TKN0x00000007-TKN0x0000000E",
|
|
2361
2727
|
decimals: 18
|
|
2362
2728
|
},
|
|
2363
2729
|
{
|
|
@@ -2365,26 +2731,6 @@ var Mangata$2 = {
|
|
|
2365
2731
|
symbol: "TUR",
|
|
2366
2732
|
decimals: 10
|
|
2367
2733
|
},
|
|
2368
|
-
{
|
|
2369
|
-
assetId: "35",
|
|
2370
|
-
symbol: "TKN0x0000000E-TKN0x0000001F",
|
|
2371
|
-
decimals: 18
|
|
2372
|
-
},
|
|
2373
|
-
{
|
|
2374
|
-
assetId: "37",
|
|
2375
|
-
symbol: "TKN0x0000001F-TKN0x0000001E",
|
|
2376
|
-
decimals: 18
|
|
2377
|
-
},
|
|
2378
|
-
{
|
|
2379
|
-
assetId: "20",
|
|
2380
|
-
symbol: "TKN0x00000004-TKN0x0000000E",
|
|
2381
|
-
decimals: 18
|
|
2382
|
-
},
|
|
2383
|
-
{
|
|
2384
|
-
assetId: "38",
|
|
2385
|
-
symbol: "TKN0x00000007-TKN0x0000000E",
|
|
2386
|
-
decimals: 18
|
|
2387
|
-
},
|
|
2388
2734
|
{
|
|
2389
2735
|
assetId: "13",
|
|
2390
2736
|
symbol: "TKN0x0000000B-TKN0x00000004",
|
|
@@ -2400,16 +2746,6 @@ var Mangata$2 = {
|
|
|
2400
2746
|
symbol: "TKN0x00000004-TKN0x00000000",
|
|
2401
2747
|
decimals: 18
|
|
2402
2748
|
},
|
|
2403
|
-
{
|
|
2404
|
-
assetId: "41",
|
|
2405
|
-
symbol: "TKN0x00000000-TKN0x0000001E",
|
|
2406
|
-
decimals: 18
|
|
2407
|
-
},
|
|
2408
|
-
{
|
|
2409
|
-
assetId: "44",
|
|
2410
|
-
symbol: "TKN0x0000000B-TKN0x00000007",
|
|
2411
|
-
decimals: 18
|
|
2412
|
-
},
|
|
2413
2749
|
{
|
|
2414
2750
|
assetId: "8",
|
|
2415
2751
|
symbol: "TKN0x00000000-TKN0x00000007",
|
|
@@ -2480,26 +2816,6 @@ var Mangata$2 = {
|
|
|
2480
2816
|
symbol: "TKN0x0000001E-TKN0x00000000",
|
|
2481
2817
|
decimals: 18
|
|
2482
2818
|
},
|
|
2483
|
-
{
|
|
2484
|
-
assetId: "24",
|
|
2485
|
-
symbol: "TKN0x0000000F-TKN0x00000000",
|
|
2486
|
-
decimals: 18
|
|
2487
|
-
},
|
|
2488
|
-
{
|
|
2489
|
-
assetId: "22",
|
|
2490
|
-
symbol: "TKN0x00000010-TKN0x0000000F",
|
|
2491
|
-
decimals: 18
|
|
2492
|
-
},
|
|
2493
|
-
{
|
|
2494
|
-
assetId: "29",
|
|
2495
|
-
symbol: "TKN0x00000004-TKN0x0000000E",
|
|
2496
|
-
decimals: 18
|
|
2497
|
-
},
|
|
2498
|
-
{
|
|
2499
|
-
assetId: "10",
|
|
2500
|
-
symbol: "TKN0x00000005-TKN0x00000000",
|
|
2501
|
-
decimals: 18
|
|
2502
|
-
},
|
|
2503
2819
|
{
|
|
2504
2820
|
assetId: "27",
|
|
2505
2821
|
symbol: "TKN0x0000001A-TKN0x00000000",
|
|
@@ -2535,11 +2851,6 @@ var Mangata$2 = {
|
|
|
2535
2851
|
symbol: "TKN0x00000000-TKN0x0000000E",
|
|
2536
2852
|
decimals: 18
|
|
2537
2853
|
},
|
|
2538
|
-
{
|
|
2539
|
-
assetId: "18",
|
|
2540
|
-
symbol: "TKN0x00000010-TKN0x00000000",
|
|
2541
|
-
decimals: 18
|
|
2542
|
-
},
|
|
2543
2854
|
{
|
|
2544
2855
|
assetId: "23",
|
|
2545
2856
|
symbol: "vBNC",
|
|
@@ -2560,11 +2871,6 @@ var Mangata$2 = {
|
|
|
2560
2871
|
symbol: "TKN0x00000004-TKN0x0000001E",
|
|
2561
2872
|
decimals: 18
|
|
2562
2873
|
},
|
|
2563
|
-
{
|
|
2564
|
-
assetId: "25",
|
|
2565
|
-
symbol: "TKN0x00000010-TKN0x00000000",
|
|
2566
|
-
decimals: 18
|
|
2567
|
-
},
|
|
2568
2874
|
{
|
|
2569
2875
|
assetId: "12",
|
|
2570
2876
|
symbol: "TKN0x00000000-TKN0x0000000B",
|
|
@@ -2574,16 +2880,6 @@ var Mangata$2 = {
|
|
|
2574
2880
|
assetId: "42",
|
|
2575
2881
|
symbol: "TKN0x00000004-TKN0x0000000E",
|
|
2576
2882
|
decimals: 18
|
|
2577
|
-
},
|
|
2578
|
-
{
|
|
2579
|
-
assetId: "36",
|
|
2580
|
-
symbol: "TKN0x00000000-TKN0x0000001E",
|
|
2581
|
-
decimals: 18
|
|
2582
|
-
},
|
|
2583
|
-
{
|
|
2584
|
-
assetId: "46",
|
|
2585
|
-
symbol: "TKN0x00000000-TKN0x0000002D",
|
|
2586
|
-
decimals: 18
|
|
2587
2883
|
}
|
|
2588
2884
|
]
|
|
2589
2885
|
};
|
|
@@ -2667,6 +2963,11 @@ var Moonriver$2 = {
|
|
|
2667
2963
|
symbol: "KINT",
|
|
2668
2964
|
decimals: 12
|
|
2669
2965
|
},
|
|
2966
|
+
{
|
|
2967
|
+
assetId: "167283995827706324502761431814209211090",
|
|
2968
|
+
symbol: "PICA",
|
|
2969
|
+
decimals: 12
|
|
2970
|
+
},
|
|
2670
2971
|
{
|
|
2671
2972
|
assetId: "105075627293246237499203909093923548958",
|
|
2672
2973
|
symbol: "TEER",
|
|
@@ -2896,6 +3197,11 @@ var Picasso$2 = {
|
|
|
2896
3197
|
symbol: "DOT_BLD_LPT",
|
|
2897
3198
|
decimals: 12
|
|
2898
3199
|
},
|
|
3200
|
+
{
|
|
3201
|
+
assetId: "26",
|
|
3202
|
+
symbol: "USK",
|
|
3203
|
+
decimals: 6
|
|
3204
|
+
},
|
|
2899
3205
|
{
|
|
2900
3206
|
assetId: "1088357900348863545360",
|
|
2901
3207
|
symbol: "ASTR_SDN_LPT",
|
|
@@ -2911,6 +3217,16 @@ var Picasso$2 = {
|
|
|
2911
3217
|
symbol: "SILK",
|
|
2912
3218
|
decimals: 6
|
|
2913
3219
|
},
|
|
3220
|
+
{
|
|
3221
|
+
assetId: "29",
|
|
3222
|
+
symbol: "QCK",
|
|
3223
|
+
decimals: 6
|
|
3224
|
+
},
|
|
3225
|
+
{
|
|
3226
|
+
assetId: "23",
|
|
3227
|
+
symbol: "MOVR",
|
|
3228
|
+
decimals: 18
|
|
3229
|
+
},
|
|
2914
3230
|
{
|
|
2915
3231
|
assetId: "130",
|
|
2916
3232
|
symbol: "USDT",
|
|
@@ -2966,6 +3282,11 @@ var Picasso$2 = {
|
|
|
2966
3282
|
symbol: "EQD",
|
|
2967
3283
|
decimals: 9
|
|
2968
3284
|
},
|
|
3285
|
+
{
|
|
3286
|
+
assetId: "20",
|
|
3287
|
+
symbol: "lsKSM",
|
|
3288
|
+
decimals: 12
|
|
3289
|
+
},
|
|
2969
3290
|
{
|
|
2970
3291
|
assetId: "8",
|
|
2971
3292
|
symbol: "OSMO",
|
|
@@ -3026,11 +3347,21 @@ var Picasso$2 = {
|
|
|
3026
3347
|
symbol: "UMEE",
|
|
3027
3348
|
decimals: 6
|
|
3028
3349
|
},
|
|
3350
|
+
{
|
|
3351
|
+
assetId: "1088357900348863545366",
|
|
3352
|
+
symbol: "DOT_TIA_LPT",
|
|
3353
|
+
decimals: 12
|
|
3354
|
+
},
|
|
3029
3355
|
{
|
|
3030
3356
|
assetId: "2011",
|
|
3031
3357
|
symbol: "EQ",
|
|
3032
3358
|
decimals: 9
|
|
3033
3359
|
},
|
|
3360
|
+
{
|
|
3361
|
+
assetId: "25",
|
|
3362
|
+
symbol: "IST",
|
|
3363
|
+
decimals: 6
|
|
3364
|
+
},
|
|
3034
3365
|
{
|
|
3035
3366
|
assetId: "13",
|
|
3036
3367
|
symbol: "CRE",
|
|
@@ -3056,6 +3387,11 @@ var Picasso$2 = {
|
|
|
3056
3387
|
symbol: "DOT_PICA_LPT",
|
|
3057
3388
|
decimals: 12
|
|
3058
3389
|
},
|
|
3390
|
+
{
|
|
3391
|
+
assetId: "28",
|
|
3392
|
+
symbol: "KUJI",
|
|
3393
|
+
decimals: 6
|
|
3394
|
+
},
|
|
3059
3395
|
{
|
|
3060
3396
|
assetId: "4",
|
|
3061
3397
|
symbol: "KSM",
|
|
@@ -3071,6 +3407,16 @@ var Picasso$2 = {
|
|
|
3071
3407
|
symbol: "KSM_USDT_LPT",
|
|
3072
3408
|
decimals: 12
|
|
3073
3409
|
},
|
|
3410
|
+
{
|
|
3411
|
+
assetId: "24",
|
|
3412
|
+
symbol: "INJ",
|
|
3413
|
+
decimals: 18
|
|
3414
|
+
},
|
|
3415
|
+
{
|
|
3416
|
+
assetId: "19",
|
|
3417
|
+
symbol: "TIA",
|
|
3418
|
+
decimals: 6
|
|
3419
|
+
},
|
|
3074
3420
|
{
|
|
3075
3421
|
assetId: "1088357900348863545364",
|
|
3076
3422
|
symbol: "DOT_vKSM_LPT",
|
|
@@ -3656,6 +4002,11 @@ var AssetHubKusama$2 = {
|
|
|
3656
4002
|
symbol: "GOOSE",
|
|
3657
4003
|
decimals: 12
|
|
3658
4004
|
},
|
|
4005
|
+
{
|
|
4006
|
+
assetId: "131313",
|
|
4007
|
+
symbol: "DMO",
|
|
4008
|
+
decimals: 3
|
|
4009
|
+
},
|
|
3659
4010
|
{
|
|
3660
4011
|
assetId: "71",
|
|
3661
4012
|
symbol: "OAK",
|
|
@@ -3706,11 +4057,6 @@ var AssetHubKusama$2 = {
|
|
|
3706
4057
|
symbol: "TNKR",
|
|
3707
4058
|
decimals: 10
|
|
3708
4059
|
},
|
|
3709
|
-
{
|
|
3710
|
-
assetId: "70",
|
|
3711
|
-
symbol: "MAR",
|
|
3712
|
-
decimals: 5
|
|
3713
|
-
},
|
|
3714
4060
|
{
|
|
3715
4061
|
assetId: "13",
|
|
3716
4062
|
symbol: "LN",
|
|
@@ -3876,6 +4222,11 @@ var AssetHubKusama$2 = {
|
|
|
3876
4222
|
symbol: "ADVERT",
|
|
3877
4223
|
decimals: 10
|
|
3878
4224
|
},
|
|
4225
|
+
{
|
|
4226
|
+
assetId: "1313",
|
|
4227
|
+
symbol: "TACP",
|
|
4228
|
+
decimals: 2
|
|
4229
|
+
},
|
|
3879
4230
|
{
|
|
3880
4231
|
assetId: "24",
|
|
3881
4232
|
symbol: "test",
|
|
@@ -3986,6 +4337,11 @@ var AssetHubKusama$2 = {
|
|
|
3986
4337
|
symbol: "MTS",
|
|
3987
4338
|
decimals: 8
|
|
3988
4339
|
},
|
|
4340
|
+
{
|
|
4341
|
+
assetId: "3327",
|
|
4342
|
+
symbol: "MVPW",
|
|
4343
|
+
decimals: 9
|
|
4344
|
+
},
|
|
3989
4345
|
{
|
|
3990
4346
|
assetId: "1337",
|
|
3991
4347
|
symbol: "TIP",
|
|
@@ -4071,6 +4427,11 @@ var AssetHubKusama$2 = {
|
|
|
4071
4427
|
symbol: "0xe299a5e299a5e299a5",
|
|
4072
4428
|
decimals: 10
|
|
4073
4429
|
},
|
|
4430
|
+
{
|
|
4431
|
+
assetId: "3328",
|
|
4432
|
+
symbol: "A42",
|
|
4433
|
+
decimals: 6
|
|
4434
|
+
},
|
|
4074
4435
|
{
|
|
4075
4436
|
assetId: "9",
|
|
4076
4437
|
symbol: "TOT",
|
|
@@ -4466,13 +4827,13 @@ var Polkadex$2 = {
|
|
|
4466
4827
|
],
|
|
4467
4828
|
otherAssets: [
|
|
4468
4829
|
{
|
|
4469
|
-
assetId: "
|
|
4830
|
+
assetId: "226557799181424065994173367616174607641"
|
|
4470
4831
|
},
|
|
4471
4832
|
{
|
|
4472
|
-
assetId: "
|
|
4833
|
+
assetId: "193492391581201937291053139015355410612"
|
|
4473
4834
|
},
|
|
4474
4835
|
{
|
|
4475
|
-
assetId: "
|
|
4836
|
+
assetId: "14826654563114266286226336203450732505"
|
|
4476
4837
|
},
|
|
4477
4838
|
{
|
|
4478
4839
|
assetId: "222121451965151777636299756141619631150"
|
|
@@ -4481,13 +4842,16 @@ var Polkadex$2 = {
|
|
|
4481
4842
|
assetId: "95930534000017180603917534864279132680"
|
|
4482
4843
|
},
|
|
4483
4844
|
{
|
|
4484
|
-
assetId: "
|
|
4845
|
+
assetId: "3496813586714279103986568049643838918"
|
|
4485
4846
|
},
|
|
4486
4847
|
{
|
|
4487
|
-
assetId: "
|
|
4848
|
+
assetId: "32595388462891559990827225517299393930"
|
|
4488
4849
|
},
|
|
4489
4850
|
{
|
|
4490
|
-
assetId: "
|
|
4851
|
+
assetId: "182269558229932594457975666948556356791"
|
|
4852
|
+
},
|
|
4853
|
+
{
|
|
4854
|
+
assetId: "240851462719321838889739625279903325250"
|
|
4491
4855
|
}
|
|
4492
4856
|
]
|
|
4493
4857
|
};
|
|
@@ -4501,6 +4865,11 @@ var Zeitgeist$2 = {
|
|
|
4501
4865
|
}
|
|
4502
4866
|
],
|
|
4503
4867
|
otherAssets: [
|
|
4868
|
+
{
|
|
4869
|
+
assetId: "1",
|
|
4870
|
+
symbol: "USDC",
|
|
4871
|
+
decimals: 6
|
|
4872
|
+
},
|
|
4504
4873
|
{
|
|
4505
4874
|
assetId: "0",
|
|
4506
4875
|
symbol: "DOT",
|
|
@@ -4782,6 +5151,29 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
4782
5151
|
parameters: constructRelayToParaParameters(options, Version.V3)
|
|
4783
5152
|
};
|
|
4784
5153
|
}
|
|
5154
|
+
}, {
|
|
5155
|
+
key: "getProvider",
|
|
5156
|
+
value: function getProvider() {
|
|
5157
|
+
return getAllNodeProviders(this.node)[0];
|
|
5158
|
+
}
|
|
5159
|
+
}, {
|
|
5160
|
+
key: "createApiInstance",
|
|
5161
|
+
value: function createApiInstance$1() {
|
|
5162
|
+
return __awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
5163
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
5164
|
+
while (1) switch (_context.prev = _context.next) {
|
|
5165
|
+
case 0:
|
|
5166
|
+
_context.next = 2;
|
|
5167
|
+
return createApiInstance(this.getProvider());
|
|
5168
|
+
case 2:
|
|
5169
|
+
return _context.abrupt("return", _context.sent);
|
|
5170
|
+
case 3:
|
|
5171
|
+
case "end":
|
|
5172
|
+
return _context.stop();
|
|
5173
|
+
}
|
|
5174
|
+
}, _callee, this);
|
|
5175
|
+
}));
|
|
5176
|
+
}
|
|
4785
5177
|
}]);
|
|
4786
5178
|
return ParachainNode;
|
|
4787
5179
|
}();
|
|
@@ -4833,6 +5225,12 @@ var Acala$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4833
5225
|
};
|
|
4834
5226
|
return XTokensTransferImpl.transferXTokens(input, currencySelection);
|
|
4835
5227
|
}
|
|
5228
|
+
}, {
|
|
5229
|
+
key: "getProvider",
|
|
5230
|
+
value: function getProvider() {
|
|
5231
|
+
// Return the second WebSocket URL because the first one is sometimes unreliable.
|
|
5232
|
+
return getAllNodeProviders(this.node)[1];
|
|
5233
|
+
}
|
|
4836
5234
|
}]);
|
|
4837
5235
|
return Acala;
|
|
4838
5236
|
}(ParachainNode);
|
|
@@ -4910,10 +5308,7 @@ var BifrostPolkadot$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4910
5308
|
_createClass(BifrostPolkadot, [{
|
|
4911
5309
|
key: "transferXTokens",
|
|
4912
5310
|
value: function transferXTokens(input) {
|
|
4913
|
-
|
|
4914
|
-
var currencySelection = {
|
|
4915
|
-
Native: input.currency
|
|
4916
|
-
};
|
|
5311
|
+
var currencySelection = _defineProperty({}, input.currency === 'BNC' ? 'Native' : 'Token', input.currency);
|
|
4917
5312
|
return XTokensTransferImpl.transferXTokens(input, currencySelection);
|
|
4918
5313
|
}
|
|
4919
5314
|
}]);
|
|
@@ -5320,6 +5715,30 @@ var Mangata$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
5320
5715
|
value: function transferXTokens(input) {
|
|
5321
5716
|
return XTokensTransferImpl.transferXTokens(input, input.currencyID);
|
|
5322
5717
|
}
|
|
5718
|
+
}, {
|
|
5719
|
+
key: "createApiInstance",
|
|
5720
|
+
value: function createApiInstance() {
|
|
5721
|
+
return __awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
5722
|
+
var MangataSDK, instance;
|
|
5723
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
5724
|
+
while (1) switch (_context.prev = _context.next) {
|
|
5725
|
+
case 0:
|
|
5726
|
+
_context.next = 2;
|
|
5727
|
+
return import('@mangata-finance/sdk');
|
|
5728
|
+
case 2:
|
|
5729
|
+
MangataSDK = _context.sent;
|
|
5730
|
+
instance = MangataSDK.Mangata.instance([this.getProvider()]);
|
|
5731
|
+
_context.next = 6;
|
|
5732
|
+
return instance.api();
|
|
5733
|
+
case 6:
|
|
5734
|
+
return _context.abrupt("return", _context.sent);
|
|
5735
|
+
case 7:
|
|
5736
|
+
case "end":
|
|
5737
|
+
return _context.stop();
|
|
5738
|
+
}
|
|
5739
|
+
}, _callee, this);
|
|
5740
|
+
}));
|
|
5741
|
+
}
|
|
5323
5742
|
}]);
|
|
5324
5743
|
return Mangata;
|
|
5325
5744
|
}(ParachainNode);
|
|
@@ -5532,6 +5951,12 @@ var Karura$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
5532
5951
|
};
|
|
5533
5952
|
return XTokensTransferImpl.transferXTokens(input, currencySelection);
|
|
5534
5953
|
}
|
|
5954
|
+
}, {
|
|
5955
|
+
key: "getProvider",
|
|
5956
|
+
value: function getProvider() {
|
|
5957
|
+
// Return the second WebSocket URL because the first one is sometimes unreliable.
|
|
5958
|
+
return getAllNodeProviders(this.node)[1];
|
|
5959
|
+
}
|
|
5535
5960
|
}]);
|
|
5536
5961
|
return Karura;
|
|
5537
5962
|
}(ParachainNode);
|
|
@@ -5942,6 +6367,7 @@ var Zeitgeist$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
5942
6367
|
|
|
5943
6368
|
// Contains supported Parachains and exports supported XCM Pallets
|
|
5944
6369
|
var NODE_NAMES = ['AssetHubPolkadot', 'Acala', 'Astar', 'BifrostPolkadot', 'Bitgreen', 'Centrifuge', 'Clover', 'ComposableFinance', 'Darwinia', 'HydraDX', 'Interlay', 'Kylin', 'Litentry', 'Moonbeam', 'Parallel', 'AssetHubKusama', 'Encointer', 'Altair', 'Amplitude', 'Bajun', 'Basilisk', 'BifrostKusama', 'Pioneer', 'Calamari', 'CrustShadow', 'Crab', 'Imbue', 'Integritee', 'InvArchTinker', 'Karura', 'Kintsugi', 'Litmus', 'Mangata', 'Moonriver', 'ParallelHeiko', 'Picasso', 'Quartz', 'Robonomics', 'Shiden', 'Turing', 'Equilibrium', 'Unique', 'Crust', 'Manta', 'Genshiro', 'Nodle', 'OriginTrail', 'Pendulum', 'Polkadex', 'Zeitgeist'];
|
|
6370
|
+
var NODES_WITH_RELAY_CHAINS = [].concat(NODE_NAMES, ['Polkadot', 'Kusama']);
|
|
5945
6371
|
var nodes = {
|
|
5946
6372
|
AssetHubPolkadot: new AssetHubPolkadot$1(),
|
|
5947
6373
|
Acala: new Acala$1(),
|
|
@@ -6211,11 +6637,61 @@ var getAllNodeProviders = function getAllNodeProviders(node) {
|
|
|
6211
6637
|
var _a;
|
|
6212
6638
|
var _ref10 = (_a = getNodeEndpointOption(node)) !== null && _a !== void 0 ? _a : {},
|
|
6213
6639
|
providers = _ref10.providers;
|
|
6640
|
+
if (providers.length < 1) {
|
|
6641
|
+
throw new Error("Node ".concat(node, " does not have any providers."));
|
|
6642
|
+
}
|
|
6214
6643
|
return Object.values(providers !== null && providers !== void 0 ? providers : []);
|
|
6215
6644
|
};
|
|
6216
6645
|
var getNodeProvider = function getNodeProvider(node) {
|
|
6217
|
-
|
|
6218
|
-
|
|
6646
|
+
return getNode(node).getProvider();
|
|
6647
|
+
};
|
|
6648
|
+
var createApiInstance = function createApiInstance(wsUrl) {
|
|
6649
|
+
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
6650
|
+
var wsProvider;
|
|
6651
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
6652
|
+
while (1) switch (_context.prev = _context.next) {
|
|
6653
|
+
case 0:
|
|
6654
|
+
wsProvider = new WsProvider(wsUrl);
|
|
6655
|
+
_context.next = 3;
|
|
6656
|
+
return ApiPromise.create({
|
|
6657
|
+
provider: wsProvider
|
|
6658
|
+
});
|
|
6659
|
+
case 3:
|
|
6660
|
+
return _context.abrupt("return", _context.sent);
|
|
6661
|
+
case 4:
|
|
6662
|
+
case "end":
|
|
6663
|
+
return _context.stop();
|
|
6664
|
+
}
|
|
6665
|
+
}, _callee);
|
|
6666
|
+
}));
|
|
6667
|
+
};
|
|
6668
|
+
var createApiInstanceForNode = function createApiInstanceForNode(node) {
|
|
6669
|
+
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
6670
|
+
var endpointOption, wsUrl;
|
|
6671
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
6672
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
6673
|
+
case 0:
|
|
6674
|
+
if (!(node === 'Polkadot' || node === 'Kusama')) {
|
|
6675
|
+
_context2.next = 6;
|
|
6676
|
+
break;
|
|
6677
|
+
}
|
|
6678
|
+
endpointOption = node === 'Polkadot' ? prodRelayPolkadot : prodRelayKusama;
|
|
6679
|
+
wsUrl = Object.values(endpointOption.providers)[0];
|
|
6680
|
+
_context2.next = 5;
|
|
6681
|
+
return createApiInstance(wsUrl);
|
|
6682
|
+
case 5:
|
|
6683
|
+
return _context2.abrupt("return", _context2.sent);
|
|
6684
|
+
case 6:
|
|
6685
|
+
_context2.next = 8;
|
|
6686
|
+
return getNode(node).createApiInstance();
|
|
6687
|
+
case 8:
|
|
6688
|
+
return _context2.abrupt("return", _context2.sent);
|
|
6689
|
+
case 9:
|
|
6690
|
+
case "end":
|
|
6691
|
+
return _context2.stop();
|
|
6692
|
+
}
|
|
6693
|
+
}, _callee2);
|
|
6694
|
+
}));
|
|
6219
6695
|
};
|
|
6220
6696
|
var lowercaseFirstLetter = function lowercaseFirstLetter(str) {
|
|
6221
6697
|
return str.charAt(0).toLowerCase() + str.slice(1);
|
|
@@ -6946,9 +7422,10 @@ var ComposableFinance = {
|
|
|
6946
7422
|
]
|
|
6947
7423
|
};
|
|
6948
7424
|
var Darwinia = {
|
|
6949
|
-
defaultPallet: "
|
|
7425
|
+
defaultPallet: "XTokens",
|
|
6950
7426
|
supportedPallets: [
|
|
6951
|
-
"PolkadotXcm"
|
|
7427
|
+
"PolkadotXcm",
|
|
7428
|
+
"XTokens"
|
|
6952
7429
|
]
|
|
6953
7430
|
};
|
|
6954
7431
|
var HydraDX = {
|
|
@@ -7150,9 +7627,10 @@ var Robonomics = {
|
|
|
7150
7627
|
]
|
|
7151
7628
|
};
|
|
7152
7629
|
var Shiden = {
|
|
7153
|
-
defaultPallet: "
|
|
7630
|
+
defaultPallet: "XTokens",
|
|
7154
7631
|
supportedPallets: [
|
|
7155
|
-
"PolkadotXcm"
|
|
7632
|
+
"PolkadotXcm",
|
|
7633
|
+
"XTokens"
|
|
7156
7634
|
]
|
|
7157
7635
|
};
|
|
7158
7636
|
var Turing = {
|
|
@@ -7346,4 +7824,4 @@ var getSupportedPallets = function getSupportedPallets(node) {
|
|
|
7346
7824
|
return palletsMap[node].supportedPallets;
|
|
7347
7825
|
};
|
|
7348
7826
|
|
|
7349
|
-
export { Builder, IncompatibleNodesError, InvalidCurrencyError, NODE_NAMES, NoXCMSupportImplementedError, NodeNotSupportedError, SUPPORTED_PALLETS, ScenarioNotSupportedError, Version, index$4 as assets, index as closeChannels, getAllAssetsSymbols, getAllNodeProviders, getAssetDecimals, getAssetId, getAssetsObject, getDefaultPallet, getNativeAssets, getNode, getNodeEndpointOption, getNodeProvider, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedPallets, getTNode, hasSupportForAsset, index$1 as openChannels, index$3 as xcmPallet, index$2 as xyk };
|
|
7827
|
+
export { Builder, IncompatibleNodesError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODE_NAMES, NoXCMSupportImplementedError, NodeNotSupportedError, SUPPORTED_PALLETS, ScenarioNotSupportedError, Version, index$4 as assets, index as closeChannels, createApiInstanceForNode, getAllAssetsSymbols, getAllNodeProviders, getAssetDecimals, getAssetId, getAssetsObject, getDefaultPallet, getNativeAssets, getNode, getNodeEndpointOption, getNodeProvider, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedPallets, getTNode, hasSupportForAsset, index$1 as openChannels, index$3 as xcmPallet, index$2 as xyk };
|