@paraspell/sdk-core 12.1.0 → 12.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.d.ts CHANGED
@@ -1982,14 +1982,6 @@ declare class Quartz<TApi, TRes> extends Parachain<TApi, TRes> implements IXToke
1982
1982
  transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1983
1983
  }
1984
1984
 
1985
- declare class RobonomicsKusama<TApi, TRes> extends Parachain<TApi, TRes> implements IPolkadotXCMTransfer {
1986
- constructor();
1987
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1988
- transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
1989
- isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
1990
- isReceivingTempDisabled(_scenario: TScenario): boolean;
1991
- }
1992
-
1993
1985
  declare class RobonomicsPolkadot<TApi, TRes> extends Parachain<TApi, TRes> implements IPolkadotXCMTransfer {
1994
1986
  constructor();
1995
1987
  transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
@@ -2078,7 +2070,6 @@ declare const chains: <TApi, TRes>() => {
2078
2070
  Moonriver: Moonriver<TApi, TRes>;
2079
2071
  Laos: Laos<TApi, TRes>;
2080
2072
  Quartz: Quartz<TApi, TRes>;
2081
- RobonomicsKusama: RobonomicsKusama<TApi, TRes>;
2082
2073
  PeopleKusama: PeopleKusama<TApi, TRes>;
2083
2074
  Shiden: Shiden<TApi, TRes>;
2084
2075
  Zeitgeist: Zeitgeist<TApi, TRes>;
@@ -2280,7 +2271,7 @@ declare const reverseTransformLocation: (location: TLocation) => TLocation;
2280
2271
 
2281
2272
  declare const normalizeAmount: (amount: bigint) => bigint;
2282
2273
 
2283
- declare const resolveDestChain: (originChain: TSubstrateChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "Darwinia" | "EnergyWebX" | "Hydration" | "Interlay" | "Heima" | "Jamton" | "Moonbeam" | "CoretimePolkadot" | "Collectives" | "Crust" | "Manta" | "Nodle" | "NeuroWeb" | "Pendulum" | "Phala" | "KiltSpiritnet" | "Curio" | "Mythos" | "Peaq" | "RobonomicsPolkadot" | "PeoplePolkadot" | "Unique" | "Xode" | "AssetHubKusama" | "BridgeHubKusama" | "Karura" | "Kintsugi" | "Moonriver" | "CoretimeKusama" | "Encointer" | "Altair" | "Amplitude" | "Basilisk" | "BifrostKusama" | "CrustShadow" | "Crab" | "Laos" | "Quartz" | "RobonomicsKusama" | "PeopleKusama" | "Shiden" | "Zeitgeist" | "AssetHubWestend" | "BridgeHubWestend" | "CollectivesWestend" | "CoretimeWestend" | "Penpal" | "PeopleWestend" | "AjunaPaseo" | "AssetHubPaseo" | "BifrostPaseo" | "BridgeHubPaseo" | "CoretimePaseo" | "EnergyWebXPaseo" | "HeimaPaseo" | "HydrationPaseo" | "KiltPaseo" | "LaosPaseo" | "NeuroWebPaseo" | "PAssetHub" | "PeoplePaseo" | "ZeitgeistPaseo" | undefined;
2274
+ declare const resolveDestChain: (originChain: TSubstrateChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "Darwinia" | "EnergyWebX" | "Hydration" | "Interlay" | "Heima" | "Jamton" | "Moonbeam" | "CoretimePolkadot" | "Collectives" | "Crust" | "Manta" | "Nodle" | "NeuroWeb" | "Pendulum" | "Phala" | "KiltSpiritnet" | "Curio" | "Mythos" | "Peaq" | "RobonomicsPolkadot" | "PeoplePolkadot" | "Unique" | "Xode" | "AssetHubKusama" | "BridgeHubKusama" | "Karura" | "Kintsugi" | "Moonriver" | "CoretimeKusama" | "Encointer" | "Altair" | "Amplitude" | "Basilisk" | "BifrostKusama" | "CrustShadow" | "Crab" | "Laos" | "Quartz" | "PeopleKusama" | "Shiden" | "Zeitgeist" | "AssetHubWestend" | "BridgeHubWestend" | "CollectivesWestend" | "CoretimeWestend" | "Penpal" | "PeopleWestend" | "AjunaPaseo" | "AssetHubPaseo" | "BifrostPaseo" | "BridgeHubPaseo" | "CoretimePaseo" | "EnergyWebXPaseo" | "HeimaPaseo" | "HydrationPaseo" | "KiltPaseo" | "LaosPaseo" | "NeuroWebPaseo" | "PAssetHub" | "PeoplePaseo" | "ZeitgeistPaseo" | undefined;
2284
2275
 
2285
2276
  declare const resolveParaId: (paraId: number | undefined, destination: TDestination) => number | undefined;
2286
2277
 
package/dist/index.mjs CHANGED
@@ -1205,6 +1205,10 @@ var AssetHubPolkadot$1 = {
1205
1205
  name: "Parity",
1206
1206
  endpoint: "wss://polkadot-asset-hub-rpc.polkadot.io"
1207
1207
  },
1208
+ {
1209
+ name: "Permanence DAO EU",
1210
+ endpoint: "wss://asset-hub-polkadot.rpc.permanence.io"
1211
+ },
1208
1212
  {
1209
1213
  name: "RadiumBlock",
1210
1214
  endpoint: "wss://statemint.public.curie.radiumblock.co/ws"
@@ -1400,10 +1404,6 @@ var Hydration$1 = {
1400
1404
  info: "hydradx",
1401
1405
  paraId: 2034,
1402
1406
  providers: [
1403
- {
1404
- name: "Dwellir",
1405
- endpoint: "wss://hydration-rpc.n.dwellir.com"
1406
- },
1407
1407
  {
1408
1408
  name: "Helikon",
1409
1409
  endpoint: "wss://rpc.helikon.io/hydradx"
@@ -1666,10 +1666,6 @@ var KiltSpiritnet$1 = {
1666
1666
  {
1667
1667
  name: "IBP2",
1668
1668
  endpoint: "wss://kilt.dotters.network"
1669
- },
1670
- {
1671
- name: "KILT Foundation",
1672
- endpoint: "wss://spiritnet.kilt.io/"
1673
1669
  }
1674
1670
  ]
1675
1671
  };
@@ -1689,18 +1685,6 @@ var Mythos$1 = {
1689
1685
  info: "mythos",
1690
1686
  paraId: 3369,
1691
1687
  providers: [
1692
- {
1693
- name: "Helikon",
1694
- endpoint: "wss://rpc.helikon.io/mythos"
1695
- },
1696
- {
1697
- name: "IBP1",
1698
- endpoint: "wss://mythos.ibp.network"
1699
- },
1700
- {
1701
- name: "IBP2",
1702
- endpoint: "wss://mythos.dotters.network"
1703
- },
1704
1688
  {
1705
1689
  name: "parity",
1706
1690
  endpoint: "wss://polkadot-mythos-rpc.polkadot.io"
@@ -2123,17 +2107,6 @@ var Quartz$1 = {
2123
2107
  }
2124
2108
  ]
2125
2109
  };
2126
- var RobonomicsKusama$1 = {
2127
- name: "Robonomics",
2128
- info: "robonomics",
2129
- paraId: 2048,
2130
- providers: [
2131
- {
2132
- name: "Airalab",
2133
- endpoint: "wss://kusama.rpc.robonomics.network/"
2134
- }
2135
- ]
2136
- };
2137
2110
  var PeopleKusama$1 = {
2138
2111
  name: "People",
2139
2112
  info: "kusamaPeople",
@@ -2544,10 +2517,6 @@ var Polkadot = {
2544
2517
  name: "OnFinality",
2545
2518
  endpoint: "wss://polkadot.api.onfinality.io/public-ws"
2546
2519
  },
2547
- {
2548
- name: "Permanence DAO EU",
2549
- endpoint: "wss://polkadot.rpc.permanence.io"
2550
- },
2551
2520
  {
2552
2521
  name: "RadiumBlock",
2553
2522
  endpoint: "wss://polkadot.public.curie.radiumblock.co/ws"
@@ -2717,7 +2686,6 @@ var configs = {
2717
2686
  Crab: Crab$1,
2718
2687
  Laos: Laos$1,
2719
2688
  Quartz: Quartz$1,
2720
- RobonomicsKusama: RobonomicsKusama$1,
2721
2689
  PeopleKusama: PeopleKusama$1,
2722
2690
  Shiden: Shiden$1,
2723
2691
  Zeitgeist: Zeitgeist$1,
@@ -7580,7 +7548,7 @@ var buildHopInfo = /*#__PURE__*/function () {
7580
7548
 
7581
7549
  var getTransferInfo = /*#__PURE__*/function () {
7582
7550
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(_ref) {
7583
- var api, buildTx, origin, destination, senderAddress, ahAddress, address, currency, feeAsset, resolvedFeeAsset, originAsset, amount, originBalanceFee, originBalance, edOrigin, _yield$getXcmFeeInter, _yield$getXcmFeeInter2, originFee, originFeeAsset, destFeeDetail, hops, isFeeAssetAh, originBalanceAfter, originBalanceFeeAfter, originBalanceNativeSufficient, originBalanceSufficient, builtHops, totalHopFee, bridgeHop, destinationInfo, _t;
7551
+ var api, buildTx, origin, destination, senderAddress, ahAddress, address, currency, feeAsset, resolvedFeeAsset, originAsset, amount, originBalance, edOrigin, _yield$getXcmFeeInter, _yield$getXcmFeeInter2, originFee, originFeeAsset, destFeeDetail, hops, originBalanceFee, isFeeAssetAh, originBalanceAfter, originBalanceFeeAfter, originBalanceNativeSufficient, originBalanceSufficient, builtHops, totalHopFee, bridgeHop, destinationInfo;
7584
7552
  return _regenerator().w(function (_context2) {
7585
7553
  while (1) switch (_context2.p = _context2.n) {
7586
7554
  case 0:
@@ -7599,43 +7567,17 @@ var getTransferInfo = /*#__PURE__*/function () {
7599
7567
  _context2.p = 3;
7600
7568
  originAsset = findAssetInfoOrThrow(origin, currency, destination);
7601
7569
  amount = abstractDecimals(currency.amount, originAsset.decimals, api);
7602
- if (!resolvedFeeAsset) {
7603
- _context2.n = 5;
7604
- break;
7605
- }
7606
7570
  _context2.n = 4;
7607
- return getAssetBalanceInternal({
7608
- api: api,
7609
- address: senderAddress,
7610
- chain: origin,
7611
- asset: resolvedFeeAsset
7612
- });
7613
- case 4:
7614
- _t = _context2.v;
7615
- _context2.n = 7;
7616
- break;
7617
- case 5:
7618
- _context2.n = 6;
7619
- return getBalanceInternal({
7620
- api: api,
7621
- address: senderAddress,
7622
- chain: origin
7623
- });
7624
- case 6:
7625
- _t = _context2.v;
7626
- case 7:
7627
- originBalanceFee = _t;
7628
- _context2.n = 8;
7629
7571
  return getAssetBalanceInternal({
7630
7572
  api: api,
7631
7573
  address: senderAddress,
7632
7574
  chain: origin,
7633
7575
  asset: originAsset
7634
7576
  });
7635
- case 8:
7577
+ case 4:
7636
7578
  originBalance = _context2.v;
7637
7579
  edOrigin = getExistentialDepositOrThrow(origin, currency);
7638
- _context2.n = 9;
7580
+ _context2.n = 5;
7639
7581
  return getXcmFee({
7640
7582
  api: api,
7641
7583
  buildTx: buildTx,
@@ -7647,13 +7589,22 @@ var getTransferInfo = /*#__PURE__*/function () {
7647
7589
  feeAsset: feeAsset,
7648
7590
  disableFallback: false
7649
7591
  });
7650
- case 9:
7592
+ case 5:
7651
7593
  _yield$getXcmFeeInter = _context2.v;
7652
7594
  _yield$getXcmFeeInter2 = _yield$getXcmFeeInter.origin;
7653
7595
  originFee = _yield$getXcmFeeInter2.fee;
7654
7596
  originFeeAsset = _yield$getXcmFeeInter2.asset;
7655
7597
  destFeeDetail = _yield$getXcmFeeInter.destination;
7656
7598
  hops = _yield$getXcmFeeInter.hops;
7599
+ _context2.n = 6;
7600
+ return getAssetBalanceInternal({
7601
+ api: api,
7602
+ address: senderAddress,
7603
+ chain: origin,
7604
+ asset: originFeeAsset
7605
+ });
7606
+ case 6:
7607
+ originBalanceFee = _context2.v;
7657
7608
  isFeeAssetAh = origin === 'AssetHubPolkadot' && resolvedFeeAsset && isAssetEqual(resolvedFeeAsset, originAsset);
7658
7609
  originBalanceAfter = originBalance - amount;
7659
7610
  originBalanceFeeAfter = isFeeAssetAh ? originBalanceFee - amount : originBalanceFee - originFee;
@@ -7661,10 +7612,10 @@ var getTransferInfo = /*#__PURE__*/function () {
7661
7612
  originBalanceSufficient = originBalanceAfter >= edOrigin;
7662
7613
  builtHops = [];
7663
7614
  if (!(hops && hops.length > 0)) {
7664
- _context2.n = 11;
7615
+ _context2.n = 8;
7665
7616
  break;
7666
7617
  }
7667
- _context2.n = 10;
7618
+ _context2.n = 7;
7668
7619
  return Promise.all(hops.map(/*#__PURE__*/function () {
7669
7620
  var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(hop) {
7670
7621
  var result;
@@ -7695,16 +7646,16 @@ var getTransferInfo = /*#__PURE__*/function () {
7695
7646
  return _ref3.apply(this, arguments);
7696
7647
  };
7697
7648
  }()));
7698
- case 10:
7649
+ case 7:
7699
7650
  builtHops = _context2.v;
7700
- case 11:
7651
+ case 8:
7701
7652
  totalHopFee = hops.reduce(function (acc, hop) {
7702
7653
  return isAssetXcEqual(hop.result.asset, originAsset) ? acc + hop.result.fee : acc;
7703
7654
  }, 0n);
7704
7655
  bridgeHop = hops.find(function (hop) {
7705
7656
  return hop.chain.startsWith('BridgeHub');
7706
7657
  });
7707
- _context2.n = 12;
7658
+ _context2.n = 9;
7708
7659
  return buildDestInfo({
7709
7660
  api: api,
7710
7661
  origin: origin,
@@ -7719,7 +7670,7 @@ var getTransferInfo = /*#__PURE__*/function () {
7719
7670
  totalHopFee: totalHopFee,
7720
7671
  bridgeFee: bridgeHop === null || bridgeHop === void 0 ? void 0 : bridgeHop.result.fee
7721
7672
  });
7722
- case 12:
7673
+ case 9:
7723
7674
  destinationInfo = _context2.v;
7724
7675
  return _context2.a(2, {
7725
7676
  chain: {
@@ -7745,17 +7696,17 @@ var getTransferInfo = /*#__PURE__*/function () {
7745
7696
  hops: builtHops,
7746
7697
  destination: destinationInfo
7747
7698
  });
7748
- case 13:
7749
- _context2.p = 13;
7699
+ case 10:
7700
+ _context2.p = 10;
7750
7701
  api.setDisconnectAllowed(true);
7751
- _context2.n = 14;
7702
+ _context2.n = 11;
7752
7703
  return api.disconnect();
7753
- case 14:
7754
- return _context2.f(13);
7755
- case 15:
7704
+ case 11:
7705
+ return _context2.f(10);
7706
+ case 12:
7756
7707
  return _context2.a(2);
7757
7708
  }
7758
- }, _callee2, null, [[3,, 13, 15]]);
7709
+ }, _callee2, null, [[3,, 10, 12]]);
7759
7710
  }));
7760
7711
  return function getTransferInfo(_x) {
7761
7712
  return _ref2.apply(this, arguments);
@@ -12873,35 +12824,6 @@ var Quartz = /*#__PURE__*/function (_Parachain) {
12873
12824
  }(Parachain);
12874
12825
  Quartz.NATIVE_ASSET_ID = 0;
12875
12826
 
12876
- var RobonomicsKusama = /*#__PURE__*/function (_Parachain) {
12877
- function RobonomicsKusama() {
12878
- _classCallCheck(this, RobonomicsKusama);
12879
- return _callSuper(this, RobonomicsKusama, ['RobonomicsKusama', 'robonomics', 'Kusama', Version.V3]);
12880
- }
12881
- _inherits(RobonomicsKusama, _Parachain);
12882
- return _createClass(RobonomicsKusama, [{
12883
- key: "transferPolkadotXCM",
12884
- value: function transferPolkadotXCM(input) {
12885
- return transferPolkadotXcm(input, 'limited_reserve_transfer_assets', 'Unlimited');
12886
- }
12887
- }, {
12888
- key: "transferLocalNonNativeAsset",
12889
- value: function transferLocalNonNativeAsset(options) {
12890
- return getChain('RobonomicsPolkadot').transferLocalNonNativeAsset(options);
12891
- }
12892
- }, {
12893
- key: "isSendingTempDisabled",
12894
- value: function isSendingTempDisabled(_options) {
12895
- return true;
12896
- }
12897
- }, {
12898
- key: "isReceivingTempDisabled",
12899
- value: function isReceivingTempDisabled(_scenario) {
12900
- return true;
12901
- }
12902
- }]);
12903
- }(Parachain);
12904
-
12905
12827
  var RobonomicsPolkadot = /*#__PURE__*/function (_Parachain) {
12906
12828
  function RobonomicsPolkadot() {
12907
12829
  _classCallCheck(this, RobonomicsPolkadot);
@@ -13204,7 +13126,6 @@ var chains = function chains() {
13204
13126
  Moonriver: new Moonriver(),
13205
13127
  Laos: new Laos(),
13206
13128
  Quartz: new Quartz(),
13207
- RobonomicsKusama: new RobonomicsKusama(),
13208
13129
  PeopleKusama: new PeopleKusama(),
13209
13130
  Shiden: new Shiden(),
13210
13131
  Zeitgeist: new Zeitgeist(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk-core",
3
- "version": "12.1.0",
3
+ "version": "12.1.2",
4
4
  "description": "SDK core for ParaSpell XCM/XCMP tool for developers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,24 +25,24 @@
25
25
  "dependencies": {
26
26
  "@noble/hashes": "^2.0.1",
27
27
  "@scure/base": "^2.0.0",
28
- "viem": "^2.40.3",
29
- "@paraspell/assets": "12.1.0",
30
- "@paraspell/pallets": "12.1.0",
31
- "@paraspell/sdk-common": "12.1.0"
28
+ "viem": "2.40.3",
29
+ "@paraspell/assets": "12.1.2",
30
+ "@paraspell/pallets": "12.1.2",
31
+ "@paraspell/sdk-common": "12.1.2"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@babel/plugin-syntax-import-attributes": "^7.27.1",
35
35
  "@babel/preset-env": "^7.28.5",
36
36
  "@codecov/rollup-plugin": "^1.9.1",
37
- "@polkadot/api": "^16.5.3",
38
- "@polkadot/types": "^16.5.3",
37
+ "@polkadot/api": "^16.5.4",
38
+ "@polkadot/types": "^16.5.4",
39
39
  "@rollup/plugin-babel": "^6.1.0",
40
40
  "@rollup/plugin-json": "^6.1.0",
41
41
  "@rollup/plugin-typescript": "^12.3.0",
42
- "@vitest/coverage-v8": "^4.0.14",
42
+ "@vitest/coverage-v8": "^4.0.16",
43
43
  "axios": "^1.13.2",
44
44
  "dotenv": "^17.2.3",
45
- "rollup": "^4.53.3",
45
+ "rollup": "^4.54.0",
46
46
  "rollup-plugin-dts": "^6.3.0",
47
47
  "ts-morph": "^27.0.2",
48
48
  "ts-node": "^10.9.2",