@paraspell/sdk 5.6.0 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -7
- package/dist/index.cjs +1068 -172
- package/dist/index.d.ts +97 -39
- package/dist/index.mjs +1059 -170
- package/package.json +16 -26
package/dist/index.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import { ethers } from 'ethers';
|
|
|
3
3
|
import { prodRelayPolkadot, prodRelayKusama } from '@polkadot/apps-config/endpoints';
|
|
4
4
|
import { u32 } from '@polkadot/types';
|
|
5
5
|
import { BN } from '@polkadot/util';
|
|
6
|
+
import { toPolkadot, environment, contextFactory } from '@snowbridge/api';
|
|
6
7
|
|
|
7
8
|
function _arrayLikeToArray(r, a) {
|
|
8
9
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -46,7 +47,7 @@ function _createClass(e, r, t) {
|
|
|
46
47
|
function _createForOfIteratorHelper(r, e) {
|
|
47
48
|
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
48
49
|
if (!t) {
|
|
49
|
-
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e
|
|
50
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {
|
|
50
51
|
t && (r = t);
|
|
51
52
|
var n = 0,
|
|
52
53
|
F = function () {};
|
|
@@ -491,6 +492,12 @@ function _superPropBase(t, o) {
|
|
|
491
492
|
for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););
|
|
492
493
|
return t;
|
|
493
494
|
}
|
|
495
|
+
function _superPropGet(t, e, r, o) {
|
|
496
|
+
var p = _get(_getPrototypeOf(t.prototype ), e, r);
|
|
497
|
+
return function (t) {
|
|
498
|
+
return p.apply(r, t);
|
|
499
|
+
} ;
|
|
500
|
+
}
|
|
494
501
|
function _toConsumableArray(r) {
|
|
495
502
|
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
496
503
|
}
|
|
@@ -1232,7 +1239,7 @@ var Centrifuge$3 = {
|
|
|
1232
1239
|
},
|
|
1233
1240
|
{
|
|
1234
1241
|
assetId: "1655476167",
|
|
1235
|
-
symbol: "
|
|
1242
|
+
symbol: "DYF1",
|
|
1236
1243
|
decimals: 6
|
|
1237
1244
|
},
|
|
1238
1245
|
{
|
|
@@ -1477,6 +1484,11 @@ var Hydration$3 = {
|
|
|
1477
1484
|
symbol: "iBTC",
|
|
1478
1485
|
decimals: 8
|
|
1479
1486
|
},
|
|
1487
|
+
{
|
|
1488
|
+
assetId: "1000085",
|
|
1489
|
+
symbol: "WUD",
|
|
1490
|
+
decimals: 10
|
|
1491
|
+
},
|
|
1480
1492
|
{
|
|
1481
1493
|
assetId: "1000099",
|
|
1482
1494
|
symbol: "ACA",
|
|
@@ -1502,6 +1514,11 @@ var Hydration$3 = {
|
|
|
1502
1514
|
symbol: "RING",
|
|
1503
1515
|
decimals: 18
|
|
1504
1516
|
},
|
|
1517
|
+
{
|
|
1518
|
+
assetId: "33",
|
|
1519
|
+
symbol: "vASTR",
|
|
1520
|
+
decimals: 18
|
|
1521
|
+
},
|
|
1505
1522
|
{
|
|
1506
1523
|
assetId: "15",
|
|
1507
1524
|
symbol: "vDOT",
|
|
@@ -1557,6 +1574,11 @@ var Hydration$3 = {
|
|
|
1557
1574
|
symbol: "NODL",
|
|
1558
1575
|
decimals: 11
|
|
1559
1576
|
},
|
|
1577
|
+
{
|
|
1578
|
+
assetId: "1000190",
|
|
1579
|
+
symbol: "WBTC",
|
|
1580
|
+
decimals: 8
|
|
1581
|
+
},
|
|
1560
1582
|
{
|
|
1561
1583
|
assetId: "22",
|
|
1562
1584
|
symbol: "USDC",
|
|
@@ -1616,6 +1638,11 @@ var Hydration$3 = {
|
|
|
1616
1638
|
assetId: "9",
|
|
1617
1639
|
symbol: "ASTR",
|
|
1618
1640
|
decimals: 18
|
|
1641
|
+
},
|
|
1642
|
+
{
|
|
1643
|
+
assetId: "1000189",
|
|
1644
|
+
symbol: "WETH",
|
|
1645
|
+
decimals: 18
|
|
1619
1646
|
}
|
|
1620
1647
|
]
|
|
1621
1648
|
};
|
|
@@ -1680,6 +1707,16 @@ var Interlay$3 = {
|
|
|
1680
1707
|
symbol: "WBTC.wh",
|
|
1681
1708
|
decimals: 8
|
|
1682
1709
|
},
|
|
1710
|
+
{
|
|
1711
|
+
assetId: "14",
|
|
1712
|
+
symbol: "PHA",
|
|
1713
|
+
decimals: 12
|
|
1714
|
+
},
|
|
1715
|
+
{
|
|
1716
|
+
assetId: "15",
|
|
1717
|
+
symbol: "stDOT",
|
|
1718
|
+
decimals: 10
|
|
1719
|
+
},
|
|
1683
1720
|
{
|
|
1684
1721
|
assetId: "2",
|
|
1685
1722
|
symbol: "USDT",
|
|
@@ -1866,6 +1903,11 @@ var Moonbeam$3 = {
|
|
|
1866
1903
|
symbol: "vGLMR",
|
|
1867
1904
|
decimals: 18
|
|
1868
1905
|
},
|
|
1906
|
+
{
|
|
1907
|
+
assetId: "184218609779515850660274730699350567246",
|
|
1908
|
+
symbol: "NCTR",
|
|
1909
|
+
decimals: 18
|
|
1910
|
+
},
|
|
1869
1911
|
{
|
|
1870
1912
|
assetId: "289989900872525819559124583375550296953",
|
|
1871
1913
|
symbol: "vMANTA",
|
|
@@ -2162,11 +2204,21 @@ var AssetHubPolkadot$3 = {
|
|
|
2162
2204
|
}
|
|
2163
2205
|
],
|
|
2164
2206
|
otherAssets: [
|
|
2207
|
+
{
|
|
2208
|
+
assetId: "",
|
|
2209
|
+
symbol: "MYTH",
|
|
2210
|
+
decimals: 18
|
|
2211
|
+
},
|
|
2165
2212
|
{
|
|
2166
2213
|
assetId: "9999",
|
|
2167
2214
|
symbol: "TOM",
|
|
2168
2215
|
decimals: 10
|
|
2169
2216
|
},
|
|
2217
|
+
{
|
|
2218
|
+
assetId: "20090142",
|
|
2219
|
+
symbol: "ELONA",
|
|
2220
|
+
decimals: 10
|
|
2221
|
+
},
|
|
2170
2222
|
{
|
|
2171
2223
|
assetId: "100",
|
|
2172
2224
|
symbol: "WETH",
|
|
@@ -2197,6 +2249,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2197
2249
|
symbol: "123",
|
|
2198
2250
|
decimals: 20
|
|
2199
2251
|
},
|
|
2252
|
+
{
|
|
2253
|
+
assetId: "52",
|
|
2254
|
+
symbol: "TeMe8",
|
|
2255
|
+
decimals: 12
|
|
2256
|
+
},
|
|
2200
2257
|
{
|
|
2201
2258
|
assetId: "9000",
|
|
2202
2259
|
symbol: "PLAY",
|
|
@@ -2217,6 +2274,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2217
2274
|
symbol: "GABE",
|
|
2218
2275
|
decimals: 20
|
|
2219
2276
|
},
|
|
2277
|
+
{
|
|
2278
|
+
assetId: "47",
|
|
2279
|
+
symbol: "TeMe6Pump",
|
|
2280
|
+
decimals: 12
|
|
2281
|
+
},
|
|
2220
2282
|
{
|
|
2221
2283
|
assetId: "50",
|
|
2222
2284
|
symbol: "CATWIF",
|
|
@@ -2247,11 +2309,21 @@ var AssetHubPolkadot$3 = {
|
|
|
2247
2309
|
symbol: "NFLR",
|
|
2248
2310
|
decimals: 10
|
|
2249
2311
|
},
|
|
2312
|
+
{
|
|
2313
|
+
assetId: "20090110",
|
|
2314
|
+
symbol: "test1",
|
|
2315
|
+
decimals: 10
|
|
2316
|
+
},
|
|
2250
2317
|
{
|
|
2251
2318
|
assetId: "256",
|
|
2252
2319
|
symbol: "ICE",
|
|
2253
2320
|
decimals: 20
|
|
2254
2321
|
},
|
|
2322
|
+
{
|
|
2323
|
+
assetId: "20090130",
|
|
2324
|
+
symbol: "SUS",
|
|
2325
|
+
decimals: 10
|
|
2326
|
+
},
|
|
2255
2327
|
{
|
|
2256
2328
|
assetId: "1111",
|
|
2257
2329
|
symbol: "TESTV2",
|
|
@@ -2272,6 +2344,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2272
2344
|
symbol: "EFI",
|
|
2273
2345
|
decimals: 18
|
|
2274
2346
|
},
|
|
2347
|
+
{
|
|
2348
|
+
assetId: "48",
|
|
2349
|
+
symbol: "SAX",
|
|
2350
|
+
decimals: 2
|
|
2351
|
+
},
|
|
2275
2352
|
{
|
|
2276
2353
|
assetId: "21",
|
|
2277
2354
|
symbol: "WBTC",
|
|
@@ -2287,6 +2364,21 @@ var AssetHubPolkadot$3 = {
|
|
|
2287
2364
|
symbol: "BULL",
|
|
2288
2365
|
decimals: 6
|
|
2289
2366
|
},
|
|
2367
|
+
{
|
|
2368
|
+
assetId: "20090109",
|
|
2369
|
+
symbol: "MATIC",
|
|
2370
|
+
decimals: 10
|
|
2371
|
+
},
|
|
2372
|
+
{
|
|
2373
|
+
assetId: "7006",
|
|
2374
|
+
symbol: "ttt",
|
|
2375
|
+
decimals: 0
|
|
2376
|
+
},
|
|
2377
|
+
{
|
|
2378
|
+
assetId: "20090138",
|
|
2379
|
+
symbol: "LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG",
|
|
2380
|
+
decimals: 10
|
|
2381
|
+
},
|
|
2290
2382
|
{
|
|
2291
2383
|
assetId: "67",
|
|
2292
2384
|
symbol: "LINK",
|
|
@@ -2297,6 +2389,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2297
2389
|
symbol: "StabCP",
|
|
2298
2390
|
decimals: 10
|
|
2299
2391
|
},
|
|
2392
|
+
{
|
|
2393
|
+
assetId: "20090140",
|
|
2394
|
+
symbol: "Grift ",
|
|
2395
|
+
decimals: 10
|
|
2396
|
+
},
|
|
2300
2397
|
{
|
|
2301
2398
|
assetId: "999",
|
|
2302
2399
|
symbol: "gold",
|
|
@@ -2312,6 +2409,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2312
2409
|
symbol: "PEPE",
|
|
2313
2410
|
decimals: 6
|
|
2314
2411
|
},
|
|
2412
|
+
{
|
|
2413
|
+
assetId: "10101",
|
|
2414
|
+
symbol: "COKE",
|
|
2415
|
+
decimals: 10
|
|
2416
|
+
},
|
|
2315
2417
|
{
|
|
2316
2418
|
assetId: "101",
|
|
2317
2419
|
symbol: "DOTMA",
|
|
@@ -2327,16 +2429,31 @@ var AssetHubPolkadot$3 = {
|
|
|
2327
2429
|
symbol: "PEPE",
|
|
2328
2430
|
decimals: 10
|
|
2329
2431
|
},
|
|
2432
|
+
{
|
|
2433
|
+
assetId: "20090133",
|
|
2434
|
+
symbol: "BSOD",
|
|
2435
|
+
decimals: 10
|
|
2436
|
+
},
|
|
2330
2437
|
{
|
|
2331
2438
|
assetId: "99",
|
|
2332
2439
|
symbol: "Cypress",
|
|
2333
2440
|
decimals: 0
|
|
2334
2441
|
},
|
|
2442
|
+
{
|
|
2443
|
+
assetId: "34",
|
|
2444
|
+
symbol: "MeTest",
|
|
2445
|
+
decimals: 12
|
|
2446
|
+
},
|
|
2335
2447
|
{
|
|
2336
2448
|
assetId: "7777",
|
|
2337
2449
|
symbol: "FUM",
|
|
2338
2450
|
decimals: 10
|
|
2339
2451
|
},
|
|
2452
|
+
{
|
|
2453
|
+
assetId: "20090114",
|
|
2454
|
+
symbol: "DOI",
|
|
2455
|
+
decimals: 10
|
|
2456
|
+
},
|
|
2340
2457
|
{
|
|
2341
2458
|
assetId: "16",
|
|
2342
2459
|
symbol: "COLA",
|
|
@@ -2347,16 +2464,31 @@ var AssetHubPolkadot$3 = {
|
|
|
2347
2464
|
symbol: "web3",
|
|
2348
2465
|
decimals: 18
|
|
2349
2466
|
},
|
|
2467
|
+
{
|
|
2468
|
+
assetId: "20090111",
|
|
2469
|
+
symbol: "txt",
|
|
2470
|
+
decimals: 10
|
|
2471
|
+
},
|
|
2350
2472
|
{
|
|
2351
2473
|
assetId: "30035",
|
|
2352
2474
|
symbol: "DED",
|
|
2353
2475
|
decimals: 18
|
|
2354
2476
|
},
|
|
2477
|
+
{
|
|
2478
|
+
assetId: "20090119",
|
|
2479
|
+
symbol: "MDGA",
|
|
2480
|
+
decimals: 10
|
|
2481
|
+
},
|
|
2355
2482
|
{
|
|
2356
2483
|
assetId: "111",
|
|
2357
2484
|
symbol: "DEMO",
|
|
2358
2485
|
decimals: 6
|
|
2359
2486
|
},
|
|
2487
|
+
{
|
|
2488
|
+
assetId: "20090121",
|
|
2489
|
+
symbol: "IBW",
|
|
2490
|
+
decimals: 10
|
|
2491
|
+
},
|
|
2360
2492
|
{
|
|
2361
2493
|
assetId: "122",
|
|
2362
2494
|
symbol: "TESTING",
|
|
@@ -2392,6 +2524,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2392
2524
|
symbol: "TST",
|
|
2393
2525
|
decimals: 10
|
|
2394
2526
|
},
|
|
2527
|
+
{
|
|
2528
|
+
assetId: "669",
|
|
2529
|
+
symbol: "lish",
|
|
2530
|
+
decimals: 9
|
|
2531
|
+
},
|
|
2395
2532
|
{
|
|
2396
2533
|
assetId: "8889",
|
|
2397
2534
|
symbol: "BNDT",
|
|
@@ -2407,6 +2544,26 @@ var AssetHubPolkadot$3 = {
|
|
|
2407
2544
|
symbol: "STINK",
|
|
2408
2545
|
decimals: 10
|
|
2409
2546
|
},
|
|
2547
|
+
{
|
|
2548
|
+
assetId: "20090143",
|
|
2549
|
+
symbol: "DMSTR",
|
|
2550
|
+
decimals: 10
|
|
2551
|
+
},
|
|
2552
|
+
{
|
|
2553
|
+
assetId: "20090117",
|
|
2554
|
+
symbol: "DEDX",
|
|
2555
|
+
decimals: 10
|
|
2556
|
+
},
|
|
2557
|
+
{
|
|
2558
|
+
assetId: "20090112",
|
|
2559
|
+
symbol: "SOLETH",
|
|
2560
|
+
decimals: 10
|
|
2561
|
+
},
|
|
2562
|
+
{
|
|
2563
|
+
assetId: "20090131",
|
|
2564
|
+
symbol: "DVCAT",
|
|
2565
|
+
decimals: 10
|
|
2566
|
+
},
|
|
2410
2567
|
{
|
|
2411
2568
|
assetId: "1107",
|
|
2412
2569
|
symbol: "JAM",
|
|
@@ -2417,6 +2574,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2417
2574
|
symbol: "DOTTY",
|
|
2418
2575
|
decimals: 10
|
|
2419
2576
|
},
|
|
2577
|
+
{
|
|
2578
|
+
assetId: "323",
|
|
2579
|
+
symbol: "DGNNNC",
|
|
2580
|
+
decimals: 6
|
|
2581
|
+
},
|
|
2420
2582
|
{
|
|
2421
2583
|
assetId: "77",
|
|
2422
2584
|
symbol: "TRQ",
|
|
@@ -2452,16 +2614,31 @@ var AssetHubPolkadot$3 = {
|
|
|
2452
2614
|
symbol: "COCOA",
|
|
2453
2615
|
decimals: 10
|
|
2454
2616
|
},
|
|
2617
|
+
{
|
|
2618
|
+
assetId: "20090115",
|
|
2619
|
+
symbol: "DOTCOIN",
|
|
2620
|
+
decimals: 10
|
|
2621
|
+
},
|
|
2455
2622
|
{
|
|
2456
2623
|
assetId: "301",
|
|
2457
2624
|
symbol: "HORN",
|
|
2458
2625
|
decimals: 6
|
|
2459
2626
|
},
|
|
2627
|
+
{
|
|
2628
|
+
assetId: "20090122",
|
|
2629
|
+
symbol: "0xf09fa590",
|
|
2630
|
+
decimals: 10
|
|
2631
|
+
},
|
|
2460
2632
|
{
|
|
2461
2633
|
assetId: "2020",
|
|
2462
2634
|
symbol: "HYDRA",
|
|
2463
2635
|
decimals: 10
|
|
2464
2636
|
},
|
|
2637
|
+
{
|
|
2638
|
+
assetId: "41",
|
|
2639
|
+
symbol: "TeMe4",
|
|
2640
|
+
decimals: 12
|
|
2641
|
+
},
|
|
2465
2642
|
{
|
|
2466
2643
|
assetId: "5318008",
|
|
2467
2644
|
symbol: "PXPS",
|
|
@@ -2497,6 +2674,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2497
2674
|
symbol: "COCA",
|
|
2498
2675
|
decimals: 6
|
|
2499
2676
|
},
|
|
2677
|
+
{
|
|
2678
|
+
assetId: "20090128",
|
|
2679
|
+
symbol: "DSTINK",
|
|
2680
|
+
decimals: 10
|
|
2681
|
+
},
|
|
2500
2682
|
{
|
|
2501
2683
|
assetId: "61",
|
|
2502
2684
|
symbol: "SUN",
|
|
@@ -2517,6 +2699,21 @@ var AssetHubPolkadot$3 = {
|
|
|
2517
2699
|
symbol: "DBX",
|
|
2518
2700
|
decimals: 6
|
|
2519
2701
|
},
|
|
2702
|
+
{
|
|
2703
|
+
assetId: "20090106",
|
|
2704
|
+
symbol: "PMATIC",
|
|
2705
|
+
decimals: 10
|
|
2706
|
+
},
|
|
2707
|
+
{
|
|
2708
|
+
assetId: "20090116",
|
|
2709
|
+
symbol: "POO",
|
|
2710
|
+
decimals: 10
|
|
2711
|
+
},
|
|
2712
|
+
{
|
|
2713
|
+
assetId: "20090129",
|
|
2714
|
+
symbol: "FCD",
|
|
2715
|
+
decimals: 10
|
|
2716
|
+
},
|
|
2520
2717
|
{
|
|
2521
2718
|
assetId: "678",
|
|
2522
2719
|
symbol: "SATS",
|
|
@@ -2527,11 +2724,21 @@ var AssetHubPolkadot$3 = {
|
|
|
2527
2724
|
symbol: "STEEBOR",
|
|
2528
2725
|
decimals: 20
|
|
2529
2726
|
},
|
|
2727
|
+
{
|
|
2728
|
+
assetId: "20090136",
|
|
2729
|
+
symbol: "HTG",
|
|
2730
|
+
decimals: 10
|
|
2731
|
+
},
|
|
2530
2732
|
{
|
|
2531
2733
|
assetId: "32",
|
|
2532
2734
|
symbol: "CLAY",
|
|
2533
2735
|
decimals: 10
|
|
2534
2736
|
},
|
|
2737
|
+
{
|
|
2738
|
+
assetId: "2106",
|
|
2739
|
+
symbol: "STREAK",
|
|
2740
|
+
decimals: 10
|
|
2741
|
+
},
|
|
2535
2742
|
{
|
|
2536
2743
|
assetId: "9527",
|
|
2537
2744
|
symbol: "LSCAT",
|
|
@@ -2547,6 +2754,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2547
2754
|
symbol: "STAR",
|
|
2548
2755
|
decimals: 6
|
|
2549
2756
|
},
|
|
2757
|
+
{
|
|
2758
|
+
assetId: "49",
|
|
2759
|
+
symbol: "TeMe7",
|
|
2760
|
+
decimals: 12
|
|
2761
|
+
},
|
|
2550
2762
|
{
|
|
2551
2763
|
assetId: "868367",
|
|
2552
2764
|
symbol: "VSC",
|
|
@@ -2562,6 +2774,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2562
2774
|
symbol: "JTO",
|
|
2563
2775
|
decimals: 10
|
|
2564
2776
|
},
|
|
2777
|
+
{
|
|
2778
|
+
assetId: "53",
|
|
2779
|
+
symbol: "TeMe9",
|
|
2780
|
+
decimals: 12
|
|
2781
|
+
},
|
|
2565
2782
|
{
|
|
2566
2783
|
assetId: "29",
|
|
2567
2784
|
symbol: "SHRIMP",
|
|
@@ -2574,8 +2791,18 @@ var AssetHubPolkadot$3 = {
|
|
|
2574
2791
|
},
|
|
2575
2792
|
{
|
|
2576
2793
|
assetId: "42",
|
|
2577
|
-
symbol: "
|
|
2578
|
-
decimals:
|
|
2794
|
+
symbol: "GAVUN",
|
|
2795
|
+
decimals: 10
|
|
2796
|
+
},
|
|
2797
|
+
{
|
|
2798
|
+
assetId: "43",
|
|
2799
|
+
symbol: "TeMe5",
|
|
2800
|
+
decimals: 12
|
|
2801
|
+
},
|
|
2802
|
+
{
|
|
2803
|
+
assetId: "7777777",
|
|
2804
|
+
symbol: "DWH",
|
|
2805
|
+
decimals: 10
|
|
2579
2806
|
},
|
|
2580
2807
|
{
|
|
2581
2808
|
assetId: "2001",
|
|
@@ -2597,6 +2824,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2597
2824
|
symbol: "lucky7",
|
|
2598
2825
|
decimals: 20
|
|
2599
2826
|
},
|
|
2827
|
+
{
|
|
2828
|
+
assetId: "4242",
|
|
2829
|
+
symbol: "GAVUN",
|
|
2830
|
+
decimals: 10
|
|
2831
|
+
},
|
|
2600
2832
|
{
|
|
2601
2833
|
assetId: "26",
|
|
2602
2834
|
symbol: "POKA",
|
|
@@ -2617,11 +2849,26 @@ var AssetHubPolkadot$3 = {
|
|
|
2617
2849
|
symbol: "USDt",
|
|
2618
2850
|
decimals: 6
|
|
2619
2851
|
},
|
|
2852
|
+
{
|
|
2853
|
+
assetId: "20090104",
|
|
2854
|
+
symbol: "DOTC",
|
|
2855
|
+
decimals: 10
|
|
2856
|
+
},
|
|
2620
2857
|
{
|
|
2621
2858
|
assetId: "20090103",
|
|
2622
2859
|
symbol: "BTC",
|
|
2623
2860
|
decimals: 20
|
|
2624
2861
|
},
|
|
2862
|
+
{
|
|
2863
|
+
assetId: "20090118",
|
|
2864
|
+
symbol: "NOTDED",
|
|
2865
|
+
decimals: 10
|
|
2866
|
+
},
|
|
2867
|
+
{
|
|
2868
|
+
assetId: "20090124",
|
|
2869
|
+
symbol: "test1",
|
|
2870
|
+
decimals: 10
|
|
2871
|
+
},
|
|
2625
2872
|
{
|
|
2626
2873
|
assetId: "690",
|
|
2627
2874
|
symbol: "BORK",
|
|
@@ -2657,11 +2904,26 @@ var AssetHubPolkadot$3 = {
|
|
|
2657
2904
|
symbol: "777",
|
|
2658
2905
|
decimals: 20
|
|
2659
2906
|
},
|
|
2907
|
+
{
|
|
2908
|
+
assetId: "86",
|
|
2909
|
+
symbol: "KOL",
|
|
2910
|
+
decimals: 12
|
|
2911
|
+
},
|
|
2912
|
+
{
|
|
2913
|
+
assetId: "20090113",
|
|
2914
|
+
symbol: "test1",
|
|
2915
|
+
decimals: 10
|
|
2916
|
+
},
|
|
2660
2917
|
{
|
|
2661
2918
|
assetId: "567",
|
|
2662
2919
|
symbol: "ANT",
|
|
2663
2920
|
decimals: 6
|
|
2664
2921
|
},
|
|
2922
|
+
{
|
|
2923
|
+
assetId: "54",
|
|
2924
|
+
symbol: "TeMe10",
|
|
2925
|
+
decimals: 12
|
|
2926
|
+
},
|
|
2665
2927
|
{
|
|
2666
2928
|
assetId: "1230",
|
|
2667
2929
|
symbol: "HAM",
|
|
@@ -2682,11 +2944,21 @@ var AssetHubPolkadot$3 = {
|
|
|
2682
2944
|
symbol: "GGI",
|
|
2683
2945
|
decimals: 6
|
|
2684
2946
|
},
|
|
2947
|
+
{
|
|
2948
|
+
assetId: "20090120",
|
|
2949
|
+
symbol: "LUNCH",
|
|
2950
|
+
decimals: 10
|
|
2951
|
+
},
|
|
2685
2952
|
{
|
|
2686
2953
|
assetId: "24",
|
|
2687
2954
|
symbol: "PRDOG",
|
|
2688
2955
|
decimals: 10
|
|
2689
2956
|
},
|
|
2957
|
+
{
|
|
2958
|
+
assetId: "20090123",
|
|
2959
|
+
symbol: "GOVD",
|
|
2960
|
+
decimals: 10
|
|
2961
|
+
},
|
|
2690
2962
|
{
|
|
2691
2963
|
assetId: "2023",
|
|
2692
2964
|
symbol: "dot",
|
|
@@ -2702,6 +2974,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2702
2974
|
symbol: "GOVD",
|
|
2703
2975
|
decimals: 10
|
|
2704
2976
|
},
|
|
2977
|
+
{
|
|
2978
|
+
assetId: "20090139",
|
|
2979
|
+
symbol: "DUSTY",
|
|
2980
|
+
decimals: 10
|
|
2981
|
+
},
|
|
2705
2982
|
{
|
|
2706
2983
|
assetId: "1864",
|
|
2707
2984
|
symbol: "JUNK",
|
|
@@ -2727,11 +3004,21 @@ var AssetHubPolkadot$3 = {
|
|
|
2727
3004
|
symbol: "HOOT",
|
|
2728
3005
|
decimals: 6
|
|
2729
3006
|
},
|
|
3007
|
+
{
|
|
3008
|
+
assetId: "20090125",
|
|
3009
|
+
symbol: "PP",
|
|
3010
|
+
decimals: 10
|
|
3011
|
+
},
|
|
2730
3012
|
{
|
|
2731
3013
|
assetId: "51",
|
|
2732
3014
|
symbol: "JAMA",
|
|
2733
3015
|
decimals: 6
|
|
2734
3016
|
},
|
|
3017
|
+
{
|
|
3018
|
+
assetId: "20090135",
|
|
3019
|
+
symbol: "DMX",
|
|
3020
|
+
decimals: 10
|
|
3021
|
+
},
|
|
2735
3022
|
{
|
|
2736
3023
|
assetId: "1234",
|
|
2737
3024
|
symbol: "BUNS",
|
|
@@ -2742,6 +3029,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2742
3029
|
symbol: "clay",
|
|
2743
3030
|
decimals: 20
|
|
2744
3031
|
},
|
|
3032
|
+
{
|
|
3033
|
+
assetId: "20090134",
|
|
3034
|
+
symbol: "DOTCOIN",
|
|
3035
|
+
decimals: 10
|
|
3036
|
+
},
|
|
2745
3037
|
{
|
|
2746
3038
|
assetId: "1000",
|
|
2747
3039
|
symbol: "BRZ",
|
|
@@ -2757,6 +3049,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2757
3049
|
symbol: "ANT",
|
|
2758
3050
|
decimals: 6
|
|
2759
3051
|
},
|
|
3052
|
+
{
|
|
3053
|
+
assetId: "20090126",
|
|
3054
|
+
symbol: "DOGMOON",
|
|
3055
|
+
decimals: 10
|
|
3056
|
+
},
|
|
2760
3057
|
{
|
|
2761
3058
|
assetId: "1992",
|
|
2762
3059
|
symbol: "SITE",
|
|
@@ -2782,6 +3079,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2782
3079
|
symbol: "no1",
|
|
2783
3080
|
decimals: 20
|
|
2784
3081
|
},
|
|
3082
|
+
{
|
|
3083
|
+
assetId: "20090132",
|
|
3084
|
+
symbol: "Beggar",
|
|
3085
|
+
decimals: 10
|
|
3086
|
+
},
|
|
2785
3087
|
{
|
|
2786
3088
|
assetId: "12",
|
|
2787
3089
|
symbol: "USDcp",
|
|
@@ -2792,6 +3094,16 @@ var AssetHubPolkadot$3 = {
|
|
|
2792
3094
|
symbol: "WUD",
|
|
2793
3095
|
decimals: 10
|
|
2794
3096
|
},
|
|
3097
|
+
{
|
|
3098
|
+
assetId: "97",
|
|
3099
|
+
symbol: "TeMe3",
|
|
3100
|
+
decimals: 12
|
|
3101
|
+
},
|
|
3102
|
+
{
|
|
3103
|
+
assetId: "12345",
|
|
3104
|
+
symbol: "usdc",
|
|
3105
|
+
decimals: 10
|
|
3106
|
+
},
|
|
2795
3107
|
{
|
|
2796
3108
|
assetId: "2000",
|
|
2797
3109
|
symbol: "DAO",
|
|
@@ -2852,6 +3164,16 @@ var AssetHubPolkadot$3 = {
|
|
|
2852
3164
|
symbol: "T54",
|
|
2853
3165
|
decimals: 10
|
|
2854
3166
|
},
|
|
3167
|
+
{
|
|
3168
|
+
assetId: "20090108",
|
|
3169
|
+
symbol: "MMM",
|
|
3170
|
+
decimals: 10
|
|
3171
|
+
},
|
|
3172
|
+
{
|
|
3173
|
+
assetId: "20090137",
|
|
3174
|
+
symbol: "hawn",
|
|
3175
|
+
decimals: 10
|
|
3176
|
+
},
|
|
2855
3177
|
{
|
|
2856
3178
|
assetId: "69",
|
|
2857
3179
|
symbol: "DAL",
|
|
@@ -2862,11 +3184,21 @@ var AssetHubPolkadot$3 = {
|
|
|
2862
3184
|
symbol: "PINK",
|
|
2863
3185
|
decimals: 10
|
|
2864
3186
|
},
|
|
3187
|
+
{
|
|
3188
|
+
assetId: "20090105",
|
|
3189
|
+
symbol: "ETH",
|
|
3190
|
+
decimals: 10
|
|
3191
|
+
},
|
|
2865
3192
|
{
|
|
2866
3193
|
assetId: "37",
|
|
2867
3194
|
symbol: "DODA",
|
|
2868
3195
|
decimals: 6
|
|
2869
3196
|
},
|
|
3197
|
+
{
|
|
3198
|
+
assetId: "20090141",
|
|
3199
|
+
symbol: "Guzzler",
|
|
3200
|
+
decimals: 10
|
|
3201
|
+
},
|
|
2870
3202
|
{
|
|
2871
3203
|
assetId: "5417",
|
|
2872
3204
|
symbol: "HASH",
|
|
@@ -2877,6 +3209,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2877
3209
|
symbol: "BOMB",
|
|
2878
3210
|
decimals: 10
|
|
2879
3211
|
},
|
|
3212
|
+
{
|
|
3213
|
+
assetId: "7151",
|
|
3214
|
+
symbol: "TUKI",
|
|
3215
|
+
decimals: 8
|
|
3216
|
+
},
|
|
2880
3217
|
{
|
|
2881
3218
|
assetId: "149",
|
|
2882
3219
|
symbol: "EDU",
|
|
@@ -2902,6 +3239,11 @@ var AssetHubPolkadot$3 = {
|
|
|
2902
3239
|
symbol: "WOOP",
|
|
2903
3240
|
decimals: 12
|
|
2904
3241
|
},
|
|
3242
|
+
{
|
|
3243
|
+
assetId: "20090107",
|
|
3244
|
+
symbol: "ETH",
|
|
3245
|
+
decimals: 10
|
|
3246
|
+
},
|
|
2905
3247
|
{
|
|
2906
3248
|
assetId: "4157",
|
|
2907
3249
|
symbol: "PDOG",
|
|
@@ -2932,10 +3274,25 @@ var AssetHubPolkadot$3 = {
|
|
|
2932
3274
|
symbol: "WOOD",
|
|
2933
3275
|
decimals: 10
|
|
2934
3276
|
},
|
|
3277
|
+
{
|
|
3278
|
+
assetId: "20090127",
|
|
3279
|
+
symbol: "PAMPIT",
|
|
3280
|
+
decimals: 10
|
|
3281
|
+
},
|
|
2935
3282
|
{
|
|
2936
3283
|
assetId: "2230",
|
|
2937
3284
|
symbol: "GBILL",
|
|
2938
3285
|
decimals: 8
|
|
3286
|
+
},
|
|
3287
|
+
{
|
|
3288
|
+
assetId: "92",
|
|
3289
|
+
symbol: "TeMe2",
|
|
3290
|
+
decimals: 12
|
|
3291
|
+
},
|
|
3292
|
+
{
|
|
3293
|
+
assetId: "2203",
|
|
3294
|
+
symbol: "PBTC",
|
|
3295
|
+
decimals: 10
|
|
2939
3296
|
}
|
|
2940
3297
|
]
|
|
2941
3298
|
};
|
|
@@ -5827,15 +6184,18 @@ var Polkadex$3 = {
|
|
|
5827
6184
|
symbol: "DOT",
|
|
5828
6185
|
decimals: 12
|
|
5829
6186
|
},
|
|
6187
|
+
{
|
|
6188
|
+
assetId: "119367686984583275840673742485354142551",
|
|
6189
|
+
symbol: "DED",
|
|
6190
|
+
decimals: 12
|
|
6191
|
+
},
|
|
5830
6192
|
{
|
|
5831
6193
|
assetId: "339306133874233608313826294843504252047",
|
|
5832
6194
|
symbol: "PINK",
|
|
5833
6195
|
decimals: 12
|
|
5834
6196
|
},
|
|
5835
6197
|
{
|
|
5836
|
-
assetId: "
|
|
5837
|
-
symbol: "DED",
|
|
5838
|
-
decimals: 12
|
|
6198
|
+
assetId: "313524628741076911470961827389955394913"
|
|
5839
6199
|
},
|
|
5840
6200
|
{
|
|
5841
6201
|
assetId: "3496813586714279103986568049643838918",
|
|
@@ -6011,21 +6371,62 @@ var Phala$3 = {
|
|
|
6011
6371
|
}
|
|
6012
6372
|
]
|
|
6013
6373
|
};
|
|
6014
|
-
var
|
|
6015
|
-
paraId:
|
|
6016
|
-
relayChainAssetSymbol: "
|
|
6017
|
-
nativeAssetSymbol: "
|
|
6374
|
+
var Ethereum$1 = {
|
|
6375
|
+
paraId: 1,
|
|
6376
|
+
relayChainAssetSymbol: "DOT",
|
|
6377
|
+
nativeAssetSymbol: "ETH",
|
|
6018
6378
|
nativeAssets: [
|
|
6019
6379
|
{
|
|
6020
|
-
symbol: "
|
|
6021
|
-
decimals:
|
|
6380
|
+
symbol: "ETH",
|
|
6381
|
+
decimals: 18
|
|
6022
6382
|
}
|
|
6023
6383
|
],
|
|
6024
6384
|
otherAssets: [
|
|
6025
6385
|
{
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6386
|
+
symbol: "WETH",
|
|
6387
|
+
assetId: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
|
|
6388
|
+
},
|
|
6389
|
+
{
|
|
6390
|
+
symbol: "WBTC",
|
|
6391
|
+
assetId: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599"
|
|
6392
|
+
},
|
|
6393
|
+
{
|
|
6394
|
+
symbol: "SHIB",
|
|
6395
|
+
assetId: "0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE"
|
|
6396
|
+
},
|
|
6397
|
+
{
|
|
6398
|
+
symbol: "PEPE",
|
|
6399
|
+
assetId: "0x6982508145454Ce325dDbE47a25d4ec3d2311933"
|
|
6400
|
+
},
|
|
6401
|
+
{
|
|
6402
|
+
symbol: "TON",
|
|
6403
|
+
assetId: "0x582d872A1B094FC48F5DE31D3B73F2D9bE47def1"
|
|
6404
|
+
},
|
|
6405
|
+
{
|
|
6406
|
+
symbol: "wstETH",
|
|
6407
|
+
assetId: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0"
|
|
6408
|
+
},
|
|
6409
|
+
{
|
|
6410
|
+
symbol: "tBTC",
|
|
6411
|
+
assetId: "0x18084fbA666a33d37592fA2633fD49a74DD93a88"
|
|
6412
|
+
}
|
|
6413
|
+
]
|
|
6414
|
+
};
|
|
6415
|
+
var Khala$3 = {
|
|
6416
|
+
paraId: 2004,
|
|
6417
|
+
relayChainAssetSymbol: "KSM",
|
|
6418
|
+
nativeAssetSymbol: "PHA",
|
|
6419
|
+
nativeAssets: [
|
|
6420
|
+
{
|
|
6421
|
+
symbol: "PHA",
|
|
6422
|
+
decimals: 12
|
|
6423
|
+
}
|
|
6424
|
+
],
|
|
6425
|
+
otherAssets: [
|
|
6426
|
+
{
|
|
6427
|
+
assetId: "0",
|
|
6428
|
+
symbol: "KSM",
|
|
6429
|
+
decimals: 12
|
|
6029
6430
|
},
|
|
6030
6431
|
{
|
|
6031
6432
|
assetId: "10",
|
|
@@ -6109,6 +6510,67 @@ var Khala$3 = {
|
|
|
6109
6510
|
}
|
|
6110
6511
|
]
|
|
6111
6512
|
};
|
|
6513
|
+
var Mythos$3 = {
|
|
6514
|
+
paraId: 3369,
|
|
6515
|
+
relayChainAssetSymbol: "DOT",
|
|
6516
|
+
nativeAssetSymbol: "MYTH",
|
|
6517
|
+
nativeAssets: [
|
|
6518
|
+
{
|
|
6519
|
+
symbol: "MYTH",
|
|
6520
|
+
decimals: 18
|
|
6521
|
+
}
|
|
6522
|
+
],
|
|
6523
|
+
otherAssets: [
|
|
6524
|
+
]
|
|
6525
|
+
};
|
|
6526
|
+
var Peaq$3 = {
|
|
6527
|
+
paraId: 3338,
|
|
6528
|
+
relayChainAssetSymbol: "DOT",
|
|
6529
|
+
nativeAssetSymbol: "PEAQ",
|
|
6530
|
+
nativeAssets: [
|
|
6531
|
+
{
|
|
6532
|
+
symbol: "PEAQ",
|
|
6533
|
+
decimals: 18
|
|
6534
|
+
}
|
|
6535
|
+
],
|
|
6536
|
+
otherAssets: [
|
|
6537
|
+
{
|
|
6538
|
+
assetId: "1005",
|
|
6539
|
+
symbol: "USDT.wh",
|
|
6540
|
+
decimals: 6
|
|
6541
|
+
},
|
|
6542
|
+
{
|
|
6543
|
+
assetId: "1004",
|
|
6544
|
+
symbol: "DAI.wh",
|
|
6545
|
+
decimals: 18
|
|
6546
|
+
},
|
|
6547
|
+
{
|
|
6548
|
+
assetId: "1000",
|
|
6549
|
+
symbol: "GLMR",
|
|
6550
|
+
decimals: 18
|
|
6551
|
+
},
|
|
6552
|
+
{
|
|
6553
|
+
assetId: "1002",
|
|
6554
|
+
symbol: "WETH.wh",
|
|
6555
|
+
decimals: 18
|
|
6556
|
+
},
|
|
6557
|
+
{
|
|
6558
|
+
assetId: "1",
|
|
6559
|
+
symbol: "DOT",
|
|
6560
|
+
decimals: 10
|
|
6561
|
+
},
|
|
6562
|
+
{
|
|
6563
|
+
assetId: "1001",
|
|
6564
|
+
symbol: "USDC.wh",
|
|
6565
|
+
decimals: 6
|
|
6566
|
+
},
|
|
6567
|
+
{
|
|
6568
|
+
assetId: "1003",
|
|
6569
|
+
symbol: "WBTC.wh",
|
|
6570
|
+
decimals: 8
|
|
6571
|
+
}
|
|
6572
|
+
]
|
|
6573
|
+
};
|
|
6112
6574
|
var assets = {
|
|
6113
6575
|
Acala: Acala$3,
|
|
6114
6576
|
BridgeHubPolkadot: BridgeHubPolkadot$3,
|
|
@@ -6163,7 +6625,10 @@ var assets = {
|
|
|
6163
6625
|
Zeitgeist: Zeitgeist$3,
|
|
6164
6626
|
Collectives: Collectives$3,
|
|
6165
6627
|
Phala: Phala$3,
|
|
6166
|
-
|
|
6628
|
+
Ethereum: Ethereum$1,
|
|
6629
|
+
Khala: Khala$3,
|
|
6630
|
+
Mythos: Mythos$3,
|
|
6631
|
+
Peaq: Peaq$3
|
|
6167
6632
|
};
|
|
6168
6633
|
|
|
6169
6634
|
var assetsMapJson = /*#__PURE__*/Object.freeze({
|
|
@@ -6192,6 +6657,7 @@ var assetsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6192
6657
|
Curio: Curio$3,
|
|
6193
6658
|
Darwinia: Darwinia$3,
|
|
6194
6659
|
Encointer: Encointer$3,
|
|
6660
|
+
Ethereum: Ethereum$1,
|
|
6195
6661
|
Hydration: Hydration$3,
|
|
6196
6662
|
Imbue: Imbue$3,
|
|
6197
6663
|
Integritee: Integritee$3,
|
|
@@ -6206,10 +6672,12 @@ var assetsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6206
6672
|
Manta: Manta$3,
|
|
6207
6673
|
Moonbeam: Moonbeam$3,
|
|
6208
6674
|
Moonriver: Moonriver$3,
|
|
6675
|
+
Mythos: Mythos$3,
|
|
6209
6676
|
NeuroWeb: NeuroWeb$3,
|
|
6210
6677
|
Nodle: Nodle$3,
|
|
6211
6678
|
Parallel: Parallel$3,
|
|
6212
6679
|
ParallelHeiko: ParallelHeiko$3,
|
|
6680
|
+
Peaq: Peaq$3,
|
|
6213
6681
|
Pendulum: Pendulum$3,
|
|
6214
6682
|
Phala: Phala$3,
|
|
6215
6683
|
Picasso: Picasso$3,
|
|
@@ -6261,8 +6729,18 @@ var getAllAssetsSymbols = function getAllAssetsSymbols(node) {
|
|
|
6261
6729
|
});
|
|
6262
6730
|
return [relayChainAssetSymbol].concat(_toConsumableArray(nativeAssetsSymbols), _toConsumableArray(otherAssetsSymbols));
|
|
6263
6731
|
};
|
|
6732
|
+
var getNativeAssetSymbol = function getNativeAssetSymbol(node) {
|
|
6733
|
+
if (node === 'Polkadot') {
|
|
6734
|
+
return 'DOT';
|
|
6735
|
+
} else if (node === 'Kusama') {
|
|
6736
|
+
return 'KSM';
|
|
6737
|
+
}
|
|
6738
|
+
return getAssetsObject(node).nativeAssetSymbol;
|
|
6739
|
+
};
|
|
6264
6740
|
var hasSupportForAsset = function hasSupportForAsset(node, symbol) {
|
|
6265
|
-
return getAllAssetsSymbols(node).
|
|
6741
|
+
return getAllAssetsSymbols(node).map(function (s) {
|
|
6742
|
+
return s.toLowerCase();
|
|
6743
|
+
}).includes(symbol.toLowerCase());
|
|
6266
6744
|
};
|
|
6267
6745
|
var getAssetDecimals = function getAssetDecimals(node, symbol) {
|
|
6268
6746
|
var _getAssetsObject2 = getAssetsObject(node),
|
|
@@ -6685,6 +7163,19 @@ var BridgeHubKusama$2 = {
|
|
|
6685
7163
|
"PolkadotXcm"
|
|
6686
7164
|
]
|
|
6687
7165
|
};
|
|
7166
|
+
var Mythos$2 = {
|
|
7167
|
+
defaultPallet: "PolkadotXcm",
|
|
7168
|
+
supportedPallets: [
|
|
7169
|
+
"PolkadotXcm"
|
|
7170
|
+
]
|
|
7171
|
+
};
|
|
7172
|
+
var Peaq$2 = {
|
|
7173
|
+
defaultPallet: "XTokens",
|
|
7174
|
+
supportedPallets: [
|
|
7175
|
+
"PolkadotXcm",
|
|
7176
|
+
"XTokens"
|
|
7177
|
+
]
|
|
7178
|
+
};
|
|
6688
7179
|
var pallets = {
|
|
6689
7180
|
AssetHubPolkadot: AssetHubPolkadot$2,
|
|
6690
7181
|
Acala: Acala$2,
|
|
@@ -6739,7 +7230,9 @@ var pallets = {
|
|
|
6739
7230
|
KiltSpiritnet: KiltSpiritnet$2,
|
|
6740
7231
|
Curio: Curio$2,
|
|
6741
7232
|
BridgeHubPolkadot: BridgeHubPolkadot$2,
|
|
6742
|
-
BridgeHubKusama: BridgeHubKusama$2
|
|
7233
|
+
BridgeHubKusama: BridgeHubKusama$2,
|
|
7234
|
+
Mythos: Mythos$2,
|
|
7235
|
+
Peaq: Peaq$2
|
|
6743
7236
|
};
|
|
6744
7237
|
|
|
6745
7238
|
var palletsMapJson = /*#__PURE__*/Object.freeze({
|
|
@@ -6782,10 +7275,12 @@ var palletsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
6782
7275
|
Manta: Manta$2,
|
|
6783
7276
|
Moonbeam: Moonbeam$2,
|
|
6784
7277
|
Moonriver: Moonriver$2,
|
|
7278
|
+
Mythos: Mythos$2,
|
|
6785
7279
|
NeuroWeb: NeuroWeb$2,
|
|
6786
7280
|
Nodle: Nodle$2,
|
|
6787
7281
|
Parallel: Parallel$2,
|
|
6788
7282
|
ParallelHeiko: ParallelHeiko$2,
|
|
7283
|
+
Peaq: Peaq$2,
|
|
6789
7284
|
Pendulum: Pendulum$2,
|
|
6790
7285
|
Phala: Phala$2,
|
|
6791
7286
|
Picasso: Picasso$2,
|
|
@@ -6810,6 +7305,69 @@ var getSupportedPallets = function getSupportedPallets(node) {
|
|
|
6810
7305
|
return palletsMap$1[node].supportedPallets;
|
|
6811
7306
|
};
|
|
6812
7307
|
|
|
7308
|
+
// Used to inform user, that currency they wish to use is not registered on either origin or destination Parachain
|
|
7309
|
+
var InvalidCurrencyError = /*#__PURE__*/function (_Error) {
|
|
7310
|
+
function InvalidCurrencyError(message) {
|
|
7311
|
+
var _this;
|
|
7312
|
+
_classCallCheck(this, InvalidCurrencyError);
|
|
7313
|
+
_this = _callSuper(this, InvalidCurrencyError, [message]);
|
|
7314
|
+
_this.name = 'InvalidCurrencyError';
|
|
7315
|
+
return _this;
|
|
7316
|
+
}
|
|
7317
|
+
_inherits(InvalidCurrencyError, _Error);
|
|
7318
|
+
return _createClass(InvalidCurrencyError);
|
|
7319
|
+
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
7320
|
+
|
|
7321
|
+
// Used to inform user, that Parachain they wish to use is not supported yet
|
|
7322
|
+
var NodeNotSupportedError = /*#__PURE__*/function (_Error) {
|
|
7323
|
+
function NodeNotSupportedError(message) {
|
|
7324
|
+
var _this;
|
|
7325
|
+
_classCallCheck(this, NodeNotSupportedError);
|
|
7326
|
+
_this = _callSuper(this, NodeNotSupportedError, [message !== null && message !== void 0 ? message : 'These nodes do not support XCM transfers from Relay / to Relay chain.']);
|
|
7327
|
+
_this.name = 'NodeNotSupported';
|
|
7328
|
+
return _this;
|
|
7329
|
+
}
|
|
7330
|
+
_inherits(NodeNotSupportedError, _Error);
|
|
7331
|
+
return _createClass(NodeNotSupportedError);
|
|
7332
|
+
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
7333
|
+
|
|
7334
|
+
// Used to inform user, that Parachain they wish to use does not support scenario they wish to use yet
|
|
7335
|
+
var ScenarioNotSupportedError = /*#__PURE__*/function (_Error) {
|
|
7336
|
+
function ScenarioNotSupportedError(node, scenario, message) {
|
|
7337
|
+
var _this;
|
|
7338
|
+
_classCallCheck(this, ScenarioNotSupportedError);
|
|
7339
|
+
_this = _callSuper(this, ScenarioNotSupportedError, [message !== null && message !== void 0 ? message : "Scenario ".concat(scenario, " not supported for node ").concat(node)]);
|
|
7340
|
+
_this.name = 'ScenarioNotSupported';
|
|
7341
|
+
return _this;
|
|
7342
|
+
}
|
|
7343
|
+
_inherits(ScenarioNotSupportedError, _Error);
|
|
7344
|
+
return _createClass(ScenarioNotSupportedError);
|
|
7345
|
+
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
7346
|
+
|
|
7347
|
+
var IncompatibleNodesError = /*#__PURE__*/function (_Error) {
|
|
7348
|
+
function IncompatibleNodesError() {
|
|
7349
|
+
var _this;
|
|
7350
|
+
_classCallCheck(this, IncompatibleNodesError);
|
|
7351
|
+
_this = _callSuper(this, IncompatibleNodesError, ['Transactions between nodes on different relaychains are not yet possible.']);
|
|
7352
|
+
_this.name = 'IncompatibleNodes';
|
|
7353
|
+
return _this;
|
|
7354
|
+
}
|
|
7355
|
+
_inherits(IncompatibleNodesError, _Error);
|
|
7356
|
+
return _createClass(IncompatibleNodesError);
|
|
7357
|
+
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
7358
|
+
|
|
7359
|
+
var DuplicateAssetError = /*#__PURE__*/function (_Error) {
|
|
7360
|
+
function DuplicateAssetError(symbol) {
|
|
7361
|
+
var _this;
|
|
7362
|
+
_classCallCheck(this, DuplicateAssetError);
|
|
7363
|
+
_this = _callSuper(this, DuplicateAssetError, ["Multiple assets found with the same symbol: ".concat(symbol, ". Please specify asset ID directly by .currency({id: <ASSET_ID>})")]);
|
|
7364
|
+
_this.name = 'DuplicateAsset';
|
|
7365
|
+
return _this;
|
|
7366
|
+
}
|
|
7367
|
+
_inherits(DuplicateAssetError, _Error);
|
|
7368
|
+
return _createClass(DuplicateAssetError);
|
|
7369
|
+
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
7370
|
+
|
|
6813
7371
|
var constructRelayToParaParameters = function constructRelayToParaParameters(_ref, version) {
|
|
6814
7372
|
var api = _ref.api,
|
|
6815
7373
|
destination = _ref.destination,
|
|
@@ -6830,6 +7388,12 @@ var isTMulti = function isTMulti(value) {
|
|
|
6830
7388
|
var isTMultiLocation = function isTMultiLocation(value) {
|
|
6831
7389
|
return value && typeof value.parents !== 'undefined' && typeof value.interior !== 'undefined';
|
|
6832
7390
|
};
|
|
7391
|
+
var isTCurrencySpecifier = function isTCurrencySpecifier(value) {
|
|
7392
|
+
if (_typeof(value) !== 'object' || value === null) {
|
|
7393
|
+
return false;
|
|
7394
|
+
}
|
|
7395
|
+
return 'symbol' in value && typeof value.symbol === 'string' || 'id' in value && (typeof value.id === 'string' || typeof value.id === 'number' || typeof value.id === 'bigint');
|
|
7396
|
+
};
|
|
6833
7397
|
var createBridgeCurrencySpec = function createBridgeCurrencySpec(amount, ecosystem) {
|
|
6834
7398
|
return _defineProperty({}, Version.V4, [{
|
|
6835
7399
|
id: {
|
|
@@ -6849,6 +7413,7 @@ var createCurrencySpec = function createCurrencySpec(amount, version, parents, o
|
|
|
6849
7413
|
var interior = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'Here';
|
|
6850
7414
|
if (!overriddenCurrency) {
|
|
6851
7415
|
return _defineProperty({}, version, [{
|
|
7416
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
6852
7417
|
id: version === Version.V4 ? {
|
|
6853
7418
|
parents: parents,
|
|
6854
7419
|
interior: interior
|
|
@@ -6873,14 +7438,14 @@ var createCurrencySpec = function createCurrencySpec(amount, version, parents, o
|
|
|
6873
7438
|
}]) : // It must be TMultiAsset if not TMultiLocation
|
|
6874
7439
|
_defineProperty({}, version, overriddenCurrency);
|
|
6875
7440
|
};
|
|
6876
|
-
var createPolkadotXcmHeader = function createPolkadotXcmHeader(scenario, version, destination, nodeId) {
|
|
6877
|
-
var
|
|
6878
|
-
var interior = scenario === 'ParaToRelay' ? 'Here' : createX1Payload(version, {
|
|
7441
|
+
var createPolkadotXcmHeader = function createPolkadotXcmHeader(scenario, version, destination, nodeId, junction, parents) {
|
|
7442
|
+
var parentsResolved = parents !== null && parents !== void 0 ? parents : scenario === 'RelayToPara' ? Parents.ZERO : Parents.ONE;
|
|
7443
|
+
var interior = scenario === 'ParaToRelay' ? 'Here' : createX1Payload(version, junction !== null && junction !== void 0 ? junction : {
|
|
6879
7444
|
Parachain: nodeId
|
|
6880
7445
|
});
|
|
6881
7446
|
var isMultiLocationDestination = _typeof(destination) === 'object';
|
|
6882
7447
|
return _defineProperty({}, version, isMultiLocationDestination ? destination : {
|
|
6883
|
-
parents:
|
|
7448
|
+
parents: parentsResolved,
|
|
6884
7449
|
interior: interior
|
|
6885
7450
|
});
|
|
6886
7451
|
};
|
|
@@ -6917,9 +7482,11 @@ var calculateTransactionFee$1 = function calculateTransactionFee(tx, address) {
|
|
|
6917
7482
|
}, _callee);
|
|
6918
7483
|
}));
|
|
6919
7484
|
};
|
|
7485
|
+
// TODO: Refactor this function to eliminate the any type
|
|
6920
7486
|
var findParachainJunction = function findParachainJunction(multilocation) {
|
|
6921
7487
|
var interior = multilocation.interior;
|
|
6922
7488
|
for (var key in interior) {
|
|
7489
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
6923
7490
|
var junctions = interior[key];
|
|
6924
7491
|
if (Array.isArray(junctions)) {
|
|
6925
7492
|
var _iterator = _createForOfIteratorHelper(junctions),
|
|
@@ -6954,7 +7521,29 @@ var resolveTNodeFromMultiLocation = function resolveTNodeFromMultiLocation(multi
|
|
|
6954
7521
|
return node;
|
|
6955
7522
|
};
|
|
6956
7523
|
|
|
7524
|
+
var findAssetBySymbol = function findAssetBySymbol(otherAssets, nativeAssets, symbol, isRelayDestination) {
|
|
7525
|
+
var otherAssetsMatches = otherAssets.filter(function (_ref) {
|
|
7526
|
+
var assetSymbol = _ref.symbol;
|
|
7527
|
+
return (assetSymbol === null || assetSymbol === void 0 ? void 0 : assetSymbol.toLowerCase()) === symbol.toLowerCase();
|
|
7528
|
+
});
|
|
7529
|
+
var nativeAssetsMatches = nativeAssets.filter(function (_ref2) {
|
|
7530
|
+
var assetSymbol = _ref2.symbol;
|
|
7531
|
+
return (assetSymbol === null || assetSymbol === void 0 ? void 0 : assetSymbol.toLowerCase()) === symbol.toLowerCase();
|
|
7532
|
+
});
|
|
7533
|
+
if (otherAssetsMatches.length > 1 && !isRelayDestination) {
|
|
7534
|
+
throw new DuplicateAssetError(symbol);
|
|
7535
|
+
}
|
|
7536
|
+
return otherAssetsMatches[0] || nativeAssetsMatches[0] || null;
|
|
7537
|
+
};
|
|
7538
|
+
var findAssetById = function findAssetById(assets, assetId) {
|
|
7539
|
+
return assets.find(function (_ref3) {
|
|
7540
|
+
var currentAssetId = _ref3.assetId;
|
|
7541
|
+
return currentAssetId === assetId;
|
|
7542
|
+
});
|
|
7543
|
+
};
|
|
6957
7544
|
var getAssetBySymbolOrId = function getAssetBySymbolOrId(node, currency) {
|
|
7545
|
+
var isRelayDestination = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
7546
|
+
var isSymbol = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined;
|
|
6958
7547
|
if (isTMulti(currency)) {
|
|
6959
7548
|
return null;
|
|
6960
7549
|
}
|
|
@@ -6963,22 +7552,26 @@ var getAssetBySymbolOrId = function getAssetBySymbolOrId(node, currency) {
|
|
|
6963
7552
|
otherAssets = _getAssetsObject.otherAssets,
|
|
6964
7553
|
nativeAssets = _getAssetsObject.nativeAssets,
|
|
6965
7554
|
relayChainAssetSymbol = _getAssetsObject.relayChainAssetSymbol;
|
|
6966
|
-
var
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
})
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
7555
|
+
var combinedAssets = [].concat(_toConsumableArray(otherAssets), _toConsumableArray(nativeAssets));
|
|
7556
|
+
var asset;
|
|
7557
|
+
if (isSymbol === true) {
|
|
7558
|
+
asset = findAssetBySymbol(otherAssets, nativeAssets, currencyString, isRelayDestination);
|
|
7559
|
+
} else if (isSymbol === false) {
|
|
7560
|
+
asset = findAssetById(combinedAssets, currencyString);
|
|
7561
|
+
} else {
|
|
7562
|
+
asset = findAssetBySymbol(otherAssets, nativeAssets, currencyString, isRelayDestination) || findAssetById(combinedAssets, currencyString);
|
|
7563
|
+
}
|
|
7564
|
+
if (asset) {
|
|
6974
7565
|
return {
|
|
6975
|
-
symbol: symbol,
|
|
6976
|
-
assetId: assetId
|
|
7566
|
+
symbol: asset.symbol,
|
|
7567
|
+
assetId: asset.assetId
|
|
7568
|
+
};
|
|
7569
|
+
}
|
|
7570
|
+
if (relayChainAssetSymbol === currencyString && isSymbol !== false) {
|
|
7571
|
+
return {
|
|
7572
|
+
symbol: relayChainAssetSymbol
|
|
6977
7573
|
};
|
|
6978
7574
|
}
|
|
6979
|
-
if (relayChainAssetSymbol === currencyString) return {
|
|
6980
|
-
symbol: relayChainAssetSymbol
|
|
6981
|
-
};
|
|
6982
7575
|
return null;
|
|
6983
7576
|
};
|
|
6984
7577
|
|
|
@@ -7140,6 +7733,8 @@ var KiltSpiritnet$1 = "10000000000000";
|
|
|
7140
7733
|
var Curio$1 = "10000000000000000";
|
|
7141
7734
|
var BridgeHubPolkadot$1 = "1000000000";
|
|
7142
7735
|
var BridgeHubKusama$1 = "33333333";
|
|
7736
|
+
var Mythos$1 = "10000000000000000";
|
|
7737
|
+
var Peaq$1 = "500";
|
|
7143
7738
|
var existentialDeposits = {
|
|
7144
7739
|
AssetHubPolkadot: AssetHubPolkadot$1,
|
|
7145
7740
|
Acala: Acala$1,
|
|
@@ -7196,7 +7791,9 @@ var existentialDeposits = {
|
|
|
7196
7791
|
KiltSpiritnet: KiltSpiritnet$1,
|
|
7197
7792
|
Curio: Curio$1,
|
|
7198
7793
|
BridgeHubPolkadot: BridgeHubPolkadot$1,
|
|
7199
|
-
BridgeHubKusama: BridgeHubKusama$1
|
|
7794
|
+
BridgeHubKusama: BridgeHubKusama$1,
|
|
7795
|
+
Mythos: Mythos$1,
|
|
7796
|
+
Peaq: Peaq$1
|
|
7200
7797
|
};
|
|
7201
7798
|
|
|
7202
7799
|
var edMapJson = /*#__PURE__*/Object.freeze({
|
|
@@ -7240,10 +7837,12 @@ var edMapJson = /*#__PURE__*/Object.freeze({
|
|
|
7240
7837
|
Manta: Manta$1,
|
|
7241
7838
|
Moonbeam: Moonbeam$1,
|
|
7242
7839
|
Moonriver: Moonriver$1,
|
|
7840
|
+
Mythos: Mythos$1,
|
|
7243
7841
|
NeuroWeb: NeuroWeb$1,
|
|
7244
7842
|
Nodle: Nodle$1,
|
|
7245
7843
|
Parallel: Parallel$1,
|
|
7246
7844
|
ParallelHeiko: ParallelHeiko$1,
|
|
7845
|
+
Peaq: Peaq$1,
|
|
7247
7846
|
Pendulum: Pendulum$1,
|
|
7248
7847
|
Phala: Phala$1,
|
|
7249
7848
|
Picasso: Picasso$1,
|
|
@@ -8005,6 +8604,158 @@ var Builder = function Builder(api) {
|
|
|
8005
8604
|
return new GeneralBuilder(api);
|
|
8006
8605
|
};
|
|
8007
8606
|
|
|
8607
|
+
var transferEthToPolkadot = function transferEthToPolkadot(provider_1, _a) {
|
|
8608
|
+
return __awaiter(void 0, [provider_1, _a], void 0, function (provider, _ref) {
|
|
8609
|
+
var signer = _ref.signer,
|
|
8610
|
+
address = _ref.address,
|
|
8611
|
+
to = _ref.to,
|
|
8612
|
+
amount = _ref.amount,
|
|
8613
|
+
currency = _ref.currency;
|
|
8614
|
+
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
8615
|
+
var ethAssets, ethAsset, env, config, context, destParaId, plan, result;
|
|
8616
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
8617
|
+
while (1) switch (_context.prev = _context.next) {
|
|
8618
|
+
case 0:
|
|
8619
|
+
ethAssets = getOtherAssets('Ethereum');
|
|
8620
|
+
ethAsset = ethAssets.find(function (asset) {
|
|
8621
|
+
return asset.symbol === currency;
|
|
8622
|
+
});
|
|
8623
|
+
if (ethAsset) {
|
|
8624
|
+
_context.next = 4;
|
|
8625
|
+
break;
|
|
8626
|
+
}
|
|
8627
|
+
throw new InvalidCurrencyError("Currency ".concat(currency, " is not supported for Ethereum transfers"));
|
|
8628
|
+
case 4:
|
|
8629
|
+
env = environment.SNOWBRIDGE_ENV['polkadot_mainnet'];
|
|
8630
|
+
config = env.config;
|
|
8631
|
+
_context.next = 8;
|
|
8632
|
+
return contextFactory({
|
|
8633
|
+
ethereum: {
|
|
8634
|
+
execution_url: provider,
|
|
8635
|
+
beacon_url: config.BEACON_HTTP_API
|
|
8636
|
+
},
|
|
8637
|
+
polkadot: {
|
|
8638
|
+
url: {
|
|
8639
|
+
bridgeHub: config.BRIDGE_HUB_URL,
|
|
8640
|
+
assetHub: config.ASSET_HUB_URL,
|
|
8641
|
+
relaychain: config.RELAY_CHAIN_URL,
|
|
8642
|
+
parachains: config.PARACHAINS
|
|
8643
|
+
}
|
|
8644
|
+
},
|
|
8645
|
+
appContracts: {
|
|
8646
|
+
gateway: config.GATEWAY_CONTRACT,
|
|
8647
|
+
beefy: config.BEEFY_CONTRACT
|
|
8648
|
+
}
|
|
8649
|
+
});
|
|
8650
|
+
case 8:
|
|
8651
|
+
context = _context.sent;
|
|
8652
|
+
destParaId = getParaId(to);
|
|
8653
|
+
_context.next = 12;
|
|
8654
|
+
return toPolkadot.validateSend(context, signer, address, ethAsset.assetId, destParaId, BigInt(amount), BigInt(0));
|
|
8655
|
+
case 12:
|
|
8656
|
+
plan = _context.sent;
|
|
8657
|
+
if (!plan.failure) {
|
|
8658
|
+
_context.next = 15;
|
|
8659
|
+
break;
|
|
8660
|
+
}
|
|
8661
|
+
throw new Error("Failed to validate send: ".concat(plan.failure.errors.map(function (e) {
|
|
8662
|
+
return e.message;
|
|
8663
|
+
}).join('\n\n')));
|
|
8664
|
+
case 15:
|
|
8665
|
+
_context.next = 17;
|
|
8666
|
+
return toPolkadot.send(context, signer, plan);
|
|
8667
|
+
case 17:
|
|
8668
|
+
result = _context.sent;
|
|
8669
|
+
return _context.abrupt("return", {
|
|
8670
|
+
result: result,
|
|
8671
|
+
plan: plan
|
|
8672
|
+
});
|
|
8673
|
+
case 19:
|
|
8674
|
+
case "end":
|
|
8675
|
+
return _context.stop();
|
|
8676
|
+
}
|
|
8677
|
+
}, _callee);
|
|
8678
|
+
})();
|
|
8679
|
+
});
|
|
8680
|
+
};
|
|
8681
|
+
|
|
8682
|
+
var EvmBuilderClass = /*#__PURE__*/function () {
|
|
8683
|
+
function EvmBuilderClass(provider) {
|
|
8684
|
+
_classCallCheck(this, EvmBuilderClass);
|
|
8685
|
+
this._provider = provider;
|
|
8686
|
+
this._options = {};
|
|
8687
|
+
}
|
|
8688
|
+
return _createClass(EvmBuilderClass, [{
|
|
8689
|
+
key: "to",
|
|
8690
|
+
value: function to(node) {
|
|
8691
|
+
this._options.to = node;
|
|
8692
|
+
return this;
|
|
8693
|
+
}
|
|
8694
|
+
}, {
|
|
8695
|
+
key: "amount",
|
|
8696
|
+
value: function amount(_amount) {
|
|
8697
|
+
this._options.amount = _amount;
|
|
8698
|
+
return this;
|
|
8699
|
+
}
|
|
8700
|
+
}, {
|
|
8701
|
+
key: "currency",
|
|
8702
|
+
value: function currency(_currency) {
|
|
8703
|
+
this._options.currency = _currency;
|
|
8704
|
+
return this;
|
|
8705
|
+
}
|
|
8706
|
+
}, {
|
|
8707
|
+
key: "address",
|
|
8708
|
+
value: function address(_address) {
|
|
8709
|
+
this._options.address = _address;
|
|
8710
|
+
return this;
|
|
8711
|
+
}
|
|
8712
|
+
}, {
|
|
8713
|
+
key: "signer",
|
|
8714
|
+
value: function signer(_signer) {
|
|
8715
|
+
this._options.signer = _signer;
|
|
8716
|
+
return this;
|
|
8717
|
+
}
|
|
8718
|
+
}, {
|
|
8719
|
+
key: "build",
|
|
8720
|
+
value: function build() {
|
|
8721
|
+
return __awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
8722
|
+
var requiredParams, _i, _requiredParams, param;
|
|
8723
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
8724
|
+
while (1) switch (_context.prev = _context.next) {
|
|
8725
|
+
case 0:
|
|
8726
|
+
requiredParams = ['to', 'amount', 'currency', 'address', 'signer'];
|
|
8727
|
+
_i = 0, _requiredParams = requiredParams;
|
|
8728
|
+
case 2:
|
|
8729
|
+
if (!(_i < _requiredParams.length)) {
|
|
8730
|
+
_context.next = 9;
|
|
8731
|
+
break;
|
|
8732
|
+
}
|
|
8733
|
+
param = _requiredParams[_i];
|
|
8734
|
+
if (!(this._options[param] === undefined)) {
|
|
8735
|
+
_context.next = 6;
|
|
8736
|
+
break;
|
|
8737
|
+
}
|
|
8738
|
+
throw new Error("Builder object is missing parameter: ".concat(param));
|
|
8739
|
+
case 6:
|
|
8740
|
+
_i++;
|
|
8741
|
+
_context.next = 2;
|
|
8742
|
+
break;
|
|
8743
|
+
case 9:
|
|
8744
|
+
_context.next = 11;
|
|
8745
|
+
return transferEthToPolkadot(this._provider, this._options);
|
|
8746
|
+
case 11:
|
|
8747
|
+
case "end":
|
|
8748
|
+
return _context.stop();
|
|
8749
|
+
}
|
|
8750
|
+
}, _callee, this);
|
|
8751
|
+
}));
|
|
8752
|
+
}
|
|
8753
|
+
}]);
|
|
8754
|
+
}();
|
|
8755
|
+
var EvmBuilder = function EvmBuilder(provider) {
|
|
8756
|
+
return new EvmBuilderClass(provider);
|
|
8757
|
+
};
|
|
8758
|
+
|
|
8008
8759
|
var createTx$1 = function createTx(originApi, address, amount, currencySymbol, originNode, destNode) {
|
|
8009
8760
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
8010
8761
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -8110,20 +8861,12 @@ var getOriginFeeDetails = function getOriginFeeDetails(origin, destination, curr
|
|
|
8110
8861
|
}));
|
|
8111
8862
|
};
|
|
8112
8863
|
|
|
8113
|
-
var getNativeAssetSymbol = function getNativeAssetSymbol(node) {
|
|
8114
|
-
if (node === 'Polkadot') {
|
|
8115
|
-
return 'DOT';
|
|
8116
|
-
} else if (node === 'Kusama') {
|
|
8117
|
-
return 'KSM';
|
|
8118
|
-
}
|
|
8119
|
-
return getAssetsObject(node).nativeAssetSymbol;
|
|
8120
|
-
};
|
|
8121
8864
|
var getAssetSymbol = function getAssetSymbol(node, assetId) {
|
|
8122
8865
|
if (node === 'Polkadot' || node === 'Kusama') {
|
|
8123
8866
|
return getNativeAssetSymbol(node);
|
|
8124
8867
|
}
|
|
8125
8868
|
var asset = getAssetBySymbolOrId(node, assetId);
|
|
8126
|
-
return asset;
|
|
8869
|
+
return asset === null || asset === void 0 ? void 0 : asset.symbol;
|
|
8127
8870
|
};
|
|
8128
8871
|
var getAssetBalance = function getAssetBalance(account, node, assetSymbolOrId) {
|
|
8129
8872
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
@@ -8180,7 +8923,7 @@ var getAssetBalance = function getAssetBalance(account, node, assetSymbolOrId) {
|
|
|
8180
8923
|
};
|
|
8181
8924
|
var getTransferInfo = function getTransferInfo(origin, destination, accountOrigin, accountDestination, assetSymbolOrId, amount) {
|
|
8182
8925
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
8183
|
-
var
|
|
8926
|
+
var _a, originApi, originBalance, _yield$getOriginFeeDe, destXcmFee, expectedBalanceAfterXCMDelivery, asset;
|
|
8184
8927
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
8185
8928
|
while (1) switch (_context2.prev = _context2.next) {
|
|
8186
8929
|
case 0:
|
|
@@ -8208,7 +8951,7 @@ var getTransferInfo = function getTransferInfo(origin, destination, accountOrigi
|
|
|
8208
8951
|
return getAssetBalance(accountOrigin, origin, assetSymbolOrId);
|
|
8209
8952
|
case 15:
|
|
8210
8953
|
_context2.t1 = _context2.sent;
|
|
8211
|
-
_context2.t2 = asset
|
|
8954
|
+
_context2.t2 = asset !== null && asset !== void 0 ? asset : '';
|
|
8212
8955
|
_context2.t3 = {
|
|
8213
8956
|
balance: _context2.t1,
|
|
8214
8957
|
currency: _context2.t2
|
|
@@ -8222,7 +8965,7 @@ var getTransferInfo = function getTransferInfo(origin, destination, accountOrigi
|
|
|
8222
8965
|
return getOriginFeeDetails(origin, destination, assetSymbolOrId, amount, accountOrigin, originApi);
|
|
8223
8966
|
case 24:
|
|
8224
8967
|
_context2.t6 = _context2.sent;
|
|
8225
|
-
_context2.t7 = BigInt((
|
|
8968
|
+
_context2.t7 = BigInt((_a = getExistentialDeposit$1(origin)) !== null && _a !== void 0 ? _a : 0);
|
|
8226
8969
|
_context2.t8 = getNativeAssetSymbol(origin);
|
|
8227
8970
|
_context2.t9 = getMinNativeTransferableAmount(origin);
|
|
8228
8971
|
_context2.next = 30;
|
|
@@ -8271,6 +9014,7 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
8271
9014
|
getAssetsObject: getAssetsObject,
|
|
8272
9015
|
getBalanceForeign: getBalanceForeign,
|
|
8273
9016
|
getBalanceNative: getBalanceNative,
|
|
9017
|
+
getNativeAssetSymbol: getNativeAssetSymbol,
|
|
8274
9018
|
getNativeAssets: getNativeAssets,
|
|
8275
9019
|
getOtherAssets: getOtherAssets,
|
|
8276
9020
|
getParaId: getParaId,
|
|
@@ -8484,7 +9228,6 @@ var getParameters = function getParameters(isAssetHub, currencySelection, addres
|
|
|
8484
9228
|
}
|
|
8485
9229
|
return [currencySelection, amount, addressSelection, fees];
|
|
8486
9230
|
};
|
|
8487
|
-
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
|
|
8488
9231
|
var XTokensTransferImpl = /*#__PURE__*/function () {
|
|
8489
9232
|
function XTokensTransferImpl() {
|
|
8490
9233
|
_classCallCheck(this, XTokensTransferImpl);
|
|
@@ -8517,6 +9260,7 @@ var XTokensTransferImpl = /*#__PURE__*/function () {
|
|
|
8517
9260
|
parameters: parameters
|
|
8518
9261
|
};
|
|
8519
9262
|
}
|
|
9263
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
8520
9264
|
return (_api$tx$module = api.tx[module])[section].apply(_api$tx$module, _toConsumableArray(parameters));
|
|
8521
9265
|
}
|
|
8522
9266
|
}]);
|
|
@@ -8565,19 +9309,6 @@ var Unique = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8565
9309
|
}]);
|
|
8566
9310
|
}(ParachainNode);
|
|
8567
9311
|
|
|
8568
|
-
// Used to inform user, that currency they wish to use is not registered on either origin or destination Parachain
|
|
8569
|
-
var InvalidCurrencyError = /*#__PURE__*/function (_Error) {
|
|
8570
|
-
function InvalidCurrencyError(message) {
|
|
8571
|
-
var _this;
|
|
8572
|
-
_classCallCheck(this, InvalidCurrencyError);
|
|
8573
|
-
_this = _callSuper(this, InvalidCurrencyError, [message]);
|
|
8574
|
-
_this.name = 'InvalidCurrencyError';
|
|
8575
|
-
return _this;
|
|
8576
|
-
}
|
|
8577
|
-
_inherits(InvalidCurrencyError, _Error);
|
|
8578
|
-
return _createClass(InvalidCurrencyError);
|
|
8579
|
-
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
8580
|
-
|
|
8581
9312
|
var Crust = /*#__PURE__*/function (_ParachainNode) {
|
|
8582
9313
|
function Crust() {
|
|
8583
9314
|
_classCallCheck(this, Crust);
|
|
@@ -8808,10 +9539,29 @@ var Amplitude = /*#__PURE__*/function (_ParachainNode) {
|
|
|
8808
9539
|
var Bajun = /*#__PURE__*/function (_ParachainNode) {
|
|
8809
9540
|
function Bajun() {
|
|
8810
9541
|
_classCallCheck(this, Bajun);
|
|
8811
|
-
return _callSuper(this, Bajun, ['Bajun', 'bajun', 'kusama', Version.
|
|
9542
|
+
return _callSuper(this, Bajun, ['Bajun', 'bajun', 'kusama', Version.V3]);
|
|
8812
9543
|
}
|
|
8813
9544
|
_inherits(Bajun, _ParachainNode);
|
|
8814
|
-
return _createClass(Bajun
|
|
9545
|
+
return _createClass(Bajun, [{
|
|
9546
|
+
key: "transferXTokens",
|
|
9547
|
+
value: function transferXTokens(input) {
|
|
9548
|
+
var scenario = input.scenario,
|
|
9549
|
+
currency = input.currency;
|
|
9550
|
+
if (scenario !== 'ParaToPara') {
|
|
9551
|
+
throw new ScenarioNotSupportedError(this.node, scenario);
|
|
9552
|
+
}
|
|
9553
|
+
var nativeSymbol = getNativeAssetSymbol(this.node);
|
|
9554
|
+
if (currency !== nativeSymbol) {
|
|
9555
|
+
throw new InvalidCurrencyError("Node ".concat(this.node, " does not support currency ").concat(currency));
|
|
9556
|
+
}
|
|
9557
|
+
return XTokensTransferImpl.transferXTokens(input, currency);
|
|
9558
|
+
}
|
|
9559
|
+
}, {
|
|
9560
|
+
key: "transferRelayToPara",
|
|
9561
|
+
value: function transferRelayToPara() {
|
|
9562
|
+
throw new NodeNotSupportedError();
|
|
9563
|
+
}
|
|
9564
|
+
}]);
|
|
8815
9565
|
}(ParachainNode);
|
|
8816
9566
|
|
|
8817
9567
|
var Basilisk = /*#__PURE__*/function (_ParachainNode) {
|
|
@@ -9030,44 +9780,6 @@ var Imbue = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9030
9780
|
}]);
|
|
9031
9781
|
}(ParachainNode);
|
|
9032
9782
|
|
|
9033
|
-
// Used to inform user, that Parachain they wish to use is not supported yet
|
|
9034
|
-
var NodeNotSupportedError = /*#__PURE__*/function (_Error) {
|
|
9035
|
-
function NodeNotSupportedError(message) {
|
|
9036
|
-
var _this;
|
|
9037
|
-
_classCallCheck(this, NodeNotSupportedError);
|
|
9038
|
-
_this = _callSuper(this, NodeNotSupportedError, [message !== null && message !== void 0 ? message : 'These nodes do not support XCM transfers from Relay / to Relay chain.']);
|
|
9039
|
-
_this.name = 'NodeNotSupported';
|
|
9040
|
-
return _this;
|
|
9041
|
-
}
|
|
9042
|
-
_inherits(NodeNotSupportedError, _Error);
|
|
9043
|
-
return _createClass(NodeNotSupportedError);
|
|
9044
|
-
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
9045
|
-
|
|
9046
|
-
// Used to inform user, that Parachain they wish to use does not support scenario they wish to use yet
|
|
9047
|
-
var ScenarioNotSupportedError = /*#__PURE__*/function (_Error) {
|
|
9048
|
-
function ScenarioNotSupportedError(node, scenario, message) {
|
|
9049
|
-
var _this;
|
|
9050
|
-
_classCallCheck(this, ScenarioNotSupportedError);
|
|
9051
|
-
_this = _callSuper(this, ScenarioNotSupportedError, [message !== null && message !== void 0 ? message : "Scenario ".concat(scenario, " not supported for node ").concat(node)]);
|
|
9052
|
-
_this.name = 'ScenarioNotSupported';
|
|
9053
|
-
return _this;
|
|
9054
|
-
}
|
|
9055
|
-
_inherits(ScenarioNotSupportedError, _Error);
|
|
9056
|
-
return _createClass(ScenarioNotSupportedError);
|
|
9057
|
-
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
9058
|
-
|
|
9059
|
-
var IncompatibleNodesError = /*#__PURE__*/function (_Error) {
|
|
9060
|
-
function IncompatibleNodesError() {
|
|
9061
|
-
var _this;
|
|
9062
|
-
_classCallCheck(this, IncompatibleNodesError);
|
|
9063
|
-
_this = _callSuper(this, IncompatibleNodesError, ['Transactions between nodes on different relaychains are not yet possible.']);
|
|
9064
|
-
_this.name = 'IncompatibleNodes';
|
|
9065
|
-
return _this;
|
|
9066
|
-
}
|
|
9067
|
-
_inherits(IncompatibleNodesError, _Error);
|
|
9068
|
-
return _createClass(IncompatibleNodesError);
|
|
9069
|
-
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
9070
|
-
|
|
9071
9783
|
var Integritee = /*#__PURE__*/function (_ParachainNode) {
|
|
9072
9784
|
function Integritee() {
|
|
9073
9785
|
_classCallCheck(this, Integritee);
|
|
@@ -9132,7 +9844,6 @@ var Karura = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9132
9844
|
|
|
9133
9845
|
// Contains basic structure of polkadotXCM call
|
|
9134
9846
|
var DEFAULT_FEE_ASSET = 0;
|
|
9135
|
-
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
|
|
9136
9847
|
var PolkadotXCMTransferImpl = /*#__PURE__*/function () {
|
|
9137
9848
|
function PolkadotXCMTransferImpl() {
|
|
9138
9849
|
_classCallCheck(this, PolkadotXCMTransferImpl);
|
|
@@ -9162,31 +9873,100 @@ var PolkadotXCMTransferImpl = /*#__PURE__*/function () {
|
|
|
9162
9873
|
|
|
9163
9874
|
var AssetHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
9164
9875
|
function AssetHubPolkadot() {
|
|
9165
|
-
var _this;
|
|
9166
9876
|
_classCallCheck(this, AssetHubPolkadot);
|
|
9167
|
-
|
|
9168
|
-
_this._assetCheckEnabled = false;
|
|
9169
|
-
return _this;
|
|
9877
|
+
return _callSuper(this, AssetHubPolkadot, ['AssetHubPolkadot', 'PolkadotAssetHub', 'polkadot', Version.V3]);
|
|
9170
9878
|
}
|
|
9171
9879
|
_inherits(AssetHubPolkadot, _ParachainNode);
|
|
9172
9880
|
return _createClass(AssetHubPolkadot, [{
|
|
9173
9881
|
key: "handleBridgeTransfer",
|
|
9174
9882
|
value: function handleBridgeTransfer(input, targetChain) {
|
|
9175
|
-
|
|
9883
|
+
var _a, _b, _c, _d;
|
|
9884
|
+
if (targetChain === 'Kusama' && ((_a = input.currencySymbol) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === 'KSM' || targetChain === 'Polkadot' && ((_b = input.currencySymbol) === null || _b === void 0 ? void 0 : _b.toUpperCase()) === 'DOT') {
|
|
9176
9885
|
var modifiedInput = Object.assign(Object.assign({}, input), {
|
|
9177
9886
|
header: createBridgePolkadotXcmDest(Version.V4, targetChain, input.destination, input.paraIdTo),
|
|
9178
9887
|
addressSelection: generateAddressMultiLocationV4(input.api, input.address),
|
|
9179
9888
|
currencySelection: createBridgeCurrencySpec(input.amount, targetChain)
|
|
9180
9889
|
});
|
|
9181
9890
|
return PolkadotXCMTransferImpl.transferPolkadotXCM(modifiedInput, 'transferAssets', 'Unlimited');
|
|
9182
|
-
} else if (targetChain === 'Polkadot' && input.
|
|
9891
|
+
} else if (targetChain === 'Polkadot' && ((_c = input.currencySymbol) === null || _c === void 0 ? void 0 : _c.toUpperCase()) === 'KSM' || targetChain === 'Kusama' && ((_d = input.currencySymbol) === null || _d === void 0 ? void 0 : _d.toUpperCase()) === 'DOT') {
|
|
9183
9892
|
var _modifiedInput = Object.assign(Object.assign({}, input), {
|
|
9184
9893
|
header: createBridgePolkadotXcmDest(Version.V3, targetChain, input.destination, input.paraIdTo),
|
|
9185
9894
|
currencySelection: createCurrencySpec(input.amount, Version.V3, Parents.ONE, input.overridedCurrency)
|
|
9186
9895
|
});
|
|
9187
9896
|
return PolkadotXCMTransferImpl.transferPolkadotXCM(_modifiedInput, 'limitedReserveTransferAssets', 'Unlimited');
|
|
9188
9897
|
}
|
|
9189
|
-
throw new InvalidCurrencyError(
|
|
9898
|
+
throw new InvalidCurrencyError("Polkadot <-> Kusama bridge does not support currency ".concat(input.currencySymbol));
|
|
9899
|
+
}
|
|
9900
|
+
}, {
|
|
9901
|
+
key: "handleEthBridgeTransfer",
|
|
9902
|
+
value: function handleEthBridgeTransfer(input) {
|
|
9903
|
+
var api = input.api,
|
|
9904
|
+
scenario = input.scenario,
|
|
9905
|
+
destination = input.destination,
|
|
9906
|
+
paraIdTo = input.paraIdTo,
|
|
9907
|
+
address = input.address,
|
|
9908
|
+
currencySymbol = input.currencySymbol;
|
|
9909
|
+
if (!ethers.isAddress(address)) {
|
|
9910
|
+
throw new Error('Only Ethereum addresses are supported for Ethereum transfers');
|
|
9911
|
+
}
|
|
9912
|
+
var ethAssets = getOtherAssets('Ethereum');
|
|
9913
|
+
var ethAsset = ethAssets.find(function (asset) {
|
|
9914
|
+
return asset.symbol === currencySymbol;
|
|
9915
|
+
});
|
|
9916
|
+
if (!ethAsset) {
|
|
9917
|
+
throw new InvalidCurrencyError("Currency ".concat(currencySymbol, " is not supported for Ethereum transfers"));
|
|
9918
|
+
}
|
|
9919
|
+
var ETH_CHAIN_ID = 1;
|
|
9920
|
+
var ethJunction = {
|
|
9921
|
+
GlobalConsensus: {
|
|
9922
|
+
Ethereum: {
|
|
9923
|
+
chain_id: ETH_CHAIN_ID
|
|
9924
|
+
}
|
|
9925
|
+
}
|
|
9926
|
+
};
|
|
9927
|
+
var modifiedInput = Object.assign(Object.assign({}, input), {
|
|
9928
|
+
header: createPolkadotXcmHeader(scenario, this.version, destination, paraIdTo, ethJunction, Parents.TWO),
|
|
9929
|
+
addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, this.version, paraIdTo),
|
|
9930
|
+
currencySelection: createCurrencySpec(input.amount, Version.V3, Parents.TWO, {
|
|
9931
|
+
parents: Parents.TWO,
|
|
9932
|
+
interior: {
|
|
9933
|
+
X2: [ethJunction, {
|
|
9934
|
+
AccountKey20: {
|
|
9935
|
+
key: ethAsset.assetId
|
|
9936
|
+
}
|
|
9937
|
+
}]
|
|
9938
|
+
}
|
|
9939
|
+
})
|
|
9940
|
+
});
|
|
9941
|
+
return PolkadotXCMTransferImpl.transferPolkadotXCM(modifiedInput, 'transferAssets', 'Unlimited');
|
|
9942
|
+
}
|
|
9943
|
+
}, {
|
|
9944
|
+
key: "handleMythosTransfer",
|
|
9945
|
+
value: function handleMythosTransfer(input) {
|
|
9946
|
+
var api = input.api,
|
|
9947
|
+
address = input.address,
|
|
9948
|
+
amount = input.amount,
|
|
9949
|
+
currencyId = input.currencyId,
|
|
9950
|
+
overridedCurrency = input.overridedCurrency,
|
|
9951
|
+
scenario = input.scenario,
|
|
9952
|
+
destination = input.destination,
|
|
9953
|
+
paraIdTo = input.paraIdTo;
|
|
9954
|
+
var version = Version.V2;
|
|
9955
|
+
var paraId = destination !== undefined && _typeof(destination) !== 'object' ? paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination) : undefined;
|
|
9956
|
+
var customMultiLocation = {
|
|
9957
|
+
parents: Parents.ONE,
|
|
9958
|
+
interior: {
|
|
9959
|
+
X1: {
|
|
9960
|
+
Parachain: paraId
|
|
9961
|
+
}
|
|
9962
|
+
}
|
|
9963
|
+
};
|
|
9964
|
+
var modifiedInput = Object.assign(Object.assign({}, input), {
|
|
9965
|
+
header: this.createPolkadotXcmHeader(scenario, version, destination, paraId),
|
|
9966
|
+
addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, version, paraId),
|
|
9967
|
+
currencySelection: this.createCurrencySpec(amount, scenario, version, currencyId, overridedCurrency !== null && overridedCurrency !== void 0 ? overridedCurrency : customMultiLocation)
|
|
9968
|
+
});
|
|
9969
|
+
return PolkadotXCMTransferImpl.transferPolkadotXCM(modifiedInput, 'limitedTeleportAssets', 'Unlimited');
|
|
9190
9970
|
}
|
|
9191
9971
|
}, {
|
|
9192
9972
|
key: "transferPolkadotXCM",
|
|
@@ -9195,6 +9975,12 @@ var AssetHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9195
9975
|
if (input.destination === 'AssetHubKusama') {
|
|
9196
9976
|
return this.handleBridgeTransfer(input, 'Kusama');
|
|
9197
9977
|
}
|
|
9978
|
+
if (input.destination === 'Ethereum') {
|
|
9979
|
+
return this.handleEthBridgeTransfer(input);
|
|
9980
|
+
}
|
|
9981
|
+
if (input.destination === 'Mythos') {
|
|
9982
|
+
return this.handleMythosTransfer(input);
|
|
9983
|
+
}
|
|
9198
9984
|
var method = scenario === 'ParaToPara' ? 'limitedReserveTransferAssets' : 'limitedTeleportAssets';
|
|
9199
9985
|
return PolkadotXCMTransferImpl.transferPolkadotXCM(input, method, 'Unlimited');
|
|
9200
9986
|
}
|
|
@@ -9222,7 +10008,7 @@ var AssetHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9222
10008
|
};
|
|
9223
10009
|
return createCurrencySpec(amount, version, Parents.ZERO, overridedMultiLocation, interior);
|
|
9224
10010
|
} else {
|
|
9225
|
-
return
|
|
10011
|
+
return _superPropGet(AssetHubPolkadot, "createCurrencySpec", this)([amount, scenario, version, currencyId]);
|
|
9226
10012
|
}
|
|
9227
10013
|
}
|
|
9228
10014
|
}]);
|
|
@@ -9230,11 +10016,8 @@ var AssetHubPolkadot = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9230
10016
|
|
|
9231
10017
|
var AssetHubKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
9232
10018
|
function AssetHubKusama() {
|
|
9233
|
-
var _this;
|
|
9234
10019
|
_classCallCheck(this, AssetHubKusama);
|
|
9235
|
-
|
|
9236
|
-
_this._assetCheckEnabled = false;
|
|
9237
|
-
return _this;
|
|
10020
|
+
return _callSuper(this, AssetHubKusama, ['AssetHubKusama', 'KusamaAssetHub', 'kusama', Version.V3]);
|
|
9238
10021
|
}
|
|
9239
10022
|
_inherits(AssetHubKusama, _ParachainNode);
|
|
9240
10023
|
return _createClass(AssetHubKusama, [{
|
|
@@ -9407,7 +10190,7 @@ var Darwinia = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9407
10190
|
};
|
|
9408
10191
|
return createCurrencySpec(amount, version, Parents.ZERO, overridedMultiLocation, interior);
|
|
9409
10192
|
} else {
|
|
9410
|
-
return
|
|
10193
|
+
return _superPropGet(Darwinia, "createCurrencySpec", this)([amount, scenario, version, currencyId]);
|
|
9411
10194
|
}
|
|
9412
10195
|
}
|
|
9413
10196
|
}]);
|
|
@@ -9639,7 +10422,7 @@ var Collectives = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9639
10422
|
if (scenario === 'ParaToPara') {
|
|
9640
10423
|
return {};
|
|
9641
10424
|
} else {
|
|
9642
|
-
return
|
|
10425
|
+
return _superPropGet(Collectives, "createCurrencySpec", this)([amount, scenario, version, currencyId]);
|
|
9643
10426
|
}
|
|
9644
10427
|
}
|
|
9645
10428
|
}]);
|
|
@@ -9687,7 +10470,6 @@ var getDestination = function getDestination(_ref) {
|
|
|
9687
10470
|
}
|
|
9688
10471
|
};
|
|
9689
10472
|
};
|
|
9690
|
-
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
|
|
9691
10473
|
var XTransferTransferImpl = /*#__PURE__*/function () {
|
|
9692
10474
|
function XTransferTransferImpl() {
|
|
9693
10475
|
_classCallCheck(this, XTransferTransferImpl);
|
|
@@ -9774,7 +10556,7 @@ var KiltSpiritnet = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9774
10556
|
key: "transferPolkadotXCM",
|
|
9775
10557
|
value: function transferPolkadotXCM(input) {
|
|
9776
10558
|
if (input.scenario !== 'ParaToPara') {
|
|
9777
|
-
throw new ScenarioNotSupportedError(
|
|
10559
|
+
throw new ScenarioNotSupportedError(this.node, input.scenario);
|
|
9778
10560
|
}
|
|
9779
10561
|
return PolkadotXCMTransferImpl.transferPolkadotXCM(input, 'reserveTransferAssets');
|
|
9780
10562
|
}
|
|
@@ -9881,9 +10663,76 @@ var BridgeHubKusama = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9881
10663
|
}]);
|
|
9882
10664
|
}(ParachainNode);
|
|
9883
10665
|
|
|
9884
|
-
|
|
9885
|
-
|
|
9886
|
-
|
|
10666
|
+
var Ethereum = /*#__PURE__*/function (_ParachainNode) {
|
|
10667
|
+
function Ethereum() {
|
|
10668
|
+
_classCallCheck(this, Ethereum);
|
|
10669
|
+
return _callSuper(this, Ethereum, ['Ethereum', 'ethereum', 'polkadot', Version.V3]);
|
|
10670
|
+
}
|
|
10671
|
+
_inherits(Ethereum, _ParachainNode);
|
|
10672
|
+
return _createClass(Ethereum);
|
|
10673
|
+
}(ParachainNode);
|
|
10674
|
+
|
|
10675
|
+
var Mythos = /*#__PURE__*/function (_ParachainNode) {
|
|
10676
|
+
function Mythos() {
|
|
10677
|
+
_classCallCheck(this, Mythos);
|
|
10678
|
+
return _callSuper(this, Mythos, ['Mythos', 'mythos', 'polkadot', Version.V3]);
|
|
10679
|
+
}
|
|
10680
|
+
_inherits(Mythos, _ParachainNode);
|
|
10681
|
+
return _createClass(Mythos, [{
|
|
10682
|
+
key: "transferPolkadotXCM",
|
|
10683
|
+
value: function transferPolkadotXCM(input) {
|
|
10684
|
+
var scenario = input.scenario,
|
|
10685
|
+
currencySymbol = input.currencySymbol;
|
|
10686
|
+
if (scenario !== 'ParaToPara') {
|
|
10687
|
+
throw new ScenarioNotSupportedError(this.node, scenario);
|
|
10688
|
+
}
|
|
10689
|
+
var nativeSymbol = getNativeAssetSymbol(this.node);
|
|
10690
|
+
if (currencySymbol !== nativeSymbol) {
|
|
10691
|
+
throw new InvalidCurrencyError("Node ".concat(this.node, " does not support currency ").concat(currencySymbol));
|
|
10692
|
+
}
|
|
10693
|
+
return PolkadotXCMTransferImpl.transferPolkadotXCM(input, 'limitedReserveTransferAssets', 'Unlimited');
|
|
10694
|
+
}
|
|
10695
|
+
}, {
|
|
10696
|
+
key: "transferRelayToPara",
|
|
10697
|
+
value: function transferRelayToPara() {
|
|
10698
|
+
throw new NodeNotSupportedError();
|
|
10699
|
+
}
|
|
10700
|
+
}]);
|
|
10701
|
+
}(ParachainNode);
|
|
10702
|
+
|
|
10703
|
+
var Peaq = /*#__PURE__*/function (_ParachainNode) {
|
|
10704
|
+
function Peaq() {
|
|
10705
|
+
_classCallCheck(this, Peaq);
|
|
10706
|
+
return _callSuper(this, Peaq, ['Peaq', 'peaq', 'polkadot', Version.V2]);
|
|
10707
|
+
}
|
|
10708
|
+
_inherits(Peaq, _ParachainNode);
|
|
10709
|
+
return _createClass(Peaq, [{
|
|
10710
|
+
key: "transferXTokens",
|
|
10711
|
+
value: function transferXTokens(input) {
|
|
10712
|
+
var scenario = input.scenario,
|
|
10713
|
+
currencyID = input.currencyID;
|
|
10714
|
+
if (scenario !== 'ParaToPara') {
|
|
10715
|
+
throw new ScenarioNotSupportedError(this.node, scenario);
|
|
10716
|
+
}
|
|
10717
|
+
return XTokensTransferImpl.transferXTokens(input, currencyID);
|
|
10718
|
+
}
|
|
10719
|
+
}, {
|
|
10720
|
+
key: "transferRelayToPara",
|
|
10721
|
+
value: function transferRelayToPara() {
|
|
10722
|
+
throw new NodeNotSupportedError();
|
|
10723
|
+
}
|
|
10724
|
+
}, {
|
|
10725
|
+
key: "getProvider",
|
|
10726
|
+
value: function getProvider() {
|
|
10727
|
+
return 'wss://peaq.api.onfinality.io/public-ws';
|
|
10728
|
+
}
|
|
10729
|
+
}]);
|
|
10730
|
+
}(ParachainNode);
|
|
10731
|
+
|
|
10732
|
+
var NODE_NAMES_DOT_KSM = ['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', 'Mythos', 'Peaq'];
|
|
10733
|
+
var NODE_NAMES = [].concat(NODE_NAMES_DOT_KSM, ['Ethereum']);
|
|
10734
|
+
var NODES_WITH_RELAY_CHAINS = [].concat(_toConsumableArray(NODE_NAMES), ['Polkadot', 'Kusama']);
|
|
10735
|
+
var NODES_WITH_RELAY_CHAINS_DOT_KSM = [].concat(NODE_NAMES_DOT_KSM, ['Polkadot', 'Kusama']);
|
|
9887
10736
|
var nodes = {
|
|
9888
10737
|
AssetHubPolkadot: new AssetHubPolkadot(),
|
|
9889
10738
|
Acala: new Acala(),
|
|
@@ -9938,7 +10787,10 @@ var nodes = {
|
|
|
9938
10787
|
Phala: new Phala(),
|
|
9939
10788
|
Subsocial: new Subsocial(),
|
|
9940
10789
|
KiltSpiritnet: new KiltSpiritnet(),
|
|
9941
|
-
Curio: new Curio()
|
|
10790
|
+
Curio: new Curio(),
|
|
10791
|
+
Ethereum: new Ethereum(),
|
|
10792
|
+
Mythos: new Mythos(),
|
|
10793
|
+
Peaq: new Peaq()
|
|
9942
10794
|
};
|
|
9943
10795
|
var SUPPORTED_PALLETS = ['XTokens', 'OrmlXTokens', 'PolkadotXcm', 'RelayerXcm', 'XTransfer'];
|
|
9944
10796
|
|
|
@@ -10080,7 +10932,7 @@ var getAllNodeProviders = function getAllNodeProviders(node) {
|
|
|
10080
10932
|
var _a;
|
|
10081
10933
|
var _ref9 = (_a = getNodeEndpointOption(node)) !== null && _a !== void 0 ? _a : {},
|
|
10082
10934
|
providers = _ref9.providers;
|
|
10083
|
-
if (providers.length < 1) {
|
|
10935
|
+
if (providers && Object.values(providers).length < 1) {
|
|
10084
10936
|
throw new Error("Node ".concat(node, " does not have any providers."));
|
|
10085
10937
|
}
|
|
10086
10938
|
return Object.values(providers !== null && providers !== void 0 ? providers : []);
|
|
@@ -10139,7 +10991,8 @@ var createApiInstanceForNode = function createApiInstanceForNode(node) {
|
|
|
10139
10991
|
var lowercaseFirstLetter = function lowercaseFirstLetter(str) {
|
|
10140
10992
|
return str.charAt(0).toLowerCase() + str.slice(1);
|
|
10141
10993
|
};
|
|
10142
|
-
var callPolkadotJsTxFunction = function callPolkadotJsTxFunction(api, _ref10
|
|
10994
|
+
var callPolkadotJsTxFunction = function callPolkadotJsTxFunction(api, _ref10 // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
10995
|
+
) {
|
|
10143
10996
|
var _api$tx$module;
|
|
10144
10997
|
var module = _ref10.module,
|
|
10145
10998
|
section = _ref10.section,
|
|
@@ -10322,13 +11175,33 @@ var checkKeepAlive = function checkKeepAlive(_a) {
|
|
|
10322
11175
|
});
|
|
10323
11176
|
};
|
|
10324
11177
|
|
|
11178
|
+
var transformOptions = function transformOptions(options) {
|
|
11179
|
+
var currency = options.currency;
|
|
11180
|
+
if (isTCurrencySpecifier(currency)) {
|
|
11181
|
+
if ('symbol' in currency) {
|
|
11182
|
+
return Object.assign(Object.assign({}, options), {
|
|
11183
|
+
currency: currency.symbol,
|
|
11184
|
+
isSymbol: true
|
|
11185
|
+
});
|
|
11186
|
+
} else if ('id' in currency) {
|
|
11187
|
+
return Object.assign(Object.assign({}, options), {
|
|
11188
|
+
currency: currency.id,
|
|
11189
|
+
isSymbol: false
|
|
11190
|
+
});
|
|
11191
|
+
}
|
|
11192
|
+
}
|
|
11193
|
+
return Object.assign(Object.assign({}, options), {
|
|
11194
|
+
currency: currency,
|
|
11195
|
+
isSymbol: undefined
|
|
11196
|
+
});
|
|
11197
|
+
};
|
|
10325
11198
|
var sendCommon = function sendCommon(options) {
|
|
10326
11199
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
10327
|
-
var _a, api, origin, currency, amount, address, destination, paraIdTo, destApiForKeepAlive, feeAsset, version,
|
|
11200
|
+
var _a, _b, _transformOptions, api, origin, currency, amount, address, destination, paraIdTo, destApiForKeepAlive, feeAsset, version, isSymbol, _transformOptions$ser, serializedApiCallEnabled, isMultiLocationDestination, isMultiLocationCurrency, isBridge, isRelayDestination, originRelayChainSymbol, destinationRelayChainSymbol, originNode, assetCheckEnabled, asset, apiWithFallback, amountStr, currencyStr;
|
|
10328
11201
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10329
11202
|
while (1) switch (_context.prev = _context.next) {
|
|
10330
11203
|
case 0:
|
|
10331
|
-
api =
|
|
11204
|
+
_transformOptions = transformOptions(options), api = _transformOptions.api, origin = _transformOptions.origin, currency = _transformOptions.currency, amount = _transformOptions.amount, address = _transformOptions.address, destination = _transformOptions.destination, paraIdTo = _transformOptions.paraIdTo, destApiForKeepAlive = _transformOptions.destApiForKeepAlive, feeAsset = _transformOptions.feeAsset, version = _transformOptions.version, isSymbol = _transformOptions.isSymbol, _transformOptions$ser = _transformOptions.serializedApiCallEnabled, serializedApiCallEnabled = _transformOptions$ser === void 0 ? false : _transformOptions$ser;
|
|
10332
11205
|
if (!((!isTMulti(currency) || isTMultiLocation(currency)) && amount === null)) {
|
|
10333
11206
|
_context.next = 3;
|
|
10334
11207
|
break;
|
|
@@ -10378,76 +11251,85 @@ var sendCommon = function sendCommon(options) {
|
|
|
10378
11251
|
}
|
|
10379
11252
|
throw new InvalidCurrencyError('Fee asset index is out of bounds. Please provide a valid index.');
|
|
10380
11253
|
case 17:
|
|
10381
|
-
asset = getAssetBySymbolOrId(origin, currency);
|
|
10382
11254
|
isMultiLocationDestination = _typeof(destination) === 'object';
|
|
10383
11255
|
isMultiLocationCurrency = _typeof(currency) === 'object';
|
|
10384
|
-
|
|
11256
|
+
isBridge = origin === 'AssetHubPolkadot' && destination === 'AssetHubKusama' || origin === 'AssetHubKusama' && destination === 'AssetHubPolkadot' || destination === 'Ethereum';
|
|
11257
|
+
isRelayDestination = destination === undefined;
|
|
11258
|
+
if (!(!isRelayDestination && !isMultiLocationDestination)) {
|
|
10385
11259
|
_context.next = 26;
|
|
10386
11260
|
break;
|
|
10387
11261
|
}
|
|
10388
11262
|
originRelayChainSymbol = getRelayChainSymbol(origin);
|
|
10389
11263
|
destinationRelayChainSymbol = getRelayChainSymbol(destination);
|
|
10390
|
-
|
|
10391
|
-
if (!(!supportsBridge && originRelayChainSymbol !== destinationRelayChainSymbol)) {
|
|
11264
|
+
if (!(!isBridge && originRelayChainSymbol !== destinationRelayChainSymbol)) {
|
|
10392
11265
|
_context.next = 26;
|
|
10393
11266
|
break;
|
|
10394
11267
|
}
|
|
10395
11268
|
throw new IncompatibleNodesError();
|
|
10396
11269
|
case 26:
|
|
10397
11270
|
originNode = getNode(origin);
|
|
10398
|
-
assetCheckEnabled =
|
|
10399
|
-
|
|
10400
|
-
|
|
11271
|
+
assetCheckEnabled = isMultiLocationCurrency || isBridge ? false : originNode.assetCheckEnabled;
|
|
11272
|
+
asset = assetCheckEnabled ? getAssetBySymbolOrId(origin, currency, isRelayDestination, isSymbol) : null;
|
|
11273
|
+
if (!(!isBridge && asset === null && assetCheckEnabled)) {
|
|
11274
|
+
_context.next = 31;
|
|
10401
11275
|
break;
|
|
10402
11276
|
}
|
|
10403
11277
|
throw new InvalidCurrencyError("Origin node ".concat(origin, " does not support currency or currencyId ").concat(JSON.stringify(currency), "."));
|
|
10404
|
-
case
|
|
10405
|
-
if (!(
|
|
10406
|
-
_context.next =
|
|
11278
|
+
case 31:
|
|
11279
|
+
if (!(!isBridge && !isRelayDestination && !isMultiLocationDestination && (asset === null || asset === void 0 ? void 0 : asset.symbol) !== undefined && assetCheckEnabled && isSymbol !== false && asset.assetId !== currency && !hasSupportForAsset(destination, asset.symbol))) {
|
|
11280
|
+
_context.next = 33;
|
|
10407
11281
|
break;
|
|
10408
11282
|
}
|
|
10409
11283
|
throw new InvalidCurrencyError("Destination node ".concat(destination, " does not support currency or currencyId ").concat(JSON.stringify(currency), "."));
|
|
10410
|
-
case
|
|
11284
|
+
case 33:
|
|
10411
11285
|
if (!(api !== null && api !== void 0)) {
|
|
10412
|
-
_context.next =
|
|
11286
|
+
_context.next = 37;
|
|
10413
11287
|
break;
|
|
10414
11288
|
}
|
|
10415
11289
|
_context.t0 = api;
|
|
10416
|
-
_context.next =
|
|
11290
|
+
_context.next = 40;
|
|
10417
11291
|
break;
|
|
10418
|
-
case
|
|
10419
|
-
_context.next =
|
|
11292
|
+
case 37:
|
|
11293
|
+
_context.next = 39;
|
|
10420
11294
|
return createApiInstanceForNode(origin);
|
|
10421
|
-
case 38:
|
|
10422
|
-
_context.t0 = _context.sent;
|
|
10423
11295
|
case 39:
|
|
11296
|
+
_context.t0 = _context.sent;
|
|
11297
|
+
case 40:
|
|
10424
11298
|
apiWithFallback = _context.t0;
|
|
10425
11299
|
amountStr = amount === null || amount === void 0 ? void 0 : amount.toString();
|
|
10426
11300
|
if (!isTMulti(currency)) {
|
|
10427
|
-
_context.next =
|
|
11301
|
+
_context.next = 46;
|
|
10428
11302
|
break;
|
|
10429
11303
|
}
|
|
10430
11304
|
console.warn('Keep alive check is not supported when using MultiLocation as currency.');
|
|
10431
|
-
_context.next =
|
|
11305
|
+
_context.next = 60;
|
|
10432
11306
|
break;
|
|
10433
|
-
case
|
|
11307
|
+
case 46:
|
|
10434
11308
|
if (!(_typeof(address) === 'object')) {
|
|
10435
|
-
_context.next =
|
|
11309
|
+
_context.next = 50;
|
|
10436
11310
|
break;
|
|
10437
11311
|
}
|
|
10438
11312
|
console.warn('Keep alive check is not supported when using MultiLocation as address.');
|
|
10439
|
-
_context.next =
|
|
11313
|
+
_context.next = 60;
|
|
10440
11314
|
break;
|
|
10441
|
-
case
|
|
11315
|
+
case 50:
|
|
10442
11316
|
if (!(_typeof(destination) === 'object')) {
|
|
10443
|
-
_context.next =
|
|
11317
|
+
_context.next = 54;
|
|
10444
11318
|
break;
|
|
10445
11319
|
}
|
|
10446
11320
|
console.warn('Keep alive check is not supported when using MultiLocation as destination.');
|
|
10447
|
-
_context.next =
|
|
11321
|
+
_context.next = 60;
|
|
10448
11322
|
break;
|
|
10449
|
-
case
|
|
10450
|
-
|
|
11323
|
+
case 54:
|
|
11324
|
+
if (!(origin === 'Ethereum' || destination === 'Ethereum')) {
|
|
11325
|
+
_context.next = 58;
|
|
11326
|
+
break;
|
|
11327
|
+
}
|
|
11328
|
+
console.warn('Keep alive check is not supported when using Ethereum as origin or destination.');
|
|
11329
|
+
_context.next = 60;
|
|
11330
|
+
break;
|
|
11331
|
+
case 58:
|
|
11332
|
+
_context.next = 60;
|
|
10451
11333
|
return checkKeepAlive({
|
|
10452
11334
|
originApi: apiWithFallback,
|
|
10453
11335
|
address: address,
|
|
@@ -10457,13 +11339,12 @@ var sendCommon = function sendCommon(options) {
|
|
|
10457
11339
|
currencySymbol: (_a = asset === null || asset === void 0 ? void 0 : asset.symbol) !== null && _a !== void 0 ? _a : currency.toString(),
|
|
10458
11340
|
destNode: destination
|
|
10459
11341
|
});
|
|
10460
|
-
case
|
|
11342
|
+
case 60:
|
|
10461
11343
|
currencyStr = isTMulti(currency) ? undefined : currency.toString();
|
|
10462
|
-
currencyId = assetCheckEnabled ? asset === null || asset === void 0 ? void 0 : asset.assetId : currencyStr;
|
|
10463
11344
|
return _context.abrupt("return", originNode.transfer({
|
|
10464
11345
|
api: apiWithFallback,
|
|
10465
|
-
currencySymbol: asset === null || asset === void 0 ? void 0 : asset.symbol,
|
|
10466
|
-
currencyId:
|
|
11346
|
+
currencySymbol: (_b = asset === null || asset === void 0 ? void 0 : asset.symbol) !== null && _b !== void 0 ? _b : currencyStr,
|
|
11347
|
+
currencyId: asset === null || asset === void 0 ? void 0 : asset.assetId,
|
|
10467
11348
|
amount: amountStr !== null && amountStr !== void 0 ? amountStr : '',
|
|
10468
11349
|
address: address,
|
|
10469
11350
|
destination: destination,
|
|
@@ -10473,7 +11354,7 @@ var sendCommon = function sendCommon(options) {
|
|
|
10473
11354
|
version: version,
|
|
10474
11355
|
serializedApiCallEnabled: serializedApiCallEnabled
|
|
10475
11356
|
}));
|
|
10476
|
-
case
|
|
11357
|
+
case 62:
|
|
10477
11358
|
case "end":
|
|
10478
11359
|
return _context.stop();
|
|
10479
11360
|
}
|
|
@@ -10516,11 +11397,11 @@ var send = function send(options) {
|
|
|
10516
11397
|
};
|
|
10517
11398
|
var transferRelayToParaCommon = function transferRelayToParaCommon(options) {
|
|
10518
11399
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
10519
|
-
var api, destination, amount, address, paraIdTo, destApiForKeepAlive, version, _options$
|
|
11400
|
+
var api, destination, amount, address, paraIdTo, destApiForKeepAlive, version, _options$serializedAp, serializedApiCallEnabled, isMultiLocationDestination, isAddressMultiLocation, apiWithFallback, amountStr, serializedApiCall;
|
|
10520
11401
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
10521
11402
|
while (1) switch (_context4.prev = _context4.next) {
|
|
10522
11403
|
case 0:
|
|
10523
|
-
api = options.api, destination = options.destination, amount = options.amount, address = options.address, paraIdTo = options.paraIdTo, destApiForKeepAlive = options.destApiForKeepAlive, version = options.version, _options$
|
|
11404
|
+
api = options.api, destination = options.destination, amount = options.amount, address = options.address, paraIdTo = options.paraIdTo, destApiForKeepAlive = options.destApiForKeepAlive, version = options.version, _options$serializedAp = options.serializedApiCallEnabled, serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
|
|
10524
11405
|
isMultiLocationDestination = _typeof(destination) === 'object';
|
|
10525
11406
|
isAddressMultiLocation = _typeof(address) === 'object';
|
|
10526
11407
|
if (!(api === undefined && isMultiLocationDestination)) {
|
|
@@ -10549,7 +11430,7 @@ var transferRelayToParaCommon = function transferRelayToParaCommon(options) {
|
|
|
10549
11430
|
break;
|
|
10550
11431
|
}
|
|
10551
11432
|
console.warn('Keep alive check is not supported when using MultiLocation as destination.');
|
|
10552
|
-
_context4.next =
|
|
11433
|
+
_context4.next = 28;
|
|
10553
11434
|
break;
|
|
10554
11435
|
case 18:
|
|
10555
11436
|
if (!isAddressMultiLocation) {
|
|
@@ -10557,10 +11438,18 @@ var transferRelayToParaCommon = function transferRelayToParaCommon(options) {
|
|
|
10557
11438
|
break;
|
|
10558
11439
|
}
|
|
10559
11440
|
console.warn('Keep alive check is not supported when using MultiLocation as address.');
|
|
10560
|
-
_context4.next =
|
|
11441
|
+
_context4.next = 28;
|
|
10561
11442
|
break;
|
|
10562
11443
|
case 22:
|
|
10563
|
-
|
|
11444
|
+
if (!(destination === 'Ethereum')) {
|
|
11445
|
+
_context4.next = 26;
|
|
11446
|
+
break;
|
|
11447
|
+
}
|
|
11448
|
+
console.warn('Keep alive check is not supported when using Ethereum as destination.');
|
|
11449
|
+
_context4.next = 28;
|
|
11450
|
+
break;
|
|
11451
|
+
case 26:
|
|
11452
|
+
_context4.next = 28;
|
|
10564
11453
|
return checkKeepAlive({
|
|
10565
11454
|
originApi: apiWithFallback,
|
|
10566
11455
|
address: address,
|
|
@@ -10569,7 +11458,7 @@ var transferRelayToParaCommon = function transferRelayToParaCommon(options) {
|
|
|
10569
11458
|
currencySymbol: getRelayChainSymbol(destination),
|
|
10570
11459
|
destNode: destination
|
|
10571
11460
|
});
|
|
10572
|
-
case
|
|
11461
|
+
case 28:
|
|
10573
11462
|
serializedApiCall = getNode(isMultiLocationDestination ? resolveTNodeFromMultiLocation(destination) : destination).transferRelayToPara({
|
|
10574
11463
|
api: apiWithFallback,
|
|
10575
11464
|
destination: destination,
|
|
@@ -10580,13 +11469,13 @@ var transferRelayToParaCommon = function transferRelayToParaCommon(options) {
|
|
|
10580
11469
|
version: version
|
|
10581
11470
|
});
|
|
10582
11471
|
if (!serializedApiCallEnabled) {
|
|
10583
|
-
_context4.next =
|
|
11472
|
+
_context4.next = 31;
|
|
10584
11473
|
break;
|
|
10585
11474
|
}
|
|
10586
11475
|
return _context4.abrupt("return", serializedApiCall);
|
|
10587
|
-
case
|
|
11476
|
+
case 31:
|
|
10588
11477
|
return _context4.abrupt("return", callPolkadotJsTxFunction(apiWithFallback, serializedApiCall));
|
|
10589
|
-
case
|
|
11478
|
+
case 32:
|
|
10590
11479
|
case "end":
|
|
10591
11480
|
return _context4.stop();
|
|
10592
11481
|
}
|
|
@@ -10637,4 +11526,4 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
10637
11526
|
transferRelayToParaSerializedApiCall: transferRelayToParaSerializedApiCall
|
|
10638
11527
|
});
|
|
10639
11528
|
|
|
10640
|
-
export { Builder, IncompatibleNodesError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODE_NAMES, NoXCMSupportImplementedError, NodeNotSupportedError, Parents, SUPPORTED_PALLETS, ScenarioNotSupportedError, Version, index$1 as assets, index$3 as closeChannels, createApiInstanceForNode, getAllAssetsSymbols, getAllNodeProviders, getAssetDecimals, getAssetId, getAssetsObject, getBalanceForeign, getBalanceNative, getDefaultPallet, getExistentialDeposit, getNativeAssets, getNode, getNodeEndpointOption, getNodeProvider, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedPallets, getTNode, getTransferInfo, hasSupportForAsset, index$2 as openChannels, index as xcmPallet };
|
|
11529
|
+
export { Builder, CloseChannelBuilder, DuplicateAssetError, EvmBuilder, IncompatibleNodesError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, NoXCMSupportImplementedError, NodeNotSupportedError, OpenChannelBuilder, Parents, SUPPORTED_PALLETS, ScenarioNotSupportedError, Version, index$1 as assets, index$3 as closeChannels, createApiInstanceForNode, getAllAssetsSymbols, getAllNodeProviders, getAssetDecimals, getAssetId, getAssetsObject, getBalanceForeign, getBalanceNative, getDefaultPallet, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getNode, getNodeEndpointOption, getNodeProvider, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedPallets, getTNode, getTransferInfo, hasSupportForAsset, index$2 as openChannels, index as xcmPallet };
|