@paraspell/sdk 5.9.0 → 5.10.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.mjs CHANGED
@@ -3,7 +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
+ import { contextFactory, toPolkadot, environment } from '@snowbridge/api';
7
7
 
8
8
  function _arrayLikeToArray(r, a) {
9
9
  (null == a || a > r.length) && (a = r.length);
@@ -568,7 +568,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
568
568
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
569
569
  PERFORMANCE OF THIS SOFTWARE.
570
570
  ***************************************************************************** */
571
- /* global Reflect, Promise, SuppressedError, Symbol */
571
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
572
572
 
573
573
 
574
574
  function __awaiter(thisArg, _arguments, P, generator) {
@@ -600,6 +600,12 @@ var Parents;
600
600
  Parents[Parents["TWO"] = 2] = "TWO";
601
601
  })(Parents || (Parents = {}));
602
602
 
603
+ var BatchMode;
604
+ (function (BatchMode) {
605
+ BatchMode["BATCH_ALL"] = "BATCH_ALL";
606
+ BatchMode["BATCH"] = "BATCH";
607
+ })(BatchMode || (BatchMode = {}));
608
+
603
609
  // Used to inform user, that Parachain they wish to use has not yet implemented full XCM Support
604
610
  var NoXCMSupportImplementedError = /*#__PURE__*/function (_Error) {
605
611
  function NoXCMSupportImplementedError(node) {
@@ -611,7 +617,7 @@ var NoXCMSupportImplementedError = /*#__PURE__*/function (_Error) {
611
617
  }
612
618
  _inherits(NoXCMSupportImplementedError, _Error);
613
619
  return _createClass(NoXCMSupportImplementedError);
614
- }( /*#__PURE__*/_wrapNativeSuper(Error));
620
+ }(/*#__PURE__*/_wrapNativeSuper(Error));
615
621
 
616
622
  var Polkadot$1 = {
617
623
  relayChainAssetSymbol: "DOT",
@@ -688,6 +694,11 @@ var Acala$3 = {
688
694
  symbol: "EQD",
689
695
  decimals: 9
690
696
  },
697
+ {
698
+ assetId: "16",
699
+ symbol: "PDEX",
700
+ decimals: 12
701
+ },
691
702
  {
692
703
  assetId: "4",
693
704
  symbol: "INTR",
@@ -748,6 +759,11 @@ var Acala$3 = {
748
759
  symbol: "LDO",
749
760
  decimals: 18
750
761
  },
762
+ {
763
+ assetId: "17",
764
+ symbol: "HDX",
765
+ decimals: 12
766
+ },
751
767
  {
752
768
  assetId: "0x54a37a01cd75b616d63e0ab665bffdb0143c52ae",
753
769
  symbol: "DAI",
@@ -813,6 +829,11 @@ var Acala$3 = {
813
829
  symbol: "WBTC",
814
830
  decimals: 8
815
831
  },
832
+ {
833
+ assetId: "15",
834
+ symbol: "CFG",
835
+ decimals: 18
836
+ },
816
837
  {
817
838
  assetId: "3",
818
839
  symbol: "IBTC",
@@ -1226,11 +1247,6 @@ var Centrifuge$3 = {
1226
1247
  symbol: "USDC",
1227
1248
  decimals: 6
1228
1249
  },
1229
- {
1230
- assetId: "N",
1231
- symbol: "CFG",
1232
- decimals: 18
1233
- },
1234
1250
  {
1235
1251
  assetId: "100002",
1236
1252
  symbol: "LpBaseUSDC",
@@ -1440,6 +1456,26 @@ var Darwinia$3 = {
1440
1456
  }
1441
1457
  ],
1442
1458
  otherAssets: [
1459
+ {
1460
+ assetId: "1027",
1461
+ symbol: "ahUSDT",
1462
+ decimals: 6
1463
+ },
1464
+ {
1465
+ assetId: "1026",
1466
+ symbol: "KTON",
1467
+ decimals: 18
1468
+ },
1469
+ {
1470
+ assetId: "1028",
1471
+ symbol: "ahPINK",
1472
+ decimals: 10
1473
+ },
1474
+ {
1475
+ assetId: "1029",
1476
+ symbol: "DOT",
1477
+ decimals: 10
1478
+ }
1443
1479
  ]
1444
1480
  };
1445
1481
  var Hydration$3 = {
@@ -1785,7 +1821,7 @@ var Litentry$3 = {
1785
1821
  nativeAssets: [
1786
1822
  {
1787
1823
  symbol: "LIT",
1788
- decimals: 12
1824
+ decimals: 18
1789
1825
  }
1790
1826
  ],
1791
1827
  otherAssets: [
@@ -2233,6 +2269,11 @@ var AssetHubPolkadot$3 = {
2233
2269
  symbol: "MYTH",
2234
2270
  decimals: 18
2235
2271
  },
2272
+ {
2273
+ assetId: "22222005",
2274
+ symbol: "love",
2275
+ decimals: 12
2276
+ },
2236
2277
  {
2237
2278
  assetId: "9999",
2238
2279
  symbol: "TOM",
@@ -2248,6 +2289,11 @@ var AssetHubPolkadot$3 = {
2248
2289
  symbol: "WETH",
2249
2290
  decimals: 18
2250
2291
  },
2292
+ {
2293
+ assetId: "22222041",
2294
+ symbol: "PAD",
2295
+ decimals: 12
2296
+ },
2251
2297
  {
2252
2298
  assetId: "56",
2253
2299
  symbol: "UNION",
@@ -2258,6 +2304,11 @@ var AssetHubPolkadot$3 = {
2258
2304
  symbol: "HUB",
2259
2305
  decimals: 10
2260
2306
  },
2307
+ {
2308
+ assetId: "22222025",
2309
+ symbol: "XCMS",
2310
+ decimals: 12
2311
+ },
2261
2312
  {
2262
2313
  assetId: "81",
2263
2314
  symbol: "GVN",
@@ -2288,6 +2339,11 @@ var AssetHubPolkadot$3 = {
2288
2339
  symbol: "DUCK",
2289
2340
  decimals: 10
2290
2341
  },
2342
+ {
2343
+ assetId: "58",
2344
+ symbol: "MDMA",
2345
+ decimals: 12
2346
+ },
2291
2347
  {
2292
2348
  assetId: "222",
2293
2349
  symbol: "SHL",
@@ -2333,21 +2389,46 @@ var AssetHubPolkadot$3 = {
2333
2389
  symbol: "NFLR",
2334
2390
  decimals: 10
2335
2391
  },
2392
+ {
2393
+ assetId: "22222028",
2394
+ symbol: "COKE",
2395
+ decimals: 12
2396
+ },
2336
2397
  {
2337
2398
  assetId: "20090110",
2338
2399
  symbol: "test1",
2339
2400
  decimals: 10
2340
2401
  },
2402
+ {
2403
+ assetId: "22222024",
2404
+ symbol: "POLISD",
2405
+ decimals: 12
2406
+ },
2341
2407
  {
2342
2408
  assetId: "256",
2343
2409
  symbol: "ICE",
2344
2410
  decimals: 20
2345
2411
  },
2412
+ {
2413
+ assetId: "22222070",
2414
+ symbol: "Mill",
2415
+ decimals: 12
2416
+ },
2417
+ {
2418
+ assetId: "22222019",
2419
+ symbol: "PI",
2420
+ decimals: 12
2421
+ },
2346
2422
  {
2347
2423
  assetId: "20090130",
2348
2424
  symbol: "SUS",
2349
2425
  decimals: 10
2350
2426
  },
2427
+ {
2428
+ assetId: "108",
2429
+ symbol: "GAME",
2430
+ decimals: 10
2431
+ },
2351
2432
  {
2352
2433
  assetId: "1111",
2353
2434
  symbol: "TESTV2",
@@ -2358,21 +2439,41 @@ var AssetHubPolkadot$3 = {
2358
2439
  symbol: "USDT",
2359
2440
  decimals: 16
2360
2441
  },
2442
+ {
2443
+ assetId: "22222008",
2444
+ symbol: "ALIEN",
2445
+ decimals: 12
2446
+ },
2361
2447
  {
2362
2448
  assetId: "300",
2363
2449
  symbol: "DOGE",
2364
2450
  decimals: 6
2365
2451
  },
2452
+ {
2453
+ assetId: "22222046",
2454
+ symbol: "$PGH",
2455
+ decimals: 12
2456
+ },
2366
2457
  {
2367
2458
  assetId: "4",
2368
2459
  symbol: "EFI",
2369
2460
  decimals: 18
2370
2461
  },
2462
+ {
2463
+ assetId: "22222043",
2464
+ symbol: "DDT",
2465
+ decimals: 12
2466
+ },
2371
2467
  {
2372
2468
  assetId: "48",
2373
2469
  symbol: "SAX",
2374
2470
  decimals: 2
2375
2471
  },
2472
+ {
2473
+ assetId: "22222064",
2474
+ symbol: "RIDEMY",
2475
+ decimals: 12
2476
+ },
2376
2477
  {
2377
2478
  assetId: "21",
2378
2479
  symbol: "WBTC",
@@ -2383,6 +2484,11 @@ var AssetHubPolkadot$3 = {
2383
2484
  symbol: "DOKA",
2384
2485
  decimals: 6
2385
2486
  },
2487
+ {
2488
+ assetId: "22222050",
2489
+ symbol: "SHIVER",
2490
+ decimals: 12
2491
+ },
2386
2492
  {
2387
2493
  assetId: "28",
2388
2494
  symbol: "BULL",
@@ -2448,6 +2554,11 @@ var AssetHubPolkadot$3 = {
2448
2554
  symbol: "SHIB",
2449
2555
  decimals: 6
2450
2556
  },
2557
+ {
2558
+ assetId: "20090147",
2559
+ symbol: "RVGAV",
2560
+ decimals: 10
2561
+ },
2451
2562
  {
2452
2563
  assetId: "46",
2453
2564
  symbol: "PEPE",
@@ -2458,6 +2569,11 @@ var AssetHubPolkadot$3 = {
2458
2569
  symbol: "BSOD",
2459
2570
  decimals: 10
2460
2571
  },
2572
+ {
2573
+ assetId: "22222036",
2574
+ symbol: "Shit",
2575
+ decimals: 12
2576
+ },
2461
2577
  {
2462
2578
  assetId: "99",
2463
2579
  symbol: "Cypress",
@@ -2469,9 +2585,14 @@ var AssetHubPolkadot$3 = {
2469
2585
  decimals: 12
2470
2586
  },
2471
2587
  {
2472
- assetId: "7777",
2473
- symbol: "FUM",
2474
- decimals: 10
2588
+ assetId: "22222058",
2589
+ symbol: "PLS",
2590
+ decimals: 12
2591
+ },
2592
+ {
2593
+ assetId: "22222002",
2594
+ symbol: "TeMeL",
2595
+ decimals: 12
2475
2596
  },
2476
2597
  {
2477
2598
  assetId: "20090114",
@@ -2488,6 +2609,26 @@ var AssetHubPolkadot$3 = {
2488
2609
  symbol: "web3",
2489
2610
  decimals: 18
2490
2611
  },
2612
+ {
2613
+ assetId: "22222051",
2614
+ symbol: "NIN",
2615
+ decimals: 12
2616
+ },
2617
+ {
2618
+ assetId: "22222020",
2619
+ symbol: "CDOG",
2620
+ decimals: 12
2621
+ },
2622
+ {
2623
+ assetId: "22222073",
2624
+ symbol: "0x4b61696279c58d",
2625
+ decimals: 12
2626
+ },
2627
+ {
2628
+ assetId: "22222074",
2629
+ symbol: "$JAM",
2630
+ decimals: 12
2631
+ },
2491
2632
  {
2492
2633
  assetId: "20090111",
2493
2634
  symbol: "txt",
@@ -2498,6 +2639,16 @@ var AssetHubPolkadot$3 = {
2498
2639
  symbol: "DED",
2499
2640
  decimals: 18
2500
2641
  },
2642
+ {
2643
+ assetId: "22222062",
2644
+ symbol: "ALPHA",
2645
+ decimals: 12
2646
+ },
2647
+ {
2648
+ assetId: "75",
2649
+ symbol: "TeMe14",
2650
+ decimals: 12
2651
+ },
2501
2652
  {
2502
2653
  assetId: "20090119",
2503
2654
  symbol: "MDGA",
@@ -2513,6 +2664,16 @@ var AssetHubPolkadot$3 = {
2513
2664
  symbol: "IBW",
2514
2665
  decimals: 10
2515
2666
  },
2667
+ {
2668
+ assetId: "22222075",
2669
+ symbol: "DUD",
2670
+ decimals: 12
2671
+ },
2672
+ {
2673
+ assetId: "22222022",
2674
+ symbol: "X",
2675
+ decimals: 12
2676
+ },
2516
2677
  {
2517
2678
  assetId: "122",
2518
2679
  symbol: "TESTING",
@@ -2533,6 +2694,21 @@ var AssetHubPolkadot$3 = {
2533
2694
  symbol: "JAMD",
2534
2695
  decimals: 10
2535
2696
  },
2697
+ {
2698
+ assetId: "57",
2699
+ symbol: "MCP",
2700
+ decimals: 12
2701
+ },
2702
+ {
2703
+ assetId: "22222021",
2704
+ symbol: "BBB",
2705
+ decimals: 12
2706
+ },
2707
+ {
2708
+ assetId: "22222009",
2709
+ symbol: "china",
2710
+ decimals: 12
2711
+ },
2536
2712
  {
2537
2713
  assetId: "14",
2538
2714
  symbol: "LEAP",
@@ -2568,6 +2744,11 @@ var AssetHubPolkadot$3 = {
2568
2744
  symbol: "STINK",
2569
2745
  decimals: 10
2570
2746
  },
2747
+ {
2748
+ assetId: "22222068",
2749
+ symbol: "V",
2750
+ decimals: 12
2751
+ },
2571
2752
  {
2572
2753
  assetId: "20090143",
2573
2754
  symbol: "DMSTR",
@@ -2599,9 +2780,14 @@ var AssetHubPolkadot$3 = {
2599
2780
  decimals: 10
2600
2781
  },
2601
2782
  {
2602
- assetId: "323",
2603
- symbol: "DGNNNC",
2604
- decimals: 6
2783
+ assetId: "22222078",
2784
+ symbol: "JAMTON",
2785
+ decimals: 12
2786
+ },
2787
+ {
2788
+ assetId: "73",
2789
+ symbol: "TeMe12",
2790
+ decimals: 12
2605
2791
  },
2606
2792
  {
2607
2793
  assetId: "77",
@@ -2613,6 +2799,11 @@ var AssetHubPolkadot$3 = {
2613
2799
  symbol: "DOGE",
2614
2800
  decimals: 10
2615
2801
  },
2802
+ {
2803
+ assetId: "22222029",
2804
+ symbol: "dog",
2805
+ decimals: 12
2806
+ },
2616
2807
  {
2617
2808
  assetId: "9002",
2618
2809
  symbol: "TAPE",
@@ -2628,6 +2819,16 @@ var AssetHubPolkadot$3 = {
2628
2819
  symbol: "GIO",
2629
2820
  decimals: 10
2630
2821
  },
2822
+ {
2823
+ assetId: "22222053",
2824
+ symbol: "DOTZ",
2825
+ decimals: 12
2826
+ },
2827
+ {
2828
+ assetId: "1747",
2829
+ symbol: "EMR",
2830
+ decimals: 10
2831
+ },
2631
2832
  {
2632
2833
  assetId: "31",
2633
2834
  symbol: "WOOD",
@@ -2683,6 +2884,11 @@ var AssetHubPolkadot$3 = {
2683
2884
  symbol: "SKL",
2684
2885
  decimals: 6
2685
2886
  },
2887
+ {
2888
+ assetId: "22222077",
2889
+ symbol: "SAPIEN",
2890
+ decimals: 12
2891
+ },
2686
2892
  {
2687
2893
  assetId: "15",
2688
2894
  symbol: "Meme",
@@ -2693,6 +2899,21 @@ var AssetHubPolkadot$3 = {
2693
2899
  symbol: "BUG",
2694
2900
  decimals: 12
2695
2901
  },
2902
+ {
2903
+ assetId: "22222013",
2904
+ symbol: "TM",
2905
+ decimals: 12
2906
+ },
2907
+ {
2908
+ assetId: "22222010",
2909
+ symbol: "TP",
2910
+ decimals: 12
2911
+ },
2912
+ {
2913
+ assetId: "22222071",
2914
+ symbol: "WUDFUD",
2915
+ decimals: 12
2916
+ },
2696
2917
  {
2697
2918
  assetId: "78",
2698
2919
  symbol: "COCA",
@@ -2713,6 +2934,11 @@ var AssetHubPolkadot$3 = {
2713
2934
  symbol: "PEPE",
2714
2935
  decimals: 10
2715
2936
  },
2937
+ {
2938
+ assetId: "20090144",
2939
+ symbol: "CHUG",
2940
+ decimals: 10
2941
+ },
2716
2942
  {
2717
2943
  assetId: "2",
2718
2944
  symbol: "BTC",
@@ -2733,6 +2959,16 @@ var AssetHubPolkadot$3 = {
2733
2959
  symbol: "POO",
2734
2960
  decimals: 10
2735
2961
  },
2962
+ {
2963
+ assetId: "22222031",
2964
+ symbol: "VRN",
2965
+ decimals: 12
2966
+ },
2967
+ {
2968
+ assetId: "22222014",
2969
+ symbol: "GIT",
2970
+ decimals: 12
2971
+ },
2736
2972
  {
2737
2973
  assetId: "20090129",
2738
2974
  symbol: "FCD",
@@ -2743,6 +2979,16 @@ var AssetHubPolkadot$3 = {
2743
2979
  symbol: "SATS",
2744
2980
  decimals: 6
2745
2981
  },
2982
+ {
2983
+ assetId: "22222034",
2984
+ symbol: "0xf09f9980",
2985
+ decimals: 12
2986
+ },
2987
+ {
2988
+ assetId: "74",
2989
+ symbol: "TeMe13",
2990
+ decimals: 12
2991
+ },
2746
2992
  {
2747
2993
  assetId: "70",
2748
2994
  symbol: "STEEBOR",
@@ -2753,11 +2999,31 @@ var AssetHubPolkadot$3 = {
2753
2999
  symbol: "HTG",
2754
3000
  decimals: 10
2755
3001
  },
3002
+ {
3003
+ assetId: "12746",
3004
+ symbol: "TTTT",
3005
+ decimals: 6
3006
+ },
2756
3007
  {
2757
3008
  assetId: "32",
2758
3009
  symbol: "CLAY",
2759
3010
  decimals: 10
2760
3011
  },
3012
+ {
3013
+ assetId: "22222035",
3014
+ symbol: ".WH",
3015
+ decimals: 12
3016
+ },
3017
+ {
3018
+ assetId: "82",
3019
+ symbol: "ANGRY",
3020
+ decimals: 12
3021
+ },
3022
+ {
3023
+ assetId: "22222065",
3024
+ symbol: "BBQ",
3025
+ decimals: 12
3026
+ },
2761
3027
  {
2762
3028
  assetId: "2106",
2763
3029
  symbol: "STREAK",
@@ -2778,11 +3044,31 @@ var AssetHubPolkadot$3 = {
2778
3044
  symbol: "STAR",
2779
3045
  decimals: 6
2780
3046
  },
3047
+ {
3048
+ assetId: "22222001",
3049
+ symbol: "OMG2",
3050
+ decimals: 12
3051
+ },
3052
+ {
3053
+ assetId: "22222042",
3054
+ symbol: "CORE",
3055
+ decimals: 12
3056
+ },
3057
+ {
3058
+ assetId: "22222018",
3059
+ symbol: "WOLF",
3060
+ decimals: 12
3061
+ },
2781
3062
  {
2782
3063
  assetId: "49",
2783
3064
  symbol: "TeMe7",
2784
3065
  decimals: 12
2785
3066
  },
3067
+ {
3068
+ assetId: "22222044",
3069
+ symbol: "DONUT",
3070
+ decimals: 12
3071
+ },
2786
3072
  {
2787
3073
  assetId: "868367",
2788
3074
  symbol: "VSC",
@@ -2798,6 +3084,11 @@ var AssetHubPolkadot$3 = {
2798
3084
  symbol: "JTO",
2799
3085
  decimals: 10
2800
3086
  },
3087
+ {
3088
+ assetId: "22222037",
3089
+ symbol: "KSM",
3090
+ decimals: 12
3091
+ },
2801
3092
  {
2802
3093
  assetId: "53",
2803
3094
  symbol: "TeMe9",
@@ -2818,6 +3109,11 @@ var AssetHubPolkadot$3 = {
2818
3109
  symbol: "GAVUN",
2819
3110
  decimals: 10
2820
3111
  },
3112
+ {
3113
+ assetId: "22222059",
3114
+ symbol: "GOOD",
3115
+ decimals: 12
3116
+ },
2821
3117
  {
2822
3118
  assetId: "43",
2823
3119
  symbol: "TeMe5",
@@ -2833,6 +3129,16 @@ var AssetHubPolkadot$3 = {
2833
3129
  symbol: "DOTA",
2834
3130
  decimals: 6
2835
3131
  },
3132
+ {
3133
+ assetId: "22222003",
3134
+ symbol: "TeMe2L",
3135
+ decimals: 12
3136
+ },
3137
+ {
3138
+ assetId: "22222039",
3139
+ symbol: "DTS",
3140
+ decimals: 12
3141
+ },
2836
3142
  {
2837
3143
  assetId: "5",
2838
3144
  symbol: "PLX",
@@ -2843,11 +3149,21 @@ var AssetHubPolkadot$3 = {
2843
3149
  symbol: "DOTA",
2844
3150
  decimals: 4
2845
3151
  },
3152
+ {
3153
+ assetId: "83",
3154
+ symbol: "BOYS",
3155
+ decimals: 12
3156
+ },
2846
3157
  {
2847
3158
  assetId: "7",
2848
3159
  symbol: "lucky7",
2849
3160
  decimals: 20
2850
3161
  },
3162
+ {
3163
+ assetId: "22222055",
3164
+ symbol: "TOP",
3165
+ decimals: 12
3166
+ },
2851
3167
  {
2852
3168
  assetId: "4242",
2853
3169
  symbol: "GAVUN",
@@ -2863,6 +3179,11 @@ var AssetHubPolkadot$3 = {
2863
3179
  symbol: "ETH",
2864
3180
  decimals: 10
2865
3181
  },
3182
+ {
3183
+ assetId: "22222072",
3184
+ symbol: "BNG",
3185
+ decimals: 12
3186
+ },
2866
3187
  {
2867
3188
  assetId: "201",
2868
3189
  symbol: "WUD",
@@ -2898,6 +3219,11 @@ var AssetHubPolkadot$3 = {
2898
3219
  symbol: "BORK",
2899
3220
  decimals: 10
2900
3221
  },
3222
+ {
3223
+ assetId: "22222048",
3224
+ symbol: "PKSK",
3225
+ decimals: 12
3226
+ },
2901
3227
  {
2902
3228
  assetId: "33441",
2903
3229
  symbol: "MPACT",
@@ -2923,6 +3249,11 @@ var AssetHubPolkadot$3 = {
2923
3249
  symbol: "PGOLD",
2924
3250
  decimals: 7
2925
3251
  },
3252
+ {
3253
+ assetId: "22222038",
3254
+ symbol: "VOR",
3255
+ decimals: 12
3256
+ },
2926
3257
  {
2927
3258
  assetId: "777",
2928
3259
  symbol: "777",
@@ -2938,16 +3269,41 @@ var AssetHubPolkadot$3 = {
2938
3269
  symbol: "test1",
2939
3270
  decimals: 10
2940
3271
  },
3272
+ {
3273
+ assetId: "22222076",
3274
+ symbol: "AAPL",
3275
+ decimals: 12
3276
+ },
2941
3277
  {
2942
3278
  assetId: "567",
2943
3279
  symbol: "ANT",
2944
3280
  decimals: 6
2945
3281
  },
3282
+ {
3283
+ assetId: "457",
3284
+ symbol: "HGVH",
3285
+ decimals: 10
3286
+ },
3287
+ {
3288
+ assetId: "68",
3289
+ symbol: "Coin68",
3290
+ decimals: 12
3291
+ },
2946
3292
  {
2947
3293
  assetId: "54",
2948
3294
  symbol: "TeMe10",
2949
3295
  decimals: 12
2950
3296
  },
3297
+ {
3298
+ assetId: "22222023",
3299
+ symbol: "LURPIS",
3300
+ decimals: 12
3301
+ },
3302
+ {
3303
+ assetId: "22222066",
3304
+ symbol: "DUW",
3305
+ decimals: 12
3306
+ },
2951
3307
  {
2952
3308
  assetId: "1230",
2953
3309
  symbol: "HAM",
@@ -2958,11 +3314,21 @@ var AssetHubPolkadot$3 = {
2958
3314
  symbol: "RNET",
2959
3315
  decimals: 0
2960
3316
  },
3317
+ {
3318
+ assetId: "22222027",
3319
+ symbol: "TDC",
3320
+ decimals: 12
3321
+ },
2961
3322
  {
2962
3323
  assetId: "9003",
2963
3324
  symbol: "KTRL",
2964
3325
  decimals: 10
2965
3326
  },
3327
+ {
3328
+ assetId: "22222033",
3329
+ symbol: "H@SH",
3330
+ decimals: 12
3331
+ },
2966
3332
  {
2967
3333
  assetId: "1313",
2968
3334
  symbol: "GGI",
@@ -2988,11 +3354,21 @@ var AssetHubPolkadot$3 = {
2988
3354
  symbol: "dot",
2989
3355
  decimals: 0
2990
3356
  },
3357
+ {
3358
+ assetId: "22222067",
3359
+ symbol: "ZALUPA",
3360
+ decimals: 12
3361
+ },
2991
3362
  {
2992
3363
  assetId: "90",
2993
3364
  symbol: "ATC",
2994
3365
  decimals: 6
2995
3366
  },
3367
+ {
3368
+ assetId: "22222017",
3369
+ symbol: "SANTA",
3370
+ decimals: 12
3371
+ },
2996
3372
  {
2997
3373
  assetId: "80",
2998
3374
  symbol: "GOVD",
@@ -3018,11 +3394,21 @@ var AssetHubPolkadot$3 = {
3018
3394
  symbol: "HYDRA",
3019
3395
  decimals: 10
3020
3396
  },
3397
+ {
3398
+ assetId: "22222057",
3399
+ symbol: "DIO",
3400
+ decimals: 12
3401
+ },
3021
3402
  {
3022
3403
  assetId: "10000",
3023
3404
  symbol: "DOGE",
3024
3405
  decimals: 6
3025
3406
  },
3407
+ {
3408
+ assetId: "59",
3409
+ symbol: "OK",
3410
+ decimals: 12
3411
+ },
3026
3412
  {
3027
3413
  assetId: "2820",
3028
3414
  symbol: "HOOT",
@@ -3033,6 +3419,21 @@ var AssetHubPolkadot$3 = {
3033
3419
  symbol: "PP",
3034
3420
  decimals: 10
3035
3421
  },
3422
+ {
3423
+ assetId: "22222069",
3424
+ symbol: "HELLO",
3425
+ decimals: 12
3426
+ },
3427
+ {
3428
+ assetId: "22222007",
3429
+ symbol: "NaCl",
3430
+ decimals: 12
3431
+ },
3432
+ {
3433
+ assetId: "2567",
3434
+ symbol: "TSTRM",
3435
+ decimals: 6
3436
+ },
3036
3437
  {
3037
3438
  assetId: "51",
3038
3439
  symbol: "JAMA",
@@ -3053,6 +3454,11 @@ var AssetHubPolkadot$3 = {
3053
3454
  symbol: "clay",
3054
3455
  decimals: 20
3055
3456
  },
3457
+ {
3458
+ assetId: "22222016",
3459
+ symbol: "MRSHE",
3460
+ decimals: 12
3461
+ },
3056
3462
  {
3057
3463
  assetId: "20090134",
3058
3464
  symbol: "DOTCOIN",
@@ -3063,11 +3469,31 @@ var AssetHubPolkadot$3 = {
3063
3469
  symbol: "BRZ",
3064
3470
  decimals: 6
3065
3471
  },
3472
+ {
3473
+ assetId: "22222049",
3474
+ symbol: "LUCKY",
3475
+ decimals: 12
3476
+ },
3066
3477
  {
3067
3478
  assetId: "8008",
3068
3479
  symbol: "HOBO",
3069
3480
  decimals: 2
3070
3481
  },
3482
+ {
3483
+ assetId: "20090146",
3484
+ symbol: "DOPE ",
3485
+ decimals: 10
3486
+ },
3487
+ {
3488
+ assetId: "22222047",
3489
+ symbol: "GWIF",
3490
+ decimals: 12
3491
+ },
3492
+ {
3493
+ assetId: "22222030",
3494
+ symbol: "PIGS",
3495
+ decimals: 12
3496
+ },
3071
3497
  {
3072
3498
  assetId: "60",
3073
3499
  symbol: "ANT",
@@ -3083,6 +3509,11 @@ var AssetHubPolkadot$3 = {
3083
3509
  symbol: "SITE",
3084
3510
  decimals: 10
3085
3511
  },
3512
+ {
3513
+ assetId: "20090145",
3514
+ symbol: "ROCK",
3515
+ decimals: 10
3516
+ },
3086
3517
  {
3087
3518
  assetId: "6666",
3088
3519
  symbol: "CHAOS",
@@ -3128,6 +3559,21 @@ var AssetHubPolkadot$3 = {
3128
3559
  symbol: "usdc",
3129
3560
  decimals: 10
3130
3561
  },
3562
+ {
3563
+ assetId: "22222000",
3564
+ symbol: "OMG",
3565
+ decimals: 12
3566
+ },
3567
+ {
3568
+ assetId: "20090149",
3569
+ symbol: "TOD",
3570
+ decimals: 10
3571
+ },
3572
+ {
3573
+ assetId: "22222045",
3574
+ symbol: "O",
3575
+ decimals: 12
3576
+ },
3131
3577
  {
3132
3578
  assetId: "2000",
3133
3579
  symbol: "DAO",
@@ -3138,6 +3584,11 @@ var AssetHubPolkadot$3 = {
3138
3584
  symbol: "DOT",
3139
3585
  decimals: 20
3140
3586
  },
3587
+ {
3588
+ assetId: "22222056",
3589
+ symbol: "KEK",
3590
+ decimals: 12
3591
+ },
3141
3592
  {
3142
3593
  assetId: "6969",
3143
3594
  symbol: "LEEMO",
@@ -3153,6 +3604,11 @@ var AssetHubPolkadot$3 = {
3153
3604
  symbol: "KAS",
3154
3605
  decimals: 12
3155
3606
  },
3607
+ {
3608
+ assetId: "22222054",
3609
+ symbol: "DON",
3610
+ decimals: 12
3611
+ },
3156
3612
  {
3157
3613
  assetId: "1337",
3158
3614
  symbol: "USDC",
@@ -3173,11 +3629,21 @@ var AssetHubPolkadot$3 = {
3173
3629
  symbol: "BOOTY",
3174
3630
  decimals: 10
3175
3631
  },
3632
+ {
3633
+ assetId: "112233",
3634
+ symbol: "MTA",
3635
+ decimals: 10
3636
+ },
3176
3637
  {
3177
3638
  assetId: "17",
3178
3639
  symbol: "WIFD",
3179
3640
  decimals: 10
3180
3641
  },
3642
+ {
3643
+ assetId: "63",
3644
+ symbol: "JBM",
3645
+ decimals: 12
3646
+ },
3181
3647
  {
3182
3648
  assetId: "1180",
3183
3649
  symbol: "KRAK",
@@ -3203,6 +3669,16 @@ var AssetHubPolkadot$3 = {
3203
3669
  symbol: "DAL",
3204
3670
  decimals: 18
3205
3671
  },
3672
+ {
3673
+ assetId: "22222032",
3674
+ symbol: "FKDC",
3675
+ decimals: 12
3676
+ },
3677
+ {
3678
+ assetId: "22222015",
3679
+ symbol: "B",
3680
+ decimals: 12
3681
+ },
3206
3682
  {
3207
3683
  assetId: "23",
3208
3684
  symbol: "PINK",
@@ -3228,6 +3704,11 @@ var AssetHubPolkadot$3 = {
3228
3704
  symbol: "HASH",
3229
3705
  decimals: 18
3230
3706
  },
3707
+ {
3708
+ assetId: "65",
3709
+ symbol: "TeMe11",
3710
+ decimals: 12
3711
+ },
3231
3712
  {
3232
3713
  assetId: "9001",
3233
3714
  symbol: "BOMB",
@@ -3268,11 +3749,41 @@ var AssetHubPolkadot$3 = {
3268
3749
  symbol: "ETH",
3269
3750
  decimals: 10
3270
3751
  },
3752
+ {
3753
+ assetId: "22222061",
3754
+ symbol: "MONAD",
3755
+ decimals: 12
3756
+ },
3757
+ {
3758
+ assetId: "22222006",
3759
+ symbol: "LFG",
3760
+ decimals: 12
3761
+ },
3762
+ {
3763
+ assetId: "64",
3764
+ symbol: "CPcoin",
3765
+ decimals: 12
3766
+ },
3271
3767
  {
3272
3768
  assetId: "4157",
3273
3769
  symbol: "PDOG",
3274
3770
  decimals: 10
3275
3771
  },
3772
+ {
3773
+ assetId: "20090148",
3774
+ symbol: "BOB",
3775
+ decimals: 10
3776
+ },
3777
+ {
3778
+ assetId: "22222040",
3779
+ symbol: "NOFUN",
3780
+ decimals: 12
3781
+ },
3782
+ {
3783
+ assetId: "22222026",
3784
+ symbol: "DDOT",
3785
+ decimals: 12
3786
+ },
3276
3787
  {
3277
3788
  assetId: "660301",
3278
3789
  symbol: "GRL",
@@ -3298,16 +3809,51 @@ var AssetHubPolkadot$3 = {
3298
3809
  symbol: "WOOD",
3299
3810
  decimals: 10
3300
3811
  },
3812
+ {
3813
+ assetId: "22222060",
3814
+ symbol: "TATE",
3815
+ decimals: 12
3816
+ },
3817
+ {
3818
+ assetId: "22222011",
3819
+ symbol: "PM",
3820
+ decimals: 12
3821
+ },
3301
3822
  {
3302
3823
  assetId: "20090127",
3303
3824
  symbol: "PAMPIT",
3304
3825
  decimals: 10
3305
3826
  },
3827
+ {
3828
+ assetId: "22222004",
3829
+ symbol: "TeMeL3",
3830
+ decimals: 12
3831
+ },
3832
+ {
3833
+ assetId: "62",
3834
+ symbol: "CPDOT",
3835
+ decimals: 12
3836
+ },
3837
+ {
3838
+ assetId: "22222012",
3839
+ symbol: "DAMN",
3840
+ decimals: 12
3841
+ },
3306
3842
  {
3307
3843
  assetId: "2230",
3308
3844
  symbol: "GBILL",
3309
3845
  decimals: 8
3310
3846
  },
3847
+ {
3848
+ assetId: "22222063",
3849
+ symbol: "MAXCAT",
3850
+ decimals: 12
3851
+ },
3852
+ {
3853
+ assetId: "22222052",
3854
+ symbol: "MODE",
3855
+ decimals: 12
3856
+ },
3311
3857
  {
3312
3858
  assetId: "92",
3313
3859
  symbol: "TeMe2",
@@ -3331,6 +3877,21 @@ var Altair$3 = {
3331
3877
  }
3332
3878
  ],
3333
3879
  otherAssets: [
3880
+ {
3881
+ assetId: "3",
3882
+ symbol: "KSM",
3883
+ decimals: 12
3884
+ },
3885
+ {
3886
+ assetId: "1",
3887
+ symbol: "USDT",
3888
+ decimals: 6
3889
+ },
3890
+ {
3891
+ assetId: "2",
3892
+ symbol: "aUSD",
3893
+ decimals: 12
3894
+ }
3334
3895
  ]
3335
3896
  };
3336
3897
  var Amplitude$3 = {
@@ -3344,6 +3905,21 @@ var Amplitude$3 = {
3344
3905
  }
3345
3906
  ],
3346
3907
  otherAssets: [
3908
+ {
3909
+ assetId: "2",
3910
+ symbol: "PICA",
3911
+ decimals: 12
3912
+ },
3913
+ {
3914
+ assetId: "1",
3915
+ symbol: "USDT",
3916
+ decimals: 6
3917
+ },
3918
+ {
3919
+ assetId: "0",
3920
+ symbol: "KSM",
3921
+ decimals: 12
3922
+ }
3347
3923
  ]
3348
3924
  };
3349
3925
  var Bajun$3 = {
@@ -3616,6 +4192,11 @@ var Crab$3 = {
3616
4192
  }
3617
4193
  ],
3618
4194
  otherAssets: [
4195
+ {
4196
+ assetId: "1026",
4197
+ symbol: "CKTON",
4198
+ decimals: 18
4199
+ }
3619
4200
  ]
3620
4201
  };
3621
4202
  var CrustShadow$3 = {
@@ -3750,6 +4331,16 @@ var Curio$3 = {
3750
4331
  assetId: "0",
3751
4332
  symbol: "BSX",
3752
4333
  decimals: 12
4334
+ },
4335
+ {
4336
+ assetId: "2",
4337
+ symbol: "VAL",
4338
+ decimals: 18
4339
+ },
4340
+ {
4341
+ assetId: "1",
4342
+ symbol: "XOR",
4343
+ decimals: 18
3753
4344
  }
3754
4345
  ]
3755
4346
  };
@@ -4082,7 +4673,7 @@ var Litmus$3 = {
4082
4673
  nativeAssets: [
4083
4674
  {
4084
4675
  symbol: "LIT",
4085
- decimals: 12
4676
+ decimals: 18
4086
4677
  }
4087
4678
  ],
4088
4679
  otherAssets: [
@@ -5505,11 +6096,6 @@ var AssetHubKusama$3 = {
5505
6096
  symbol: "XEN",
5506
6097
  decimals: 10
5507
6098
  },
5508
- {
5509
- assetId: "4294967291",
5510
- symbol: "PRIME",
5511
- decimals: 7
5512
- },
5513
6099
  {
5514
6100
  assetId: "777777",
5515
6101
  symbol: "DEFI",
@@ -6732,7 +7318,7 @@ var InvalidCurrencyError = /*#__PURE__*/function (_Error) {
6732
7318
  }
6733
7319
  _inherits(InvalidCurrencyError, _Error);
6734
7320
  return _createClass(InvalidCurrencyError);
6735
- }( /*#__PURE__*/_wrapNativeSuper(Error));
7321
+ }(/*#__PURE__*/_wrapNativeSuper(Error));
6736
7322
 
6737
7323
  // Used to inform user, that Parachain they wish to use is not supported yet
6738
7324
  var NodeNotSupportedError = /*#__PURE__*/function (_Error) {
@@ -6745,7 +7331,7 @@ var NodeNotSupportedError = /*#__PURE__*/function (_Error) {
6745
7331
  }
6746
7332
  _inherits(NodeNotSupportedError, _Error);
6747
7333
  return _createClass(NodeNotSupportedError);
6748
- }( /*#__PURE__*/_wrapNativeSuper(Error));
7334
+ }(/*#__PURE__*/_wrapNativeSuper(Error));
6749
7335
 
6750
7336
  // Used to inform user, that Parachain they wish to use does not support scenario they wish to use yet
6751
7337
  var ScenarioNotSupportedError = /*#__PURE__*/function (_Error) {
@@ -6758,7 +7344,7 @@ var ScenarioNotSupportedError = /*#__PURE__*/function (_Error) {
6758
7344
  }
6759
7345
  _inherits(ScenarioNotSupportedError, _Error);
6760
7346
  return _createClass(ScenarioNotSupportedError);
6761
- }( /*#__PURE__*/_wrapNativeSuper(Error));
7347
+ }(/*#__PURE__*/_wrapNativeSuper(Error));
6762
7348
 
6763
7349
  var IncompatibleNodesError = /*#__PURE__*/function (_Error) {
6764
7350
  function IncompatibleNodesError(message) {
@@ -6770,7 +7356,7 @@ var IncompatibleNodesError = /*#__PURE__*/function (_Error) {
6770
7356
  }
6771
7357
  _inherits(IncompatibleNodesError, _Error);
6772
7358
  return _createClass(IncompatibleNodesError);
6773
- }( /*#__PURE__*/_wrapNativeSuper(Error));
7359
+ }(/*#__PURE__*/_wrapNativeSuper(Error));
6774
7360
 
6775
7361
  var DuplicateAssetError = /*#__PURE__*/function (_Error) {
6776
7362
  function DuplicateAssetError(symbol) {
@@ -6782,7 +7368,7 @@ var DuplicateAssetError = /*#__PURE__*/function (_Error) {
6782
7368
  }
6783
7369
  _inherits(DuplicateAssetError, _Error);
6784
7370
  return _createClass(DuplicateAssetError);
6785
- }( /*#__PURE__*/_wrapNativeSuper(Error));
7371
+ }(/*#__PURE__*/_wrapNativeSuper(Error));
6786
7372
 
6787
7373
  var constructRelayToParaParameters = function constructRelayToParaParameters(_ref, version) {
6788
7374
  var api = _ref.api,
@@ -6952,12 +7538,12 @@ var findAssetBySymbol = function findAssetBySymbol(node, destination, otherAsset
6952
7538
  var assetSymbol = _ref3.symbol;
6953
7539
  return (assetSymbol === null || assetSymbol === void 0 ? void 0 : assetSymbol.toLowerCase()) === symbol.toLowerCase();
6954
7540
  });
6955
- if (otherAssetsMatches.length > 1 && !isRelayDestination && isSymbol === undefined) {
6956
- throw new DuplicateAssetError(symbol);
6957
- }
6958
7541
  if (node === 'Astar' || node === 'Shiden') {
6959
7542
  return nativeAssetsMatches[0] || otherAssetsMatches[0] || null;
6960
7543
  }
7544
+ if (otherAssetsMatches.length > 1 && !isRelayDestination && isSymbol === undefined) {
7545
+ throw new DuplicateAssetError(symbol);
7546
+ }
6961
7547
  return otherAssetsMatches[0] || nativeAssetsMatches[0] || null;
6962
7548
  };
6963
7549
  var findAssetById = function findAssetById(assets, assetId) {
@@ -7818,7 +8404,7 @@ var Centrifuge$1 = "1000000000000";
7818
8404
  var ComposableFinance$1 = "100000000000";
7819
8405
  var Darwinia$1 = "0";
7820
8406
  var Hydration$1 = "1000000000000";
7821
- var Litentry$1 = "100000000000";
8407
+ var Litentry$1 = "100000000000000000";
7822
8408
  var Moonbeam$1 = "0";
7823
8409
  var Parallel$1 = "100000000000";
7824
8410
  var AssetHubKusama$1 = "3333333";
@@ -7837,7 +8423,7 @@ var Imbue$1 = "1000000";
7837
8423
  var Integritee$1 = "1000000000";
7838
8424
  var InvArchTinker$1 = "1000000000";
7839
8425
  var Karura$1 = "100000000000";
7840
- var Litmus$1 = "100000000000";
8426
+ var Litmus$1 = "100000000000000000";
7841
8427
  var Moonriver$1 = "0";
7842
8428
  var ParallelHeiko$1 = "10000000000";
7843
8429
  var Picasso$1 = "100000000000";
@@ -8196,8 +8782,9 @@ var OpenChannelBuilder = /*#__PURE__*/function () {
8196
8782
  }();
8197
8783
 
8198
8784
  var RelayToParaBuilder = /*#__PURE__*/function () {
8199
- function RelayToParaBuilder(api, to, paraIdTo) {
8785
+ function RelayToParaBuilder(api, to, batchManager, paraIdTo) {
8200
8786
  _classCallCheck(this, RelayToParaBuilder);
8787
+ this.batchManager = batchManager;
8201
8788
  this.api = api;
8202
8789
  this.to = to;
8203
8790
  this.paraIdTo = paraIdTo;
@@ -8239,6 +8826,15 @@ var RelayToParaBuilder = /*#__PURE__*/function () {
8239
8826
  version: this._version
8240
8827
  };
8241
8828
  }
8829
+ }, {
8830
+ key: "addToBatch",
8831
+ value: function addToBatch() {
8832
+ this.batchManager.addTransaction({
8833
+ func: transferRelayToPara,
8834
+ options: this.buildOptions()
8835
+ });
8836
+ return new GeneralBuilder(this.batchManager, this.api, undefined, this.to);
8837
+ }
8242
8838
  }, {
8243
8839
  key: "build",
8244
8840
  value: function build() {
@@ -8281,15 +8877,16 @@ var RelayToParaBuilder = /*#__PURE__*/function () {
8281
8877
  }
8282
8878
  }], [{
8283
8879
  key: "create",
8284
- value: function create(api, to, paraIdTo) {
8285
- return new RelayToParaBuilder(api, to, paraIdTo);
8880
+ value: function create(api, to, batchManager, paraIdTo) {
8881
+ return new RelayToParaBuilder(api, to, batchManager, paraIdTo);
8286
8882
  }
8287
8883
  }]);
8288
8884
  }();
8289
8885
 
8290
8886
  var ParaToParaBuilder = /*#__PURE__*/function () {
8291
- function ParaToParaBuilder(api, from, to, currency, paraIdTo) {
8887
+ function ParaToParaBuilder(api, from, to, currency, batchManager, paraIdTo) {
8292
8888
  _classCallCheck(this, ParaToParaBuilder);
8889
+ this.batchManager = batchManager;
8293
8890
  this.api = api;
8294
8891
  this.from = from;
8295
8892
  this.to = to;
@@ -8342,6 +8939,16 @@ var ParaToParaBuilder = /*#__PURE__*/function () {
8342
8939
  version: this._version
8343
8940
  };
8344
8941
  }
8942
+ }, {
8943
+ key: "addToBatch",
8944
+ value: function addToBatch() {
8945
+ var options = this.buildOptions();
8946
+ this.batchManager.addTransaction({
8947
+ func: send,
8948
+ options: options
8949
+ });
8950
+ return new GeneralBuilder(this.batchManager, this.api, this.from);
8951
+ }
8345
8952
  }, {
8346
8953
  key: "build",
8347
8954
  value: function build() {
@@ -8350,12 +8957,18 @@ var ParaToParaBuilder = /*#__PURE__*/function () {
8350
8957
  return _regeneratorRuntime().wrap(function _callee$(_context) {
8351
8958
  while (1) switch (_context.prev = _context.next) {
8352
8959
  case 0:
8960
+ if (this.batchManager.isEmpty()) {
8961
+ _context.next = 2;
8962
+ break;
8963
+ }
8964
+ throw new Error('Transaction manager contains batched items. Use buildBatch() to process them.');
8965
+ case 2:
8353
8966
  options = this.buildOptions();
8354
- _context.next = 3;
8967
+ _context.next = 5;
8355
8968
  return send(options);
8356
- case 3:
8969
+ case 5:
8357
8970
  return _context.abrupt("return", _context.sent);
8358
- case 4:
8971
+ case 6:
8359
8972
  case "end":
8360
8973
  return _context.stop();
8361
8974
  }
@@ -8384,15 +8997,16 @@ var ParaToParaBuilder = /*#__PURE__*/function () {
8384
8997
  }
8385
8998
  }], [{
8386
8999
  key: "createParaToPara",
8387
- value: function createParaToPara(api, from, to, currency, paraIdTo) {
8388
- return new ParaToParaBuilder(api, from, to, currency, paraIdTo);
9000
+ value: function createParaToPara(api, from, to, currency, batchManager, paraIdTo) {
9001
+ return new ParaToParaBuilder(api, from, to, currency, batchManager, paraIdTo);
8389
9002
  }
8390
9003
  }]);
8391
9004
  }();
8392
9005
 
8393
9006
  var ParaToRelayBuilder = /*#__PURE__*/function () {
8394
- function ParaToRelayBuilder(api, from, amount, feeAsset) {
9007
+ function ParaToRelayBuilder(api, from, amount, batchManager, feeAsset) {
8395
9008
  _classCallCheck(this, ParaToRelayBuilder);
9009
+ this.batchManager = batchManager;
8396
9010
  this.api = api;
8397
9011
  this.from = from;
8398
9012
  this.amount = amount;
@@ -8434,6 +9048,16 @@ var ParaToRelayBuilder = /*#__PURE__*/function () {
8434
9048
  version: this._version
8435
9049
  };
8436
9050
  }
9051
+ }, {
9052
+ key: "addToBatch",
9053
+ value: function addToBatch() {
9054
+ var options = this.buildOptions();
9055
+ this.batchManager.addTransaction({
9056
+ func: send,
9057
+ options: options
9058
+ });
9059
+ return new GeneralBuilder(this.batchManager, this.api, this.from);
9060
+ }
8437
9061
  }, {
8438
9062
  key: "build",
8439
9063
  value: function build() {
@@ -8476,8 +9100,8 @@ var ParaToRelayBuilder = /*#__PURE__*/function () {
8476
9100
  }
8477
9101
  }], [{
8478
9102
  key: "create",
8479
- value: function create(api, from, amount, feeAsset) {
8480
- return new ParaToRelayBuilder(api, from, amount, feeAsset);
9103
+ value: function create(api, from, amount, batchManager, feeAsset) {
9104
+ return new ParaToRelayBuilder(api, from, amount, batchManager, feeAsset);
8481
9105
  }
8482
9106
  }]);
8483
9107
  }();
@@ -8492,7 +9116,7 @@ var MissingApiPromiseError = /*#__PURE__*/function (_Error) {
8492
9116
  }
8493
9117
  _inherits(MissingApiPromiseError, _Error);
8494
9118
  return _createClass(MissingApiPromiseError);
8495
- }( /*#__PURE__*/_wrapNativeSuper(Error));
9119
+ }(/*#__PURE__*/_wrapNativeSuper(Error));
8496
9120
 
8497
9121
  var buildBeneficiaryInput = function buildBeneficiaryInput(api, address) {
8498
9122
  if (isTMultiLocation(address)) {
@@ -8655,9 +9279,104 @@ var AssetClaimBuilder = /*#__PURE__*/function () {
8655
9279
  }]);
8656
9280
  }();
8657
9281
 
9282
+ var BatchTransactionManager = /*#__PURE__*/function () {
9283
+ function BatchTransactionManager() {
9284
+ _classCallCheck(this, BatchTransactionManager);
9285
+ this.transactions = [];
9286
+ }
9287
+ return _createClass(BatchTransactionManager, [{
9288
+ key: "addTransaction",
9289
+ value: function addTransaction(transaction) {
9290
+ this.transactions.push(transaction);
9291
+ }
9292
+ }, {
9293
+ key: "isEmpty",
9294
+ value: function isEmpty() {
9295
+ return this.transactions.length === 0;
9296
+ }
9297
+ }, {
9298
+ key: "buildBatch",
9299
+ value: function buildBatch(api_1, from_1, to_1) {
9300
+ return __awaiter(this, arguments, void 0, function (api, from, to) {
9301
+ var _this = this;
9302
+ var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {
9303
+ mode: BatchMode.BATCH_ALL
9304
+ };
9305
+ return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9306
+ var apiWithFallback, mode, sameFrom, results, txs;
9307
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
9308
+ while (1) switch (_context.prev = _context.next) {
9309
+ case 0:
9310
+ if (!(!from && !to)) {
9311
+ _context.next = 2;
9312
+ break;
9313
+ }
9314
+ throw new Error('From or to node is required');
9315
+ case 2:
9316
+ if (!(to && _typeof(to) === 'object')) {
9317
+ _context.next = 4;
9318
+ break;
9319
+ }
9320
+ throw new Error('Please provide ApiPromise instance.');
9321
+ case 4:
9322
+ if (!(api !== null && api !== void 0)) {
9323
+ _context.next = 8;
9324
+ break;
9325
+ }
9326
+ _context.t0 = api;
9327
+ _context.next = 11;
9328
+ break;
9329
+ case 8:
9330
+ _context.next = 10;
9331
+ return createApiInstanceForNode(from !== null && from !== void 0 ? from : determineRelayChain(to));
9332
+ case 10:
9333
+ _context.t0 = _context.sent;
9334
+ case 11:
9335
+ apiWithFallback = _context.t0;
9336
+ mode = options.mode;
9337
+ if (!(_this.transactions.length === 0)) {
9338
+ _context.next = 15;
9339
+ break;
9340
+ }
9341
+ throw new Error('No transactions to batch.');
9342
+ case 15:
9343
+ sameFrom = _this.transactions.every(function (tx) {
9344
+ if ('origin' in tx.options) {
9345
+ return tx.options.origin === from;
9346
+ }
9347
+ return true;
9348
+ });
9349
+ if (sameFrom) {
9350
+ _context.next = 18;
9351
+ break;
9352
+ }
9353
+ throw new Error('All transactions must have the same origin.');
9354
+ case 18:
9355
+ results = _this.transactions.map(function (options) {
9356
+ var func = options.func,
9357
+ txOptions = options.options;
9358
+ return func(txOptions);
9359
+ });
9360
+ _context.next = 21;
9361
+ return Promise.all(results);
9362
+ case 21:
9363
+ txs = _context.sent;
9364
+ return _context.abrupt("return", mode === BatchMode.BATCH_ALL ? apiWithFallback.tx.utility.batchAll(txs) : apiWithFallback.tx.utility.batch(txs));
9365
+ case 23:
9366
+ case "end":
9367
+ return _context.stop();
9368
+ }
9369
+ }, _callee);
9370
+ })();
9371
+ });
9372
+ }
9373
+ }]);
9374
+ }();
9375
+
8658
9376
  var ToGeneralBuilder = /*#__PURE__*/function () {
8659
- function ToGeneralBuilder(api, from, to, paraIdTo) {
9377
+ function ToGeneralBuilder(api, from, to, batchManager, paraIdTo) {
8660
9378
  _classCallCheck(this, ToGeneralBuilder);
9379
+ this.batchManager = batchManager;
8661
9380
  this.api = api;
8662
9381
  this.from = from;
8663
9382
  this.to = to;
@@ -8666,7 +9385,7 @@ var ToGeneralBuilder = /*#__PURE__*/function () {
8666
9385
  return _createClass(ToGeneralBuilder, [{
8667
9386
  key: "currency",
8668
9387
  value: function currency(_currency) {
8669
- return ParaToParaBuilder.createParaToPara(this.api, this.from, this.to, _currency, this.paraIdTo);
9388
+ return ParaToParaBuilder.createParaToPara(this.api, this.from, this.to, _currency, this.batchManager, this.paraIdTo);
8670
9389
  }
8671
9390
  }, {
8672
9391
  key: "openChannel",
@@ -8679,15 +9398,16 @@ var ToGeneralBuilder = /*#__PURE__*/function () {
8679
9398
  }]);
8680
9399
  }();
8681
9400
  var FromGeneralBuilder = /*#__PURE__*/function () {
8682
- function FromGeneralBuilder(api, from) {
9401
+ function FromGeneralBuilder(api, from, batchManager) {
8683
9402
  _classCallCheck(this, FromGeneralBuilder);
9403
+ this.batchManager = batchManager;
8684
9404
  this.api = api;
8685
9405
  this.from = from;
8686
9406
  }
8687
9407
  return _createClass(FromGeneralBuilder, [{
8688
9408
  key: "to",
8689
9409
  value: function to(node, paraIdTo) {
8690
- return new ToGeneralBuilder(this.api, this.from, node, paraIdTo);
9410
+ return new ToGeneralBuilder(this.api, this.from, node, this.batchManager, paraIdTo);
8691
9411
  }
8692
9412
  }, {
8693
9413
  key: "feeAsset",
@@ -8698,7 +9418,7 @@ var FromGeneralBuilder = /*#__PURE__*/function () {
8698
9418
  }, {
8699
9419
  key: "amount",
8700
9420
  value: function amount(_amount) {
8701
- return ParaToRelayBuilder.create(this.api, this.from, _amount, this._feeAsset);
9421
+ return ParaToRelayBuilder.create(this.api, this.from, _amount, this.batchManager, this._feeAsset);
8702
9422
  }
8703
9423
  }, {
8704
9424
  key: "closeChannel",
@@ -8711,29 +9431,100 @@ var FromGeneralBuilder = /*#__PURE__*/function () {
8711
9431
  }]);
8712
9432
  }();
8713
9433
  var GeneralBuilder = /*#__PURE__*/function () {
8714
- function GeneralBuilder(api) {
9434
+ function GeneralBuilder(batchManager, api, _from, _to) {
8715
9435
  _classCallCheck(this, GeneralBuilder);
9436
+ this.batchManager = batchManager;
8716
9437
  this.api = api;
9438
+ this._from = _from;
9439
+ this._to = _to;
8717
9440
  }
8718
9441
  return _createClass(GeneralBuilder, [{
8719
9442
  key: "from",
8720
9443
  value: function from(node) {
8721
- return new FromGeneralBuilder(this.api, node);
9444
+ return new FromGeneralBuilder(this.api, node, this.batchManager);
8722
9445
  }
8723
9446
  }, {
8724
9447
  key: "to",
8725
9448
  value: function to(node, paraIdTo) {
8726
- return RelayToParaBuilder.create(this.api, node, paraIdTo);
9449
+ return RelayToParaBuilder.create(this.api, node, this.batchManager, paraIdTo);
8727
9450
  }
8728
9451
  }, {
8729
9452
  key: "claimFrom",
8730
9453
  value: function claimFrom(node) {
8731
9454
  return AssetClaimBuilder.create(this.api, node);
8732
9455
  }
9456
+ }, {
9457
+ key: "buildBatch",
9458
+ value: function buildBatch(options) {
9459
+ return __awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9460
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
9461
+ while (1) switch (_context.prev = _context.next) {
9462
+ case 0:
9463
+ return _context.abrupt("return", this.batchManager.buildBatch(this.api, this._from, this._to, options));
9464
+ case 1:
9465
+ case "end":
9466
+ return _context.stop();
9467
+ }
9468
+ }, _callee, this);
9469
+ }));
9470
+ }
8733
9471
  }]);
8734
9472
  }();
8735
9473
  var Builder = function Builder(api) {
8736
- return new GeneralBuilder(api);
9474
+ return new GeneralBuilder(new BatchTransactionManager(), api);
9475
+ };
9476
+
9477
+ var findEthAsset = function findEthAsset(currency) {
9478
+ var ethAssets = getOtherAssets('Ethereum');
9479
+ var ethAsset = ethAssets.find(function (asset) {
9480
+ return asset.symbol === currency;
9481
+ });
9482
+ if (!ethAsset) {
9483
+ throw new InvalidCurrencyError("Currency ".concat(currency, " is not supported for Ethereum transfers"));
9484
+ }
9485
+ return ethAsset;
9486
+ };
9487
+
9488
+ var createContext = function createContext(executionUrl, config) {
9489
+ return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9490
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
9491
+ while (1) switch (_context.prev = _context.next) {
9492
+ case 0:
9493
+ _context.next = 2;
9494
+ return contextFactory({
9495
+ ethereum: {
9496
+ execution_url: executionUrl,
9497
+ beacon_url: config.BEACON_HTTP_API
9498
+ },
9499
+ polkadot: {
9500
+ url: {
9501
+ bridgeHub: config.BRIDGE_HUB_URL,
9502
+ assetHub: config.ASSET_HUB_URL,
9503
+ relaychain: config.RELAY_CHAIN_URL,
9504
+ parachains: config.PARACHAINS
9505
+ }
9506
+ },
9507
+ appContracts: {
9508
+ gateway: config.GATEWAY_CONTRACT,
9509
+ beefy: config.BEEFY_CONTRACT
9510
+ }
9511
+ });
9512
+ case 2:
9513
+ return _context.abrupt("return", _context.sent);
9514
+ case 3:
9515
+ case "end":
9516
+ return _context.stop();
9517
+ }
9518
+ }, _callee);
9519
+ }));
9520
+ };
9521
+
9522
+ var checkPlanFailure = function checkPlanFailure(plan) {
9523
+ if (plan.failure) {
9524
+ throw new Error("Failed to validate send: ".concat(plan.failure.errors.map(function (e) {
9525
+ return e.message;
9526
+ }).join('\n\n')));
9527
+ }
8737
9528
  };
8738
9529
 
8739
9530
  var transferEthToPolkadot = function transferEthToPolkadot(provider_1, _a) {
@@ -8744,65 +9535,31 @@ var transferEthToPolkadot = function transferEthToPolkadot(provider_1, _a) {
8744
9535
  amount = _ref.amount,
8745
9536
  currency = _ref.currency;
8746
9537
  return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
8747
- var ethAssets, ethAsset, env, config, context, destParaId, plan, result;
9538
+ var ethAsset, env, context, destParaId, plan, result;
8748
9539
  return _regeneratorRuntime().wrap(function _callee$(_context) {
8749
9540
  while (1) switch (_context.prev = _context.next) {
8750
9541
  case 0:
8751
- ethAssets = getOtherAssets('Ethereum');
8752
- ethAsset = ethAssets.find(function (asset) {
8753
- return asset.symbol === currency;
8754
- });
8755
- if (ethAsset) {
8756
- _context.next = 4;
8757
- break;
8758
- }
8759
- throw new InvalidCurrencyError("Currency ".concat(currency, " is not supported for Ethereum transfers"));
8760
- case 4:
9542
+ ethAsset = findEthAsset(currency);
8761
9543
  env = environment.SNOWBRIDGE_ENV['polkadot_mainnet'];
8762
- config = env.config;
8763
- _context.next = 8;
8764
- return contextFactory({
8765
- ethereum: {
8766
- execution_url: provider,
8767
- beacon_url: config.BEACON_HTTP_API
8768
- },
8769
- polkadot: {
8770
- url: {
8771
- bridgeHub: config.BRIDGE_HUB_URL,
8772
- assetHub: config.ASSET_HUB_URL,
8773
- relaychain: config.RELAY_CHAIN_URL,
8774
- parachains: config.PARACHAINS
8775
- }
8776
- },
8777
- appContracts: {
8778
- gateway: config.GATEWAY_CONTRACT,
8779
- beefy: config.BEEFY_CONTRACT
8780
- }
8781
- });
8782
- case 8:
9544
+ _context.next = 4;
9545
+ return createContext(provider, env.config);
9546
+ case 4:
8783
9547
  context = _context.sent;
8784
9548
  destParaId = getParaId(to);
8785
- _context.next = 12;
9549
+ _context.next = 8;
8786
9550
  return toPolkadot.validateSend(context, signer, address, ethAsset.assetId, destParaId, BigInt(amount), BigInt(0));
8787
- case 12:
9551
+ case 8:
8788
9552
  plan = _context.sent;
8789
- if (!plan.failure) {
8790
- _context.next = 15;
8791
- break;
8792
- }
8793
- throw new Error("Failed to validate send: ".concat(plan.failure.errors.map(function (e) {
8794
- return e.message;
8795
- }).join('\n\n')));
8796
- case 15:
8797
- _context.next = 17;
9553
+ checkPlanFailure(plan);
9554
+ _context.next = 12;
8798
9555
  return toPolkadot.send(context, signer, plan);
8799
- case 17:
9556
+ case 12:
8800
9557
  result = _context.sent;
8801
9558
  return _context.abrupt("return", {
8802
9559
  result: result,
8803
9560
  plan: plan
8804
9561
  });
8805
- case 19:
9562
+ case 14:
8806
9563
  case "end":
8807
9564
  return _context.stop();
8808
9565
  }
@@ -9401,7 +10158,6 @@ var XTokensTransferImpl = /*#__PURE__*/function () {
9401
10158
  parameters: parameters
9402
10159
  };
9403
10160
  }
9404
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
9405
10161
  return (_api$tx$module = api.tx[module])[section].apply(_api$tx$module, _toConsumableArray(parameters));
9406
10162
  }
9407
10163
  }]);
@@ -10509,11 +11265,6 @@ var Polkadex = /*#__PURE__*/function (_ParachainNode) {
10509
11265
  var currencyID = input.currencyID;
10510
11266
  return XTokensTransferImpl.transferXTokens(input, currencyID);
10511
11267
  }
10512
- }, {
10513
- key: "getProvider",
10514
- value: function getProvider() {
10515
- return getAllNodeProviders(this.node)[1];
10516
- }
10517
11268
  }]);
10518
11269
  }(ParachainNode);
10519
11270
 
@@ -11083,6 +11834,11 @@ var getAllNodeProviders = function getAllNodeProviders(node) {
11083
11834
  return Object.values(providers !== null && providers !== void 0 ? providers : []);
11084
11835
  };
11085
11836
  var getNodeProvider = function getNodeProvider(node) {
11837
+ if (node === 'Polkadot') {
11838
+ return prodRelayPolkadot.providers[0];
11839
+ } else if (node === 'Kusama') {
11840
+ return prodRelayKusama.providers[0];
11841
+ }
11086
11842
  return getNode(node).getProvider();
11087
11843
  };
11088
11844
  var createApiInstance = function createApiInstance(wsUrl) {
@@ -11170,7 +11926,7 @@ var KeepAliveError = /*#__PURE__*/function (_Error) {
11170
11926
  }
11171
11927
  _inherits(KeepAliveError, _Error);
11172
11928
  return _createClass(KeepAliveError);
11173
- }( /*#__PURE__*/_wrapNativeSuper(Error));
11929
+ }(/*#__PURE__*/_wrapNativeSuper(Error));
11174
11930
 
11175
11931
  var edMap = edMapJson;
11176
11932
  var getExistentialDeposit = function getExistentialDeposit(node) {
@@ -11320,7 +12076,7 @@ var checkKeepAlive = function checkKeepAlive(_a) {
11320
12076
  });
11321
12077
  };
11322
12078
 
11323
- var transformOptions = function transformOptions(options) {
12079
+ var transformSendOptions = function transformSendOptions(options) {
11324
12080
  var currency = options.currency;
11325
12081
  if (isTCurrencySpecifier(currency)) {
11326
12082
  if ('symbol' in currency) {
@@ -11340,13 +12096,14 @@ var transformOptions = function transformOptions(options) {
11340
12096
  isSymbol: undefined
11341
12097
  });
11342
12098
  };
12099
+
11343
12100
  var sendCommon = function sendCommon(options) {
11344
12101
  return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
11345
- 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;
12102
+ var _a, _b, _transformSendOptions, api, origin, currency, amount, address, destination, paraIdTo, destApiForKeepAlive, feeAsset, version, isSymbol, _transformSendOptions2, serializedApiCallEnabled, isMultiLocationDestination, isMultiLocationCurrency, isBridge, isRelayDestination, originRelayChainSymbol, destinationRelayChainSymbol, originNode, assetCheckEnabled, asset, apiWithFallback, amountStr, currencyStr;
11346
12103
  return _regeneratorRuntime().wrap(function _callee$(_context) {
11347
12104
  while (1) switch (_context.prev = _context.next) {
11348
12105
  case 0:
11349
- _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;
12106
+ _transformSendOptions = transformSendOptions(options), api = _transformSendOptions.api, origin = _transformSendOptions.origin, currency = _transformSendOptions.currency, amount = _transformSendOptions.amount, address = _transformSendOptions.address, destination = _transformSendOptions.destination, paraIdTo = _transformSendOptions.paraIdTo, destApiForKeepAlive = _transformSendOptions.destApiForKeepAlive, feeAsset = _transformSendOptions.feeAsset, version = _transformSendOptions.version, isSymbol = _transformSendOptions.isSymbol, _transformSendOptions2 = _transformSendOptions.serializedApiCallEnabled, serializedApiCallEnabled = _transformSendOptions2 === void 0 ? false : _transformSendOptions2;
11350
12107
  if (!((!isTMulti(currency) || isTMultiLocation(currency)) && amount === null)) {
11351
12108
  _context.next = 3;
11352
12109
  break;
@@ -11517,13 +12274,10 @@ var sendSerializedApiCall = function sendSerializedApiCall(options) {
11517
12274
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
11518
12275
  while (1) switch (_context2.prev = _context2.next) {
11519
12276
  case 0:
11520
- _context2.next = 2;
11521
- return sendCommon(Object.assign(Object.assign({}, options), {
12277
+ return _context2.abrupt("return", sendCommon(Object.assign(Object.assign({}, options), {
11522
12278
  serializedApiCallEnabled: true
11523
- }));
11524
- case 2:
11525
- return _context2.abrupt("return", _context2.sent);
11526
- case 3:
12279
+ })));
12280
+ case 1:
11527
12281
  case "end":
11528
12282
  return _context2.stop();
11529
12283
  }
@@ -11535,11 +12289,8 @@ var send = function send(options) {
11535
12289
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
11536
12290
  while (1) switch (_context3.prev = _context3.next) {
11537
12291
  case 0:
11538
- _context3.next = 2;
11539
- return sendCommon(options);
11540
- case 2:
11541
- return _context3.abrupt("return", _context3.sent);
11542
- case 3:
12292
+ return _context3.abrupt("return", sendCommon(options));
12293
+ case 1:
11543
12294
  case "end":
11544
12295
  return _context3.stop();
11545
12296
  }
@@ -11638,11 +12389,8 @@ var transferRelayToPara = function transferRelayToPara(options) {
11638
12389
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
11639
12390
  while (1) switch (_context5.prev = _context5.next) {
11640
12391
  case 0:
11641
- _context5.next = 2;
11642
- return transferRelayToParaCommon(options);
11643
- case 2:
11644
- return _context5.abrupt("return", _context5.sent);
11645
- case 3:
12392
+ return _context5.abrupt("return", transferRelayToParaCommon(options));
12393
+ case 1:
11646
12394
  case "end":
11647
12395
  return _context5.stop();
11648
12396
  }
@@ -11654,13 +12402,10 @@ var transferRelayToParaSerializedApiCall = function transferRelayToParaSerialize
11654
12402
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
11655
12403
  while (1) switch (_context6.prev = _context6.next) {
11656
12404
  case 0:
11657
- _context6.next = 2;
11658
- return transferRelayToParaCommon(Object.assign(Object.assign({}, options), {
12405
+ return _context6.abrupt("return", transferRelayToParaCommon(Object.assign(Object.assign({}, options), {
11659
12406
  serializedApiCallEnabled: true
11660
- }));
11661
- case 2:
11662
- return _context6.abrupt("return", _context6.sent);
11663
- case 3:
12407
+ })));
12408
+ case 1:
11664
12409
  case "end":
11665
12410
  return _context6.stop();
11666
12411
  }
@@ -11668,8 +12413,60 @@ var transferRelayToParaSerializedApiCall = function transferRelayToParaSerialize
11668
12413
  }));
11669
12414
  };
11670
12415
 
12416
+ var buildEthTransferOptions = function buildEthTransferOptions(_a) {
12417
+ return __awaiter(void 0, [_a], void 0, function (_ref) {
12418
+ var currency = _ref.currency,
12419
+ to = _ref.to,
12420
+ address = _ref.address,
12421
+ destAddress = _ref.destAddress,
12422
+ amount = _ref.amount;
12423
+ return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
12424
+ var ethAsset, env, EXECUTION_URL, context, destParaId, signer, plan;
12425
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
12426
+ while (1) switch (_context.prev = _context.next) {
12427
+ case 0:
12428
+ ethAsset = findEthAsset(currency);
12429
+ env = environment.SNOWBRIDGE_ENV['polkadot_mainnet'];
12430
+ EXECUTION_URL = 'https://eth.llamarpc.com';
12431
+ _context.next = 5;
12432
+ return createContext(EXECUTION_URL, env.config);
12433
+ case 5:
12434
+ context = _context.sent;
12435
+ destParaId = getParaId(to);
12436
+ signer = {
12437
+ getAddress: function getAddress() {
12438
+ return Promise.resolve(address);
12439
+ }
12440
+ };
12441
+ _context.next = 10;
12442
+ return toPolkadot.validateSend(context, signer, destAddress, ethAsset.assetId, destParaId, BigInt(amount), BigInt(0));
12443
+ case 10:
12444
+ plan = _context.sent;
12445
+ checkPlanFailure(plan);
12446
+ if (plan.success) {
12447
+ _context.next = 14;
12448
+ break;
12449
+ }
12450
+ throw new Error('Failed to validate send');
12451
+ case 14:
12452
+ return _context.abrupt("return", {
12453
+ token: plan.success.token,
12454
+ destinationParaId: plan.success.destinationParaId,
12455
+ destinationFee: plan.success.destinationFee,
12456
+ amount: plan.success.amount
12457
+ });
12458
+ case 15:
12459
+ case "end":
12460
+ return _context.stop();
12461
+ }
12462
+ }, _callee);
12463
+ })();
12464
+ });
12465
+ };
12466
+
11671
12467
  var index = /*#__PURE__*/Object.freeze({
11672
12468
  __proto__: null,
12469
+ buildEthTransferOptions: buildEthTransferOptions,
11673
12470
  send: send,
11674
12471
  sendSerializedApiCall: sendSerializedApiCall,
11675
12472
  transferRelayToPara: transferRelayToPara,
@@ -11677,4 +12474,4 @@ var index = /*#__PURE__*/Object.freeze({
11677
12474
  transferRelayToParaSerializedApiCall: transferRelayToParaSerializedApiCall
11678
12475
  });
11679
12476
 
11680
- 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, getAssets, getAssetsObject, getBalanceForeign, getBalanceNative, getDefaultPallet, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getNode, getNodeEndpointOption, getNodeProvider, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getTNode, getTransferInfo, hasSupportForAsset, index$2 as openChannels, index as xcmPallet };
12477
+ export { BatchMode, 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, buildEthTransferOptions, index$3 as closeChannels, createApiInstanceForNode, getAllAssetsSymbols, getAllNodeProviders, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getBalanceForeign, getBalanceNative, getDefaultPallet, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getNode, getNodeEndpointOption, getNodeProvider, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getTNode, getTransferInfo, hasSupportForAsset, index$2 as openChannels, send, sendSerializedApiCall, transferRelayToPara, transferRelayToParaCommon, transferRelayToParaSerializedApiCall, index as xcmPallet };