@paraspell/sdk 1.0.1 → 1.1.2

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