@paraspell/sdk-dedot 13.10.1 → 14.0.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/README.md CHANGED
@@ -125,10 +125,7 @@ import * as paraspell from '@paraspell/sdk-dedot'
125
125
 
126
126
  > [!NOTE]
127
127
  > **Latest news:**
128
- > - V12 > V13 Migration guide: https://paraspell.github.io/docs/migration/v12-to-v13.html
129
- > - Swap extension is now available on every XCM SDK version: https://paraspell.github.io/docs/xcm-sdk/getting-started.html#install-swap-extension
130
- > - EVM extension is now available: https://paraspell.github.io/docs/xcm-sdk/getting-started.html#install-evm-extension
131
- > - Snowbridge extension is now available: https://paraspell.github.io/docs/xcm-sdk/getting-started.html#install-snowbridge-extension
128
+ > - V13 > V14 Migration guide: https://paraspell.github.io/docs/migration/v13-to-v14.html
132
129
 
133
130
 
134
131
  ### Sending XCM
@@ -341,7 +338,7 @@ SDK features ability to add custom chain and/or custom assets simply by adding i
341
338
  {
342
339
  symbol: 'USDC',
343
340
  decimals: 6,
344
- existentialDeposit: 0.1,
341
+ existentialDeposit: 100000000, //Needs to be in plancks
345
342
  location: {
346
343
  parents: 1,
347
344
  interior: { X3: [{ Parachain: 1000 }, { PalletInstance: 50 }, {
@@ -360,7 +357,7 @@ SDK features ability to add custom chain and/or custom assets simply by adding i
360
357
  symbol: 'MYNEWUSD',
361
358
  decimals: 6,
362
359
  assetId: '9999',
363
- existentialDeposit: 0.1,
360
+ existentialDeposit: 100000000, //Needs to be in plancks
364
361
  location: {
365
362
  parents: 0,
366
363
  interior: { X2: [{ PalletInstance: 50 }, { GeneralIndex: 9999 }] }
@@ -371,7 +368,7 @@ SDK features ability to add custom chain and/or custom assets simply by adding i
371
368
  symbol: 'USDT',
372
369
  decimals: 6,
373
370
  assetId: '1984',
374
- existentialDeposit: 0.1,
371
+ existentialDeposit: 100000000, //Needs to be in plancks
375
372
  location: {
376
373
  parents: 0,
377
374
  interior: { X2: [{ PalletInstance: 50 }, { GeneralIndex: 1984 }] }
@@ -729,7 +726,7 @@ We run an open Bug Bounty Program that rewards contributors for reporting and fi
729
726
 
730
727
  Made with 💛 by [ParaSpell✨](https://paraspell.xyz/)
731
728
 
732
- Published under [MIT License](https://github.com/paraspell/xcm-tools/blob/main/packages/sdk/LICENSE).
729
+ Published under [MIT License](https://github.com/paraspell/xcm-tools/blob/main/packages/sdk-dedot/LICENSE).
733
730
 
734
731
  ## Supported by
735
732
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _paraspell_sdk_core from '@paraspell/sdk-core';
2
- import { Foreign, ForeignAbstract, Native, Override, findAssetInfo, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTChain, hasSupportForAsset, isChainEvm, TSubstrateChain, TBuilderOptions, TApiOrUrl, GeneralBuilder as GeneralBuilder$1, TCustomChainFrom, TTransferBaseOptions } from '@paraspell/sdk-core';
2
+ import { Foreign, ForeignAbstract, Native, findAssetInfo, getAllAssetsSymbols, getAssets, getAssetsObject, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTChain, isChainEvm, TSubstrateChain, TBuilderOptions, TApiOrUrl, GeneralBuilder as GeneralBuilder$1, TCustomChainFrom, TTransferBaseOptions } from '@paraspell/sdk-core';
3
3
  export * from '@paraspell/sdk-core';
4
4
  import { DedotClient as DedotClient$1 } from 'dedot';
5
5
  import { GenericSubstrateApi as GenericSubstrateApi$1, ChainSubmittableExtrinsic as ChainSubmittableExtrinsic$1, IKeyringPair as IKeyringPair$1 } from 'dedot/types';
@@ -22,11 +22,8 @@ declare const getBalance: (options: _paraspell_sdk_core.TGetBalanceCommonOptions
22
22
  declare const assets_Foreign: typeof Foreign;
23
23
  declare const assets_ForeignAbstract: typeof ForeignAbstract;
24
24
  declare const assets_Native: typeof Native;
25
- declare const assets_Override: typeof Override;
26
25
  declare const assets_findAssetInfo: typeof findAssetInfo;
27
26
  declare const assets_getAllAssetsSymbols: typeof getAllAssetsSymbols;
28
- declare const assets_getAssetDecimals: typeof getAssetDecimals;
29
- declare const assets_getAssetId: typeof getAssetId;
30
27
  declare const assets_getAssets: typeof getAssets;
31
28
  declare const assets_getAssetsObject: typeof getAssetsObject;
32
29
  declare const assets_getBalance: typeof getBalance;
@@ -37,18 +34,14 @@ declare const assets_getOtherAssets: typeof getOtherAssets;
37
34
  declare const assets_getRelayChainSymbol: typeof getRelayChainSymbol;
38
35
  declare const assets_getSupportedAssets: typeof getSupportedAssets;
39
36
  declare const assets_getTChain: typeof getTChain;
40
- declare const assets_hasSupportForAsset: typeof hasSupportForAsset;
41
37
  declare const assets_isChainEvm: typeof isChainEvm;
42
38
  declare namespace assets {
43
39
  export {
44
40
  assets_Foreign as Foreign,
45
41
  assets_ForeignAbstract as ForeignAbstract,
46
42
  assets_Native as Native,
47
- assets_Override as Override,
48
43
  assets_findAssetInfo as findAssetInfo,
49
44
  assets_getAllAssetsSymbols as getAllAssetsSymbols,
50
- assets_getAssetDecimals as getAssetDecimals,
51
- assets_getAssetId as getAssetId,
52
45
  assets_getAssets as getAssets,
53
46
  assets_getAssetsObject as getAssetsObject,
54
47
  assets_getBalance as getBalance,
@@ -59,7 +52,6 @@ declare namespace assets {
59
52
  assets_getRelayChainSymbol as getRelayChainSymbol,
60
53
  assets_getSupportedAssets as getSupportedAssets,
61
54
  assets_getTChain as getTChain,
62
- assets_hasSupportForAsset as hasSupportForAsset,
63
55
  assets_isChainEvm as isChainEvm,
64
56
  };
65
57
  }
@@ -77,7 +69,7 @@ type GeneralBuilder<T extends Partial<TTransferBaseOptions<TDedotApi, TDedotExtr
77
69
 
78
70
  declare const dryRun: (options: _paraspell_sdk_core.TDryRunBaseOptions<ChainSubmittableExtrinsic, never> & {
79
71
  api?: TApiOrUrl<TDedotApi>;
80
- }) => Promise<_paraspell_sdk_core.TDryRunResult>;
72
+ }) => Promise<_paraspell_sdk_core.TDryRunResult<never>>;
81
73
  declare const dryRunOrigin: (options: _paraspell_sdk_core.TDryRunCallBaseOptions<ChainSubmittableExtrinsic, never> & {
82
74
  api?: TApiOrUrl<TDedotApi>;
83
75
  }) => Promise<_paraspell_sdk_core.TDryRunChainResult>;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { getEvmPrivateKeyHex, getNativeAssetSymbol, getOtherAssets, NumberFormatError, createClientCache, MAX_CLIENTS, EXTENSION_MS, createClientPoolHelpers, BatchMode, isConfig, findNativeAssetInfoOrThrowImpl, isCustomChain, getChainProvidersImpl, isSenderSigner, PolkadotApi, UnsupportedOperationError, findAssetInfoOrThrowImpl, hasXcmPaymentApiSupportImpl, resolveModuleError, hasDryRunSupportImpl, RuntimeApiUnavailableError, wrapTxBypass, localizeLocation, createAssetId, addXcmVersionHeader, isAssetEqual, RELAY_LOCATION, getRelayChainOfImpl, replaceBigInt, createChainClient as createChainClient$1, getBalance as getBalance$1, Foreign, ForeignAbstract, Native, Override, findAssetInfo, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getExistentialDeposit, getNativeAssets, getRelayChainSymbol, getSupportedAssets, getTChain, hasSupportForAsset, isChainEvm, convertSs58 as convertSs58$1, Builder as Builder$1, getBridgeStatus as getBridgeStatus$1, getParaEthTransferFees as getParaEthTransferFees$1, DRY_RUN_CLIENT_TIMEOUT_MS, dryRun as dryRun$1, dryRunOrigin as dryRunOrigin$1 } from '@paraspell/sdk-core';
1
+ import { getEvmPrivateKeyHex, getNativeAssetSymbol, getOtherAssets, NumberFormatError, createClientCache, MAX_CLIENTS, EXTENSION_MS, createClientPoolHelpers, BatchMode, isConfig, isCustomChain, isSenderSigner, PolkadotApi, UnsupportedOperationError, buildDryRunError, resolveModuleError, RuntimeApiUnavailableError, wrapTxBypass, localizeLocation, createAssetId, addXcmVersionHeader, isAssetEqual, RELAY_LOCATION, replaceBigInt, createChainClient as createChainClient$1, getBalance as getBalance$1, Foreign, ForeignAbstract, Native, findAssetInfo, getAllAssetsSymbols, getAssets, getAssetsObject, getExistentialDeposit, getNativeAssets, getRelayChainSymbol, getSupportedAssets, getTChain, isChainEvm, convertSs58 as convertSs58$1, Builder as Builder$1, getBridgeStatus as getBridgeStatus$1, getParaEthTransferFees as getParaEthTransferFees$1, DRY_RUN_CLIENT_TIMEOUT_MS, dryRun as dryRun$1, dryRunOrigin as dryRunOrigin$1 } from '@paraspell/sdk-core';
2
2
  export * from '@paraspell/sdk-core';
3
3
  import { stringPascalCase, isEvmAddress, decodeAddress, isHex, u8aToHex, hexToU8a, stringToU8a, blake2AsHex } from 'dedot/utils';
4
4
  import { Keyring } from '@polkadot/keyring';
@@ -750,22 +750,22 @@ var extractDryRunXcmFailureReason = function extractDryRunXcmFailureReason(resul
750
750
  var executionResult = result === null || result === void 0 || (_result$value = result.value) === null || _result$value === void 0 ? void 0 : _result$value.executionResult;
751
751
  var error = executionResult === null || executionResult === void 0 || (_executionResult$valu = executionResult.value) === null || _executionResult$valu === void 0 ? void 0 : _executionResult$valu.error;
752
752
  var failureType = (_ref3 = (_ref4 = (_ref5 = (_error$error$type = error === null || error === void 0 || (_error$error = error.error) === null || _error$error === void 0 ? void 0 : _error$error.type) !== null && _error$error$type !== void 0 ? _error$error$type : error === null || error === void 0 || (_error$value = error.value) === null || _error$value === void 0 || (_error$value = _error$value.error) === null || _error$value === void 0 ? void 0 : _error$value.type) !== null && _ref5 !== void 0 ? _ref5 : error === null || error === void 0 || (_error$value2 = error.value) === null || _error$value2 === void 0 || (_error$value2 = _error$value2.value) === null || _error$value2 === void 0 ? void 0 : _error$value2.type) !== null && _ref4 !== void 0 ? _ref4 : error === null || error === void 0 || (_error$value3 = error.value) === null || _error$value3 === void 0 ? void 0 : _error$value3.type) !== null && _ref3 !== void 0 ? _ref3 : error === null || error === void 0 ? void 0 : error.type;
753
- var failureIndex = typeof (error === null || error === void 0 ? void 0 : error.index) === "number" ? error.index : undefined;
753
+ var instructionIndex = typeof (error === null || error === void 0 ? void 0 : error.index) === "number" ? error.index : undefined;
754
754
  if (typeof failureType === "string") {
755
755
  return {
756
- failureReason: failureType,
757
- failureIndex: failureIndex
756
+ reason: failureType,
757
+ instructionIndex: instructionIndex
758
758
  };
759
759
  }
760
760
  if (typeof (executionResult === null || executionResult === void 0 ? void 0 : executionResult.type) === "string") {
761
761
  return {
762
- failureReason: executionResult.type,
763
- failureIndex: failureIndex
762
+ reason: executionResult.type,
763
+ instructionIndex: instructionIndex
764
764
  };
765
765
  }
766
766
  return {
767
- failureReason: JSON.stringify((_ref6 = (_result$value2 = result === null || result === void 0 ? void 0 : result.value) !== null && _result$value2 !== void 0 ? _result$value2 : result) !== null && _ref6 !== void 0 ? _ref6 : "Unknown error structure", replaceBigInt),
768
- failureIndex: failureIndex
767
+ reason: JSON.stringify((_ref6 = (_result$value2 = result === null || result === void 0 ? void 0 : result.value) !== null && _result$value2 !== void 0 ? _result$value2 : result) !== null && _ref6 !== void 0 ? _ref6 : "Unknown error structure", replaceBigInt),
768
+ instructionIndex: instructionIndex
769
769
  };
770
770
  };
771
771
  var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
@@ -1034,7 +1034,7 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1034
1034
  value: function resolveDefaultFeeAsset(_ref0) {
1035
1035
  var chain = _ref0.chain,
1036
1036
  feeAsset = _ref0.feeAsset;
1037
- return feeAsset !== null && feeAsset !== void 0 ? feeAsset : findNativeAssetInfoOrThrowImpl(chain, this._customCtx);
1037
+ return feeAsset !== null && feeAsset !== void 0 ? feeAsset : this.findNativeAssetInfoOrThrow(chain);
1038
1038
  }
1039
1039
  }, {
1040
1040
  key: "resolveFeeAsset",
@@ -1069,9 +1069,9 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1069
1069
  case 3:
1070
1070
  return _context6.a(2, {
1071
1071
  isCustomAsset: true,
1072
- asset: findAssetInfoOrThrowImpl(chain, {
1072
+ asset: this.findAssetInfoOrThrow(chain, {
1073
1073
  id: assetId
1074
- }, undefined, this._customCtx)
1074
+ })
1075
1075
  });
1076
1076
  }
1077
1077
  }, _callee6, this);
@@ -1086,15 +1086,15 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1086
1086
  value: function () {
1087
1087
  var _getDryRunCall = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(options) {
1088
1088
  var _this2 = this,
1089
- _result,
1089
+ _result3,
1090
1090
  _resValue$executionRe,
1091
1091
  _execRes$actualWeight;
1092
- var tx, address, feeAsset, chain, destination, version, _options$useRootOrigi, useRootOrigin, bypassOptions, supportsDryRunApi, basePayload, resolvedTx, resolvedFeeAsset, performDryRunCall, findFailingEventInResult, getExecutionSuccessFromResult, extractFailureReasonFromResult, result, isSuccess, failureErr, shouldRetryWithVersion, msg, _msg, resValue, execRes, forwardedXcms, actualWeight, weight, destParaId, localXcm, USE_XCM_PAYMENT_API_CHAINS, overriddenWeight, xcmFee, _yield$this$getPaymen, executionFee, fee, _t, _t2, _t3, _t4;
1092
+ var tx, address, feeAsset, chain, destination, version, _options$useRootOrigi, useRootOrigin, bypassOptions, supportsDryRunApi, basePayload, resolvedTx, resolvedFeeAsset, performDryRunCall, findFailingEventInResult, getExecutionSuccessFromResult, extractFailureReasonFromResult, result, isSuccess, failureErr, shouldRetryWithVersion, msg, _result, _msg, _result2, resValue, execRes, forwardedXcms, actualWeight, weight, destParaId, localXcm, USE_XCM_PAYMENT_API_CHAINS, overriddenWeight, xcmFee, _yield$this$getPaymen, executionFee, fee, _t, _t2, _t3, _t4;
1093
1093
  return _regenerator().w(function (_context7) {
1094
1094
  while (1) switch (_context7.p = _context7.n) {
1095
1095
  case 0:
1096
1096
  tx = options.tx, address = options.address, feeAsset = options.feeAsset, chain = options.chain, destination = options.destination, version = options.version, _options$useRootOrigi = options.useRootOrigin, useRootOrigin = _options$useRootOrigi === void 0 ? false : _options$useRootOrigi, bypassOptions = options.bypassOptions;
1097
- supportsDryRunApi = hasDryRunSupportImpl(chain, this._customCtx);
1097
+ supportsDryRunApi = this.hasDryRunSupport(chain);
1098
1098
  if (supportsDryRunApi) {
1099
1099
  _context7.n = 1;
1100
1100
  break;
@@ -1165,16 +1165,16 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1165
1165
  var otherErr = (_execErr$error$Other = (_execErr$error2 = execErr.error) === null || _execErr$error2 === void 0 ? void 0 : _execErr$error2.Other) !== null && _execErr$error$Other !== void 0 ? _execErr$error$Other : (_execErr$error3 = execErr.error) === null || _execErr$error3 === void 0 ? void 0 : _execErr$error3.other;
1166
1166
  if (otherErr) {
1167
1167
  return {
1168
- failureReason: String(otherErr)
1168
+ reason: String(otherErr)
1169
1169
  };
1170
1170
  }
1171
1171
  if (typeof execErr.error === "string") {
1172
1172
  return {
1173
- failureReason: execErr.error
1173
+ reason: execErr.error
1174
1174
  };
1175
1175
  }
1176
1176
  return {
1177
- failureReason: JSON.stringify(execErr.error)
1177
+ reason: JSON.stringify(execErr.error)
1178
1178
  };
1179
1179
  }
1180
1180
  var erroredEvent = findFailingEventInResult(result);
@@ -1188,17 +1188,17 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1188
1188
  return resolveModuleError(chain, subErr);
1189
1189
  }
1190
1190
  return {
1191
- failureReason: err.type
1191
+ reason: err.type
1192
1192
  };
1193
1193
  }
1194
1194
  }
1195
1195
  return {
1196
- failureReason: JSON.stringify(result !== null && result !== void 0 ? result : "Unknown error")
1196
+ reason: JSON.stringify(result !== null && result !== void 0 ? result : "Unknown error")
1197
1197
  };
1198
1198
  }; // Attempt 1: WITHOUT version
1199
1199
  isSuccess = false;
1200
1200
  failureErr = {
1201
- failureReason: ""
1201
+ reason: ""
1202
1202
  };
1203
1203
  shouldRetryWithVersion = false;
1204
1204
  _context7.p = 6;
@@ -1209,7 +1209,7 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1209
1209
  isSuccess = getExecutionSuccessFromResult(result);
1210
1210
  if (!isSuccess) {
1211
1211
  failureErr = extractFailureReasonFromResult(result);
1212
- if (failureErr.failureReason === "VersionedConversionFailed") {
1212
+ if (failureErr.reason === "VersionedConversionFailed") {
1213
1213
  shouldRetryWithVersion = true;
1214
1214
  }
1215
1215
  }
@@ -1229,7 +1229,9 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1229
1229
  case 9:
1230
1230
  return _context7.a(2, {
1231
1231
  success: false,
1232
- failureReason: msg,
1232
+ dryRunError: {
1233
+ reason: msg
1234
+ },
1233
1235
  asset: resolvedFeeAsset.asset
1234
1236
  });
1235
1237
  case 10:
@@ -1252,16 +1254,14 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1252
1254
  _context7.p = 13;
1253
1255
  _t3 = _context7.v;
1254
1256
  _msg = _t3 instanceof Error ? _t3.message : String(_t3);
1255
- if (!failureErr.failureReason) {
1257
+ if (!failureErr.reason) {
1256
1258
  failureErr = {
1257
- failureReason: _msg
1259
+ reason: _msg
1258
1260
  };
1259
1261
  }
1260
1262
  return _context7.a(2, {
1261
1263
  success: false,
1262
- failureReason: failureErr.failureReason,
1263
- failureSubReason: failureErr.failureSubReason,
1264
- failureIndex: failureErr.failureIndex,
1264
+ dryRunError: buildDryRunError(failureErr, (_result = result) === null || _result === void 0 || (_result = _result.value) === null || _result === void 0 ? void 0 : _result.localXcm),
1265
1265
  asset: resolvedFeeAsset.asset
1266
1266
  });
1267
1267
  case 14:
@@ -1271,13 +1271,13 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1271
1271
  }
1272
1272
  return _context7.a(2, {
1273
1273
  success: false,
1274
- failureReason: failureErr.failureReason || "Unknown error",
1275
- failureSubReason: failureErr.failureSubReason,
1276
- failureIndex: failureErr.failureIndex,
1274
+ dryRunError: buildDryRunError(_objectSpread2(_objectSpread2({}, failureErr), {}, {
1275
+ reason: failureErr.reason || "Unknown error"
1276
+ }), (_result2 = result) === null || _result2 === void 0 || (_result2 = _result2.value) === null || _result2 === void 0 ? void 0 : _result2.localXcm),
1277
1277
  asset: resolvedFeeAsset.asset
1278
1278
  });
1279
1279
  case 15:
1280
- resValue = (_result = result) === null || _result === void 0 ? void 0 : _result.value;
1280
+ resValue = (_result3 = result) === null || _result3 === void 0 ? void 0 : _result3.value;
1281
1281
  execRes = resValue === null || resValue === void 0 || (_resValue$executionRe = resValue.executionResult) === null || _resValue$executionRe === void 0 ? void 0 : _resValue$executionRe.value;
1282
1282
  forwardedXcms = result.value.forwardedXcms.length > 0 ? result.value.forwardedXcms[0] : [];
1283
1283
  actualWeight = (_execRes$actualWeight = execRes === null || execRes === void 0 ? void 0 : execRes.actualWeight) !== null && _execRes$actualWeight !== void 0 ? _execRes$actualWeight : execRes === null || execRes === void 0 ? void 0 : execRes.actual_weight;
@@ -1285,7 +1285,7 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1285
1285
  destParaId = this.extractDestParaId(forwardedXcms);
1286
1286
  localXcm = resValue === null || resValue === void 0 ? void 0 : resValue.localXcm;
1287
1287
  USE_XCM_PAYMENT_API_CHAINS = ["Astar"];
1288
- if (!(hasXcmPaymentApiSupportImpl(chain, this._customCtx) && localXcm && (feeAsset || USE_XCM_PAYMENT_API_CHAINS.includes(chain) || chain.startsWith("AssetHub") && destination === "Ethereum") || resolvedFeeAsset.isCustomAsset)) {
1288
+ if (!(this.hasXcmPaymentApiSupport(chain) && localXcm && (feeAsset || USE_XCM_PAYMENT_API_CHAINS.includes(chain) || chain.startsWith("AssetHub") && destination === "Ethereum") || resolvedFeeAsset.isCustomAsset)) {
1289
1289
  _context7.n = 21;
1290
1290
  break;
1291
1291
  }
@@ -1363,7 +1363,6 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1363
1363
  transformedAssetId,
1364
1364
  execFeeRes,
1365
1365
  execFee,
1366
- bridgeHubExecFee,
1367
1366
  deliveryFee,
1368
1367
  _args7 = arguments,
1369
1368
  _t5;
@@ -1420,10 +1419,7 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1420
1419
  _context9.n = 5;
1421
1420
  return this.getBridgeHubFallbackExecFee(chain, weight, asset, version);
1422
1421
  case 5:
1423
- bridgeHubExecFee = _context9.v;
1424
- if (typeof bridgeHubExecFee === "bigint") {
1425
- execFee = bridgeHubExecFee;
1426
- }
1422
+ execFee = _context9.v;
1427
1423
  case 6:
1428
1424
  _context9.n = 7;
1429
1425
  return this.getDeliveryFee(chain, forwardedXcm, asset, assetLocalizedLoc, version);
@@ -1482,7 +1478,7 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1482
1478
  case 6:
1483
1479
  assets = (_deliveryFeeRes = deliveryFeeRes) === null || _deliveryFeeRes === void 0 || (_deliveryFeeRes = _deliveryFeeRes.value) === null || _deliveryFeeRes === void 0 ? void 0 : _deliveryFeeRes.value;
1484
1480
  deliveryFeeResolved = deliveryFeeRes && (assets === null || assets === void 0 ? void 0 : assets.length) > 0 ? (_assets$0$fun$value = (_assets$ = assets[0]) === null || _assets$ === void 0 || (_assets$ = _assets$.fun) === null || _assets$ === void 0 ? void 0 : _assets$.value) !== null && _assets$0$fun$value !== void 0 ? _assets$0$fun$value : 0n : 0n;
1485
- nativeAsset = findNativeAssetInfoOrThrowImpl(chain, this._customCtx);
1481
+ nativeAsset = this.findNativeAssetInfoOrThrow(chain);
1486
1482
  if (!(isAssetEqual(asset, nativeAsset) || usedThirdParam)) {
1487
1483
  _context0.n = 7;
1488
1484
  break;
@@ -1529,10 +1525,10 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1529
1525
  _context1.n = 2;
1530
1526
  break;
1531
1527
  }
1532
- return _context1.a(2, undefined);
1528
+ return _context1.a(2, 0n);
1533
1529
  case 2:
1534
1530
  ahApi = this.clone();
1535
- assetHubChain = "AssetHub".concat(getRelayChainOfImpl(this, chain));
1531
+ assetHubChain = "AssetHub".concat(this.getRelayChainOf(chain));
1536
1532
  _context1.n = 3;
1537
1533
  return ahApi.init(assetHubChain);
1538
1534
  case 3:
@@ -1545,13 +1541,7 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1545
1541
  });
1546
1542
  case 4:
1547
1543
  convertedExecFee = _context1.v;
1548
- if (!(typeof convertedExecFee === "bigint")) {
1549
- _context1.n = 5;
1550
- break;
1551
- }
1552
- return _context1.a(2, convertedExecFee);
1553
- case 5:
1554
- return _context1.a(2, undefined);
1544
+ return _context1.a(2, typeof convertedExecFee === "bigint" ? convertedExecFee : 0n);
1555
1545
  }
1556
1546
  }, _callee1, this);
1557
1547
  }));
@@ -1599,12 +1589,12 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1599
1589
  value: function () {
1600
1590
  var _getDryRunXcm = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee11(_ref10) {
1601
1591
  var _result$value5;
1602
- var originLocation, xcm, asset, chain, version, supportsDryRunApi, transformedOriginLocation, result, executionResult, isSuccess, _extractDryRunXcmFail, failureReason, failureIndex, actualWeight, weight, forwardedXcms, destParaId, fee;
1592
+ var originLocation, xcm, asset, chain, version, supportsDryRunApi, transformedOriginLocation, result, executionResult, isSuccess, failure, actualWeight, weight, forwardedXcms, destParaId, fee;
1603
1593
  return _regenerator().w(function (_context11) {
1604
1594
  while (1) switch (_context11.n) {
1605
1595
  case 0:
1606
1596
  originLocation = _ref10.originLocation, xcm = _ref10.xcm, asset = _ref10.asset, chain = _ref10.chain, version = _ref10.version;
1607
- supportsDryRunApi = hasDryRunSupportImpl(chain, this._customCtx);
1597
+ supportsDryRunApi = this.hasDryRunSupport(chain);
1608
1598
  if (supportsDryRunApi) {
1609
1599
  _context11.n = 1;
1610
1600
  break;
@@ -1622,11 +1612,10 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1622
1612
  _context11.n = 3;
1623
1613
  break;
1624
1614
  }
1625
- _extractDryRunXcmFail = extractDryRunXcmFailureReason(result), failureReason = _extractDryRunXcmFail.failureReason, failureIndex = _extractDryRunXcmFail.failureIndex;
1615
+ failure = extractDryRunXcmFailureReason(result);
1626
1616
  return _context11.a(2, {
1627
1617
  success: false,
1628
- failureReason: failureReason,
1629
- failureIndex: failureIndex,
1618
+ dryRunError: buildDryRunError(failure, xcm),
1630
1619
  asset: asset
1631
1620
  });
1632
1621
  case 3:
@@ -1634,7 +1623,7 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1634
1623
  weight = actualWeight ? actualWeight : undefined;
1635
1624
  forwardedXcms = result.value.forwardedXcms.length > 0 ? result.value.forwardedXcms[0] : [];
1636
1625
  destParaId = this.extractDestParaId(forwardedXcms);
1637
- if (!hasXcmPaymentApiSupportImpl(chain, this._customCtx)) {
1626
+ if (!this.hasXcmPaymentApiSupport(chain)) {
1638
1627
  _context11.n = 6;
1639
1628
  break;
1640
1629
  }
@@ -1648,7 +1637,9 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1648
1637
  }
1649
1638
  return _context11.a(2, {
1650
1639
  success: false,
1651
- failureReason: "Failed to retrieve fee from XcmPaymentApi",
1640
+ dryRunError: {
1641
+ reason: "Failed to retrieve fee from XcmPaymentApi"
1642
+ },
1652
1643
  asset: asset
1653
1644
  });
1654
1645
  case 5:
@@ -1663,7 +1654,9 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1663
1654
  case 6:
1664
1655
  return _context11.a(2, {
1665
1656
  success: false,
1666
- failureReason: "Cannot determine destination fee. XcmPaymentApi is not supported by this chain",
1657
+ dryRunError: {
1658
+ reason: "Cannot determine destination fee. XcmPaymentApi is not supported by this chain"
1659
+ },
1667
1660
  asset: asset
1668
1661
  });
1669
1662
  }
@@ -1749,7 +1742,7 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1749
1742
  if (force) {
1750
1743
  void this.api.disconnect();
1751
1744
  } else {
1752
- var key = api === undefined ? getChainProvidersImpl(chain, this._customCtx) : api;
1745
+ var key = api === undefined ? this.getChainProviders(chain) : api;
1753
1746
  releaseClient(key);
1754
1747
  }
1755
1748
  }
@@ -1856,11 +1849,8 @@ var assets = /*#__PURE__*/Object.freeze({
1856
1849
  Foreign: Foreign,
1857
1850
  ForeignAbstract: ForeignAbstract,
1858
1851
  Native: Native,
1859
- Override: Override,
1860
1852
  findAssetInfo: findAssetInfo,
1861
1853
  getAllAssetsSymbols: getAllAssetsSymbols,
1862
- getAssetDecimals: getAssetDecimals,
1863
- getAssetId: getAssetId,
1864
1854
  getAssets: getAssets,
1865
1855
  getAssetsObject: getAssetsObject,
1866
1856
  getBalance: getBalance,
@@ -1871,7 +1861,6 @@ var assets = /*#__PURE__*/Object.freeze({
1871
1861
  getRelayChainSymbol: getRelayChainSymbol,
1872
1862
  getSupportedAssets: getSupportedAssets,
1873
1863
  getTChain: getTChain,
1874
- hasSupportForAsset: hasSupportForAsset,
1875
1864
  isChainEvm: isChainEvm
1876
1865
  });
1877
1866
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk-dedot",
3
- "version": "13.10.1",
3
+ "version": "14.0.0",
4
4
  "description": "Dedot-based SDK for ParaSpell XCM/XCMP tool for developers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,8 +22,8 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "@paraspell/sdk-common": "13.10.1",
26
- "@paraspell/sdk-core": "13.10.1"
25
+ "@paraspell/sdk-common": "14.0.0",
26
+ "@paraspell/sdk-core": "14.0.0"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "dedot": ">= 1.3.0",