@paraspell/swap 14.0.0 → 14.1.0-rc.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.
Files changed (2) hide show
  1. package/dist/index.mjs +6 -6
  2. package/package.json +6 -6
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { createChainClient as createChainClient$1, registerSwapExtension } from '@paraspell/sdk';
1
+ import { createChainClient as createChainClient$1, getPaymentInfo, registerSwapExtension } from '@paraspell/sdk';
2
2
  import { UnsupportedOperationError, assertCurrencyCore, dryRun, getDryRunError, DryRunFailedError, isConfig, getNativeAssets, RoutingResolutionError, findAssetInfoById, getOtherAssets, getChainProviders, parseUnits, getNativeAssetSymbol, padValueBy, formatUnits as formatUnits$1, AmountTooLowError, getBalance, localizeLocation, getAssets, Parents, isSymbolMatch, getParaId, UnableToComputeError, findNativeAssetInfoOrThrow, InvalidCurrencyError, findAssetInfoOrThrow, findAssetInfoByLoc, isSymbolSpecifier, findBestMatches, findAssetInfoBySymbol, deepEqual, normalizeExchange, EXCHANGE_CHAINS, reverseTransformLocation, getAssetsImpl, isAssetEqual, isExternalChain, isSystemAsset, ScenarioNotSupportedError, applyDecimalAbstraction, findAssetInfo, getRelayChainOf, Builder, isChainEvm, convertBuilderConfig, handleSwapExecuteTransfer, getXcmFee, getOriginXcmFee as getOriginXcmFee$1, InvalidAddressError, MissingParameterError, BatchMode, createChainClient as createChainClient$2, getExistentialDepositOrThrow, buildHopInfo, getRelayChainSymbol, aggregateHopFees, buildDestInfo, buildOriginInfo } from '@paraspell/sdk-core';
3
3
  import { toHex } from 'polkadot-api/utils';
4
4
  import 'polkadot-api';
@@ -451,7 +451,7 @@ var calculateTxFeePjs = /*#__PURE__*/function () {
451
451
  }();
452
452
 
453
453
  var isPapiTransaction = function isPapiTransaction(tx) {
454
- return _typeof(tx) === 'object' && tx !== null && 'getEncodedData' in tx && typeof tx.getEncodedData === 'function' && 'signSubmitAndWatch' in tx && typeof tx.signSubmitAndWatch === 'function';
454
+ return _typeof(tx) === 'object' && tx !== null && 'getEncodedData' in tx && typeof tx.getEncodedData === 'function' && 'createSubmitAndWatch' in tx && typeof tx.createSubmitAndWatch === 'function';
455
455
  };
456
456
 
457
457
  var isPjsExtrinsic = function isPjsExtrinsic(tx) {
@@ -9301,7 +9301,7 @@ var BifrostExchange = /*#__PURE__*/function (_ExchangeChain) {
9301
9301
 
9302
9302
  var calculateFee = /*#__PURE__*/function () {
9303
9303
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(_ref, tradeRouter, txBuilderFactory, currencyFromInfo, currencyToInfo, currencyFromDecimals, chain, toDestTransactionFee) {
9304
- var amount, slippagePct, feeCalcAddress, sender, trade, nativeAsset, substrateTx, tx, _yield$tx$getPaymentI, swapFee, feeNative, currencyFromPriceInfo, currencyFromPrice, feeInCurrencyFrom, finalFee;
9304
+ var amount, slippagePct, feeCalcAddress, sender, trade, nativeAsset, substrateTx, tx, _yield$getPaymentInfo, swapFee, feeNative, currencyFromPriceInfo, currencyFromPrice, feeInCurrencyFrom, finalFee;
9305
9305
  return _regenerator().w(function (_context) {
9306
9306
  while (1) switch (_context.n) {
9307
9307
  case 0:
@@ -9317,10 +9317,10 @@ var calculateFee = /*#__PURE__*/function () {
9317
9317
  substrateTx = _context.v;
9318
9318
  tx = substrateTx.get();
9319
9319
  _context.n = 3;
9320
- return tx.getPaymentInfo(feeCalcAddress);
9320
+ return getPaymentInfo(tx, feeCalcAddress);
9321
9321
  case 3:
9322
- _yield$tx$getPaymentI = _context.v;
9323
- swapFee = _yield$tx$getPaymentI.partial_fee;
9322
+ _yield$getPaymentInfo = _context.v;
9323
+ swapFee = _yield$getPaymentInfo.partial_fee;
9324
9324
  feeNative = swapFee + toDestTransactionFee + toDestTransactionFee;
9325
9325
  Logger.log('XCM to exch. fee:', toDestTransactionFee, nativeAsset.symbol);
9326
9326
  Logger.log('XCM to dest. fee:', toDestTransactionFee, nativeAsset.symbol);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/swap",
3
- "version": "14.0.0",
3
+ "version": "14.1.0-rc.1",
4
4
  "description": "Tool for XCM cross-chain asset exchanging across Polkadot and Kusama ecosystems",
5
5
  "type": "module",
6
6
  "exports": {
@@ -46,14 +46,14 @@
46
46
  "ethers-v6": "npm:ethers@6.16.0",
47
47
  "jsbi": "^4.3.2",
48
48
  "lodash-es": "^4.18.1",
49
- "polkadot-api": "^2.1.7",
49
+ "polkadot-api": "3.0.0-rc.5",
50
50
  "postcss": "^8.5.16",
51
51
  "react": "^19.2.7",
52
52
  "rxjs": "^7.8.2",
53
- "@paraspell/sdk": "14.0.0",
54
- "@paraspell/sdk-common": "14.0.0",
55
- "@paraspell/sdk-core": "14.0.0",
56
- "@paraspell/sdk-pjs": "14.0.0"
53
+ "@paraspell/sdk": "14.1.0-rc.1",
54
+ "@paraspell/sdk-common": "14.1.0-rc.1",
55
+ "@paraspell/sdk-core": "14.1.0-rc.1",
56
+ "@paraspell/sdk-pjs": "14.1.0-rc.1"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@babel/plugin-syntax-import-attributes": "^7.29.7",