@paraspell/sdk 0.0.27 → 1.1.1

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
@@ -178,7 +178,7 @@ function _toPropertyKey(arg) {
178
178
  return typeof key === "symbol" ? key : String(key);
179
179
  }
180
180
 
181
- var NODE_NAMES = ['Statemint', 'Acala', 'Astar', 'BifrostPolkadot', 'Bitgreen', 'Centrifuge', 'Clover', 'ComposableFinance', 'Darwinia', 'HydraDX', 'Interlay', 'Kylin', 'Litentry', 'Moonbeam', 'Parallel', 'Statemine', 'Encointer', 'Altair', 'Amplitude', 'Bajun', 'Basilisk', 'BifrostKusama', 'Pioneer', 'Calamari', 'CrustShadow', 'Crab', 'Dorafactory', 'Imbue', 'Integritee', 'InvArchTinker', 'Karura', 'Kico', 'Kintsugi', 'Listen', 'Litmus', 'Mangata', 'Moonriver', 'ParallelHeiko', 'Picasso', 'Pichiu', 'Quartz', 'Robonomics', 'Shiden', 'Turing'];
181
+ var NODE_NAMES = ['Statemint', 'Acala', 'Astar', 'BifrostPolkadot', 'Bitgreen', 'Centrifuge', 'Clover', 'ComposableFinance', 'Darwinia', 'HydraDX', 'Interlay', 'Kylin', 'Litentry', 'Moonbeam', 'Parallel', 'Statemine', 'Encointer', 'Altair', 'Amplitude', 'Bajun', 'Basilisk', 'BifrostKusama', 'Pioneer', 'Calamari', 'CrustShadow', 'Crab', 'Dorafactory', 'Imbue', 'Integritee', 'InvArchTinker', 'Karura', 'Kico', 'Kintsugi', 'Listen', 'Litmus', 'Mangata', 'Moonriver', 'ParallelHeiko', 'Picasso', 'Pichiu', 'Quartz', 'Robonomics', 'Shiden', 'Turing', 'Equilibrium', 'Unique', 'Crust', 'Efinity', 'Ipci'];
182
182
  var SUPPORTED_PALLETS = ['XTokens', 'OrmlXTokens', 'PolkadotXcm', 'RelayerXcm'];
183
183
 
184
184
  function createAccID(api, account) {
@@ -474,24 +474,24 @@ function createHeaderPolkadotXCM(scenario, nodeId, node) {
474
474
  };
475
475
  }
476
476
  }
477
- function constructXTokens(api, origin, currencyID, currency, amount, addressSelection, fees) {
477
+ function constructXTokens(api, origin, currency, currencyID, amount, addressSelection, fees) {
478
478
  switch (origin) {
479
479
  // Polkadot xTokens
480
480
  case 'Acala':
481
481
  console.log('Transferring tokens ' + currency + ' from Acala');
482
482
  return api.tx.xTokens.transfer({
483
483
  Token: currency
484
- }, amount, addressSelection, fees);
484
+ }, amount, addressSelection, 'Unlimited');
485
485
  // Multiple asset options need addressing
486
486
  case 'BifrostPolkadot':
487
487
  console.log('Transferring ' + currency + ' tokens from BifrostPolkadot');
488
488
  return api.tx.xTokens.transfer({
489
489
  Token: currency
490
- }, amount, addressSelection, fees);
490
+ }, amount, addressSelection, 'Unlimited');
491
491
  // Multiple asset options need addressing
492
492
  case 'Centrifuge':
493
493
  console.log('Transferring tokens from Centrifuge');
494
- return api.tx.xTokens.transfer('Native', amount, addressSelection, fees);
494
+ return api.tx.xTokens.transfer('Native', amount, addressSelection, 'Unlimited');
495
495
  // Multiple asset options needs addressing
496
496
  case 'Clover':
497
497
  console.log('Transferring tokens from Clover');
@@ -508,30 +508,41 @@ function constructXTokens(api, origin, currencyID, currency, amount, addressSele
508
508
  // Multiple asset options needs addressing
509
509
  case 'Moonbeam':
510
510
  console.log('Transferring tokens from Moonbeam');
511
- return api.tx.xTokens.transfer('SelfReserve', amount, addressSelection, fees);
511
+ return api.tx.xTokens.transfer('SelfReserve', amount, addressSelection, 'Unlimited');
512
512
  // Multiple asset options needs addressing
513
513
  case 'Parallel':
514
514
  console.log('Transferring ' + currencyID + ' tokens from Parallel');
515
- return api.tx.xTokens.transfer(currencyID, amount, addressSelection, fees);
515
+ return api.tx.xTokens.transfer(currencyID, amount, addressSelection, 'Unlimited');
516
516
  case 'Litentry':
517
517
  console.log('Transferring ' + currencyID + ' tokens from Litentry');
518
- return api.tx.xTokens.transfer('SelfReserve', amount, addressSelection, fees);
518
+ return api.tx.xTokens.transfer('SelfReserve', amount, addressSelection, 'Unlimited');
519
519
  case 'Kylin':
520
520
  console.log('Transferring ' + currency + ' tokens from Kylin');
521
521
  return api.tx.ormlXTokens.transfer(currency, amount, addressSelection, fees);
522
+ case 'Unique':
523
+ console.log('Transferring ' + currencyID + ' tokens from Unique');
524
+ return api.tx.xTokens.transfer({
525
+ ForeignAssetId: currencyID
526
+ }, amount, addressSelection, 'Unlimited');
527
+ case 'Crust':
528
+ console.log('Transferring tokens from Crust');
529
+ return api.tx.xTokens.transfer('SelfReserve', amount, addressSelection, fees);
530
+ // Multiple asset options needs addressing
531
+ case 'Efinity':
532
+ console.log('Transferring ' + currencyID + ' tokens from Efinity');
533
+ return api.tx.xTokens.transfer({
534
+ currenncyId: [0, currencyID]
535
+ }, amount, addressSelection, 'Unlimited');
522
536
  // Kusama xTokens
523
537
  case 'Altair':
524
538
  console.log('Transferring tokens from Altair');
525
- return api.tx.xTokens.transfer('Native', amount, addressSelection, fees);
539
+ return api.tx.xTokens.transfer('Native', amount, addressSelection, 'Unlimited');
526
540
  // Multiple asset options needs addressing
527
541
  case 'Amplitude':
528
542
  console.log('Transferring ' + currency + ' tokens from Amplitude');
529
543
  return api.tx.xTokens.transfer({
530
544
  XCM: currency
531
- }, amount, addressSelection, fees);
532
- case 'Bajun':
533
- console.log('Transferring ' + currencyID + ' token from Bajun');
534
- return api.tx.xTokens.transfer(currencyID, amount, addressSelection, fees);
545
+ }, amount, addressSelection, 'Unlimited');
535
546
  case 'Basilisk':
536
547
  console.log('Transferring ' + currencyID + ' token from Basilisk');
537
548
  return api.tx.xTokens.transfer(currencyID, amount, addressSelection, fees);
@@ -539,7 +550,7 @@ function constructXTokens(api, origin, currencyID, currency, amount, addressSele
539
550
  console.log('Transferring ' + currency + ' tokens from BifrostKusama');
540
551
  return api.tx.xTokens.transfer({
541
552
  Token: currency
542
- }, amount, addressSelection, fees);
553
+ }, amount, addressSelection, 'Unlimited');
543
554
  // Multiple asset options need addressing
544
555
  case 'Pioneer':
545
556
  console.log('Transferring tokens from Pioneer');
@@ -563,7 +574,7 @@ function constructXTokens(api, origin, currencyID, currency, amount, addressSele
563
574
  return api.tx.xTokens.transfer(currency, amount, addressSelection, fees);
564
575
  case 'Integritee':
565
576
  console.log('Transferring ' + currency + ' tokens from Integritee');
566
- return api.tx.xTokens.transfer(currency, amount, addressSelection, fees);
577
+ return api.tx.xTokens.transfer(currency, amount, addressSelection, 'Unlimited');
567
578
  case 'InvArchTinker':
568
579
  console.log('Transferring ' + currencyID + ' token from InvArch Tinker');
569
580
  return api.tx.xTokens.transfer(currencyID, amount, addressSelection, fees);
@@ -571,7 +582,7 @@ function constructXTokens(api, origin, currencyID, currency, amount, addressSele
571
582
  console.log('Transferring ' + currency + ' tokens from Karura');
572
583
  return api.tx.xTokens.transfer({
573
584
  Token: currency
574
- }, amount, addressSelection, fees);
585
+ }, amount, addressSelection, 'Unlimited');
575
586
  // Multiple asset options need addressing
576
587
  case 'Kico':
577
588
  console.log('Transferring ' + currencyID + ' token from KICO');
@@ -580,28 +591,25 @@ function constructXTokens(api, origin, currencyID, currency, amount, addressSele
580
591
  console.log('Transferring ' + currency + ' tokens from kintsugi');
581
592
  return api.tx.xTokens.transfer({
582
593
  Token: currency
583
- }, amount, addressSelection, fees);
594
+ }, amount, addressSelection, 'Unlimited');
584
595
  // Multiple asset options need addressing
585
- case 'Listen':
586
- console.log('Transferring ' + currencyID + ' token from Listen');
587
- return api.tx.xTokens.transfer(currencyID, amount, addressSelection, fees);
588
596
  case 'Litmus':
589
597
  console.log('Transferring tokens from Litmus');
590
- return api.tx.xTokens.transfer('SelfReserve', amount, addressSelection, fees);
598
+ return api.tx.xTokens.transfer('SelfReserve', amount, addressSelection, 'Unlimited');
591
599
  // Multiple asset options needs addressing
592
600
  case 'Mangata':
593
601
  console.log('Transferring ' + currencyID + ' token from Mangata');
594
- return api.tx.xTokens.transfer(currencyID, amount, addressSelection, fees);
602
+ return api.tx.xTokens.transfer(currencyID, amount, addressSelection, 'Unlimited');
595
603
  case 'Moonriver':
596
604
  console.log('Transferring tokens from Moonriver');
597
- return api.tx.xTokens.transfer('SelfReserve', amount, addressSelection, fees);
605
+ return api.tx.xTokens.transfer('SelfReserve', amount, addressSelection, 'Unlimited');
598
606
  // Multiple asset options needs addressing
599
607
  case 'ParallelHeiko':
600
608
  console.log('Transferring ' + currencyID + ' token from Parallel Heiko');
601
- return api.tx.xTokens.transfer(currencyID, amount, addressSelection, fees);
609
+ return api.tx.xTokens.transfer(currencyID, amount, addressSelection, 'Unlimited');
602
610
  case 'Picasso':
603
611
  console.log('Transferring ' + currencyID + ' token from Picasso');
604
- return api.tx.xTokens.transfer(currencyID, amount, addressSelection, fees);
612
+ return api.tx.xTokens.transfer(currencyID, amount, addressSelection, 'Unlimited');
605
613
  case 'Pichiu':
606
614
  console.log('Transferring ' + currency + ' tokens from Pichiu');
607
615
  return api.tx.ormlXTokens.transfer(currency, amount, addressSelection, fees);
@@ -624,6 +632,15 @@ function constructPolkadotXCM(api, origin, header, addressSelection, currencySel
624
632
  return api.tx.polkadotXcm.limitedTeleportAssets(header, addressSelection, currencySelection, 0, 'Unlimited');
625
633
  }
626
634
  break;
635
+ case 'Equilibrium':
636
+ if (scenario === 'ParaToPara') {
637
+ console.log('Transferring native tokens from Astar'); // UNTESTED AS 0 TX HAVE BEEN DONE FROM PARACHAIN ONLY TO PARACHAIN
638
+ return api.tx.polkadotXcm.reserveTransferAssets(header, addressSelection, currencySelection, 0);
639
+ } else if (scenario === 'ParaToRelay') {
640
+ console.log('Transferring DOT tokens from Astar'); // UNTESTED AS 0 TX HAVE BEEN DONE FROM PARACHAIN ONLY TO PARACHAIN
641
+ return api.tx.polkadotXcm.reserveWithdrawAssets(header, addressSelection, currencySelection, 0);
642
+ }
643
+ break;
627
644
  case 'Astar':
628
645
  if (scenario === 'ParaToPara') {
629
646
  console.log('Transferring native tokens from Astar'); // TESTED https://polkadot.subscan.io/xcm_message/polkadot-f2b697df74ebe4b62853fe81b8b7d0522464972d
@@ -633,6 +650,12 @@ function constructPolkadotXCM(api, origin, header, addressSelection, currencySel
633
650
  return api.tx.polkadotXcm.reserveWithdrawAssets(header, addressSelection, currencySelection, 0);
634
651
  }
635
652
  break;
653
+ case 'Ipci':
654
+ if (scenario == 'ParaToPara') {
655
+ console.log('Transferring native tokens from Ipci'); // UNTESTED, ONLY HAS CHANNELS W ROBONOMICS & 0 TRANSACTIONS
656
+ return api.tx.polkadotXcm.reserveTransferAssets(header, addressSelection, currencySelection, 0);
657
+ }
658
+ break;
636
659
  case 'Darwinia':
637
660
  if (scenario === 'ParaToPara') {
638
661
  console.log('Transferring native tokens from Darwinia'); // TESTED https://polkadot.subscan.io/xcm_message/polkadot-55c5c36c8fe8794c8cfbea725c9f8bc5984c6b05
@@ -723,6 +746,11 @@ var Acala$1 = {
723
746
  }
724
747
  ],
725
748
  otherAssets: [
749
+ {
750
+ assetId: "10",
751
+ symbol: "UNQ",
752
+ decimals: 18
753
+ },
726
754
  {
727
755
  assetId: "0",
728
756
  symbol: "tDOT",
@@ -783,6 +811,11 @@ var Acala$1 = {
783
811
  symbol: "DAI",
784
812
  decimals: 18
785
813
  },
814
+ {
815
+ assetId: "11",
816
+ symbol: "CRU",
817
+ decimals: 12
818
+ },
786
819
  {
787
820
  assetId: "0x5a4d6acdc4e3e5ab15717f407afe957f7a242578",
788
821
  symbol: "WETH",
@@ -915,6 +948,11 @@ var Astar$1 = {
915
948
  symbol: "LDOT",
916
949
  decimals: 10
917
950
  },
951
+ {
952
+ assetId: "18446744073709551630",
953
+ symbol: "HDX",
954
+ decimals: 12
955
+ },
918
956
  {
919
957
  assetId: "18446744073709551617",
920
958
  symbol: "aUSD",
@@ -1178,6 +1216,11 @@ var Kylin$1 = {
1178
1216
  }
1179
1217
  ],
1180
1218
  otherAssets: [
1219
+ {
1220
+ assetId: "1",
1221
+ symbol: "DOT",
1222
+ decimals: 0
1223
+ }
1181
1224
  ]
1182
1225
  };
1183
1226
  var Litentry$1 = {
@@ -1506,6 +1549,11 @@ var Statemint$1 = {
1506
1549
  symbol: "DOTMA",
1507
1550
  decimals: 0
1508
1551
  },
1552
+ {
1553
+ assetId: "11",
1554
+ symbol: "web3",
1555
+ decimals: 18
1556
+ },
1509
1557
  {
1510
1558
  assetId: "6",
1511
1559
  symbol: "LPHP",
@@ -1556,6 +1604,11 @@ var Statemint$1 = {
1556
1604
  symbol: "JOE",
1557
1605
  decimals: 9
1558
1606
  },
1607
+ {
1608
+ assetId: "1000",
1609
+ symbol: "BRZ",
1610
+ decimals: 6
1611
+ },
1559
1612
  {
1560
1613
  assetId: "1",
1561
1614
  symbol: "no1",
@@ -1649,6 +1702,11 @@ var Basilisk$1 = {
1649
1702
  symbol: "USDCet",
1650
1703
  decimals: 6
1651
1704
  },
1705
+ {
1706
+ assetId: "16",
1707
+ symbol: "XRT",
1708
+ decimals: 9
1709
+ },
1652
1710
  {
1653
1711
  assetId: "14",
1654
1712
  symbol: "USDT",
@@ -1741,23 +1799,18 @@ var Calamari$1 = {
1741
1799
  ],
1742
1800
  otherAssets: [
1743
1801
  {
1744
- assetId: "10",
1745
- symbol: "LKSM",
1802
+ assetId: "9",
1803
+ symbol: "AUSD",
1746
1804
  decimals: 12
1747
1805
  },
1748
1806
  {
1749
- assetId: "11",
1750
- symbol: "MOVR",
1751
- decimals: 18
1752
- },
1753
- {
1754
- assetId: "13",
1755
- symbol: "PHA",
1807
+ assetId: "8",
1808
+ symbol: "KAR",
1756
1809
  decimals: 12
1757
1810
  },
1758
1811
  {
1759
- assetId: "8",
1760
- symbol: "KAR",
1812
+ assetId: "10",
1813
+ symbol: "LKSM",
1761
1814
  decimals: 12
1762
1815
  },
1763
1816
  {
@@ -1766,9 +1819,14 @@ var Calamari$1 = {
1766
1819
  decimals: 12
1767
1820
  },
1768
1821
  {
1769
- assetId: "9",
1770
- symbol: "AUSD",
1822
+ assetId: "13",
1823
+ symbol: "PHA",
1771
1824
  decimals: 12
1825
+ },
1826
+ {
1827
+ assetId: "11",
1828
+ symbol: "MOVR",
1829
+ decimals: 18
1772
1830
  }
1773
1831
  ]
1774
1832
  };
@@ -2186,6 +2244,11 @@ var Kintsugi$1 = {
2186
2244
  symbol: "LKSM",
2187
2245
  decimals: 12
2188
2246
  },
2247
+ {
2248
+ assetId: "6",
2249
+ symbol: "SKSM",
2250
+ decimals: 12
2251
+ },
2189
2252
  {
2190
2253
  assetId: "3",
2191
2254
  symbol: "USDT",
@@ -2282,11 +2345,21 @@ var Mangata$1 = {
2282
2345
  symbol: "TUR",
2283
2346
  decimals: 10
2284
2347
  },
2348
+ {
2349
+ assetId: "20",
2350
+ symbol: "TKN0x00000004-TKN0x0000000E",
2351
+ decimals: 18
2352
+ },
2285
2353
  {
2286
2354
  assetId: "13",
2287
2355
  symbol: "TKN0x0000000B-TKN0x00000004",
2288
2356
  decimals: 18
2289
2357
  },
2358
+ {
2359
+ assetId: "26",
2360
+ symbol: "ZLK",
2361
+ decimals: 18
2362
+ },
2290
2363
  {
2291
2364
  assetId: "5",
2292
2365
  symbol: "TKN0x00000004-TKN0x00000000",
@@ -2322,16 +2395,46 @@ var Mangata$1 = {
2322
2395
  symbol: "BNC",
2323
2396
  decimals: 12
2324
2397
  },
2398
+ {
2399
+ assetId: "21",
2400
+ symbol: "TKN0x0000000F-TKN0x00000004",
2401
+ decimals: 18
2402
+ },
2325
2403
  {
2326
2404
  assetId: "15",
2327
2405
  symbol: "vKSM",
2328
2406
  decimals: 12
2329
2407
  },
2408
+ {
2409
+ assetId: "24",
2410
+ symbol: "TKN0x0000000F-TKN0x00000000",
2411
+ decimals: 18
2412
+ },
2413
+ {
2414
+ assetId: "22",
2415
+ symbol: "TKN0x00000010-TKN0x0000000F",
2416
+ decimals: 18
2417
+ },
2418
+ {
2419
+ assetId: "29",
2420
+ symbol: "TKN0x00000004-TKN0x0000000E",
2421
+ decimals: 18
2422
+ },
2330
2423
  {
2331
2424
  assetId: "10",
2332
2425
  symbol: "TKN0x00000005-TKN0x00000000",
2333
2426
  decimals: 18
2334
2427
  },
2428
+ {
2429
+ assetId: "27",
2430
+ symbol: "TKN0x0000001A-TKN0x00000000",
2431
+ decimals: 18
2432
+ },
2433
+ {
2434
+ assetId: "28",
2435
+ symbol: "TKN0x00000004-TKN0x0000001A",
2436
+ decimals: 18
2437
+ },
2335
2438
  {
2336
2439
  assetId: "0",
2337
2440
  symbol: "MGX",
@@ -2362,11 +2465,21 @@ var Mangata$1 = {
2362
2465
  symbol: "TKN0x00000010-TKN0x00000000",
2363
2466
  decimals: 18
2364
2467
  },
2468
+ {
2469
+ assetId: "23",
2470
+ symbol: "vBNC",
2471
+ decimals: 12
2472
+ },
2365
2473
  {
2366
2474
  assetId: "4",
2367
2475
  symbol: "KSM",
2368
2476
  decimals: 12
2369
2477
  },
2478
+ {
2479
+ assetId: "25",
2480
+ symbol: "TKN0x00000010-TKN0x00000000",
2481
+ decimals: 18
2482
+ },
2370
2483
  {
2371
2484
  assetId: "12",
2372
2485
  symbol: "TKN0x00000000-TKN0x0000000B",
@@ -2845,6 +2958,11 @@ var Statemine$1 = {
2845
2958
  }
2846
2959
  ],
2847
2960
  otherAssets: [
2961
+ {
2962
+ assetId: "863012",
2963
+ symbol: "VCOP",
2964
+ decimals: 2
2965
+ },
2848
2966
  {
2849
2967
  assetId: "9999",
2850
2968
  symbol: "BTC",
@@ -2865,6 +2983,11 @@ var Statemine$1 = {
2865
2983
  symbol: "KPOTS",
2866
2984
  decimals: 6
2867
2985
  },
2986
+ {
2987
+ assetId: "222",
2988
+ symbol: "PNEO",
2989
+ decimals: 12
2990
+ },
2868
2991
  {
2869
2992
  assetId: "1155",
2870
2993
  symbol: "WITEK",
@@ -3165,6 +3288,11 @@ var Statemine$1 = {
3165
3288
  symbol: "wETH",
3166
3289
  decimals: 18
3167
3290
  },
3291
+ {
3292
+ assetId: "61",
3293
+ symbol: "CRY",
3294
+ decimals: 12
3295
+ },
3168
3296
  {
3169
3297
  assetId: "40",
3170
3298
  symbol: "ERIC",
@@ -3385,11 +3513,21 @@ var Statemine$1 = {
3385
3513
  symbol: "belove",
3386
3514
  decimals: 20
3387
3515
  },
3516
+ {
3517
+ assetId: "6967",
3518
+ symbol: "CHAOS",
3519
+ decimals: 10
3520
+ },
3388
3521
  {
3389
3522
  assetId: "1234",
3390
3523
  symbol: "KSM",
3391
3524
  decimals: 10
3392
3525
  },
3526
+ {
3527
+ assetId: "404",
3528
+ symbol: "MAXI",
3529
+ decimals: 8
3530
+ },
3393
3531
  {
3394
3532
  assetId: "1420",
3395
3533
  symbol: "HYDR",
@@ -3460,6 +3598,11 @@ var Statemine$1 = {
3460
3598
  symbol: "MEME",
3461
3599
  decimals: 18
3462
3600
  },
3601
+ {
3602
+ assetId: "220204",
3603
+ symbol: "STM",
3604
+ decimals: 10
3605
+ },
3463
3606
  {
3464
3607
  assetId: "598",
3465
3608
  symbol: "EREN",
@@ -3520,6 +3663,11 @@ var Statemine$1 = {
3520
3663
  symbol: "TOT",
3521
3664
  decimals: 1
3522
3665
  },
3666
+ {
3667
+ assetId: "862812",
3668
+ symbol: "CUBO",
3669
+ decimals: 9
3670
+ },
3523
3671
  {
3524
3672
  assetId: "888",
3525
3673
  symbol: "LUCK",
@@ -3572,6 +3720,11 @@ var Turing$1 = {
3572
3720
  symbol: "HKO",
3573
3721
  decimals: 12
3574
3722
  },
3723
+ {
3724
+ assetId: "8",
3725
+ symbol: "SDN",
3726
+ decimals: 18
3727
+ },
3575
3728
  {
3576
3729
  assetId: "1",
3577
3730
  symbol: "KSM",
@@ -3604,6 +3757,71 @@ var Turing$1 = {
3604
3757
  }
3605
3758
  ]
3606
3759
  };
3760
+ var Equilibrium$1 = {
3761
+ paraId: 2011,
3762
+ relayChainAssetSymbol: "DOT",
3763
+ nativeAssets: [
3764
+ {
3765
+ symbol: "TOKEN",
3766
+ decimals: 9
3767
+ }
3768
+ ],
3769
+ otherAssets: [
3770
+ ]
3771
+ };
3772
+ var Unique$1 = {
3773
+ paraId: 2037,
3774
+ relayChainAssetSymbol: "DOT",
3775
+ nativeAssets: [
3776
+ {
3777
+ symbol: "UNQ",
3778
+ decimals: 18
3779
+ }
3780
+ ],
3781
+ otherAssets: [
3782
+ ]
3783
+ };
3784
+ var Crust$1 = {
3785
+ paraId: 2008,
3786
+ relayChainAssetSymbol: "DOT",
3787
+ nativeAssets: [
3788
+ {
3789
+ symbol: "CRU",
3790
+ decimals: 12
3791
+ }
3792
+ ],
3793
+ otherAssets: [
3794
+ {
3795
+ assetId: "187224307232923873519830480073807488153",
3796
+ symbol: "EQD",
3797
+ decimals: 9
3798
+ }
3799
+ ]
3800
+ };
3801
+ var Efinity$1 = {
3802
+ paraId: 2021,
3803
+ relayChainAssetSymbol: "DOT",
3804
+ nativeAssets: [
3805
+ {
3806
+ symbol: "EFI",
3807
+ decimals: 18
3808
+ }
3809
+ ],
3810
+ otherAssets: [
3811
+ ]
3812
+ };
3813
+ var Ipci$1 = {
3814
+ paraId: 2222,
3815
+ relayChainAssetSymbol: "KSM",
3816
+ nativeAssets: [
3817
+ {
3818
+ symbol: "MITO",
3819
+ decimals: 12
3820
+ }
3821
+ ],
3822
+ otherAssets: [
3823
+ ]
3824
+ };
3607
3825
  var assets = {
3608
3826
  Acala: Acala$1,
3609
3827
  Astar: Astar$1,
@@ -3648,7 +3866,12 @@ var assets = {
3648
3866
  Robonomics: Robonomics$1,
3649
3867
  Shiden: Shiden$1,
3650
3868
  Statemine: Statemine$1,
3651
- Turing: Turing$1
3869
+ Turing: Turing$1,
3870
+ Equilibrium: Equilibrium$1,
3871
+ Unique: Unique$1,
3872
+ Crust: Crust$1,
3873
+ Efinity: Efinity$1,
3874
+ Ipci: Ipci$1
3652
3875
  };
3653
3876
 
3654
3877
  var assetsMapJson = /*#__PURE__*/Object.freeze({
@@ -3667,15 +3890,19 @@ var assetsMapJson = /*#__PURE__*/Object.freeze({
3667
3890
  Clover: Clover$1,
3668
3891
  ComposableFinance: ComposableFinance$1,
3669
3892
  Crab: Crab$1,
3893
+ Crust: Crust$1,
3670
3894
  CrustShadow: CrustShadow$1,
3671
3895
  Darwinia: Darwinia$1,
3672
3896
  Dorafactory: Dorafactory$1,
3897
+ Efinity: Efinity$1,
3673
3898
  Encointer: Encointer$1,
3899
+ Equilibrium: Equilibrium$1,
3674
3900
  HydraDX: HydraDX$1,
3675
3901
  Imbue: Imbue$1,
3676
3902
  Integritee: Integritee$1,
3677
3903
  Interlay: Interlay$1,
3678
3904
  InvArchTinker: InvArchTinker$1,
3905
+ Ipci: Ipci$1,
3679
3906
  Karura: Karura$1,
3680
3907
  Kico: Kico$1,
3681
3908
  Kintsugi: Kintsugi$1,
@@ -3697,6 +3924,7 @@ var assetsMapJson = /*#__PURE__*/Object.freeze({
3697
3924
  Statemine: Statemine$1,
3698
3925
  Statemint: Statemint$1,
3699
3926
  Turing: Turing$1,
3927
+ Unique: Unique$1,
3700
3928
  default: assets
3701
3929
  });
3702
3930
 
@@ -3762,6 +3990,30 @@ var index$4 = /*#__PURE__*/Object.freeze({
3762
3990
  hasSupportForAsset: hasSupportForAsset
3763
3991
  });
3764
3992
 
3993
+ var getAssetBySymbolOrId = function getAssetBySymbolOrId(node, symbolOrId) {
3994
+ var _getAssetsObject = getAssetsObject(node),
3995
+ otherAssets = _getAssetsObject.otherAssets,
3996
+ nativeAssets = _getAssetsObject.nativeAssets,
3997
+ relayChainAssetSymbol = _getAssetsObject.relayChainAssetSymbol;
3998
+ var asset = [].concat(_toConsumableArray(nativeAssets), _toConsumableArray(otherAssets)).find(function (_ref) {
3999
+ var symbol = _ref.symbol,
4000
+ assetId = _ref.assetId;
4001
+ return symbol === symbolOrId || assetId === symbolOrId;
4002
+ });
4003
+ if (asset) {
4004
+ var symbol = asset.symbol,
4005
+ assetId = asset.assetId;
4006
+ return {
4007
+ symbol: symbol,
4008
+ assetId: assetId ? Number(assetId) : undefined
4009
+ };
4010
+ }
4011
+ if (relayChainAssetSymbol === symbolOrId) return {
4012
+ symbol: relayChainAssetSymbol
4013
+ };
4014
+ return null;
4015
+ };
4016
+
3765
4017
  var Statemint = {
3766
4018
  defaultPallet: "PolkadotXcm",
3767
4019
  supportedPallets: [
@@ -4059,6 +4311,39 @@ var Turing = {
4059
4311
  "XTokens"
4060
4312
  ]
4061
4313
  };
4314
+ var Equilibrium = {
4315
+ defaultPallet: "PolkadotXcm",
4316
+ supportedPallets: [
4317
+ "PolkadotXcm"
4318
+ ]
4319
+ };
4320
+ var Unique = {
4321
+ defaultPallet: "XTokens",
4322
+ supportedPallets: [
4323
+ "XTokens",
4324
+ "PolkadotXcm"
4325
+ ]
4326
+ };
4327
+ var Crust = {
4328
+ defaultPallet: "XTokens",
4329
+ supportedPallets: [
4330
+ "PolkadotXcm",
4331
+ "XTokens"
4332
+ ]
4333
+ };
4334
+ var Efinity = {
4335
+ defaultPallet: "XTokens",
4336
+ supportedPallets: [
4337
+ "PolkadotXcm",
4338
+ "XTokens"
4339
+ ]
4340
+ };
4341
+ var Ipci = {
4342
+ defaultPallet: "PolkadotXcm",
4343
+ supportedPallets: [
4344
+ "PolkadotXcm"
4345
+ ]
4346
+ };
4062
4347
  var pallets = {
4063
4348
  Statemint: Statemint,
4064
4349
  Acala: Acala,
@@ -4103,7 +4388,12 @@ var pallets = {
4103
4388
  Quartz: Quartz,
4104
4389
  Robonomics: Robonomics,
4105
4390
  Shiden: Shiden,
4106
- Turing: Turing
4391
+ Turing: Turing,
4392
+ Equilibrium: Equilibrium,
4393
+ Unique: Unique,
4394
+ Crust: Crust,
4395
+ Efinity: Efinity,
4396
+ Ipci: Ipci
4107
4397
  };
4108
4398
 
4109
4399
  var palletsMapJson = /*#__PURE__*/Object.freeze({
@@ -4122,15 +4412,19 @@ var palletsMapJson = /*#__PURE__*/Object.freeze({
4122
4412
  Clover: Clover,
4123
4413
  ComposableFinance: ComposableFinance,
4124
4414
  Crab: Crab,
4415
+ Crust: Crust,
4125
4416
  CrustShadow: CrustShadow,
4126
4417
  Darwinia: Darwinia,
4127
4418
  Dorafactory: Dorafactory,
4419
+ Efinity: Efinity,
4128
4420
  Encointer: Encointer,
4421
+ Equilibrium: Equilibrium,
4129
4422
  HydraDX: HydraDX,
4130
4423
  Imbue: Imbue,
4131
4424
  Integritee: Integritee,
4132
4425
  Interlay: Interlay,
4133
4426
  InvArchTinker: InvArchTinker,
4427
+ Ipci: Ipci,
4134
4428
  Karura: Karura,
4135
4429
  Kico: Kico,
4136
4430
  Kintsugi: Kintsugi,
@@ -4152,6 +4446,7 @@ var palletsMapJson = /*#__PURE__*/Object.freeze({
4152
4446
  Statemine: Statemine,
4153
4447
  Statemint: Statemint,
4154
4448
  Turing: Turing,
4449
+ Unique: Unique,
4155
4450
  default: pallets
4156
4451
  });
4157
4452
 
@@ -4189,19 +4484,25 @@ var NodeNotSupportedError = /*#__PURE__*/function (_Error) {
4189
4484
  return _createClass(NodeNotSupportedError);
4190
4485
  }( /*#__PURE__*/_wrapNativeSuper(Error));
4191
4486
 
4192
- function send(api, origin, currency, currencyID, amount, to, destination) {
4193
- if (!hasSupportForAsset(origin, currency)) {
4194
- throw new InvalidCurrencyError("Node ".concat(origin, " does not support currency ").concat(currency, "."));
4487
+ function send(api, origin, currencySymbolOrId, amount, to, destination) {
4488
+ var asset = getAssetBySymbolOrId(origin, currencySymbolOrId.toString());
4489
+ if (!asset) {
4490
+ throw new InvalidCurrencyError("Origin node ".concat(origin, " does not support currency or currencyId ").concat(currencySymbolOrId, "."));
4491
+ }
4492
+ if (destination && !hasSupportForAsset(destination, asset.symbol)) {
4493
+ throw new InvalidCurrencyError("Destination node ".concat(destination, " does not support currency or currencyId ").concat(currencySymbolOrId, "."));
4195
4494
  }
4495
+ var currencySymbol = asset.symbol,
4496
+ currencyId = asset.assetId;
4196
4497
  var type = destination ? 'ParaToPara' : 'ParaToRelay';
4197
4498
  var paraId = destination ? getParaId(destination) : undefined;
4198
4499
  var pallet = getDefaultPallet(origin);
4199
4500
  if (pallet === 'XTokens' || pallet === 'OrmlXTokens') {
4200
- return constructXTokens(api, origin, currencyID, currency, amount, handleAddress(type, 'xTokens', api, to, paraId), getFees(type));
4501
+ return constructXTokens(api, origin, currencySymbol, currencyId, amount, handleAddress(type, 'xTokens', api, to, paraId), getFees(type));
4201
4502
  } else if (pallet === 'PolkadotXcm' || pallet === 'RelayerXcm') {
4202
4503
  // Specific node requirements
4203
4504
  if ((origin === 'Statemint' || origin === 'Statemine') && type === 'ParaToPara') {
4204
- return constructPolkadotXCM(api, origin, createHeaderPolkadotXCM(type, paraId), handleAddress(type, 'polkadotXCM', api, to, paraId), createCurrencySpecification(amount, type, origin, currencyID), type);
4505
+ return constructPolkadotXCM(api, origin, createHeaderPolkadotXCM(type, paraId), handleAddress(type, 'polkadotXCM', api, to, paraId), createCurrencySpecification(amount, type, origin, currencyId), type);
4205
4506
  } else if ((origin === 'Darwinia' || origin === 'Crab') && type === 'ParaToPara') {
4206
4507
  return constructPolkadotXCM(api, origin, createHeaderPolkadotXCM(type, paraId), handleAddress(type, 'polkadotXCM', api, to, paraId), createCurrencySpecification(amount, type, origin), type);
4207
4508
  } else if (origin === 'Quartz' && type === 'ParaToPara') {
@@ -4599,12 +4900,6 @@ var SendBuilder = /*#__PURE__*/function () {
4599
4900
  this.currency = currency;
4600
4901
  }
4601
4902
  _createClass(SendBuilder, [{
4602
- key: "currencyId",
4603
- value: function currencyId(_currencyId) {
4604
- this._currencyId = _currencyId;
4605
- return this;
4606
- }
4607
- }, {
4608
4903
  key: "amount",
4609
4904
  value: function amount(_amount) {
4610
4905
  this._amount = _amount;
@@ -4619,7 +4914,7 @@ var SendBuilder = /*#__PURE__*/function () {
4619
4914
  }, {
4620
4915
  key: "build",
4621
4916
  value: function build() {
4622
- return send(this.api, this.from, this.currency, this._currencyId, this._amount, this._address, this.to);
4917
+ return send(this.api, this.from, this.currency, this._amount, this._address, this.to);
4623
4918
  }
4624
4919
  }], [{
4625
4920
  key: "createParaToRelay",