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