@paraspell/sdk-core 8.9.3 → 8.9.4

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
@@ -5537,7 +5537,7 @@ var Peaq = /*#__PURE__*/function (_ParachainNode) {
5537
5537
  var Pendulum = /*#__PURE__*/function (_ParachainNode) {
5538
5538
  function Pendulum() {
5539
5539
  _classCallCheck(this, Pendulum);
5540
- return _callSuper(this, Pendulum, ['Pendulum', 'pendulum', 'polkadot', exports.Version.V3]);
5540
+ return _callSuper(this, Pendulum, ['Pendulum', 'pendulum', 'polkadot', exports.Version.V2]);
5541
5541
  }
5542
5542
  _inherits(Pendulum, _ParachainNode);
5543
5543
  return _createClass(Pendulum, [{
@@ -5545,25 +5545,21 @@ var Pendulum = /*#__PURE__*/function (_ParachainNode) {
5545
5545
  value: function transferXTokens(input) {
5546
5546
  var scenario = input.scenario,
5547
5547
  asset = input.asset;
5548
- if (scenario !== 'ParaToPara') {
5549
- throw new ScenarioNotSupportedError(this.node, input.scenario);
5550
- }
5551
- if (asset.symbol !== this.getNativeAssetSymbol()) {
5552
- throw new assets.InvalidCurrencyError("Asset ".concat(asset.symbol, " is not supported by node ").concat(this.node, "."));
5548
+ if (scenario === 'ParaToRelay') {
5549
+ throw new ScenarioNotSupportedError(this.node, scenario);
5553
5550
  }
5554
- if (!assets.isForeignAsset(asset)) {
5555
- throw new assets.InvalidCurrencyError("Asset ".concat(JSON.stringify(asset), " has no assetId"));
5551
+ if (scenario === 'ParaToPara' && asset.symbol === 'DOT') {
5552
+ throw new assets.InvalidCurrencyError('Pendulum does not support DOT transfers');
5556
5553
  }
5557
- var currencySelection = {
5558
- XCM: Number(asset.assetId)
5554
+ var currencySelection = asset.symbol === 'PEN' ? {
5555
+ Native: null
5556
+ } : {
5557
+ XCM: assets.isForeignAsset(asset) ? Number(asset.assetId) : function () {
5558
+ throw new assets.InvalidCurrencyError("Asset ".concat(JSON.stringify(asset), " has no assetId"));
5559
+ }()
5559
5560
  };
5560
5561
  return XTokensTransferImpl.transferXTokens(input, currencySelection);
5561
5562
  }
5562
- }, {
5563
- key: "transferRelayToPara",
5564
- value: function transferRelayToPara() {
5565
- throw new NodeNotSupportedError();
5566
- }
5567
5563
  }]);
5568
5564
  }(ParachainNode);
5569
5565
 
package/dist/index.d.ts CHANGED
@@ -32,6 +32,8 @@ type TForeignOrTokenAsset = TXcmForeignAsset | {
32
32
  type TForeignOrNativeAsset = TXcmForeignAsset | 'Native';
33
33
  type TXcmAsset = {
34
34
  XCM: number | undefined;
35
+ } | {
36
+ Native: null;
35
37
  };
36
38
  type TMantaAsset = {
37
39
  MantaCurrency: bigint | undefined;
@@ -1179,7 +1181,6 @@ declare class Peaq<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTo
1179
1181
  declare class Pendulum<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1180
1182
  constructor();
1181
1183
  transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1182
- transferRelayToPara(): TSerializedApiCall;
1183
1184
  }
1184
1185
 
1185
1186
  declare class PeopleKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
package/dist/index.mjs CHANGED
@@ -5538,7 +5538,7 @@ var Peaq = /*#__PURE__*/function (_ParachainNode) {
5538
5538
  var Pendulum = /*#__PURE__*/function (_ParachainNode) {
5539
5539
  function Pendulum() {
5540
5540
  _classCallCheck(this, Pendulum);
5541
- return _callSuper(this, Pendulum, ['Pendulum', 'pendulum', 'polkadot', Version.V3]);
5541
+ return _callSuper(this, Pendulum, ['Pendulum', 'pendulum', 'polkadot', Version.V2]);
5542
5542
  }
5543
5543
  _inherits(Pendulum, _ParachainNode);
5544
5544
  return _createClass(Pendulum, [{
@@ -5546,25 +5546,21 @@ var Pendulum = /*#__PURE__*/function (_ParachainNode) {
5546
5546
  value: function transferXTokens(input) {
5547
5547
  var scenario = input.scenario,
5548
5548
  asset = input.asset;
5549
- if (scenario !== 'ParaToPara') {
5550
- throw new ScenarioNotSupportedError(this.node, input.scenario);
5551
- }
5552
- if (asset.symbol !== this.getNativeAssetSymbol()) {
5553
- throw new InvalidCurrencyError("Asset ".concat(asset.symbol, " is not supported by node ").concat(this.node, "."));
5549
+ if (scenario === 'ParaToRelay') {
5550
+ throw new ScenarioNotSupportedError(this.node, scenario);
5554
5551
  }
5555
- if (!isForeignAsset(asset)) {
5556
- throw new InvalidCurrencyError("Asset ".concat(JSON.stringify(asset), " has no assetId"));
5552
+ if (scenario === 'ParaToPara' && asset.symbol === 'DOT') {
5553
+ throw new InvalidCurrencyError('Pendulum does not support DOT transfers');
5557
5554
  }
5558
- var currencySelection = {
5559
- XCM: Number(asset.assetId)
5555
+ var currencySelection = asset.symbol === 'PEN' ? {
5556
+ Native: null
5557
+ } : {
5558
+ XCM: isForeignAsset(asset) ? Number(asset.assetId) : function () {
5559
+ throw new InvalidCurrencyError("Asset ".concat(JSON.stringify(asset), " has no assetId"));
5560
+ }()
5560
5561
  };
5561
5562
  return XTokensTransferImpl.transferXTokens(input, currencySelection);
5562
5563
  }
5563
- }, {
5564
- key: "transferRelayToPara",
5565
- value: function transferRelayToPara() {
5566
- throw new NodeNotSupportedError();
5567
- }
5568
5564
  }]);
5569
5565
  }(ParachainNode);
5570
5566
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk-core",
3
- "version": "8.9.3",
3
+ "version": "8.9.4",
4
4
  "description": "SDK core for ParaSpell XCM/XCMP tool for developers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,9 +25,9 @@
25
25
  "dependencies": {
26
26
  "ethers": "^6.13.5",
27
27
  "viem": "^2.23.15",
28
- "@paraspell/sdk-common": "8.9.3",
29
- "@paraspell/assets": "8.9.3",
30
- "@paraspell/pallets": "8.9.3"
28
+ "@paraspell/sdk-common": "8.9.4",
29
+ "@paraspell/pallets": "8.9.4",
30
+ "@paraspell/assets": "8.9.4"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@babel/plugin-syntax-import-attributes": "^7.26.0",