@paraspell/sdk 7.0.0 → 7.0.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
@@ -59,10 +59,12 @@ declare class Crust<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXT
59
59
  transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
60
60
  }
61
61
 
62
- declare class BifrostPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
62
+ declare class BifrostPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer, IPolkadotXCMTransfer {
63
63
  constructor();
64
64
  private getCurrencySelection;
65
65
  transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
66
+ transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes>;
67
+ protected canUseXTokens({ currencySymbol, destination }: TSendInternalOptions<TApi, TRes>): boolean;
66
68
  }
67
69
 
68
70
  declare class Bitgreen<TApi, TRes> extends ParachainNode<TApi, TRes> {
@@ -1085,6 +1087,32 @@ type TGetAssetBalanceOptionsBase = {
1085
1087
  */
1086
1088
  currency: TCurrencyCore;
1087
1089
  };
1090
+ type TGetOriginFeeDetailsOptionsBase = {
1091
+ /**
1092
+ * The origin node.
1093
+ */
1094
+ origin: TNodeDotKsmWithRelayChains;
1095
+ /**
1096
+ * The destination node.
1097
+ */
1098
+ destination: TNodeDotKsmWithRelayChains;
1099
+ /**
1100
+ * The currency to transfer.
1101
+ */
1102
+ currency: TCurrencyCore;
1103
+ /**
1104
+ * The amount to transfer.
1105
+ */
1106
+ amount: string;
1107
+ /**
1108
+ * The account to transfer from.
1109
+ */
1110
+ account: string;
1111
+ /**
1112
+ * The fee margin percentage.
1113
+ */
1114
+ feeMarginPercentage?: number;
1115
+ };
1088
1116
 
1089
1117
  /**
1090
1118
  * Retrieves the assets object for a given node containing the native and foreign assets.
@@ -1231,6 +1259,9 @@ declare const getAssetBalance: (options: TGetAssetBalanceOptionsBase & {
1231
1259
  declare const claimAssets: (options: TAssetClaimOptionsBase & {
1232
1260
  api?: ApiPromise;
1233
1261
  }) => Promise<Extrinsic | TSerializedApiCall>;
1262
+ declare const getOriginFeeDetails: (options: TGetOriginFeeDetailsOptionsBase & {
1263
+ api?: ApiPromise;
1264
+ }) => Promise<TOriginFeeDetails>;
1234
1265
 
1235
1266
  declare const assets_claimAssets: typeof claimAssets;
1236
1267
  declare const assets_getAllAssetsSymbols: typeof getAllAssetsSymbols;
@@ -1244,6 +1275,7 @@ declare const assets_getBalanceNative: typeof getBalanceNative;
1244
1275
  declare const assets_getExistentialDeposit: typeof getExistentialDeposit;
1245
1276
  declare const assets_getNativeAssetSymbol: typeof getNativeAssetSymbol;
1246
1277
  declare const assets_getNativeAssets: typeof getNativeAssets;
1278
+ declare const assets_getOriginFeeDetails: typeof getOriginFeeDetails;
1247
1279
  declare const assets_getOtherAssets: typeof getOtherAssets;
1248
1280
  declare const assets_getParaId: typeof getParaId;
1249
1281
  declare const assets_getRelayChainSymbol: typeof getRelayChainSymbol;
@@ -1252,7 +1284,7 @@ declare const assets_getTNode: typeof getTNode;
1252
1284
  declare const assets_getTransferInfo: typeof getTransferInfo;
1253
1285
  declare const assets_hasSupportForAsset: typeof hasSupportForAsset;
1254
1286
  declare namespace assets {
1255
- export { assets_claimAssets as claimAssets, assets_getAllAssetsSymbols as getAllAssetsSymbols, assets_getAssetBalance as getAssetBalance, assets_getAssetDecimals as getAssetDecimals, assets_getAssetId as getAssetId, assets_getAssets as getAssets, assets_getAssetsObject as getAssetsObject, assets_getBalanceForeign as getBalanceForeign, assets_getBalanceNative as getBalanceNative, assets_getExistentialDeposit as getExistentialDeposit, assets_getNativeAssetSymbol as getNativeAssetSymbol, assets_getNativeAssets as getNativeAssets, assets_getOtherAssets as getOtherAssets, assets_getParaId as getParaId, assets_getRelayChainSymbol as getRelayChainSymbol, assets_getSupportedAssets as getSupportedAssets, assets_getTNode as getTNode, assets_getTransferInfo as getTransferInfo, assets_hasSupportForAsset as hasSupportForAsset };
1287
+ export { assets_claimAssets as claimAssets, assets_getAllAssetsSymbols as getAllAssetsSymbols, assets_getAssetBalance as getAssetBalance, assets_getAssetDecimals as getAssetDecimals, assets_getAssetId as getAssetId, assets_getAssets as getAssets, assets_getAssetsObject as getAssetsObject, assets_getBalanceForeign as getBalanceForeign, assets_getBalanceNative as getBalanceNative, assets_getExistentialDeposit as getExistentialDeposit, assets_getNativeAssetSymbol as getNativeAssetSymbol, assets_getNativeAssets as getNativeAssets, assets_getOriginFeeDetails as getOriginFeeDetails, assets_getOtherAssets as getOtherAssets, assets_getParaId as getParaId, assets_getRelayChainSymbol as getRelayChainSymbol, assets_getSupportedAssets as getSupportedAssets, assets_getTNode as getTNode, assets_getTransferInfo as getTransferInfo, assets_hasSupportForAsset as hasSupportForAsset };
1256
1288
  }
1257
1289
 
1258
1290
  /**
@@ -1615,4 +1647,4 @@ declare class DuplicateAssetIdError extends Error {
1615
1647
  constructor(id: string);
1616
1648
  }
1617
1649
 
1618
- export { BatchMode, Builder, type CheckKeepAliveOptions, DuplicateAssetError, DuplicateAssetIdError, EvmBuilder, type Extrinsic, GeneralBuilder, type HexString$1 as HexString, type IPolkadotXCMTransfer, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidCurrencyError, type JunctionParachain, type JunctionType, type Junctions, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, NoXCMSupportImplementedError, NodeNotSupportedError, Parents, type PolkadotXCMTransferInput, type PolkadotXcmSection, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TAsset, type TAssetDetails, type TAssetJsonMap, type TBatchOptions, type TBifrostToken, type TCurrency, type TCurrencyCore, type TCurrencyInput, type TCurrencySelection, type TCurrencySelectionHeader, type TCurrencySelectionHeaderArr, type TCurrencySelectionV4, type TCurrencySymbol, type TDestWeight, type TDestination, type TEdJsonMap, type TEvmBuilderOptions, type TForeignAsset, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TGetTransferInfoOptions, type TGetTransferInfoOptionsBase, type TJunction, type TMantaAsset, type TMultiAsset, type TMultiAssetV3, type TMultiAssetV4, type TMultiLocation, type TMultiLocationHeader, type TNativeAssetDetails, type TNativeTokenAsset, type TNode, type TNodeAssets, type TNodeDotKsmWithRelayChains, type TNodePolkadotKusama, type TNodeWithRelayChains, type TNodleAsset, type TOptionalEvmBuilderOptions, type TOriginFeeDetails, type TOtherReserveAsset, type TPallet, type TPalletJsonMap, type TPalletMap, type TRelayChainSymbol, type TRelayChainType, type TRelayToParaOptions, type TReserveAsset, type TScenario, type TSelfReserveAsset, type TSendBaseOptions, type TSendInternalOptions, type TSendOptions, type TSerializeEthTransferOptions, type TSerializedApiCall, type TSerializedApiCallV2, type TSerializedEthTransfer, type TTransferInfo, type TTransferReturn, type TVersionClaimAssets, type TXTokensCurrencySelection, type TXcmAsset, type TZeitgeistAsset, type UseKeepAliveFinalBuilder, Version, type XTokensSection, type XTokensTransferInput, type XTransferSection, type XTransferTransferInput, assets, buildEthTransferOptions, claimAssets, createApiInstanceForNode, createPolkadotJsApiCall, determineRelayChain, getAllAssetsSymbols, getAllNodeProviders, getAssetBalance, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getBalanceForeign, getBalanceNative, getDefaultPallet, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getNode, getNodeEndpointOption, getNodeProvider, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getTNode, getTransferInfo, hasSupportForAsset, isRelayChain, send, sendSerializedApiCall, transferRelayToPara, transferRelayToParaSerializedApiCall, transfer as xcmPallet };
1650
+ export { BatchMode, Builder, type CheckKeepAliveOptions, DuplicateAssetError, DuplicateAssetIdError, EvmBuilder, type Extrinsic, GeneralBuilder, type HexString$1 as HexString, type IPolkadotXCMTransfer, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidCurrencyError, type JunctionParachain, type JunctionType, type Junctions, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, NoXCMSupportImplementedError, NodeNotSupportedError, Parents, type PolkadotXCMTransferInput, type PolkadotXcmSection, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TAsset, type TAssetDetails, type TAssetJsonMap, type TBatchOptions, type TBifrostToken, type TCurrency, type TCurrencyCore, type TCurrencyInput, type TCurrencySelection, type TCurrencySelectionHeader, type TCurrencySelectionHeaderArr, type TCurrencySelectionV4, type TCurrencySymbol, type TDestWeight, type TDestination, type TEdJsonMap, type TEvmBuilderOptions, type TForeignAsset, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TGetTransferInfoOptions, type TGetTransferInfoOptionsBase, type TJunction, type TMantaAsset, type TMultiAsset, type TMultiAssetV3, type TMultiAssetV4, type TMultiLocation, type TMultiLocationHeader, type TNativeAssetDetails, type TNativeTokenAsset, type TNode, type TNodeAssets, type TNodeDotKsmWithRelayChains, type TNodePolkadotKusama, type TNodeWithRelayChains, type TNodleAsset, type TOptionalEvmBuilderOptions, type TOriginFeeDetails, type TOtherReserveAsset, type TPallet, type TPalletJsonMap, type TPalletMap, type TRelayChainSymbol, type TRelayChainType, type TRelayToParaOptions, type TReserveAsset, type TScenario, type TSelfReserveAsset, type TSendBaseOptions, type TSendInternalOptions, type TSendOptions, type TSerializeEthTransferOptions, type TSerializedApiCall, type TSerializedApiCallV2, type TSerializedEthTransfer, type TTransferInfo, type TTransferReturn, type TVersionClaimAssets, type TXTokensCurrencySelection, type TXcmAsset, type TZeitgeistAsset, type UseKeepAliveFinalBuilder, Version, type XTokensSection, type XTokensTransferInput, type XTransferSection, type XTransferTransferInput, assets, buildEthTransferOptions, claimAssets, createApiInstanceForNode, createPolkadotJsApiCall, determineRelayChain, getAllAssetsSymbols, getAllNodeProviders, getAssetBalance, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getBalanceForeign, getBalanceNative, getDefaultPallet, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getNode, getNodeEndpointOption, getNodeProvider, getOriginFeeDetails, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getTNode, getTransferInfo, hasSupportForAsset, isRelayChain, send, sendSerializedApiCall, transferRelayToPara, transferRelayToParaSerializedApiCall, transfer as xcmPallet };