@paraspell/sdk-core 12.1.0 → 12.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.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"
@@ -1666,10 +1670,6 @@ var KiltSpiritnet$1 = {
1666
1670
  {
1667
1671
  name: "IBP2",
1668
1672
  endpoint: "wss://kilt.dotters.network"
1669
- },
1670
- {
1671
- name: "KILT Foundation",
1672
- endpoint: "wss://spiritnet.kilt.io/"
1673
1673
  }
1674
1674
  ]
1675
1675
  };
@@ -1689,18 +1689,6 @@ var Mythos$1 = {
1689
1689
  info: "mythos",
1690
1690
  paraId: 3369,
1691
1691
  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
1692
  {
1705
1693
  name: "parity",
1706
1694
  endpoint: "wss://polkadot-mythos-rpc.polkadot.io"
@@ -2123,17 +2111,6 @@ var Quartz$1 = {
2123
2111
  }
2124
2112
  ]
2125
2113
  };
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
2114
  var PeopleKusama$1 = {
2138
2115
  name: "People",
2139
2116
  info: "kusamaPeople",
@@ -2544,10 +2521,6 @@ var Polkadot = {
2544
2521
  name: "OnFinality",
2545
2522
  endpoint: "wss://polkadot.api.onfinality.io/public-ws"
2546
2523
  },
2547
- {
2548
- name: "Permanence DAO EU",
2549
- endpoint: "wss://polkadot.rpc.permanence.io"
2550
- },
2551
2524
  {
2552
2525
  name: "RadiumBlock",
2553
2526
  endpoint: "wss://polkadot.public.curie.radiumblock.co/ws"
@@ -2717,7 +2690,6 @@ var configs = {
2717
2690
  Crab: Crab$1,
2718
2691
  Laos: Laos$1,
2719
2692
  Quartz: Quartz$1,
2720
- RobonomicsKusama: RobonomicsKusama$1,
2721
2693
  PeopleKusama: PeopleKusama$1,
2722
2694
  Shiden: Shiden$1,
2723
2695
  Zeitgeist: Zeitgeist$1,
@@ -7580,7 +7552,7 @@ var buildHopInfo = /*#__PURE__*/function () {
7580
7552
 
7581
7553
  var getTransferInfo = /*#__PURE__*/function () {
7582
7554
  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;
7555
+ 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
7556
  return _regenerator().w(function (_context2) {
7585
7557
  while (1) switch (_context2.p = _context2.n) {
7586
7558
  case 0:
@@ -7599,43 +7571,17 @@ var getTransferInfo = /*#__PURE__*/function () {
7599
7571
  _context2.p = 3;
7600
7572
  originAsset = findAssetInfoOrThrow(origin, currency, destination);
7601
7573
  amount = abstractDecimals(currency.amount, originAsset.decimals, api);
7602
- if (!resolvedFeeAsset) {
7603
- _context2.n = 5;
7604
- break;
7605
- }
7606
7574
  _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
7575
  return getAssetBalanceInternal({
7630
7576
  api: api,
7631
7577
  address: senderAddress,
7632
7578
  chain: origin,
7633
7579
  asset: originAsset
7634
7580
  });
7635
- case 8:
7581
+ case 4:
7636
7582
  originBalance = _context2.v;
7637
7583
  edOrigin = getExistentialDepositOrThrow(origin, currency);
7638
- _context2.n = 9;
7584
+ _context2.n = 5;
7639
7585
  return getXcmFee({
7640
7586
  api: api,
7641
7587
  buildTx: buildTx,
@@ -7647,13 +7593,22 @@ var getTransferInfo = /*#__PURE__*/function () {
7647
7593
  feeAsset: feeAsset,
7648
7594
  disableFallback: false
7649
7595
  });
7650
- case 9:
7596
+ case 5:
7651
7597
  _yield$getXcmFeeInter = _context2.v;
7652
7598
  _yield$getXcmFeeInter2 = _yield$getXcmFeeInter.origin;
7653
7599
  originFee = _yield$getXcmFeeInter2.fee;
7654
7600
  originFeeAsset = _yield$getXcmFeeInter2.asset;
7655
7601
  destFeeDetail = _yield$getXcmFeeInter.destination;
7656
7602
  hops = _yield$getXcmFeeInter.hops;
7603
+ _context2.n = 6;
7604
+ return getAssetBalanceInternal({
7605
+ api: api,
7606
+ address: senderAddress,
7607
+ chain: origin,
7608
+ asset: originFeeAsset
7609
+ });
7610
+ case 6:
7611
+ originBalanceFee = _context2.v;
7657
7612
  isFeeAssetAh = origin === 'AssetHubPolkadot' && resolvedFeeAsset && isAssetEqual(resolvedFeeAsset, originAsset);
7658
7613
  originBalanceAfter = originBalance - amount;
7659
7614
  originBalanceFeeAfter = isFeeAssetAh ? originBalanceFee - amount : originBalanceFee - originFee;
@@ -7661,10 +7616,10 @@ var getTransferInfo = /*#__PURE__*/function () {
7661
7616
  originBalanceSufficient = originBalanceAfter >= edOrigin;
7662
7617
  builtHops = [];
7663
7618
  if (!(hops && hops.length > 0)) {
7664
- _context2.n = 11;
7619
+ _context2.n = 8;
7665
7620
  break;
7666
7621
  }
7667
- _context2.n = 10;
7622
+ _context2.n = 7;
7668
7623
  return Promise.all(hops.map(/*#__PURE__*/function () {
7669
7624
  var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(hop) {
7670
7625
  var result;
@@ -7695,16 +7650,16 @@ var getTransferInfo = /*#__PURE__*/function () {
7695
7650
  return _ref3.apply(this, arguments);
7696
7651
  };
7697
7652
  }()));
7698
- case 10:
7653
+ case 7:
7699
7654
  builtHops = _context2.v;
7700
- case 11:
7655
+ case 8:
7701
7656
  totalHopFee = hops.reduce(function (acc, hop) {
7702
7657
  return isAssetXcEqual(hop.result.asset, originAsset) ? acc + hop.result.fee : acc;
7703
7658
  }, 0n);
7704
7659
  bridgeHop = hops.find(function (hop) {
7705
7660
  return hop.chain.startsWith('BridgeHub');
7706
7661
  });
7707
- _context2.n = 12;
7662
+ _context2.n = 9;
7708
7663
  return buildDestInfo({
7709
7664
  api: api,
7710
7665
  origin: origin,
@@ -7719,7 +7674,7 @@ var getTransferInfo = /*#__PURE__*/function () {
7719
7674
  totalHopFee: totalHopFee,
7720
7675
  bridgeFee: bridgeHop === null || bridgeHop === void 0 ? void 0 : bridgeHop.result.fee
7721
7676
  });
7722
- case 12:
7677
+ case 9:
7723
7678
  destinationInfo = _context2.v;
7724
7679
  return _context2.a(2, {
7725
7680
  chain: {
@@ -7745,17 +7700,17 @@ var getTransferInfo = /*#__PURE__*/function () {
7745
7700
  hops: builtHops,
7746
7701
  destination: destinationInfo
7747
7702
  });
7748
- case 13:
7749
- _context2.p = 13;
7703
+ case 10:
7704
+ _context2.p = 10;
7750
7705
  api.setDisconnectAllowed(true);
7751
- _context2.n = 14;
7706
+ _context2.n = 11;
7752
7707
  return api.disconnect();
7753
- case 14:
7754
- return _context2.f(13);
7755
- case 15:
7708
+ case 11:
7709
+ return _context2.f(10);
7710
+ case 12:
7756
7711
  return _context2.a(2);
7757
7712
  }
7758
- }, _callee2, null, [[3,, 13, 15]]);
7713
+ }, _callee2, null, [[3,, 10, 12]]);
7759
7714
  }));
7760
7715
  return function getTransferInfo(_x) {
7761
7716
  return _ref2.apply(this, arguments);
@@ -12873,35 +12828,6 @@ var Quartz = /*#__PURE__*/function (_Parachain) {
12873
12828
  }(Parachain);
12874
12829
  Quartz.NATIVE_ASSET_ID = 0;
12875
12830
 
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
12831
  var RobonomicsPolkadot = /*#__PURE__*/function (_Parachain) {
12906
12832
  function RobonomicsPolkadot() {
12907
12833
  _classCallCheck(this, RobonomicsPolkadot);
@@ -13204,7 +13130,6 @@ var chains = function chains() {
13204
13130
  Moonriver: new Moonriver(),
13205
13131
  Laos: new Laos(),
13206
13132
  Quartz: new Quartz(),
13207
- RobonomicsKusama: new RobonomicsKusama(),
13208
13133
  PeopleKusama: new PeopleKusama(),
13209
13134
  Shiden: new Shiden(),
13210
13135
  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.1",
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/sdk-common": "12.1.1",
30
+ "@paraspell/assets": "12.1.1",
31
+ "@paraspell/pallets": "12.1.1"
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",