@paraspell/sdk 5.0.1 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -338,6 +338,15 @@ function _toPropertyKey(t) {
338
338
  var i = _toPrimitive(t, "string");
339
339
  return "symbol" == typeof i ? i : i + "";
340
340
  }
341
+ function _typeof(o) {
342
+ "@babel/helpers - typeof";
343
+
344
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
345
+ return typeof o;
346
+ } : function (o) {
347
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
348
+ }, _typeof(o);
349
+ }
341
350
  function _classCallCheck(instance, Constructor) {
342
351
  if (!(instance instanceof Constructor)) {
343
352
  throw new TypeError("Cannot call a class as a function");
@@ -498,6 +507,57 @@ function _arrayLikeToArray(arr, len) {
498
507
  function _nonIterableSpread() {
499
508
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
500
509
  }
510
+ function _createForOfIteratorHelper(o, allowArrayLike) {
511
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
512
+ if (!it) {
513
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
514
+ if (it) o = it;
515
+ var i = 0;
516
+ var F = function () {};
517
+ return {
518
+ s: F,
519
+ n: function () {
520
+ if (i >= o.length) return {
521
+ done: true
522
+ };
523
+ return {
524
+ done: false,
525
+ value: o[i++]
526
+ };
527
+ },
528
+ e: function (e) {
529
+ throw e;
530
+ },
531
+ f: F
532
+ };
533
+ }
534
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
535
+ }
536
+ var normalCompletion = true,
537
+ didErr = false,
538
+ err;
539
+ return {
540
+ s: function () {
541
+ it = it.call(o);
542
+ },
543
+ n: function () {
544
+ var step = it.next();
545
+ normalCompletion = step.done;
546
+ return step;
547
+ },
548
+ e: function (e) {
549
+ didErr = true;
550
+ err = e;
551
+ },
552
+ f: function () {
553
+ try {
554
+ if (!normalCompletion && it.return != null) it.return();
555
+ } finally {
556
+ if (didErr) throw err;
557
+ }
558
+ }
559
+ };
560
+ }
501
561
 
502
562
  /******************************************************************************
503
563
  Copyright (c) Microsoft Corporation.
@@ -543,10 +603,10 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
543
603
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
544
604
  };
545
605
 
546
- // derrived from https://github.com/kodadot/packages/blob/main/minimark/src/common/types.ts
547
606
  exports.Version = void 0;
548
607
  (function (Version) {
549
608
  Version["V1"] = "V1";
609
+ Version["V2"] = "V2";
550
610
  Version["V3"] = "V3";
551
611
  })(exports.Version || (exports.Version = {}));
552
612
  exports.Parents = void 0;
@@ -922,6 +982,11 @@ var Astar$3 = {
922
982
  symbol: "aSEED",
923
983
  decimals: 12
924
984
  },
985
+ {
986
+ assetId: "18446744073709551634",
987
+ symbol: "xcPEN",
988
+ decimals: 12
989
+ },
925
990
  {
926
991
  assetId: "1336",
927
992
  symbol: "TDOT",
@@ -1076,6 +1141,11 @@ var Centrifuge$3 = {
1076
1141
  symbol: "localUSDC",
1077
1142
  decimals: 6
1078
1143
  },
1144
+ {
1145
+ assetId: "1615768079",
1146
+ symbol: "NS3SR",
1147
+ decimals: 6
1148
+ },
1079
1149
  {
1080
1150
  assetId: "100006",
1081
1151
  symbol: "LpCeloUSDC",
@@ -1130,6 +1200,11 @@ var Centrifuge$3 = {
1130
1200
  assetId: "4139607887",
1131
1201
  symbol: "LTF",
1132
1202
  decimals: 6
1203
+ },
1204
+ {
1205
+ assetId: "1615768079",
1206
+ symbol: "NS3JR",
1207
+ decimals: 6
1133
1208
  }
1134
1209
  ]
1135
1210
  };
@@ -1309,48 +1384,68 @@ var HydraDX$3 = {
1309
1384
  ],
1310
1385
  otherAssets: [
1311
1386
  {
1312
- assetId: "7",
1313
- symbol: "USDC",
1387
+ assetId: "100",
1388
+ symbol: "4-Pool",
1389
+ decimals: 18
1390
+ },
1391
+ {
1392
+ assetId: "0",
1393
+ symbol: "HDX",
1394
+ decimals: 12
1395
+ },
1396
+ {
1397
+ assetId: "10",
1398
+ symbol: "USDT",
1314
1399
  decimals: 6
1315
1400
  },
1316
1401
  {
1317
- assetId: "20",
1402
+ assetId: "4",
1318
1403
  symbol: "WETH",
1319
1404
  decimals: 18
1320
1405
  },
1321
1406
  {
1322
- assetId: "13",
1323
- symbol: "CFG",
1324
- decimals: 18
1407
+ assetId: "21",
1408
+ symbol: "USDC",
1409
+ decimals: 6
1325
1410
  },
1326
1411
  {
1327
- assetId: "26",
1328
- symbol: "NODL",
1329
- decimals: 11
1412
+ assetId: "28",
1413
+ symbol: "KILT",
1414
+ decimals: 15
1330
1415
  },
1331
1416
  {
1332
- assetId: "5",
1333
- symbol: "DOT",
1334
- decimals: 10
1417
+ assetId: "20",
1418
+ symbol: "WETH",
1419
+ decimals: 18
1335
1420
  },
1336
1421
  {
1337
- assetId: "100",
1338
- symbol: "4-Pool",
1422
+ assetId: "101",
1423
+ symbol: "2-Pool",
1339
1424
  decimals: 18
1340
1425
  },
1341
1426
  {
1342
- assetId: "8",
1343
- symbol: "PHA",
1427
+ assetId: "16",
1428
+ symbol: "GLMR",
1429
+ decimals: 18
1430
+ },
1431
+ {
1432
+ assetId: "11",
1433
+ symbol: "iBTC",
1434
+ decimals: 8
1435
+ },
1436
+ {
1437
+ assetId: "1000099",
1438
+ symbol: "ACA",
1344
1439
  decimals: 12
1345
1440
  },
1346
1441
  {
1347
- assetId: "1",
1348
- symbol: "LRNA",
1442
+ assetId: "14",
1443
+ symbol: "BNC",
1349
1444
  decimals: 12
1350
1445
  },
1351
1446
  {
1352
- assetId: "101",
1353
- symbol: "2-Pool",
1447
+ assetId: "6",
1448
+ symbol: "APE",
1354
1449
  decimals: 18
1355
1450
  },
1356
1451
  {
@@ -1359,64 +1454,84 @@ var HydraDX$3 = {
1359
1454
  decimals: 8
1360
1455
  },
1361
1456
  {
1362
- assetId: "9",
1363
- symbol: "ASTR",
1457
+ assetId: "15",
1458
+ symbol: "vDOT",
1459
+ decimals: 10
1460
+ },
1461
+ {
1462
+ assetId: "2",
1463
+ symbol: "DAI",
1364
1464
  decimals: 18
1365
1465
  },
1366
1466
  {
1367
- assetId: "16",
1368
- symbol: "GLMR",
1467
+ assetId: "13",
1468
+ symbol: "CFG",
1369
1469
  decimals: 18
1370
1470
  },
1371
1471
  {
1372
- assetId: "14",
1373
- symbol: "BNC",
1472
+ assetId: "27",
1473
+ symbol: "CRU",
1374
1474
  decimals: 12
1375
1475
  },
1376
1476
  {
1377
- assetId: "21",
1378
- symbol: "USDC",
1379
- decimals: 6
1477
+ assetId: "102",
1478
+ symbol: "2-Pool",
1479
+ decimals: 18
1380
1480
  },
1381
1481
  {
1382
- assetId: "15",
1383
- symbol: "vDOT",
1482
+ assetId: "5",
1483
+ symbol: "DOT",
1384
1484
  decimals: 10
1385
1485
  },
1386
1486
  {
1387
- assetId: "24",
1388
- symbol: "SUB",
1389
- decimals: 10
1487
+ assetId: "18",
1488
+ symbol: "DAI",
1489
+ decimals: 18
1390
1490
  },
1391
1491
  {
1392
- assetId: "22",
1492
+ assetId: "7",
1393
1493
  symbol: "USDC",
1394
1494
  decimals: 6
1395
1495
  },
1396
1496
  {
1397
- assetId: "2",
1398
- symbol: "DAI",
1399
- decimals: 18
1497
+ assetId: "26",
1498
+ symbol: "NODL",
1499
+ decimals: 11
1400
1500
  },
1401
1501
  {
1402
- assetId: "10",
1403
- symbol: "USDT",
1502
+ assetId: "22",
1503
+ symbol: "USDC",
1404
1504
  decimals: 6
1405
1505
  },
1406
1506
  {
1407
- assetId: "0",
1408
- symbol: "HDX",
1507
+ assetId: "24",
1508
+ symbol: "SUB",
1509
+ decimals: 10
1510
+ },
1511
+ {
1512
+ assetId: "8",
1513
+ symbol: "PHA",
1409
1514
  decimals: 12
1410
1515
  },
1411
1516
  {
1412
- assetId: "6",
1413
- symbol: "APE",
1414
- decimals: 18
1517
+ assetId: "1000100",
1518
+ symbol: "LDOT",
1519
+ decimals: 10
1415
1520
  },
1416
1521
  {
1417
- assetId: "11",
1418
- symbol: "iBTC",
1419
- decimals: 8
1522
+ assetId: "1",
1523
+ symbol: "LRNA",
1524
+ decimals: 12
1525
+ },
1526
+ {
1527
+ assetId: "12",
1528
+ symbol: "ZTG",
1529
+ decimals: 10
1530
+ },
1531
+ {
1532
+ assetId: "1000081",
1533
+ symbol: "PEN",
1534
+ decimals: 12
1420
1535
  },
1421
1536
  {
1422
1537
  assetId: "3",
@@ -1429,8 +1544,8 @@ var HydraDX$3 = {
1429
1544
  decimals: 10
1430
1545
  },
1431
1546
  {
1432
- assetId: "18",
1433
- symbol: "DAI",
1547
+ assetId: "25",
1548
+ symbol: "UNQ",
1434
1549
  decimals: 18
1435
1550
  },
1436
1551
  {
@@ -1439,19 +1554,9 @@ var HydraDX$3 = {
1439
1554
  decimals: 6
1440
1555
  },
1441
1556
  {
1442
- assetId: "4",
1443
- symbol: "WETH",
1444
- decimals: 18
1445
- },
1446
- {
1447
- assetId: "25",
1448
- symbol: "UNQ",
1557
+ assetId: "9",
1558
+ symbol: "ASTR",
1449
1559
  decimals: 18
1450
- },
1451
- {
1452
- assetId: "12",
1453
- symbol: "ZTG",
1454
- decimals: 10
1455
1560
  }
1456
1561
  ]
1457
1562
  };
@@ -1491,6 +1596,11 @@ var Interlay$3 = {
1491
1596
  symbol: "WBNB.wh",
1492
1597
  decimals: 18
1493
1598
  },
1599
+ {
1600
+ assetId: "13",
1601
+ symbol: "HDX",
1602
+ decimals: 12
1603
+ },
1494
1604
  {
1495
1605
  assetId: "5",
1496
1606
  symbol: "TBTC.wh",
@@ -1540,6 +1650,11 @@ var Interlay$3 = {
1540
1650
  assetId: "4",
1541
1651
  symbol: "DAI.wh",
1542
1652
  decimals: 18
1653
+ },
1654
+ {
1655
+ assetId: "12",
1656
+ symbol: "USDC",
1657
+ decimals: 6
1543
1658
  }
1544
1659
  ]
1545
1660
  };
@@ -1577,11 +1692,21 @@ var Moonbeam$3 = {
1577
1692
  symbol: "ZTG",
1578
1693
  decimals: 10
1579
1694
  },
1695
+ {
1696
+ assetId: "283870493414747423842723289889816153538",
1697
+ symbol: "UNQ",
1698
+ decimals: 18
1699
+ },
1580
1700
  {
1581
1701
  assetId: "90225766094594282577230355136633846906",
1582
1702
  symbol: "PDEX",
1583
1703
  decimals: 12
1584
1704
  },
1705
+ {
1706
+ assetId: "314077021455772878282433861213184736939",
1707
+ symbol: "PEAQ",
1708
+ decimals: 18
1709
+ },
1585
1710
  {
1586
1711
  assetId: "144012926827374458669278577633504620722",
1587
1712
  symbol: "FIL",
@@ -1632,6 +1757,11 @@ var Moonbeam$3 = {
1632
1757
  symbol: "LDOT",
1633
1758
  decimals: 10
1634
1759
  },
1760
+ {
1761
+ assetId: "124463719055550872076363892993240202694",
1762
+ symbol: "DED",
1763
+ decimals: 10
1764
+ },
1635
1765
  {
1636
1766
  assetId: "224077081838586484055667086558292981199",
1637
1767
  symbol: "ASTR",
@@ -1647,6 +1777,11 @@ var Moonbeam$3 = {
1647
1777
  symbol: "USDC",
1648
1778
  decimals: 6
1649
1779
  },
1780
+ {
1781
+ assetId: "142155548796783636521833385094843759961",
1782
+ symbol: "BNCS",
1783
+ decimals: 12
1784
+ },
1650
1785
  {
1651
1786
  assetId: "89994634370519791027168048838578580624",
1652
1787
  symbol: "SUB",
@@ -1667,6 +1802,11 @@ var Moonbeam$3 = {
1667
1802
  symbol: "vGLMR",
1668
1803
  decimals: 18
1669
1804
  },
1805
+ {
1806
+ assetId: "289989900872525819559124583375550296953",
1807
+ symbol: "vMANTA",
1808
+ decimals: 18
1809
+ },
1670
1810
  {
1671
1811
  assetId: "110021739665376159354538090254163045594",
1672
1812
  symbol: "aUSD",
@@ -1732,11 +1872,21 @@ var Moonbeam$3 = {
1732
1872
  symbol: "vFIL",
1733
1873
  decimals: 18
1734
1874
  },
1875
+ {
1876
+ assetId: "114018676402354620972806895487280206446",
1877
+ symbol: "vASTR",
1878
+ decimals: 18
1879
+ },
1735
1880
  {
1736
1881
  assetId: "238111524681612888331172110363070489924",
1737
1882
  symbol: "OTP",
1738
1883
  decimals: 12
1739
1884
  },
1885
+ {
1886
+ assetId: "112679793397406599376365943185137098326",
1887
+ symbol: "STINK",
1888
+ decimals: 10
1889
+ },
1740
1890
  {
1741
1891
  assetId: "132685552157663328694213725410064821485",
1742
1892
  symbol: "PHA",
@@ -1948,16 +2098,36 @@ var AssetHubPolkadot$3 = {
1948
2098
  }
1949
2099
  ],
1950
2100
  otherAssets: [
2101
+ {
2102
+ assetId: "9999",
2103
+ symbol: "TOM",
2104
+ decimals: 10
2105
+ },
1951
2106
  {
1952
2107
  assetId: "100",
1953
2108
  symbol: "WETH",
1954
2109
  decimals: 18
1955
2110
  },
2111
+ {
2112
+ assetId: "482",
2113
+ symbol: "HUB",
2114
+ decimals: 10
2115
+ },
1956
2116
  {
1957
2117
  assetId: "123",
1958
2118
  symbol: "123",
1959
2119
  decimals: 20
1960
2120
  },
2121
+ {
2122
+ assetId: "9000",
2123
+ symbol: "PLAY",
2124
+ decimals: 10
2125
+ },
2126
+ {
2127
+ assetId: "69420",
2128
+ symbol: "GABE",
2129
+ decimals: 20
2130
+ },
1961
2131
  {
1962
2132
  assetId: "25518",
1963
2133
  symbol: "BEER",
@@ -2013,6 +2183,11 @@ var AssetHubPolkadot$3 = {
2013
2183
  symbol: "Cypress",
2014
2184
  decimals: 0
2015
2185
  },
2186
+ {
2187
+ assetId: "7777",
2188
+ symbol: "FUM",
2189
+ decimals: 10
2190
+ },
2016
2191
  {
2017
2192
  assetId: "11",
2018
2193
  symbol: "web3",
@@ -2023,6 +2198,11 @@ var AssetHubPolkadot$3 = {
2023
2198
  symbol: "DED",
2024
2199
  decimals: 18
2025
2200
  },
2201
+ {
2202
+ assetId: "111",
2203
+ symbol: "DEMO",
2204
+ decimals: 6
2205
+ },
2026
2206
  {
2027
2207
  assetId: "555",
2028
2208
  symbol: "GAME",
@@ -2043,6 +2223,16 @@ var AssetHubPolkadot$3 = {
2043
2223
  symbol: "TST",
2044
2224
  decimals: 10
2045
2225
  },
2226
+ {
2227
+ assetId: "8889",
2228
+ symbol: "BNDT",
2229
+ decimals: 10
2230
+ },
2231
+ {
2232
+ assetId: "8886",
2233
+ symbol: "BANDIT",
2234
+ decimals: 10
2235
+ },
2046
2236
  {
2047
2237
  assetId: "42069",
2048
2238
  symbol: "STINK",
@@ -2053,6 +2243,16 @@ var AssetHubPolkadot$3 = {
2053
2243
  symbol: "TRQ",
2054
2244
  decimals: 18
2055
2245
  },
2246
+ {
2247
+ assetId: "9002",
2248
+ symbol: "TAPE",
2249
+ decimals: 10
2250
+ },
2251
+ {
2252
+ assetId: "33",
2253
+ symbol: "COCOA",
2254
+ decimals: 10
2255
+ },
2056
2256
  {
2057
2257
  assetId: "15",
2058
2258
  symbol: "Meme",
@@ -2063,6 +2263,11 @@ var AssetHubPolkadot$3 = {
2063
2263
  symbol: "BTC",
2064
2264
  decimals: 20
2065
2265
  },
2266
+ {
2267
+ assetId: "9527",
2268
+ symbol: "LSCAT",
2269
+ decimals: 10
2270
+ },
2066
2271
  {
2067
2272
  assetId: "868367",
2068
2273
  symbol: "VSC",
@@ -2081,13 +2286,18 @@ var AssetHubPolkadot$3 = {
2081
2286
  {
2082
2287
  assetId: "18",
2083
2288
  symbol: "DOTA",
2084
- decimals: 18
2289
+ decimals: 4
2085
2290
  },
2086
2291
  {
2087
2292
  assetId: "7",
2088
2293
  symbol: "lucky7",
2089
2294
  decimals: 20
2090
2295
  },
2296
+ {
2297
+ assetId: "4294967295",
2298
+ symbol: "(>'')>",
2299
+ decimals: 0
2300
+ },
2091
2301
  {
2092
2302
  assetId: "1984",
2093
2303
  symbol: "USDt",
@@ -2118,6 +2328,21 @@ var AssetHubPolkadot$3 = {
2118
2328
  symbol: "HAM",
2119
2329
  decimals: 10
2120
2330
  },
2331
+ {
2332
+ assetId: "9003",
2333
+ symbol: "KTRL",
2334
+ decimals: 10
2335
+ },
2336
+ {
2337
+ assetId: "1313",
2338
+ symbol: "GGI",
2339
+ decimals: 6
2340
+ },
2341
+ {
2342
+ assetId: "24",
2343
+ symbol: "PRDOG",
2344
+ decimals: 10
2345
+ },
2121
2346
  {
2122
2347
  assetId: "2023",
2123
2348
  symbol: "dot",
@@ -2133,11 +2358,26 @@ var AssetHubPolkadot$3 = {
2133
2358
  symbol: "HOOT",
2134
2359
  decimals: 6
2135
2360
  },
2361
+ {
2362
+ assetId: "404",
2363
+ symbol: "clay",
2364
+ decimals: 20
2365
+ },
2136
2366
  {
2137
2367
  assetId: "1000",
2138
2368
  symbol: "BRZ",
2139
2369
  decimals: 6
2140
2370
  },
2371
+ {
2372
+ assetId: "8008",
2373
+ symbol: "HOBO",
2374
+ decimals: 2
2375
+ },
2376
+ {
2377
+ assetId: "6666",
2378
+ symbol: "CHAOS",
2379
+ decimals: 10
2380
+ },
2141
2381
  {
2142
2382
  assetId: "1",
2143
2383
  symbol: "no1",
@@ -2148,11 +2388,26 @@ var AssetHubPolkadot$3 = {
2148
2388
  symbol: "USDcp",
2149
2389
  decimals: 0
2150
2390
  },
2391
+ {
2392
+ assetId: "31337",
2393
+ symbol: "WUD",
2394
+ decimals: 10
2395
+ },
2151
2396
  {
2152
2397
  assetId: "3",
2153
2398
  symbol: "DOT",
2154
2399
  decimals: 20
2155
2400
  },
2401
+ {
2402
+ assetId: "6969",
2403
+ symbol: "LEEMO",
2404
+ decimals: 10
2405
+ },
2406
+ {
2407
+ assetId: "1983",
2408
+ symbol: "KAS",
2409
+ decimals: 12
2410
+ },
2156
2411
  {
2157
2412
  assetId: "1337",
2158
2413
  symbol: "USDC",
@@ -2163,6 +2418,21 @@ var AssetHubPolkadot$3 = {
2163
2418
  symbol: "DANGER",
2164
2419
  decimals: 8
2165
2420
  },
2421
+ {
2422
+ assetId: "17",
2423
+ symbol: "WIFD",
2424
+ decimals: 10
2425
+ },
2426
+ {
2427
+ assetId: "25",
2428
+ symbol: "T54",
2429
+ decimals: 10
2430
+ },
2431
+ {
2432
+ assetId: "69",
2433
+ symbol: "DAL",
2434
+ decimals: 18
2435
+ },
2166
2436
  {
2167
2437
  assetId: "23",
2168
2438
  symbol: "PINK",
@@ -2173,6 +2443,26 @@ var AssetHubPolkadot$3 = {
2173
2443
  symbol: "HASH",
2174
2444
  decimals: 18
2175
2445
  },
2446
+ {
2447
+ assetId: "9001",
2448
+ symbol: "BOMB",
2449
+ decimals: 10
2450
+ },
2451
+ {
2452
+ assetId: "149",
2453
+ symbol: "EDU",
2454
+ decimals: 10
2455
+ },
2456
+ {
2457
+ assetId: "1980",
2458
+ symbol: "GAVIN",
2459
+ decimals: 0
2460
+ },
2461
+ {
2462
+ assetId: "4157",
2463
+ symbol: "PDOG",
2464
+ decimals: 10
2465
+ },
2176
2466
  {
2177
2467
  assetId: "660301",
2178
2468
  symbol: "GRL",
@@ -2188,10 +2478,20 @@ var AssetHubPolkadot$3 = {
2188
2478
  symbol: "CUBO",
2189
2479
  decimals: 9
2190
2480
  },
2481
+ {
2482
+ assetId: "888",
2483
+ symbol: "ASX",
2484
+ decimals: 10
2485
+ },
2191
2486
  {
2192
2487
  assetId: "2024",
2193
2488
  symbol: "WOOD",
2194
2489
  decimals: 10
2490
+ },
2491
+ {
2492
+ assetId: "2230",
2493
+ symbol: "GBILL",
2494
+ decimals: 8
2195
2495
  }
2196
2496
  ]
2197
2497
  };
@@ -2552,6 +2852,19 @@ var Imbue$3 = {
2552
2852
  otherAssets: [
2553
2853
  ]
2554
2854
  };
2855
+ var KiltSpiritnet$3 = {
2856
+ paraId: 2086,
2857
+ relayChainAssetSymbol: "DOT",
2858
+ nativeAssetSymbol: "KILT",
2859
+ nativeAssets: [
2860
+ {
2861
+ symbol: "KILT",
2862
+ decimals: 15
2863
+ }
2864
+ ],
2865
+ otherAssets: [
2866
+ ]
2867
+ };
2555
2868
  var Integritee$3 = {
2556
2869
  paraId: 2015,
2557
2870
  relayChainAssetSymbol: "KSM",
@@ -3117,6 +3430,11 @@ var Moonriver$3 = {
3117
3430
  symbol: "HKO",
3118
3431
  decimals: 12
3119
3432
  },
3433
+ {
3434
+ assetId: "138512078356357941985706694377215053953",
3435
+ symbol: "TNKR",
3436
+ decimals: 12
3437
+ },
3120
3438
  {
3121
3439
  assetId: "328179947973504579459046439826496046832",
3122
3440
  symbol: "KBTC",
@@ -3865,6 +4183,11 @@ var Shiden$3 = {
3865
4183
  symbol: "SYG",
3866
4184
  decimals: 10
3867
4185
  },
4186
+ {
4187
+ assetId: "18446744073709551634",
4188
+ symbol: "BILL",
4189
+ decimals: 8
4190
+ },
3868
4191
  {
3869
4192
  assetId: "18446744073709551626",
3870
4193
  symbol: "SKU",
@@ -3993,6 +4316,11 @@ var AssetHubKusama$3 = {
3993
4316
  symbol: "USDC",
3994
4317
  decimals: 4
3995
4318
  },
4319
+ {
4320
+ assetId: "120",
4321
+ symbol: "OAT",
4322
+ decimals: 4
4323
+ },
3996
4324
  {
3997
4325
  assetId: "1111",
3998
4326
  symbol: "MTVD",
@@ -4308,6 +4636,11 @@ var AssetHubKusama$3 = {
4308
4636
  symbol: "PNN",
4309
4637
  decimals: 10
4310
4638
  },
4639
+ {
4640
+ assetId: "1121",
4641
+ symbol: "OAT",
4642
+ decimals: 12
4643
+ },
4311
4644
  {
4312
4645
  assetId: "117",
4313
4646
  symbol: "TNKR",
@@ -4413,6 +4746,11 @@ var AssetHubKusama$3 = {
4413
4746
  symbol: "HEI",
4414
4747
  decimals: 10
4415
4748
  },
4749
+ {
4750
+ assetId: "1311",
4751
+ symbol: "GCT",
4752
+ decimals: 4
4753
+ },
4416
4754
  {
4417
4755
  assetId: "7",
4418
4756
  symbol: "DOS",
@@ -4508,6 +4846,11 @@ var AssetHubKusama$3 = {
4508
4846
  symbol: "SATS",
4509
4847
  decimals: 1
4510
4848
  },
4849
+ {
4850
+ assetId: "177",
4851
+ symbol: "KST",
4852
+ decimals: 4
4853
+ },
4511
4854
  {
4512
4855
  assetId: "3000",
4513
4856
  symbol: "GRAIN",
@@ -5199,6 +5542,11 @@ var Zeitgeist$3 = {
5199
5542
  symbol: "USDC",
5200
5543
  decimals: 6
5201
5544
  },
5545
+ {
5546
+ assetId: "4",
5547
+ symbol: "USDC",
5548
+ decimals: 6
5549
+ },
5202
5550
  {
5203
5551
  assetId: "2",
5204
5552
  symbol: "WSX",
@@ -5213,6 +5561,11 @@ var Zeitgeist$3 = {
5213
5561
  assetId: "0",
5214
5562
  symbol: "DOT",
5215
5563
  decimals: 10
5564
+ },
5565
+ {
5566
+ assetId: "5",
5567
+ symbol: "USDT",
5568
+ decimals: 6
5216
5569
  }
5217
5570
  ]
5218
5571
  };
@@ -5435,6 +5788,7 @@ var assets = {
5435
5788
  CrustShadow: CrustShadow$3,
5436
5789
  Encointer: Encointer$3,
5437
5790
  Imbue: Imbue$3,
5791
+ KiltSpiritnet: KiltSpiritnet$3,
5438
5792
  Integritee: Integritee$3,
5439
5793
  InvArchTinker: InvArchTinker$3,
5440
5794
  Karura: Karura$3,
@@ -5494,6 +5848,7 @@ var assetsMapJson = /*#__PURE__*/Object.freeze({
5494
5848
  InvArchTinker: InvArchTinker$3,
5495
5849
  Karura: Karura$3,
5496
5850
  Khala: Khala$3,
5851
+ KiltSpiritnet: KiltSpiritnet$3,
5497
5852
  Kintsugi: Kintsugi$3,
5498
5853
  Litentry: Litentry$3,
5499
5854
  Litmus: Litmus$3,
@@ -5599,18 +5954,18 @@ var constructRelayToParaParameters = function constructRelayToParaParameters(_re
5599
5954
  amount = _ref.amount,
5600
5955
  paraIdTo = _ref.paraIdTo;
5601
5956
  var includeFee = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
5602
- var paraId = paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination);
5603
- var parameters = [createPolkadotXcmHeader('RelayToPara', version, paraId), generateAddressPayload(api, 'RelayToPara', null, address, version, paraId), createCurrencySpec(amount, version, exports.Parents.ZERO), 0];
5957
+ var paraId = destination !== undefined && _typeof(destination) !== 'object' ? paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination) : undefined;
5958
+ var parameters = [createPolkadotXcmHeader('RelayToPara', version, destination, paraId), generateAddressPayload(api, 'RelayToPara', null, address, version, paraId), createCurrencySpec(amount, version, exports.Parents.ZERO), 0];
5604
5959
  if (includeFee) {
5605
5960
  parameters.push('Unlimited');
5606
5961
  }
5607
5962
  return parameters;
5608
5963
  };
5609
- var createCurrencySpec = function createCurrencySpec(amount, version, parents) {
5610
- var interior = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'Here';
5964
+ var createCurrencySpec = function createCurrencySpec(amount, version, parents, overridedMultiLocation) {
5965
+ var interior = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'Here';
5611
5966
  return _defineProperty({}, version, [{
5612
5967
  id: {
5613
- Concrete: {
5968
+ Concrete: overridedMultiLocation !== null && overridedMultiLocation !== void 0 ? overridedMultiLocation : {
5614
5969
  parents: parents,
5615
5970
  interior: interior
5616
5971
  }
@@ -5620,14 +5975,15 @@ var createCurrencySpec = function createCurrencySpec(amount, version, parents) {
5620
5975
  }
5621
5976
  }]);
5622
5977
  };
5623
- var createPolkadotXcmHeader = function createPolkadotXcmHeader(scenario, version, nodeId) {
5978
+ var createPolkadotXcmHeader = function createPolkadotXcmHeader(scenario, version, destination, nodeId) {
5624
5979
  var parents = scenario === 'RelayToPara' ? exports.Parents.ZERO : exports.Parents.ONE;
5625
5980
  var interior = scenario === 'ParaToRelay' ? 'Here' : {
5626
5981
  X1: {
5627
5982
  Parachain: nodeId
5628
5983
  }
5629
5984
  };
5630
- return _defineProperty({}, scenario === 'RelayToPara' ? exports.Version.V3 : version, {
5985
+ var isMultiLocationDestination = _typeof(destination) === 'object';
5986
+ return _defineProperty({}, scenario === 'RelayToPara' ? exports.Version.V3 : version, isMultiLocationDestination ? destination : {
5631
5987
  parents: parents,
5632
5988
  interior: interior
5633
5989
  });
@@ -5651,6 +6007,42 @@ var calculateTransactionFee = function calculateTransactionFee(tx, address) {
5651
6007
  }, _callee);
5652
6008
  }));
5653
6009
  };
6010
+ var findParachainJunction = function findParachainJunction(multilocation) {
6011
+ var interior = multilocation.interior;
6012
+ for (var key in interior) {
6013
+ var junctions = interior[key];
6014
+ if (Array.isArray(junctions)) {
6015
+ var _iterator = _createForOfIteratorHelper(junctions),
6016
+ _step;
6017
+ try {
6018
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
6019
+ var junction = _step.value;
6020
+ if ('Parachain' in junction) {
6021
+ return Number(junction.Parachain);
6022
+ }
6023
+ }
6024
+ } catch (err) {
6025
+ _iterator.e(err);
6026
+ } finally {
6027
+ _iterator.f();
6028
+ }
6029
+ } else if (junctions !== undefined && 'Parachain' in junctions) {
6030
+ return Number(junctions.Parachain);
6031
+ }
6032
+ }
6033
+ return null;
6034
+ };
6035
+ var resolveTNodeFromMultiLocation = function resolveTNodeFromMultiLocation(multiLocation) {
6036
+ var parachainId = findParachainJunction(multiLocation);
6037
+ if (parachainId === null) {
6038
+ throw new Error('Parachain ID not found in destination multi location.');
6039
+ }
6040
+ var node = getTNode(parachainId);
6041
+ if (node === null) {
6042
+ throw new Error('Node with specified paraId not found in destination multi location.');
6043
+ }
6044
+ return node;
6045
+ };
5654
6046
 
5655
6047
  var supportsXTokens = function supportsXTokens(obj) {
5656
6048
  return 'transferXTokens' in obj;
@@ -5705,10 +6097,12 @@ var ParachainNode = /*#__PURE__*/function () {
5705
6097
  address = options.address,
5706
6098
  destination = options.destination,
5707
6099
  paraIdTo = options.paraIdTo,
6100
+ overridedCurrencyMultiLocation = options.overridedCurrencyMultiLocation,
6101
+ feeAsset = options.feeAsset,
5708
6102
  _options$serializedAp = options.serializedApiCallEnabled,
5709
6103
  serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
5710
6104
  var scenario = destination !== undefined ? 'ParaToPara' : 'ParaToRelay';
5711
- var paraId = destination !== undefined ? paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination) : undefined;
6105
+ var paraId = destination !== undefined && _typeof(destination) !== 'object' ? paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination) : undefined;
5712
6106
  if (supportsXTokens(this)) {
5713
6107
  return this.transferXTokens({
5714
6108
  api: api,
@@ -5721,6 +6115,8 @@ var ParachainNode = /*#__PURE__*/function () {
5721
6115
  scenario: scenario,
5722
6116
  paraIdTo: paraId,
5723
6117
  destination: destination,
6118
+ overridedCurrencyMultiLocation: overridedCurrencyMultiLocation,
6119
+ feeAsset: feeAsset,
5724
6120
  serializedApiCallEnabled: serializedApiCallEnabled
5725
6121
  });
5726
6122
  } else if (supportsXTransfer(this)) {
@@ -5733,16 +6129,18 @@ var ParachainNode = /*#__PURE__*/function () {
5733
6129
  paraId: paraId,
5734
6130
  origin: this.node,
5735
6131
  destination: destination,
6132
+ overridedCurrencyMultiLocation: overridedCurrencyMultiLocation,
5736
6133
  serializedApiCallEnabled: serializedApiCallEnabled
5737
6134
  });
5738
6135
  } else if (supportsPolkadotXCM(this)) {
5739
6136
  return this.transferPolkadotXCM({
5740
6137
  api: api,
5741
- header: this.createPolkadotXcmHeader(scenario, paraId),
6138
+ header: this.createPolkadotXcmHeader(scenario, destination, paraId),
5742
6139
  addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, this.version, paraId),
5743
- currencySelection: this.createCurrencySpec(amount, scenario, this.version, currencyId),
6140
+ currencySelection: this.createCurrencySpec(amount, scenario, this.version, currencyId, overridedCurrencyMultiLocation),
5744
6141
  scenario: scenario,
5745
6142
  currencySymbol: currencySymbol,
6143
+ feeAsset: feeAsset,
5746
6144
  serializedApiCallEnabled: serializedApiCallEnabled
5747
6145
  });
5748
6146
  } else {
@@ -5783,13 +6181,13 @@ var ParachainNode = /*#__PURE__*/function () {
5783
6181
  }
5784
6182
  }, {
5785
6183
  key: "createCurrencySpec",
5786
- value: function createCurrencySpec$1(amount, scenario, version, currencyId) {
5787
- return createCurrencySpec(amount, version, scenario === 'ParaToRelay' ? exports.Parents.ONE : exports.Parents.ZERO);
6184
+ value: function createCurrencySpec$1(amount, scenario, version, _, overridedMultiLocation) {
6185
+ return createCurrencySpec(amount, version, scenario === 'ParaToRelay' ? exports.Parents.ONE : exports.Parents.ZERO, overridedMultiLocation);
5788
6186
  }
5789
6187
  }, {
5790
6188
  key: "createPolkadotXcmHeader",
5791
- value: function createPolkadotXcmHeader$1(scenario, paraId) {
5792
- return createPolkadotXcmHeader(scenario, this.version, paraId);
6189
+ value: function createPolkadotXcmHeader$1(scenario, destination, paraId) {
6190
+ return createPolkadotXcmHeader(scenario, this.version, destination, paraId);
5793
6191
  }
5794
6192
  }]);
5795
6193
  }();
@@ -5815,6 +6213,26 @@ var getModifiedCurrencySelection = function getModifiedCurrencySelection(version
5815
6213
  }
5816
6214
  });
5817
6215
  };
6216
+ var getCurrencySelection = function getCurrencySelection(_ref2, isAssetHub, currencySelection) {
6217
+ var origin = _ref2.origin,
6218
+ amount = _ref2.amount,
6219
+ currencyID = _ref2.currencyID,
6220
+ paraIdTo = _ref2.paraIdTo,
6221
+ overridedCurrencyMultiLocation = _ref2.overridedCurrencyMultiLocation;
6222
+ var _getNode = getNode(origin),
6223
+ version = _getNode.version;
6224
+ if (overridedCurrencyMultiLocation !== undefined) return _defineProperty({}, version, overridedCurrencyMultiLocation);
6225
+ if (isAssetHub) {
6226
+ return getModifiedCurrencySelection(version, amount, currencyID, paraIdTo);
6227
+ }
6228
+ return currencySelection;
6229
+ };
6230
+ var getParameters = function getParameters(isAssetHub, currencySelection, addressSelection, amount, fees, feeAsset) {
6231
+ if (isAssetHub) {
6232
+ return feeAsset !== undefined ? [currencySelection, feeAsset, addressSelection, fees] : [currencySelection, addressSelection, fees];
6233
+ }
6234
+ return [currencySelection, amount, addressSelection, fees];
6235
+ };
5818
6236
  // eslint-disable-next-line @typescript-eslint/no-extraneous-class
5819
6237
  var XTokensTransferImpl = /*#__PURE__*/function () {
5820
6238
  function XTokensTransferImpl() {
@@ -5822,30 +6240,33 @@ var XTokensTransferImpl = /*#__PURE__*/function () {
5822
6240
  }
5823
6241
  return _createClass(XTokensTransferImpl, null, [{
5824
6242
  key: "transferXTokens",
5825
- value: function transferXTokens(_ref2, currencySelection) {
5826
- var api = _ref2.api,
5827
- amount = _ref2.amount,
5828
- currencyID = _ref2.currencyID,
5829
- addressSelection = _ref2.addressSelection,
5830
- origin = _ref2.origin,
5831
- destination = _ref2.destination,
5832
- paraIdTo = _ref2.paraIdTo,
5833
- serializedApiCallEnabled = _ref2.serializedApiCallEnabled;
6243
+ value: function transferXTokens(input, currencySelection) {
6244
+ var _api$tx$module;
5834
6245
  var fees = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Unlimited';
5835
6246
  var pallet = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'XTokens';
6247
+ var api = input.api,
6248
+ amount = input.amount,
6249
+ addressSelection = input.addressSelection,
6250
+ destination = input.destination,
6251
+ feeAsset = input.feeAsset,
6252
+ serializedApiCallEnabled = input.serializedApiCallEnabled;
6253
+ var isMultiLocationDestination = _typeof(destination) === 'object';
6254
+ if (isMultiLocationDestination) {
6255
+ throw new Error('Multilocation destinations are not supported for specific transfer you are trying to create. In special cases such as xTokens or xTransfer pallet try using address multilocation instead (for both destination and address in same multilocation set (eg. X2 - Parachain, Address). For further assistance please open issue in our repository.');
6256
+ }
5836
6257
  var module = lowercaseFirstLetter(pallet.toString());
5837
6258
  var isAssetHub = destination === 'AssetHubPolkadot' || destination === 'AssetHubKusama';
5838
- var node = getNode(origin);
5839
- var modifiedCurrencySelection = isAssetHub ? getModifiedCurrencySelection(node.version, amount, currencyID, paraIdTo) : currencySelection;
6259
+ var modifiedCurrencySelection = getCurrencySelection(input, isAssetHub, currencySelection);
5840
6260
  var section = isAssetHub ? 'transferMultiasset' : 'transfer';
6261
+ var parameters = getParameters(isAssetHub, modifiedCurrencySelection, addressSelection, amount, fees, feeAsset);
5841
6262
  if (serializedApiCallEnabled === true) {
5842
6263
  return {
5843
6264
  module: module,
5844
6265
  section: section,
5845
- parameters: isAssetHub ? [modifiedCurrencySelection, addressSelection, fees] : [currencySelection, amount, addressSelection, fees]
6266
+ parameters: parameters
5846
6267
  };
5847
6268
  }
5848
- return isAssetHub ? api.tx[module][section](modifiedCurrencySelection, addressSelection, fees) : api.tx[module][section](currencySelection, amount, addressSelection, fees);
6269
+ return (_api$tx$module = api.tx[module])[section].apply(_api$tx$module, _toConsumableArray(parameters));
5849
6270
  }
5850
6271
  }]);
5851
6272
  }();
@@ -6507,6 +6928,7 @@ var Karura$2 = /*#__PURE__*/function (_ParachainNode) {
6507
6928
  }(ParachainNode);
6508
6929
 
6509
6930
  // Contains basic structure of polkadotXCM call
6931
+ var DEFAULT_FEE_ASSET = 0;
6510
6932
  // eslint-disable-next-line @typescript-eslint/no-extraneous-class
6511
6933
  var PolkadotXCMTransferImpl = /*#__PURE__*/function () {
6512
6934
  function PolkadotXCMTransferImpl() {
@@ -6519,16 +6941,18 @@ var PolkadotXCMTransferImpl = /*#__PURE__*/function () {
6519
6941
  header = _ref.header,
6520
6942
  addressSelection = _ref.addressSelection,
6521
6943
  currencySelection = _ref.currencySelection,
6944
+ _ref$feeAsset = _ref.feeAsset,
6945
+ feeAsset = _ref$feeAsset === void 0 ? DEFAULT_FEE_ASSET : _ref$feeAsset,
6522
6946
  serializedApiCallEnabled = _ref.serializedApiCallEnabled;
6523
6947
  var fees = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
6524
6948
  if (serializedApiCallEnabled === true) {
6525
6949
  return {
6526
6950
  module: 'polkadotXcm',
6527
6951
  section: method,
6528
- parameters: [header, addressSelection, currencySelection, 0].concat(_toConsumableArray(fees !== undefined ? [fees] : []))
6952
+ parameters: [header, addressSelection, currencySelection, feeAsset].concat(_toConsumableArray(fees !== undefined ? [fees] : []))
6529
6953
  };
6530
6954
  }
6531
- return fees !== undefined ? api.tx.polkadotXcm[method](header, addressSelection, currencySelection, 0, fees) : api.tx.polkadotXcm[method](header, addressSelection, currencySelection, 0);
6955
+ return fees !== undefined ? api.tx.polkadotXcm[method](header, addressSelection, currencySelection, feeAsset, fees) : api.tx.polkadotXcm[method](header, addressSelection, currencySelection, feeAsset);
6532
6956
  }
6533
6957
  }]);
6534
6958
  }();
@@ -6560,7 +6984,7 @@ var AssetHubPolkadot$2 = /*#__PURE__*/function (_ParachainNode) {
6560
6984
  }
6561
6985
  }, {
6562
6986
  key: "createCurrencySpec",
6563
- value: function createCurrencySpec$1(amount, scenario, version, currencyId) {
6987
+ value: function createCurrencySpec$1(amount, scenario, version, currencyId, overridedMultiLocation) {
6564
6988
  if (scenario === 'ParaToPara') {
6565
6989
  var interior = {
6566
6990
  X2: [{
@@ -6569,7 +6993,7 @@ var AssetHubPolkadot$2 = /*#__PURE__*/function (_ParachainNode) {
6569
6993
  GeneralIndex: currencyId
6570
6994
  }]
6571
6995
  };
6572
- return createCurrencySpec(amount, version, exports.Parents.ZERO, interior);
6996
+ return createCurrencySpec(amount, version, exports.Parents.ZERO, overridedMultiLocation, interior);
6573
6997
  } else {
6574
6998
  return _get(_getPrototypeOf(AssetHubPolkadot.prototype), "createCurrencySpec", this).call(this, amount, scenario, version, currencyId);
6575
6999
  }
@@ -6616,7 +7040,7 @@ var CoretimeKusama$2 = /*#__PURE__*/function (_ParachainNode) {
6616
7040
  function CoretimeKusama() {
6617
7041
  var _this;
6618
7042
  _classCallCheck(this, CoretimeKusama);
6619
- _this = _callSuper(this, CoretimeKusama, ['CoretimeKusama', 'KusamaCoretime', 'kusama', exports.Version.V3]);
7043
+ _this = _callSuper(this, CoretimeKusama, ['CoretimeKusama', 'kusamaCoretime', 'kusama', exports.Version.V3]);
6620
7044
  _this._assetCheckEnabled = false;
6621
7045
  return _this;
6622
7046
  }
@@ -6719,10 +7143,11 @@ var Astar$2 = /*#__PURE__*/function (_ParachainNode) {
6719
7143
  address = options.address,
6720
7144
  destination = options.destination,
6721
7145
  paraIdTo = options.paraIdTo,
7146
+ overridedCurrencyMultiLocation = options.overridedCurrencyMultiLocation,
6722
7147
  _options$serializedAp = options.serializedApiCallEnabled,
6723
7148
  serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
6724
7149
  var scenario = destination !== undefined ? 'ParaToPara' : 'ParaToRelay';
6725
- var paraId = destination !== undefined ? paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination) : undefined;
7150
+ var paraId = destination !== undefined && _typeof(destination) !== 'object' ? paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination) : undefined;
6726
7151
  var node = this.node;
6727
7152
  if (supportsXTokens(this) && currencySymbol !== 'ASTR') {
6728
7153
  return this.transferXTokens({
@@ -6736,14 +7161,15 @@ var Astar$2 = /*#__PURE__*/function (_ParachainNode) {
6736
7161
  scenario: scenario,
6737
7162
  paraIdTo: paraId,
6738
7163
  destination: destination,
7164
+ overridedCurrencyMultiLocation: overridedCurrencyMultiLocation,
6739
7165
  serializedApiCallEnabled: serializedApiCallEnabled
6740
7166
  });
6741
7167
  } else if (supportsPolkadotXCM(this)) {
6742
7168
  return this.transferPolkadotXCM({
6743
7169
  api: api,
6744
- header: this.createPolkadotXcmHeader(scenario, paraId),
7170
+ header: this.createPolkadotXcmHeader(scenario, destination, paraId),
6745
7171
  addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, this.version, paraId),
6746
- currencySelection: this.createCurrencySpec(amount, scenario, this.version, currencyId),
7172
+ currencySelection: this.createCurrencySpec(amount, scenario, this.version, currencyId, overridedCurrencyMultiLocation),
6747
7173
  scenario: scenario,
6748
7174
  currencySymbol: currencySymbol,
6749
7175
  serializedApiCallEnabled: serializedApiCallEnabled
@@ -6774,14 +7200,14 @@ var Darwinia$2 = /*#__PURE__*/function (_ParachainNode) {
6774
7200
  }
6775
7201
  }, {
6776
7202
  key: "createCurrencySpec",
6777
- value: function createCurrencySpec$1(amount, scenario, version, currencyId) {
7203
+ value: function createCurrencySpec$1(amount, scenario, version, currencyId, overridedMultiLocation) {
6778
7204
  if (scenario === 'ParaToPara') {
6779
7205
  var interior = {
6780
7206
  X1: {
6781
7207
  PalletInstance: 5
6782
7208
  }
6783
7209
  };
6784
- return createCurrencySpec(amount, version, exports.Parents.ZERO, interior);
7210
+ return createCurrencySpec(amount, version, exports.Parents.ZERO, overridedMultiLocation, interior);
6785
7211
  } else {
6786
7212
  return _get(_getPrototypeOf(Darwinia.prototype), "createCurrencySpec", this).call(this, amount, scenario, version, currencyId);
6787
7213
  }
@@ -6866,10 +7292,11 @@ var Shiden$2 = /*#__PURE__*/function (_ParachainNode) {
6866
7292
  address = options.address,
6867
7293
  destination = options.destination,
6868
7294
  paraIdTo = options.paraIdTo,
7295
+ overridedCurrencyMultiLocation = options.overridedCurrencyMultiLocation,
6869
7296
  _options$serializedAp = options.serializedApiCallEnabled,
6870
7297
  serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
6871
7298
  var scenario = destination !== undefined ? 'ParaToPara' : 'ParaToRelay';
6872
- var paraId = destination !== undefined ? paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination) : undefined;
7299
+ var paraId = destination !== undefined && _typeof(destination) !== 'object' ? paraIdTo !== null && paraIdTo !== void 0 ? paraIdTo : getParaId(destination) : undefined;
6873
7300
  var node = this.node;
6874
7301
  if (supportsXTokens(this) && currencySymbol !== 'SDN') {
6875
7302
  return this.transferXTokens({
@@ -6879,18 +7306,19 @@ var Shiden$2 = /*#__PURE__*/function (_ParachainNode) {
6879
7306
  amount: amount,
6880
7307
  addressSelection: generateAddressPayload(api, scenario, 'XTokens', address, this.version, paraId),
6881
7308
  fees: getFees(scenario),
7309
+ origin: this.node,
6882
7310
  scenario: scenario,
6883
7311
  paraIdTo: paraId,
6884
- origin: this.node,
6885
7312
  destination: destination,
7313
+ overridedCurrencyMultiLocation: overridedCurrencyMultiLocation,
6886
7314
  serializedApiCallEnabled: serializedApiCallEnabled
6887
7315
  });
6888
7316
  } else if (supportsPolkadotXCM(this)) {
6889
7317
  return this.transferPolkadotXCM({
6890
7318
  api: api,
6891
- header: this.createPolkadotXcmHeader(scenario, paraId),
7319
+ header: this.createPolkadotXcmHeader(scenario, destination, paraId),
6892
7320
  addressSelection: generateAddressPayload(api, scenario, 'PolkadotXcm', address, this.version, paraId),
6893
- currencySelection: this.createCurrencySpec(amount, scenario, this.version, currencyId),
7321
+ currencySelection: this.createCurrencySpec(amount, scenario, this.version, currencyId, overridedCurrencyMultiLocation),
6894
7322
  scenario: scenario,
6895
7323
  currencySymbol: currencySymbol,
6896
7324
  serializedApiCallEnabled: serializedApiCallEnabled
@@ -7070,6 +7498,33 @@ var determineDestWeight = function determineDestWeight(destNode) {
7070
7498
  }
7071
7499
  throw new NodeNotSupportedError("Node ".concat(destNode, " is not supported"));
7072
7500
  };
7501
+ var getDestination = function getDestination(_ref) {
7502
+ var recipientAddress = _ref.recipientAddress,
7503
+ paraId = _ref.paraId,
7504
+ api = _ref.api;
7505
+ var isMultiLocation = _typeof(recipientAddress) === 'object';
7506
+ if (isMultiLocation) {
7507
+ return recipientAddress;
7508
+ }
7509
+ var isEthAddress = ethers.ethers.utils.isAddress(recipientAddress);
7510
+ var addressJunction = isEthAddress ? {
7511
+ AccountKey20: {
7512
+ key: recipientAddress
7513
+ }
7514
+ } : {
7515
+ AccountId32: {
7516
+ id: createAccID(api, recipientAddress)
7517
+ }
7518
+ };
7519
+ return {
7520
+ parents: exports.Parents.ONE,
7521
+ interior: {
7522
+ X2: [{
7523
+ Parachain: paraId
7524
+ }, addressJunction]
7525
+ }
7526
+ };
7527
+ };
7073
7528
  // eslint-disable-next-line @typescript-eslint/no-extraneous-class
7074
7529
  var XTransferTransferImpl = /*#__PURE__*/function () {
7075
7530
  function XTransferTransferImpl() {
@@ -7077,28 +7532,19 @@ var XTransferTransferImpl = /*#__PURE__*/function () {
7077
7532
  }
7078
7533
  return _createClass(XTransferTransferImpl, null, [{
7079
7534
  key: "transferXTransfer",
7080
- value: function transferXTransfer(_ref) {
7081
- var api = _ref.api,
7082
- amount = _ref.amount,
7083
- origin = _ref.origin,
7084
- recipientAddress = _ref.recipientAddress,
7085
- destination = _ref.destination,
7086
- paraId = _ref.paraId,
7087
- serializedApiCallEnabled = _ref.serializedApiCallEnabled;
7088
- var currencySpec = createCurrencySpec(amount, exports.Version.V1, exports.Parents.ZERO)[exports.Version.V1][0];
7089
- var isEthAddress = ethers.ethers.utils.isAddress(recipientAddress);
7090
- var dest = {
7091
- parents: 1,
7092
- interior: {
7093
- X2: [{
7094
- Parachain: paraId
7095
- }, _defineProperty({}, isEthAddress ? 'AccountKey20' : 'AccountId32', Object.assign({}, isEthAddress ? {
7096
- key: recipientAddress
7097
- } : {
7098
- id: createAccID(api, recipientAddress)
7099
- }))]
7100
- }
7101
- };
7535
+ value: function transferXTransfer(input) {
7536
+ var api = input.api,
7537
+ amount = input.amount,
7538
+ origin = input.origin,
7539
+ destination = input.destination,
7540
+ serializedApiCallEnabled = input.serializedApiCallEnabled,
7541
+ overridedCurrencyMultiLocation = input.overridedCurrencyMultiLocation;
7542
+ var isMultiLocationDestination = _typeof(destination) === 'object';
7543
+ if (isMultiLocationDestination) {
7544
+ throw new Error('Multilocation destinations are not supported for specific transfer you are trying to create. In special cases such as xTokens or xTransfer pallet try using address multilocation instead (for both destination and address in same multilocation set (eg. X2 - Parachain, Address). For further assistance please open issue in our repository.');
7545
+ }
7546
+ var currencySpec = Object.values(createCurrencySpec(amount, exports.Version.V1, exports.Parents.ZERO, overridedCurrencyMultiLocation))[0][0];
7547
+ var dest = getDestination(input);
7102
7548
  if (serializedApiCallEnabled === true) {
7103
7549
  return {
7104
7550
  module: 'xTransfer',
@@ -7156,8 +7602,30 @@ var Subsocial$2 = /*#__PURE__*/function (_ParachainNode) {
7156
7602
  return _createClass(Subsocial);
7157
7603
  }(ParachainNode);
7158
7604
 
7605
+ var KiltSpiritnet$2 = /*#__PURE__*/function (_ParachainNode) {
7606
+ function KiltSpiritnet() {
7607
+ _classCallCheck(this, KiltSpiritnet);
7608
+ return _callSuper(this, KiltSpiritnet, ['KiltSpiritnet', 'kilt', 'polkadot', exports.Version.V2]);
7609
+ }
7610
+ _inherits(KiltSpiritnet, _ParachainNode);
7611
+ return _createClass(KiltSpiritnet, [{
7612
+ key: "transferPolkadotXCM",
7613
+ value: function transferPolkadotXCM(input) {
7614
+ if (input.scenario !== 'ParaToPara') {
7615
+ throw new ScenarioNotSupportedError('KiltSpiritnet', input.scenario);
7616
+ }
7617
+ return PolkadotXCMTransferImpl.transferPolkadotXCM(input, 'reserveTransferAssets');
7618
+ }
7619
+ }, {
7620
+ key: "transferRelayToPara",
7621
+ value: function transferRelayToPara() {
7622
+ throw new NodeNotSupportedError();
7623
+ }
7624
+ }]);
7625
+ }(ParachainNode);
7626
+
7159
7627
  // Contains supported Parachains and exports supported XCM Pallets
7160
- var NODE_NAMES = ['AssetHubPolkadot', 'Acala', 'Astar', 'BifrostPolkadot', 'Bitgreen', 'Centrifuge', 'ComposableFinance', 'Darwinia', 'HydraDX', 'Interlay', 'Litentry', 'Moonbeam', 'Parallel', 'AssetHubKusama', 'CoretimeKusama', 'Encointer', 'Altair', 'Amplitude', 'Bajun', 'Basilisk', 'BifrostKusama', 'Pioneer', 'Calamari', 'CrustShadow', 'Crab', 'Imbue', 'Integritee', 'InvArchTinker', 'Karura', 'Kintsugi', 'Litmus', 'Mangata', 'Moonriver', 'ParallelHeiko', 'Picasso', 'Quartz', 'Robonomics', 'Shiden', 'Turing', 'Unique', 'Crust', 'Manta', 'Nodle', 'NeuroWeb', 'Pendulum', 'Polkadex', 'Zeitgeist', 'Collectives', 'Khala', 'Phala', 'Subsocial'];
7628
+ var NODE_NAMES = ['AssetHubPolkadot', 'Acala', 'Astar', 'BifrostPolkadot', 'Bitgreen', 'Centrifuge', 'ComposableFinance', 'Darwinia', 'HydraDX', 'Interlay', 'Litentry', 'Moonbeam', 'Parallel', 'AssetHubKusama', 'CoretimeKusama', 'Encointer', 'Altair', 'Amplitude', 'Bajun', 'Basilisk', 'BifrostKusama', 'Pioneer', 'Calamari', 'CrustShadow', 'Crab', 'Imbue', 'Integritee', 'InvArchTinker', 'Karura', 'Kintsugi', 'Litmus', 'Mangata', 'Moonriver', 'ParallelHeiko', 'Picasso', 'Quartz', 'Robonomics', 'Shiden', 'Turing', 'Unique', 'Crust', 'Manta', 'Nodle', 'NeuroWeb', 'Pendulum', 'Polkadex', 'Zeitgeist', 'Collectives', 'Khala', 'Phala', 'Subsocial', 'KiltSpiritnet'];
7161
7629
  var NODES_WITH_RELAY_CHAINS = [].concat(NODE_NAMES, ['Polkadot', 'Kusama']);
7162
7630
  var nodes = {
7163
7631
  AssetHubPolkadot: new AssetHubPolkadot$2(),
@@ -7210,7 +7678,8 @@ var nodes = {
7210
7678
  Collectives: new Collectives$2(),
7211
7679
  Khala: new Khala$2(),
7212
7680
  Phala: new Phala$2(),
7213
- Subsocial: new Subsocial$2()
7681
+ Subsocial: new Subsocial$2(),
7682
+ KiltSpiritnet: new KiltSpiritnet$2()
7214
7683
  };
7215
7684
  var SUPPORTED_PALLETS = ['XTokens', 'OrmlXTokens', 'PolkadotXcm', 'RelayerXcm', 'XTransfer'];
7216
7685
 
@@ -7229,10 +7698,14 @@ var getFees = function getFees(scenario) {
7229
7698
  throw new Error("Fees for scenario ".concat(scenario, " are not defined."));
7230
7699
  };
7231
7700
  var generateAddressPayload = function generateAddressPayload(api, scenario, pallet, recipientAddress, version, nodeId) {
7701
+ var isMultiLocation = _typeof(recipientAddress) === 'object';
7702
+ if (isMultiLocation) {
7703
+ return _defineProperty({}, version, recipientAddress);
7704
+ }
7232
7705
  var isEthAddress = ethers.ethers.utils.isAddress(recipientAddress);
7233
7706
  if (scenario === 'ParaToRelay') {
7234
7707
  return _defineProperty({}, version, {
7235
- parents: pallet === 'XTokens' ? 1 : 0,
7708
+ parents: pallet === 'XTokens' ? exports.Parents.ONE : exports.Parents.ZERO,
7236
7709
  interior: {
7237
7710
  X1: {
7238
7711
  AccountId32: Object.assign(Object.assign({}, version === exports.Version.V1 && {
@@ -7246,46 +7719,60 @@ var generateAddressPayload = function generateAddressPayload(api, scenario, pall
7246
7719
  }
7247
7720
  if (scenario === 'ParaToPara' && pallet === 'XTokens') {
7248
7721
  return _defineProperty({}, version, {
7249
- parents: 1,
7722
+ parents: exports.Parents.ONE,
7250
7723
  interior: {
7251
7724
  X2: [{
7252
7725
  Parachain: nodeId
7253
- }, _defineProperty({}, isEthAddress ? 'AccountKey20' : 'AccountId32', Object.assign(Object.assign({}, version === exports.Version.V1 && {
7254
- network: 'any'
7255
- }), isEthAddress ? {
7256
- key: recipientAddress
7726
+ }, isEthAddress ? {
7727
+ AccountKey20: Object.assign(Object.assign({}, version === exports.Version.V1 && {
7728
+ network: 'any'
7729
+ }), {
7730
+ key: recipientAddress
7731
+ })
7257
7732
  } : {
7258
- id: createAccID(api, recipientAddress)
7259
- }))]
7733
+ AccountId32: Object.assign(Object.assign({}, version === exports.Version.V1 && {
7734
+ network: 'any'
7735
+ }), {
7736
+ id: createAccID(api, recipientAddress)
7737
+ })
7738
+ }]
7260
7739
  }
7261
7740
  });
7262
7741
  }
7263
7742
  if (scenario === 'ParaToPara' && pallet === 'PolkadotXcm') {
7264
7743
  return _defineProperty({}, version, {
7265
- parents: 0,
7744
+ parents: exports.Parents.ZERO,
7266
7745
  interior: {
7267
- X1: _defineProperty({}, isEthAddress ? 'AccountKey20' : 'AccountId32', Object.assign(Object.assign({}, version === exports.Version.V1 && {
7268
- network: 'any'
7269
- }), isEthAddress ? {
7270
- key: recipientAddress
7746
+ X1: isEthAddress ? {
7747
+ AccountKey20: Object.assign(Object.assign({}, version === exports.Version.V1 && {
7748
+ network: 'any'
7749
+ }), {
7750
+ key: recipientAddress
7751
+ })
7271
7752
  } : {
7272
- id: createAccID(api, recipientAddress)
7273
- }))
7753
+ AccountId32: Object.assign(Object.assign({}, version === exports.Version.V1 && {
7754
+ network: 'any'
7755
+ }), {
7756
+ id: createAccID(api, recipientAddress)
7757
+ })
7758
+ }
7274
7759
  }
7275
7760
  });
7276
7761
  }
7277
- return {
7278
- V3: {
7279
- parents: 0,
7280
- interior: {
7281
- X1: _defineProperty({}, isEthAddress ? 'AccountKey20' : 'AccountId32', Object.assign({}, isEthAddress ? {
7762
+ return _defineProperty({}, exports.Version.V3, {
7763
+ parents: exports.Parents.ZERO,
7764
+ interior: {
7765
+ X1: isEthAddress ? {
7766
+ AccountKey20: {
7282
7767
  key: recipientAddress
7283
- } : {
7768
+ }
7769
+ } : {
7770
+ AccountId32: {
7284
7771
  id: createAccID(api, recipientAddress)
7285
- }))
7772
+ }
7286
7773
  }
7287
7774
  }
7288
- };
7775
+ });
7289
7776
  };
7290
7777
  var getNode = function getNode(node) {
7291
7778
  return nodes[node];
@@ -7294,8 +7781,8 @@ var getNodeEndpointOption = function getNodeEndpointOption(node) {
7294
7781
  var _getNode = getNode(node),
7295
7782
  type = _getNode.type,
7296
7783
  name = _getNode.name;
7297
- var _ref5 = type === 'polkadot' ? endpoints.prodRelayPolkadot : endpoints.prodRelayKusama,
7298
- linked = _ref5.linked;
7784
+ var _ref6 = type === 'polkadot' ? endpoints.prodRelayPolkadot : endpoints.prodRelayKusama,
7785
+ linked = _ref6.linked;
7299
7786
  if (linked === undefined) return undefined;
7300
7787
  var preferredOption = linked.find(function (o) {
7301
7788
  return o.info === name && Object.values(o.providers).length > 0;
@@ -7306,8 +7793,8 @@ var getNodeEndpointOption = function getNodeEndpointOption(node) {
7306
7793
  };
7307
7794
  var getAllNodeProviders = function getAllNodeProviders(node) {
7308
7795
  var _a;
7309
- var _ref6 = (_a = getNodeEndpointOption(node)) !== null && _a !== void 0 ? _a : {},
7310
- providers = _ref6.providers;
7796
+ var _ref7 = (_a = getNodeEndpointOption(node)) !== null && _a !== void 0 ? _a : {},
7797
+ providers = _ref7.providers;
7311
7798
  if (providers.length < 1) {
7312
7799
  throw new Error("Node ".concat(node, " does not have any providers."));
7313
7800
  }
@@ -7367,18 +7854,22 @@ var createApiInstanceForNode = function createApiInstanceForNode(node) {
7367
7854
  var lowercaseFirstLetter = function lowercaseFirstLetter(str) {
7368
7855
  return str.charAt(0).toLowerCase() + str.slice(1);
7369
7856
  };
7370
- var callPolkadotJsTxFunction = function callPolkadotJsTxFunction(api, _ref7) {
7857
+ var callPolkadotJsTxFunction = function callPolkadotJsTxFunction(api, _ref8) {
7371
7858
  var _api$tx$module;
7372
- var module = _ref7.module,
7373
- section = _ref7.section,
7374
- parameters = _ref7.parameters;
7859
+ var module = _ref8.module,
7860
+ section = _ref8.section,
7861
+ parameters = _ref8.parameters;
7375
7862
  return (_api$tx$module = api.tx[module])[section].apply(_api$tx$module, _toConsumableArray(parameters));
7376
7863
  };
7377
7864
  var determineRelayChain = function determineRelayChain(node) {
7378
7865
  return getRelayChainSymbol(node) === 'KSM' ? 'Kusama' : 'Polkadot';
7379
7866
  };
7380
7867
 
7381
- var getAssetBySymbolOrId = function getAssetBySymbolOrId(node, symbolOrId) {
7868
+ var getAssetBySymbolOrId = function getAssetBySymbolOrId(node, currency) {
7869
+ if (_typeof(currency) === 'object') {
7870
+ return null;
7871
+ }
7872
+ var currencyString = currency.toString();
7382
7873
  var _getAssetsObject = getAssetsObject(node),
7383
7874
  otherAssets = _getAssetsObject.otherAssets,
7384
7875
  nativeAssets = _getAssetsObject.nativeAssets,
@@ -7386,7 +7877,7 @@ var getAssetBySymbolOrId = function getAssetBySymbolOrId(node, symbolOrId) {
7386
7877
  var asset = [].concat(_toConsumableArray(otherAssets), _toConsumableArray(nativeAssets)).find(function (_ref) {
7387
7878
  var symbol = _ref.symbol,
7388
7879
  assetId = _ref.assetId;
7389
- return symbol === symbolOrId || assetId === symbolOrId;
7880
+ return symbol === currencyString || assetId === currencyString;
7390
7881
  });
7391
7882
  if (asset !== undefined) {
7392
7883
  var symbol = asset.symbol,
@@ -7396,7 +7887,7 @@ var getAssetBySymbolOrId = function getAssetBySymbolOrId(node, symbolOrId) {
7396
7887
  assetId: assetId
7397
7888
  };
7398
7889
  }
7399
- if (relayChainAssetSymbol === symbolOrId) return {
7890
+ if (relayChainAssetSymbol === currencyString) return {
7400
7891
  symbol: relayChainAssetSymbol
7401
7892
  };
7402
7893
  return null;
@@ -7427,7 +7918,7 @@ var Litentry$1 = "100000000000";
7427
7918
  var Moonbeam$1 = "0";
7428
7919
  var Parallel$1 = "100000000000";
7429
7920
  var AssetHubKusama$1 = "3333333";
7430
- var CoretimeKusama$1 = "3333333";
7921
+ var CoretimeKusama$1 = "33333333";
7431
7922
  var Encointer$1 = "33333333";
7432
7923
  var Altair$1 = "1000000000000";
7433
7924
  var Amplitude$1 = "1000000000";
@@ -7467,6 +7958,7 @@ var Collectives$1 = "1000000000";
7467
7958
  var Khala$1 = "10000000000";
7468
7959
  var Phala$1 = "10000000000";
7469
7960
  var Subsocial$1 = "100000000";
7961
+ var KiltSpiritnet$1 = "10000000000000";
7470
7962
  var existentialDeposits = {
7471
7963
  AssetHubPolkadot: AssetHubPolkadot$1,
7472
7964
  Acala: Acala$1,
@@ -7520,7 +8012,8 @@ var existentialDeposits = {
7520
8012
  Collectives: Collectives$1,
7521
8013
  Khala: Khala$1,
7522
8014
  Phala: Phala$1,
7523
- Subsocial: Subsocial$1
8015
+ Subsocial: Subsocial$1,
8016
+ KiltSpiritnet: KiltSpiritnet$1
7524
8017
  };
7525
8018
 
7526
8019
  var edMapJson = /*#__PURE__*/Object.freeze({
@@ -7553,6 +8046,7 @@ var edMapJson = /*#__PURE__*/Object.freeze({
7553
8046
  InvArchTinker: InvArchTinker$1,
7554
8047
  Karura: Karura$1,
7555
8048
  Khala: Khala$1,
8049
+ KiltSpiritnet: KiltSpiritnet$1,
7556
8050
  Kintsugi: Kintsugi$1,
7557
8051
  Kusama: Kusama,
7558
8052
  Litentry: Litentry$1,
@@ -7724,6 +8218,9 @@ var OpenChannelBuilder = /*#__PURE__*/function () {
7724
8218
  }, {
7725
8219
  key: "buildOptions",
7726
8220
  value: function buildOptions() {
8221
+ if (_typeof(this.to) === 'object') {
8222
+ throw new Error('Channels do not support multi-location destinations');
8223
+ }
7727
8224
  return {
7728
8225
  api: this.api,
7729
8226
  origin: this.from,
@@ -7847,6 +8344,12 @@ var ParaToParaBuilder = /*#__PURE__*/function () {
7847
8344
  this.paraIdTo = paraIdTo;
7848
8345
  }
7849
8346
  return _createClass(ParaToParaBuilder, [{
8347
+ key: "feeAsset",
8348
+ value: function feeAsset(_feeAsset) {
8349
+ this._feeAsset = _feeAsset;
8350
+ return this;
8351
+ }
8352
+ }, {
7850
8353
  key: "amount",
7851
8354
  value: function amount(_amount) {
7852
8355
  this._amount = _amount;
@@ -7875,6 +8378,7 @@ var ParaToParaBuilder = /*#__PURE__*/function () {
7875
8378
  address: this._address,
7876
8379
  destination: this.to,
7877
8380
  paraIdTo: this.paraIdTo,
8381
+ feeAsset: this._feeAsset,
7878
8382
  destApiForKeepAlive: this._destApi
7879
8383
  };
7880
8384
  }
@@ -7927,11 +8431,12 @@ var ParaToParaBuilder = /*#__PURE__*/function () {
7927
8431
  }();
7928
8432
 
7929
8433
  var ParaToRelayBuilder = /*#__PURE__*/function () {
7930
- function ParaToRelayBuilder(api, from, amount) {
8434
+ function ParaToRelayBuilder(api, from, amount, feeAsset) {
7931
8435
  _classCallCheck(this, ParaToRelayBuilder);
7932
8436
  this.api = api;
7933
8437
  this.from = from;
7934
8438
  this.amount = amount;
8439
+ this.feeAsset = feeAsset;
7935
8440
  }
7936
8441
  return _createClass(ParaToRelayBuilder, [{
7937
8442
  key: "address",
@@ -7955,6 +8460,7 @@ var ParaToRelayBuilder = /*#__PURE__*/function () {
7955
8460
  currency: currency,
7956
8461
  amount: this.amount,
7957
8462
  address: this._address,
8463
+ feeAsset: this.feeAsset,
7958
8464
  destApiForKeepAlive: this._destApi
7959
8465
  };
7960
8466
  }
@@ -8000,8 +8506,8 @@ var ParaToRelayBuilder = /*#__PURE__*/function () {
8000
8506
  }
8001
8507
  }], [{
8002
8508
  key: "create",
8003
- value: function create(api, from, amount) {
8004
- return new ParaToRelayBuilder(api, from, amount);
8509
+ value: function create(api, from, amount, feeAsset) {
8510
+ return new ParaToRelayBuilder(api, from, amount, feeAsset);
8005
8511
  }
8006
8512
  }]);
8007
8513
  }();
@@ -8052,10 +8558,16 @@ var FromGeneralBuilder = /*#__PURE__*/function () {
8052
8558
  value: function to(node, paraIdTo) {
8053
8559
  return new ToGeneralBuilder(this.api, this.from, node, paraIdTo);
8054
8560
  }
8561
+ }, {
8562
+ key: "feeAsset",
8563
+ value: function feeAsset(_feeAsset) {
8564
+ this._feeAsset = _feeAsset;
8565
+ return this;
8566
+ }
8055
8567
  }, {
8056
8568
  key: "amount",
8057
8569
  value: function amount(_amount) {
8058
- return ParaToRelayBuilder.create(this.api, this.from, _amount);
8570
+ return ParaToRelayBuilder.create(this.api, this.from, _amount, this._feeAsset);
8059
8571
  }
8060
8572
  }, {
8061
8573
  key: "closeChannel",
@@ -8236,71 +8748,98 @@ var checkKeepAlive = function checkKeepAlive(_ref) {
8236
8748
 
8237
8749
  var sendCommon = function sendCommon(options) {
8238
8750
  return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
8239
- var _a, api, origin, currencySymbolOrId, amount, address, destination, paraIdTo, destApiForKeepAlive, _options$serializedAp, serializedApiCallEnabled, asset, originRelayChainSymbol, destinationRelayChainSymbol, originNode, assetCheckEnabled, apiWithFallback, amountStr, currencyId;
8751
+ var _a, api, origin, currency, amount, address, destination, paraIdTo, destApiForKeepAlive, feeAsset, _options$serializedAp, serializedApiCallEnabled, asset, isMultiLocationDestination, isMultiLocationCurrency, originRelayChainSymbol, destinationRelayChainSymbol, originNode, assetCheckEnabled, apiWithFallback, amountStr, currencyStr, currencyId;
8240
8752
  return _regeneratorRuntime().wrap(function _callee$(_context) {
8241
8753
  while (1) switch (_context.prev = _context.next) {
8242
8754
  case 0:
8243
- api = options.api, origin = options.origin, currencySymbolOrId = options.currency, amount = options.amount, address = options.address, destination = options.destination, paraIdTo = options.paraIdTo, destApiForKeepAlive = options.destApiForKeepAlive, _options$serializedAp = options.serializedApiCallEnabled, serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
8244
- if (!(typeof currencySymbolOrId === 'number' && currencySymbolOrId > Number.MAX_SAFE_INTEGER)) {
8755
+ api = options.api, origin = options.origin, currency = options.currency, amount = options.amount, address = options.address, destination = options.destination, paraIdTo = options.paraIdTo, destApiForKeepAlive = options.destApiForKeepAlive, feeAsset = options.feeAsset, _options$serializedAp = options.serializedApiCallEnabled, serializedApiCallEnabled = _options$serializedAp === void 0 ? false : _options$serializedAp;
8756
+ if (!(typeof currency === 'number' && currency > Number.MAX_SAFE_INTEGER)) {
8245
8757
  _context.next = 3;
8246
8758
  break;
8247
8759
  }
8248
8760
  throw new InvalidCurrencyError('The provided asset ID is larger than the maximum safe integer value. Please provide it as a string.');
8249
8761
  case 3:
8250
- asset = getAssetBySymbolOrId(origin, currencySymbolOrId.toString());
8251
- if (!(destination !== undefined)) {
8252
- _context.next = 9;
8762
+ asset = getAssetBySymbolOrId(origin, currency);
8763
+ isMultiLocationDestination = _typeof(destination) === 'object';
8764
+ isMultiLocationCurrency = _typeof(currency) === 'object';
8765
+ if (!(destination !== undefined && !isMultiLocationDestination)) {
8766
+ _context.next = 11;
8253
8767
  break;
8254
8768
  }
8255
8769
  originRelayChainSymbol = getRelayChainSymbol(origin);
8256
8770
  destinationRelayChainSymbol = getRelayChainSymbol(destination);
8257
8771
  if (!(originRelayChainSymbol !== destinationRelayChainSymbol)) {
8258
- _context.next = 9;
8772
+ _context.next = 11;
8259
8773
  break;
8260
8774
  }
8261
8775
  throw new IncompatibleNodesError();
8262
- case 9:
8776
+ case 11:
8263
8777
  originNode = getNode(origin);
8264
- assetCheckEnabled = destination === 'AssetHubKusama' || destination === 'AssetHubPolkadot' ? false : originNode.assetCheckEnabled;
8778
+ assetCheckEnabled = destination === 'AssetHubKusama' || destination === 'AssetHubPolkadot' || isMultiLocationCurrency ? false : originNode.assetCheckEnabled;
8265
8779
  if (!(asset === null && assetCheckEnabled)) {
8266
- _context.next = 13;
8267
- break;
8268
- }
8269
- throw new InvalidCurrencyError("Origin node ".concat(origin, " does not support currency or currencyId ").concat(currencySymbolOrId, "."));
8270
- case 13:
8271
- if (!(destination !== undefined && (asset === null || asset === void 0 ? void 0 : asset.symbol) !== undefined && assetCheckEnabled && !hasSupportForAsset(destination, asset.symbol))) {
8272
8780
  _context.next = 15;
8273
8781
  break;
8274
8782
  }
8275
- throw new InvalidCurrencyError("Destination node ".concat(destination, " does not support currency or currencyId ").concat(currencySymbolOrId, "."));
8783
+ throw new InvalidCurrencyError("Origin node ".concat(origin, " does not support currency or currencyId ").concat(JSON.stringify(currency), "."));
8276
8784
  case 15:
8785
+ if (!(destination !== undefined && !isMultiLocationDestination && (asset === null || asset === void 0 ? void 0 : asset.symbol) !== undefined && assetCheckEnabled && !hasSupportForAsset(destination, asset.symbol))) {
8786
+ _context.next = 17;
8787
+ break;
8788
+ }
8789
+ throw new InvalidCurrencyError("Destination node ".concat(destination, " does not support currency or currencyId ").concat(JSON.stringify(currency), "."));
8790
+ case 17:
8277
8791
  if (!(api !== null && api !== void 0)) {
8278
- _context.next = 19;
8792
+ _context.next = 21;
8279
8793
  break;
8280
8794
  }
8281
8795
  _context.t0 = api;
8282
- _context.next = 22;
8796
+ _context.next = 24;
8283
8797
  break;
8284
- case 19:
8285
- _context.next = 21;
8286
- return createApiInstanceForNode(origin);
8287
8798
  case 21:
8799
+ _context.next = 23;
8800
+ return createApiInstanceForNode(origin);
8801
+ case 23:
8288
8802
  _context.t0 = _context.sent;
8289
- case 22:
8803
+ case 24:
8290
8804
  apiWithFallback = _context.t0;
8291
8805
  amountStr = amount.toString();
8292
- _context.next = 26;
8806
+ if (!(_typeof(currency) === 'object')) {
8807
+ _context.next = 30;
8808
+ break;
8809
+ }
8810
+ console.warn('Keep alive check is not supported when using MultiLocation as currency.');
8811
+ _context.next = 40;
8812
+ break;
8813
+ case 30:
8814
+ if (!(_typeof(address) === 'object')) {
8815
+ _context.next = 34;
8816
+ break;
8817
+ }
8818
+ console.warn('Keep alive check is not supported when using MultiLocation as address.');
8819
+ _context.next = 40;
8820
+ break;
8821
+ case 34:
8822
+ if (!(_typeof(destination) === 'object')) {
8823
+ _context.next = 38;
8824
+ break;
8825
+ }
8826
+ console.warn('Keep alive check is not supported when using MultiLocation as destination.');
8827
+ _context.next = 40;
8828
+ break;
8829
+ case 38:
8830
+ _context.next = 40;
8293
8831
  return checkKeepAlive({
8294
8832
  originApi: apiWithFallback,
8295
8833
  address: address,
8296
8834
  amount: amountStr,
8297
8835
  originNode: origin,
8298
8836
  destApi: destApiForKeepAlive,
8299
- currencySymbol: (_a = asset === null || asset === void 0 ? void 0 : asset.symbol) !== null && _a !== void 0 ? _a : currencySymbolOrId.toString(),
8837
+ currencySymbol: (_a = asset === null || asset === void 0 ? void 0 : asset.symbol) !== null && _a !== void 0 ? _a : currency.toString(),
8300
8838
  destNode: destination
8301
8839
  });
8302
- case 26:
8303
- currencyId = assetCheckEnabled ? asset === null || asset === void 0 ? void 0 : asset.assetId : currencySymbolOrId.toString();
8840
+ case 40:
8841
+ currencyStr = _typeof(currency) === 'object' ? undefined : currency.toString();
8842
+ currencyId = assetCheckEnabled ? asset === null || asset === void 0 ? void 0 : asset.assetId : currencyStr;
8304
8843
  return _context.abrupt("return", originNode.transfer({
8305
8844
  api: apiWithFallback,
8306
8845
  currencySymbol: asset === null || asset === void 0 ? void 0 : asset.symbol,
@@ -8309,9 +8848,11 @@ var sendCommon = function sendCommon(options) {
8309
8848
  address: address,
8310
8849
  destination: destination,
8311
8850
  paraIdTo: paraIdTo,
8851
+ overridedCurrencyMultiLocation: _typeof(currency) === 'object' ? currency : undefined,
8852
+ feeAsset: feeAsset,
8312
8853
  serializedApiCallEnabled: serializedApiCallEnabled
8313
8854
  }));
8314
- case 28:
8855
+ case 43:
8315
8856
  case "end":
8316
8857
  return _context.stop();
8317
8858
  }
@@ -8354,39 +8895,61 @@ var send = function send(options) {
8354
8895
  };
8355
8896
  var transferRelayToParaCommon = function transferRelayToParaCommon(options) {
8356
8897
  return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
8357
- var api, destination, amount, address, paraIdTo, destApiForKeepAlive, _options$serializedAp2, serializedApiCallEnabled, currencySymbol, relayNode, apiWithFallback, amountStr, serializedApiCall;
8898
+ var api, destination, amount, address, paraIdTo, destApiForKeepAlive, _options$serializedAp2, serializedApiCallEnabled, isMultiLocationDestination, isAddressMultiLocation, apiWithFallback, amountStr, serializedApiCall;
8358
8899
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
8359
8900
  while (1) switch (_context4.prev = _context4.next) {
8360
8901
  case 0:
8361
8902
  api = options.api, destination = options.destination, amount = options.amount, address = options.address, paraIdTo = options.paraIdTo, destApiForKeepAlive = options.destApiForKeepAlive, _options$serializedAp2 = options.serializedApiCallEnabled, serializedApiCallEnabled = _options$serializedAp2 === void 0 ? false : _options$serializedAp2;
8362
- currencySymbol = getRelayChainSymbol(destination);
8363
- relayNode = determineRelayChain(destination);
8903
+ isMultiLocationDestination = _typeof(destination) === 'object';
8904
+ isAddressMultiLocation = _typeof(address) === 'object';
8905
+ if (!(api === undefined && isMultiLocationDestination)) {
8906
+ _context4.next = 5;
8907
+ break;
8908
+ }
8909
+ throw new Error('API is required when using MultiLocation as destination.');
8910
+ case 5:
8364
8911
  if (!(api !== null && api !== void 0)) {
8365
- _context4.next = 7;
8912
+ _context4.next = 9;
8366
8913
  break;
8367
8914
  }
8368
8915
  _context4.t0 = api;
8369
- _context4.next = 10;
8916
+ _context4.next = 12;
8370
8917
  break;
8371
- case 7:
8372
- _context4.next = 9;
8373
- return createApiInstanceForNode(relayNode);
8374
8918
  case 9:
8919
+ _context4.next = 11;
8920
+ return createApiInstanceForNode(determineRelayChain(destination));
8921
+ case 11:
8375
8922
  _context4.t0 = _context4.sent;
8376
- case 10:
8923
+ case 12:
8377
8924
  apiWithFallback = _context4.t0;
8378
8925
  amountStr = amount.toString();
8379
- _context4.next = 14;
8926
+ if (!isMultiLocationDestination) {
8927
+ _context4.next = 18;
8928
+ break;
8929
+ }
8930
+ console.warn('Keep alive check is not supported when using MultiLocation as destination.');
8931
+ _context4.next = 24;
8932
+ break;
8933
+ case 18:
8934
+ if (!isAddressMultiLocation) {
8935
+ _context4.next = 22;
8936
+ break;
8937
+ }
8938
+ console.warn('Keep alive check is not supported when using MultiLocation as address.');
8939
+ _context4.next = 24;
8940
+ break;
8941
+ case 22:
8942
+ _context4.next = 24;
8380
8943
  return checkKeepAlive({
8381
8944
  originApi: apiWithFallback,
8382
8945
  address: address,
8383
8946
  amount: amountStr,
8384
8947
  destApi: destApiForKeepAlive,
8385
- currencySymbol: currencySymbol,
8948
+ currencySymbol: getRelayChainSymbol(destination),
8386
8949
  destNode: destination
8387
8950
  });
8388
- case 14:
8389
- serializedApiCall = getNode(destination).transferRelayToPara({
8951
+ case 24:
8952
+ serializedApiCall = getNode(isMultiLocationDestination ? resolveTNodeFromMultiLocation(destination) : destination).transferRelayToPara({
8390
8953
  api: apiWithFallback,
8391
8954
  destination: destination,
8392
8955
  address: address,
@@ -8395,13 +8958,13 @@ var transferRelayToParaCommon = function transferRelayToParaCommon(options) {
8395
8958
  destApiForKeepAlive: destApiForKeepAlive
8396
8959
  });
8397
8960
  if (!serializedApiCallEnabled) {
8398
- _context4.next = 17;
8961
+ _context4.next = 27;
8399
8962
  break;
8400
8963
  }
8401
8964
  return _context4.abrupt("return", serializedApiCall);
8402
- case 17:
8965
+ case 27:
8403
8966
  return _context4.abrupt("return", callPolkadotJsTxFunction(apiWithFallback, serializedApiCall));
8404
- case 18:
8967
+ case 28:
8405
8968
  case "end":
8406
8969
  return _context4.stop();
8407
8970
  }
@@ -8800,6 +9363,12 @@ var Subsocial = {
8800
9363
  "PolkadotXcm"
8801
9364
  ]
8802
9365
  };
9366
+ var KiltSpiritnet = {
9367
+ defaultPallet: "PolkadotXcm",
9368
+ supportedPallets: [
9369
+ "PolkadotXcm"
9370
+ ]
9371
+ };
8803
9372
  var pallets = {
8804
9373
  AssetHubPolkadot: AssetHubPolkadot,
8805
9374
  Acala: Acala,
@@ -8851,7 +9420,8 @@ var pallets = {
8851
9420
  Collectives: Collectives,
8852
9421
  Khala: Khala,
8853
9422
  Phala: Phala,
8854
- Subsocial: Subsocial
9423
+ Subsocial: Subsocial,
9424
+ KiltSpiritnet: KiltSpiritnet
8855
9425
  };
8856
9426
 
8857
9427
  var palletsMapJson = /*#__PURE__*/Object.freeze({
@@ -8884,6 +9454,7 @@ var palletsMapJson = /*#__PURE__*/Object.freeze({
8884
9454
  InvArchTinker: InvArchTinker,
8885
9455
  Karura: Karura,
8886
9456
  Khala: Khala,
9457
+ KiltSpiritnet: KiltSpiritnet,
8887
9458
  Kintsugi: Kintsugi,
8888
9459
  Litentry: Litentry,
8889
9460
  Litmus: Litmus,