@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 CHANGED
@@ -1,9 +1,310 @@
1
1
  'use strict';
2
2
 
3
- require('@polkadot/api');
3
+ var api = require('@polkadot/api');
4
4
  var ethers = require('ethers');
5
5
  var endpoints = require('@polkadot/apps-config/endpoints');
6
6
 
7
+ function _regeneratorRuntime() {
8
+ _regeneratorRuntime = function () {
9
+ return e;
10
+ };
11
+ var t,
12
+ e = {},
13
+ r = Object.prototype,
14
+ n = r.hasOwnProperty,
15
+ o = Object.defineProperty || function (t, e, r) {
16
+ t[e] = r.value;
17
+ },
18
+ i = "function" == typeof Symbol ? Symbol : {},
19
+ a = i.iterator || "@@iterator",
20
+ c = i.asyncIterator || "@@asyncIterator",
21
+ u = i.toStringTag || "@@toStringTag";
22
+ function define(t, e, r) {
23
+ return Object.defineProperty(t, e, {
24
+ value: r,
25
+ enumerable: !0,
26
+ configurable: !0,
27
+ writable: !0
28
+ }), t[e];
29
+ }
30
+ try {
31
+ define({}, "");
32
+ } catch (t) {
33
+ define = function (t, e, r) {
34
+ return t[e] = r;
35
+ };
36
+ }
37
+ function wrap(t, e, r, n) {
38
+ var i = e && e.prototype instanceof Generator ? e : Generator,
39
+ a = Object.create(i.prototype),
40
+ c = new Context(n || []);
41
+ return o(a, "_invoke", {
42
+ value: makeInvokeMethod(t, r, c)
43
+ }), a;
44
+ }
45
+ function tryCatch(t, e, r) {
46
+ try {
47
+ return {
48
+ type: "normal",
49
+ arg: t.call(e, r)
50
+ };
51
+ } catch (t) {
52
+ return {
53
+ type: "throw",
54
+ arg: t
55
+ };
56
+ }
57
+ }
58
+ e.wrap = wrap;
59
+ var h = "suspendedStart",
60
+ l = "suspendedYield",
61
+ f = "executing",
62
+ s = "completed",
63
+ y = {};
64
+ function Generator() {}
65
+ function GeneratorFunction() {}
66
+ function GeneratorFunctionPrototype() {}
67
+ var p = {};
68
+ define(p, a, function () {
69
+ return this;
70
+ });
71
+ var d = Object.getPrototypeOf,
72
+ v = d && d(d(values([])));
73
+ v && v !== r && n.call(v, a) && (p = v);
74
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
75
+ function defineIteratorMethods(t) {
76
+ ["next", "throw", "return"].forEach(function (e) {
77
+ define(t, e, function (t) {
78
+ return this._invoke(e, t);
79
+ });
80
+ });
81
+ }
82
+ function AsyncIterator(t, e) {
83
+ function invoke(r, o, i, a) {
84
+ var c = tryCatch(t[r], t, o);
85
+ if ("throw" !== c.type) {
86
+ var u = c.arg,
87
+ h = u.value;
88
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
89
+ invoke("next", t, i, a);
90
+ }, function (t) {
91
+ invoke("throw", t, i, a);
92
+ }) : e.resolve(h).then(function (t) {
93
+ u.value = t, i(u);
94
+ }, function (t) {
95
+ return invoke("throw", t, i, a);
96
+ });
97
+ }
98
+ a(c.arg);
99
+ }
100
+ var r;
101
+ o(this, "_invoke", {
102
+ value: function (t, n) {
103
+ function callInvokeWithMethodAndArg() {
104
+ return new e(function (e, r) {
105
+ invoke(t, n, e, r);
106
+ });
107
+ }
108
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
109
+ }
110
+ });
111
+ }
112
+ function makeInvokeMethod(e, r, n) {
113
+ var o = h;
114
+ return function (i, a) {
115
+ if (o === f) throw new Error("Generator is already running");
116
+ if (o === s) {
117
+ if ("throw" === i) throw a;
118
+ return {
119
+ value: t,
120
+ done: !0
121
+ };
122
+ }
123
+ for (n.method = i, n.arg = a;;) {
124
+ var c = n.delegate;
125
+ if (c) {
126
+ var u = maybeInvokeDelegate(c, n);
127
+ if (u) {
128
+ if (u === y) continue;
129
+ return u;
130
+ }
131
+ }
132
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
133
+ if (o === h) throw o = s, n.arg;
134
+ n.dispatchException(n.arg);
135
+ } else "return" === n.method && n.abrupt("return", n.arg);
136
+ o = f;
137
+ var p = tryCatch(e, r, n);
138
+ if ("normal" === p.type) {
139
+ if (o = n.done ? s : l, p.arg === y) continue;
140
+ return {
141
+ value: p.arg,
142
+ done: n.done
143
+ };
144
+ }
145
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
146
+ }
147
+ };
148
+ }
149
+ function maybeInvokeDelegate(e, r) {
150
+ var n = r.method,
151
+ o = e.iterator[n];
152
+ 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;
153
+ var i = tryCatch(o, e.iterator, r.arg);
154
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
155
+ var a = i.arg;
156
+ 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);
157
+ }
158
+ function pushTryEntry(t) {
159
+ var e = {
160
+ tryLoc: t[0]
161
+ };
162
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
163
+ }
164
+ function resetTryEntry(t) {
165
+ var e = t.completion || {};
166
+ e.type = "normal", delete e.arg, t.completion = e;
167
+ }
168
+ function Context(t) {
169
+ this.tryEntries = [{
170
+ tryLoc: "root"
171
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
172
+ }
173
+ function values(e) {
174
+ if (e || "" === e) {
175
+ var r = e[a];
176
+ if (r) return r.call(e);
177
+ if ("function" == typeof e.next) return e;
178
+ if (!isNaN(e.length)) {
179
+ var o = -1,
180
+ i = function next() {
181
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
182
+ return next.value = t, next.done = !0, next;
183
+ };
184
+ return i.next = i;
185
+ }
186
+ }
187
+ throw new TypeError(typeof e + " is not iterable");
188
+ }
189
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
190
+ value: GeneratorFunctionPrototype,
191
+ configurable: !0
192
+ }), o(GeneratorFunctionPrototype, "constructor", {
193
+ value: GeneratorFunction,
194
+ configurable: !0
195
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
196
+ var e = "function" == typeof t && t.constructor;
197
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
198
+ }, e.mark = function (t) {
199
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
200
+ }, e.awrap = function (t) {
201
+ return {
202
+ __await: t
203
+ };
204
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
205
+ return this;
206
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
207
+ void 0 === i && (i = Promise);
208
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
209
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
210
+ return t.done ? t.value : a.next();
211
+ });
212
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
213
+ return this;
214
+ }), define(g, "toString", function () {
215
+ return "[object Generator]";
216
+ }), e.keys = function (t) {
217
+ var e = Object(t),
218
+ r = [];
219
+ for (var n in e) r.push(n);
220
+ return r.reverse(), function next() {
221
+ for (; r.length;) {
222
+ var t = r.pop();
223
+ if (t in e) return next.value = t, next.done = !1, next;
224
+ }
225
+ return next.done = !0, next;
226
+ };
227
+ }, e.values = values, Context.prototype = {
228
+ constructor: Context,
229
+ reset: function (e) {
230
+ 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);
231
+ },
232
+ stop: function () {
233
+ this.done = !0;
234
+ var t = this.tryEntries[0].completion;
235
+ if ("throw" === t.type) throw t.arg;
236
+ return this.rval;
237
+ },
238
+ dispatchException: function (e) {
239
+ if (this.done) throw e;
240
+ var r = this;
241
+ function handle(n, o) {
242
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
243
+ }
244
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
245
+ var i = this.tryEntries[o],
246
+ a = i.completion;
247
+ if ("root" === i.tryLoc) return handle("end");
248
+ if (i.tryLoc <= this.prev) {
249
+ var c = n.call(i, "catchLoc"),
250
+ u = n.call(i, "finallyLoc");
251
+ if (c && u) {
252
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
253
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
254
+ } else if (c) {
255
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
256
+ } else {
257
+ if (!u) throw new Error("try statement without catch or finally");
258
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
259
+ }
260
+ }
261
+ }
262
+ },
263
+ abrupt: function (t, e) {
264
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
265
+ var o = this.tryEntries[r];
266
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
267
+ var i = o;
268
+ break;
269
+ }
270
+ }
271
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
272
+ var a = i ? i.completion : {};
273
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
274
+ },
275
+ complete: function (t, e) {
276
+ if ("throw" === t.type) throw t.arg;
277
+ 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;
278
+ },
279
+ finish: function (t) {
280
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
281
+ var r = this.tryEntries[e];
282
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
283
+ }
284
+ },
285
+ catch: function (t) {
286
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
287
+ var r = this.tryEntries[e];
288
+ if (r.tryLoc === t) {
289
+ var n = r.completion;
290
+ if ("throw" === n.type) {
291
+ var o = n.arg;
292
+ resetTryEntry(r);
293
+ }
294
+ return o;
295
+ }
296
+ }
297
+ throw new Error("illegal catch attempt");
298
+ },
299
+ delegateYield: function (e, r, n) {
300
+ return this.delegate = {
301
+ iterator: values(e),
302
+ resultName: r,
303
+ nextLoc: n
304
+ }, "next" === this.method && (this.arg = t), y;
305
+ }
306
+ }, e;
307
+ }
7
308
  function _toPrimitive(t, r) {
8
309
  if ("object" != typeof t || !t) return t;
9
310
  var e = t[Symbol.toPrimitive];
@@ -213,6 +514,16 @@ PERFORMANCE OF THIS SOFTWARE.
213
514
  /* global Reflect, Promise, SuppressedError, Symbol */
214
515
 
215
516
 
517
+ function __awaiter(thisArg, _arguments, P, generator) {
518
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
519
+ return new (P || (P = Promise))(function (resolve, reject) {
520
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
521
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
522
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
523
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
524
+ });
525
+ }
526
+
216
527
  typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
217
528
  var e = new Error(message);
218
529
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
@@ -836,6 +1147,11 @@ var ComposableFinance$2 = {
836
1147
  symbol: "BNC Kusama",
837
1148
  decimals: 12
838
1149
  },
1150
+ {
1151
+ assetId: "79228162514264337593543950355",
1152
+ symbol: "TIA",
1153
+ decimals: 6
1154
+ },
839
1155
  {
840
1156
  assetId: "79228162514264337593543950338",
841
1157
  symbol: "LAYR",
@@ -856,6 +1172,16 @@ var ComposableFinance$2 = {
856
1172
  symbol: "OSMO",
857
1173
  decimals: 6
858
1174
  },
1175
+ {
1176
+ assetId: "79228162514264337593543950359",
1177
+ symbol: "MOVR",
1178
+ decimals: 18
1179
+ },
1180
+ {
1181
+ assetId: "79228162514264337593543950361",
1182
+ symbol: "IST",
1183
+ decimals: 6
1184
+ },
859
1185
  {
860
1186
  assetId: "79228162514264337593543950463",
861
1187
  symbol: "EQD",
@@ -885,6 +1211,11 @@ var ComposableFinance$2 = {
885
1211
  assetId: "79228162514264337593543950369",
886
1212
  symbol: "BNC Polkadot",
887
1213
  decimals: 10
1214
+ },
1215
+ {
1216
+ assetId: "79228162514264337593543950354",
1217
+ symbol: "BLD",
1218
+ decimals: 6
888
1219
  }
889
1220
  ]
890
1221
  };
@@ -930,6 +1261,11 @@ var HydraDX$2 = {
930
1261
  symbol: "DOT",
931
1262
  decimals: 10
932
1263
  },
1264
+ {
1265
+ assetId: "100",
1266
+ symbol: "4-Pool",
1267
+ decimals: 18
1268
+ },
933
1269
  {
934
1270
  assetId: "8",
935
1271
  symbol: "PHA",
@@ -970,6 +1306,11 @@ var HydraDX$2 = {
970
1306
  symbol: "vDOT",
971
1307
  decimals: 10
972
1308
  },
1309
+ {
1310
+ assetId: "24",
1311
+ symbol: "SUB",
1312
+ decimals: 10
1313
+ },
973
1314
  {
974
1315
  assetId: "22",
975
1316
  symbol: "USDC",
@@ -1163,6 +1504,11 @@ var Moonbeam$2 = {
1163
1504
  symbol: "ZTG",
1164
1505
  decimals: 10
1165
1506
  },
1507
+ {
1508
+ assetId: "90225766094594282577230355136633846906",
1509
+ symbol: "PDEX",
1510
+ decimals: 12
1511
+ },
1166
1512
  {
1167
1513
  assetId: "144012926827374458669278577633504620722",
1168
1514
  symbol: "FIL",
@@ -1198,6 +1544,11 @@ var Moonbeam$2 = {
1198
1544
  symbol: "vDOT",
1199
1545
  decimals: 10
1200
1546
  },
1547
+ {
1548
+ assetId: "225719522181998468294117309041779353812",
1549
+ symbol: "LDOT",
1550
+ decimals: 10
1551
+ },
1201
1552
  {
1202
1553
  assetId: "224077081838586484055667086558292981199",
1203
1554
  symbol: "ASTR",
@@ -1263,6 +1614,11 @@ var Moonbeam$2 = {
1263
1614
  symbol: "DOT",
1264
1615
  decimals: 10
1265
1616
  },
1617
+ {
1618
+ assetId: "45647473099451451833602657905356404688",
1619
+ symbol: "PEN",
1620
+ decimals: 12
1621
+ },
1266
1622
  {
1267
1623
  assetId: "224821240862170613278369189818311486111",
1268
1624
  symbol: "ACA",
@@ -1517,6 +1873,11 @@ var AssetHubPolkadot$2 = {
1517
1873
  symbol: "WBTC",
1518
1874
  decimals: 8
1519
1875
  },
1876
+ {
1877
+ assetId: "20",
1878
+ symbol: "StabCP",
1879
+ decimals: 10
1880
+ },
1520
1881
  {
1521
1882
  assetId: "999",
1522
1883
  symbol: "gold",
@@ -1562,11 +1923,6 @@ var AssetHubPolkadot$2 = {
1562
1923
  symbol: "VSC",
1563
1924
  decimals: 9
1564
1925
  },
1565
- {
1566
- assetId: "19760401",
1567
- symbol: "APPL",
1568
- decimals: 0
1569
- },
1570
1926
  {
1571
1927
  assetId: "5",
1572
1928
  symbol: "PLX",
@@ -1587,11 +1943,21 @@ var AssetHubPolkadot$2 = {
1587
1943
  symbol: "BTC",
1588
1944
  decimals: 20
1589
1945
  },
1946
+ {
1947
+ assetId: "79",
1948
+ symbol: "PGOLD",
1949
+ decimals: 7
1950
+ },
1590
1951
  {
1591
1952
  assetId: "777",
1592
1953
  symbol: "777",
1593
1954
  decimals: 20
1594
1955
  },
1956
+ {
1957
+ assetId: "2023",
1958
+ symbol: "dot",
1959
+ decimals: 0
1960
+ },
1595
1961
  {
1596
1962
  assetId: "8",
1597
1963
  symbol: "JOE",
@@ -1602,11 +1968,6 @@ var AssetHubPolkadot$2 = {
1602
1968
  symbol: "BRZ",
1603
1969
  decimals: 6
1604
1970
  },
1605
- {
1606
- assetId: "19120101",
1607
- symbol: "NTDC",
1608
- decimals: 0
1609
- },
1610
1971
  {
1611
1972
  assetId: "1",
1612
1973
  symbol: "no1",
@@ -1632,6 +1993,11 @@ var AssetHubPolkadot$2 = {
1632
1993
  symbol: "DANGER",
1633
1994
  decimals: 8
1634
1995
  },
1996
+ {
1997
+ assetId: "23",
1998
+ symbol: "PINK",
1999
+ decimals: 10
2000
+ },
1635
2001
  {
1636
2002
  assetId: "9",
1637
2003
  symbol: "PINT",
@@ -2358,8 +2724,8 @@ var Mangata$2 = {
2358
2724
  decimals: 6
2359
2725
  },
2360
2726
  {
2361
- assetId: "40",
2362
- symbol: "TKN0x00000004-TKN0x0000000E",
2727
+ assetId: "48",
2728
+ symbol: "TKN0x00000007-TKN0x0000000E",
2363
2729
  decimals: 18
2364
2730
  },
2365
2731
  {
@@ -2367,26 +2733,6 @@ var Mangata$2 = {
2367
2733
  symbol: "TUR",
2368
2734
  decimals: 10
2369
2735
  },
2370
- {
2371
- assetId: "35",
2372
- symbol: "TKN0x0000000E-TKN0x0000001F",
2373
- decimals: 18
2374
- },
2375
- {
2376
- assetId: "37",
2377
- symbol: "TKN0x0000001F-TKN0x0000001E",
2378
- decimals: 18
2379
- },
2380
- {
2381
- assetId: "20",
2382
- symbol: "TKN0x00000004-TKN0x0000000E",
2383
- decimals: 18
2384
- },
2385
- {
2386
- assetId: "38",
2387
- symbol: "TKN0x00000007-TKN0x0000000E",
2388
- decimals: 18
2389
- },
2390
2736
  {
2391
2737
  assetId: "13",
2392
2738
  symbol: "TKN0x0000000B-TKN0x00000004",
@@ -2402,16 +2748,6 @@ var Mangata$2 = {
2402
2748
  symbol: "TKN0x00000004-TKN0x00000000",
2403
2749
  decimals: 18
2404
2750
  },
2405
- {
2406
- assetId: "41",
2407
- symbol: "TKN0x00000000-TKN0x0000001E",
2408
- decimals: 18
2409
- },
2410
- {
2411
- assetId: "44",
2412
- symbol: "TKN0x0000000B-TKN0x00000007",
2413
- decimals: 18
2414
- },
2415
2751
  {
2416
2752
  assetId: "8",
2417
2753
  symbol: "TKN0x00000000-TKN0x00000007",
@@ -2482,26 +2818,6 @@ var Mangata$2 = {
2482
2818
  symbol: "TKN0x0000001E-TKN0x00000000",
2483
2819
  decimals: 18
2484
2820
  },
2485
- {
2486
- assetId: "24",
2487
- symbol: "TKN0x0000000F-TKN0x00000000",
2488
- decimals: 18
2489
- },
2490
- {
2491
- assetId: "22",
2492
- symbol: "TKN0x00000010-TKN0x0000000F",
2493
- decimals: 18
2494
- },
2495
- {
2496
- assetId: "29",
2497
- symbol: "TKN0x00000004-TKN0x0000000E",
2498
- decimals: 18
2499
- },
2500
- {
2501
- assetId: "10",
2502
- symbol: "TKN0x00000005-TKN0x00000000",
2503
- decimals: 18
2504
- },
2505
2821
  {
2506
2822
  assetId: "27",
2507
2823
  symbol: "TKN0x0000001A-TKN0x00000000",
@@ -2537,11 +2853,6 @@ var Mangata$2 = {
2537
2853
  symbol: "TKN0x00000000-TKN0x0000000E",
2538
2854
  decimals: 18
2539
2855
  },
2540
- {
2541
- assetId: "18",
2542
- symbol: "TKN0x00000010-TKN0x00000000",
2543
- decimals: 18
2544
- },
2545
2856
  {
2546
2857
  assetId: "23",
2547
2858
  symbol: "vBNC",
@@ -2562,11 +2873,6 @@ var Mangata$2 = {
2562
2873
  symbol: "TKN0x00000004-TKN0x0000001E",
2563
2874
  decimals: 18
2564
2875
  },
2565
- {
2566
- assetId: "25",
2567
- symbol: "TKN0x00000010-TKN0x00000000",
2568
- decimals: 18
2569
- },
2570
2876
  {
2571
2877
  assetId: "12",
2572
2878
  symbol: "TKN0x00000000-TKN0x0000000B",
@@ -2576,16 +2882,6 @@ var Mangata$2 = {
2576
2882
  assetId: "42",
2577
2883
  symbol: "TKN0x00000004-TKN0x0000000E",
2578
2884
  decimals: 18
2579
- },
2580
- {
2581
- assetId: "36",
2582
- symbol: "TKN0x00000000-TKN0x0000001E",
2583
- decimals: 18
2584
- },
2585
- {
2586
- assetId: "46",
2587
- symbol: "TKN0x00000000-TKN0x0000002D",
2588
- decimals: 18
2589
2885
  }
2590
2886
  ]
2591
2887
  };
@@ -2669,6 +2965,11 @@ var Moonriver$2 = {
2669
2965
  symbol: "KINT",
2670
2966
  decimals: 12
2671
2967
  },
2968
+ {
2969
+ assetId: "167283995827706324502761431814209211090",
2970
+ symbol: "PICA",
2971
+ decimals: 12
2972
+ },
2672
2973
  {
2673
2974
  assetId: "105075627293246237499203909093923548958",
2674
2975
  symbol: "TEER",
@@ -2898,6 +3199,11 @@ var Picasso$2 = {
2898
3199
  symbol: "DOT_BLD_LPT",
2899
3200
  decimals: 12
2900
3201
  },
3202
+ {
3203
+ assetId: "26",
3204
+ symbol: "USK",
3205
+ decimals: 6
3206
+ },
2901
3207
  {
2902
3208
  assetId: "1088357900348863545360",
2903
3209
  symbol: "ASTR_SDN_LPT",
@@ -2913,6 +3219,16 @@ var Picasso$2 = {
2913
3219
  symbol: "SILK",
2914
3220
  decimals: 6
2915
3221
  },
3222
+ {
3223
+ assetId: "29",
3224
+ symbol: "QCK",
3225
+ decimals: 6
3226
+ },
3227
+ {
3228
+ assetId: "23",
3229
+ symbol: "MOVR",
3230
+ decimals: 18
3231
+ },
2916
3232
  {
2917
3233
  assetId: "130",
2918
3234
  symbol: "USDT",
@@ -2968,6 +3284,11 @@ var Picasso$2 = {
2968
3284
  symbol: "EQD",
2969
3285
  decimals: 9
2970
3286
  },
3287
+ {
3288
+ assetId: "20",
3289
+ symbol: "lsKSM",
3290
+ decimals: 12
3291
+ },
2971
3292
  {
2972
3293
  assetId: "8",
2973
3294
  symbol: "OSMO",
@@ -3028,11 +3349,21 @@ var Picasso$2 = {
3028
3349
  symbol: "UMEE",
3029
3350
  decimals: 6
3030
3351
  },
3352
+ {
3353
+ assetId: "1088357900348863545366",
3354
+ symbol: "DOT_TIA_LPT",
3355
+ decimals: 12
3356
+ },
3031
3357
  {
3032
3358
  assetId: "2011",
3033
3359
  symbol: "EQ",
3034
3360
  decimals: 9
3035
3361
  },
3362
+ {
3363
+ assetId: "25",
3364
+ symbol: "IST",
3365
+ decimals: 6
3366
+ },
3036
3367
  {
3037
3368
  assetId: "13",
3038
3369
  symbol: "CRE",
@@ -3058,6 +3389,11 @@ var Picasso$2 = {
3058
3389
  symbol: "DOT_PICA_LPT",
3059
3390
  decimals: 12
3060
3391
  },
3392
+ {
3393
+ assetId: "28",
3394
+ symbol: "KUJI",
3395
+ decimals: 6
3396
+ },
3061
3397
  {
3062
3398
  assetId: "4",
3063
3399
  symbol: "KSM",
@@ -3073,6 +3409,16 @@ var Picasso$2 = {
3073
3409
  symbol: "KSM_USDT_LPT",
3074
3410
  decimals: 12
3075
3411
  },
3412
+ {
3413
+ assetId: "24",
3414
+ symbol: "INJ",
3415
+ decimals: 18
3416
+ },
3417
+ {
3418
+ assetId: "19",
3419
+ symbol: "TIA",
3420
+ decimals: 6
3421
+ },
3076
3422
  {
3077
3423
  assetId: "1088357900348863545364",
3078
3424
  symbol: "DOT_vKSM_LPT",
@@ -3658,6 +4004,11 @@ var AssetHubKusama$2 = {
3658
4004
  symbol: "GOOSE",
3659
4005
  decimals: 12
3660
4006
  },
4007
+ {
4008
+ assetId: "131313",
4009
+ symbol: "DMO",
4010
+ decimals: 3
4011
+ },
3661
4012
  {
3662
4013
  assetId: "71",
3663
4014
  symbol: "OAK",
@@ -3708,11 +4059,6 @@ var AssetHubKusama$2 = {
3708
4059
  symbol: "TNKR",
3709
4060
  decimals: 10
3710
4061
  },
3711
- {
3712
- assetId: "70",
3713
- symbol: "MAR",
3714
- decimals: 5
3715
- },
3716
4062
  {
3717
4063
  assetId: "13",
3718
4064
  symbol: "LN",
@@ -3878,6 +4224,11 @@ var AssetHubKusama$2 = {
3878
4224
  symbol: "ADVERT",
3879
4225
  decimals: 10
3880
4226
  },
4227
+ {
4228
+ assetId: "1313",
4229
+ symbol: "TACP",
4230
+ decimals: 2
4231
+ },
3881
4232
  {
3882
4233
  assetId: "24",
3883
4234
  symbol: "test",
@@ -3988,6 +4339,11 @@ var AssetHubKusama$2 = {
3988
4339
  symbol: "MTS",
3989
4340
  decimals: 8
3990
4341
  },
4342
+ {
4343
+ assetId: "3327",
4344
+ symbol: "MVPW",
4345
+ decimals: 9
4346
+ },
3991
4347
  {
3992
4348
  assetId: "1337",
3993
4349
  symbol: "TIP",
@@ -4073,6 +4429,11 @@ var AssetHubKusama$2 = {
4073
4429
  symbol: "0xe299a5e299a5e299a5",
4074
4430
  decimals: 10
4075
4431
  },
4432
+ {
4433
+ assetId: "3328",
4434
+ symbol: "A42",
4435
+ decimals: 6
4436
+ },
4076
4437
  {
4077
4438
  assetId: "9",
4078
4439
  symbol: "TOT",
@@ -4468,13 +4829,13 @@ var Polkadex$2 = {
4468
4829
  ],
4469
4830
  otherAssets: [
4470
4831
  {
4471
- assetId: "1"
4832
+ assetId: "226557799181424065994173367616174607641"
4472
4833
  },
4473
4834
  {
4474
- assetId: "0"
4835
+ assetId: "193492391581201937291053139015355410612"
4475
4836
  },
4476
4837
  {
4477
- assetId: "456"
4838
+ assetId: "14826654563114266286226336203450732505"
4478
4839
  },
4479
4840
  {
4480
4841
  assetId: "222121451965151777636299756141619631150"
@@ -4483,13 +4844,16 @@ var Polkadex$2 = {
4483
4844
  assetId: "95930534000017180603917534864279132680"
4484
4845
  },
4485
4846
  {
4486
- assetId: "188197390862117588552302061289480388608"
4847
+ assetId: "3496813586714279103986568049643838918"
4487
4848
  },
4488
4849
  {
4489
- assetId: "3496813586714279103986568049643838918"
4850
+ assetId: "32595388462891559990827225517299393930"
4490
4851
  },
4491
4852
  {
4492
- assetId: "123"
4853
+ assetId: "182269558229932594457975666948556356791"
4854
+ },
4855
+ {
4856
+ assetId: "240851462719321838889739625279903325250"
4493
4857
  }
4494
4858
  ]
4495
4859
  };
@@ -4503,6 +4867,11 @@ var Zeitgeist$2 = {
4503
4867
  }
4504
4868
  ],
4505
4869
  otherAssets: [
4870
+ {
4871
+ assetId: "1",
4872
+ symbol: "USDC",
4873
+ decimals: 6
4874
+ },
4506
4875
  {
4507
4876
  assetId: "0",
4508
4877
  symbol: "DOT",
@@ -4784,6 +5153,29 @@ var ParachainNode = /*#__PURE__*/function () {
4784
5153
  parameters: constructRelayToParaParameters(options, exports.Version.V3)
4785
5154
  };
4786
5155
  }
5156
+ }, {
5157
+ key: "getProvider",
5158
+ value: function getProvider() {
5159
+ return getAllNodeProviders(this.node)[0];
5160
+ }
5161
+ }, {
5162
+ key: "createApiInstance",
5163
+ value: function createApiInstance$1() {
5164
+ return __awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5165
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
5166
+ while (1) switch (_context.prev = _context.next) {
5167
+ case 0:
5168
+ _context.next = 2;
5169
+ return createApiInstance(this.getProvider());
5170
+ case 2:
5171
+ return _context.abrupt("return", _context.sent);
5172
+ case 3:
5173
+ case "end":
5174
+ return _context.stop();
5175
+ }
5176
+ }, _callee, this);
5177
+ }));
5178
+ }
4787
5179
  }]);
4788
5180
  return ParachainNode;
4789
5181
  }();
@@ -4835,6 +5227,12 @@ var Acala$1 = /*#__PURE__*/function (_ParachainNode) {
4835
5227
  };
4836
5228
  return XTokensTransferImpl.transferXTokens(input, currencySelection);
4837
5229
  }
5230
+ }, {
5231
+ key: "getProvider",
5232
+ value: function getProvider() {
5233
+ // Return the second WebSocket URL because the first one is sometimes unreliable.
5234
+ return getAllNodeProviders(this.node)[1];
5235
+ }
4838
5236
  }]);
4839
5237
  return Acala;
4840
5238
  }(ParachainNode);
@@ -4912,10 +5310,7 @@ var BifrostPolkadot$1 = /*#__PURE__*/function (_ParachainNode) {
4912
5310
  _createClass(BifrostPolkadot, [{
4913
5311
  key: "transferXTokens",
4914
5312
  value: function transferXTokens(input) {
4915
- // Multiple asset options need addressing
4916
- var currencySelection = {
4917
- Native: input.currency
4918
- };
5313
+ var currencySelection = _defineProperty({}, input.currency === 'BNC' ? 'Native' : 'Token', input.currency);
4919
5314
  return XTokensTransferImpl.transferXTokens(input, currencySelection);
4920
5315
  }
4921
5316
  }]);
@@ -5322,6 +5717,30 @@ var Mangata$1 = /*#__PURE__*/function (_ParachainNode) {
5322
5717
  value: function transferXTokens(input) {
5323
5718
  return XTokensTransferImpl.transferXTokens(input, input.currencyID);
5324
5719
  }
5720
+ }, {
5721
+ key: "createApiInstance",
5722
+ value: function createApiInstance() {
5723
+ return __awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5724
+ var MangataSDK, instance;
5725
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
5726
+ while (1) switch (_context.prev = _context.next) {
5727
+ case 0:
5728
+ _context.next = 2;
5729
+ return import('@mangata-finance/sdk');
5730
+ case 2:
5731
+ MangataSDK = _context.sent;
5732
+ instance = MangataSDK.Mangata.instance([this.getProvider()]);
5733
+ _context.next = 6;
5734
+ return instance.api();
5735
+ case 6:
5736
+ return _context.abrupt("return", _context.sent);
5737
+ case 7:
5738
+ case "end":
5739
+ return _context.stop();
5740
+ }
5741
+ }, _callee, this);
5742
+ }));
5743
+ }
5325
5744
  }]);
5326
5745
  return Mangata;
5327
5746
  }(ParachainNode);
@@ -5534,6 +5953,12 @@ var Karura$1 = /*#__PURE__*/function (_ParachainNode) {
5534
5953
  };
5535
5954
  return XTokensTransferImpl.transferXTokens(input, currencySelection);
5536
5955
  }
5956
+ }, {
5957
+ key: "getProvider",
5958
+ value: function getProvider() {
5959
+ // Return the second WebSocket URL because the first one is sometimes unreliable.
5960
+ return getAllNodeProviders(this.node)[1];
5961
+ }
5537
5962
  }]);
5538
5963
  return Karura;
5539
5964
  }(ParachainNode);
@@ -5944,6 +6369,7 @@ var Zeitgeist$1 = /*#__PURE__*/function (_ParachainNode) {
5944
6369
 
5945
6370
  // Contains supported Parachains and exports supported XCM Pallets
5946
6371
  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'];
6372
+ var NODES_WITH_RELAY_CHAINS = [].concat(NODE_NAMES, ['Polkadot', 'Kusama']);
5947
6373
  var nodes = {
5948
6374
  AssetHubPolkadot: new AssetHubPolkadot$1(),
5949
6375
  Acala: new Acala$1(),
@@ -6213,11 +6639,61 @@ var getAllNodeProviders = function getAllNodeProviders(node) {
6213
6639
  var _a;
6214
6640
  var _ref10 = (_a = getNodeEndpointOption(node)) !== null && _a !== void 0 ? _a : {},
6215
6641
  providers = _ref10.providers;
6642
+ if (providers.length < 1) {
6643
+ throw new Error("Node ".concat(node, " does not have any providers."));
6644
+ }
6216
6645
  return Object.values(providers !== null && providers !== void 0 ? providers : []);
6217
6646
  };
6218
6647
  var getNodeProvider = function getNodeProvider(node) {
6219
- var providers = getAllNodeProviders(node);
6220
- return providers.length > 0 ? providers[0] : null;
6648
+ return getNode(node).getProvider();
6649
+ };
6650
+ var createApiInstance = function createApiInstance(wsUrl) {
6651
+ return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
6652
+ var wsProvider;
6653
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
6654
+ while (1) switch (_context.prev = _context.next) {
6655
+ case 0:
6656
+ wsProvider = new api.WsProvider(wsUrl);
6657
+ _context.next = 3;
6658
+ return api.ApiPromise.create({
6659
+ provider: wsProvider
6660
+ });
6661
+ case 3:
6662
+ return _context.abrupt("return", _context.sent);
6663
+ case 4:
6664
+ case "end":
6665
+ return _context.stop();
6666
+ }
6667
+ }, _callee);
6668
+ }));
6669
+ };
6670
+ var createApiInstanceForNode = function createApiInstanceForNode(node) {
6671
+ return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
6672
+ var endpointOption, wsUrl;
6673
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
6674
+ while (1) switch (_context2.prev = _context2.next) {
6675
+ case 0:
6676
+ if (!(node === 'Polkadot' || node === 'Kusama')) {
6677
+ _context2.next = 6;
6678
+ break;
6679
+ }
6680
+ endpointOption = node === 'Polkadot' ? endpoints.prodRelayPolkadot : endpoints.prodRelayKusama;
6681
+ wsUrl = Object.values(endpointOption.providers)[0];
6682
+ _context2.next = 5;
6683
+ return createApiInstance(wsUrl);
6684
+ case 5:
6685
+ return _context2.abrupt("return", _context2.sent);
6686
+ case 6:
6687
+ _context2.next = 8;
6688
+ return getNode(node).createApiInstance();
6689
+ case 8:
6690
+ return _context2.abrupt("return", _context2.sent);
6691
+ case 9:
6692
+ case "end":
6693
+ return _context2.stop();
6694
+ }
6695
+ }, _callee2);
6696
+ }));
6221
6697
  };
6222
6698
  var lowercaseFirstLetter = function lowercaseFirstLetter(str) {
6223
6699
  return str.charAt(0).toLowerCase() + str.slice(1);
@@ -6948,9 +7424,10 @@ var ComposableFinance = {
6948
7424
  ]
6949
7425
  };
6950
7426
  var Darwinia = {
6951
- defaultPallet: "PolkadotXcm",
7427
+ defaultPallet: "XTokens",
6952
7428
  supportedPallets: [
6953
- "PolkadotXcm"
7429
+ "PolkadotXcm",
7430
+ "XTokens"
6954
7431
  ]
6955
7432
  };
6956
7433
  var HydraDX = {
@@ -7152,9 +7629,10 @@ var Robonomics = {
7152
7629
  ]
7153
7630
  };
7154
7631
  var Shiden = {
7155
- defaultPallet: "PolkadotXcm",
7632
+ defaultPallet: "XTokens",
7156
7633
  supportedPallets: [
7157
- "PolkadotXcm"
7634
+ "PolkadotXcm",
7635
+ "XTokens"
7158
7636
  ]
7159
7637
  };
7160
7638
  var Turing = {
@@ -7351,6 +7829,7 @@ var getSupportedPallets = function getSupportedPallets(node) {
7351
7829
  exports.Builder = Builder;
7352
7830
  exports.IncompatibleNodesError = IncompatibleNodesError;
7353
7831
  exports.InvalidCurrencyError = InvalidCurrencyError;
7832
+ exports.NODES_WITH_RELAY_CHAINS = NODES_WITH_RELAY_CHAINS;
7354
7833
  exports.NODE_NAMES = NODE_NAMES;
7355
7834
  exports.NoXCMSupportImplementedError = NoXCMSupportImplementedError;
7356
7835
  exports.NodeNotSupportedError = NodeNotSupportedError;
@@ -7358,6 +7837,7 @@ exports.SUPPORTED_PALLETS = SUPPORTED_PALLETS;
7358
7837
  exports.ScenarioNotSupportedError = ScenarioNotSupportedError;
7359
7838
  exports.assets = index$4;
7360
7839
  exports.closeChannels = index;
7840
+ exports.createApiInstanceForNode = createApiInstanceForNode;
7361
7841
  exports.getAllAssetsSymbols = getAllAssetsSymbols;
7362
7842
  exports.getAllNodeProviders = getAllNodeProviders;
7363
7843
  exports.getAssetDecimals = getAssetDecimals;