@paraspell/sdk 5.3.0 → 5.4.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
@@ -360,18 +360,55 @@ declare const getAssetDecimals: (node: TNode, symbol: string) => number | null;
360
360
  declare const getParaId: (node: TNode) => number;
361
361
  declare const getTNode: (paraId: number) => TNode | null;
362
362
 
363
+ declare const getBalanceNative: (address: string, node: TNodeWithRelayChains, api?: ApiPromise) => Promise<bigint>;
364
+
365
+ declare const getBalanceForeign: (address: string, node: TNode, symbolOrId: string, api?: ApiPromise) => Promise<bigint | null>;
366
+
367
+ interface TTransferInfo {
368
+ chain: {
369
+ origin: TNodeWithRelayChains;
370
+ destination: TNodeWithRelayChains;
371
+ ecosystem: string;
372
+ };
373
+ currencyBalanceOrigin: {
374
+ balance: bigint;
375
+ currency: string;
376
+ };
377
+ originFeeBalance: {
378
+ balance: bigint;
379
+ expectedBalanceAfterXCMFee: bigint;
380
+ xcmFee: {
381
+ sufficientForXCM: boolean;
382
+ xcmFee: bigint;
383
+ };
384
+ existentialDeposit: bigint;
385
+ asset: string;
386
+ minNativeTransferableAmount: bigint;
387
+ maxNativeTransferableAmount: bigint;
388
+ };
389
+ destinationFeeBalance: {
390
+ balance: bigint;
391
+ currency: string;
392
+ existentialDeposit: bigint;
393
+ };
394
+ }
395
+ declare const getTransferInfo: (origin: TNodeWithRelayChains, destination: TNodeWithRelayChains, accountOrigin: string, accountDestination: string, assetSymbolOrId: string, amount: string) => Promise<TTransferInfo>;
396
+
363
397
  declare const index_getAllAssetsSymbols: typeof getAllAssetsSymbols;
364
398
  declare const index_getAssetDecimals: typeof getAssetDecimals;
365
399
  declare const index_getAssetId: typeof getAssetId;
366
400
  declare const index_getAssetsObject: typeof getAssetsObject;
401
+ declare const index_getBalanceForeign: typeof getBalanceForeign;
402
+ declare const index_getBalanceNative: typeof getBalanceNative;
367
403
  declare const index_getNativeAssets: typeof getNativeAssets;
368
404
  declare const index_getOtherAssets: typeof getOtherAssets;
369
405
  declare const index_getParaId: typeof getParaId;
370
406
  declare const index_getRelayChainSymbol: typeof getRelayChainSymbol;
371
407
  declare const index_getTNode: typeof getTNode;
408
+ declare const index_getTransferInfo: typeof getTransferInfo;
372
409
  declare const index_hasSupportForAsset: typeof hasSupportForAsset;
373
410
  declare namespace index {
374
- export { index_getAllAssetsSymbols as getAllAssetsSymbols, index_getAssetDecimals as getAssetDecimals, index_getAssetId as getAssetId, index_getAssetsObject as getAssetsObject, index_getNativeAssets as getNativeAssets, index_getOtherAssets as getOtherAssets, index_getParaId as getParaId, index_getRelayChainSymbol as getRelayChainSymbol, index_getTNode as getTNode, index_hasSupportForAsset as hasSupportForAsset };
411
+ export { index_getAllAssetsSymbols as getAllAssetsSymbols, index_getAssetDecimals as getAssetDecimals, index_getAssetId as getAssetId, index_getAssetsObject as getAssetsObject, index_getBalanceForeign as getBalanceForeign, index_getBalanceNative as getBalanceNative, index_getNativeAssets as getNativeAssets, index_getOtherAssets as getOtherAssets, index_getParaId as getParaId, index_getRelayChainSymbol as getRelayChainSymbol, index_getTNode as getTNode, index_getTransferInfo as getTransferInfo, index_hasSupportForAsset as hasSupportForAsset };
375
412
  }
376
413
 
377
414
  declare const getDefaultPallet: (node: TNode) => TPallet;
@@ -479,4 +516,4 @@ declare class IncompatibleNodesError extends Error {
479
516
 
480
517
  declare const getExistentialDeposit: (node: TNodeWithRelayChains) => string | null;
481
518
 
482
- export { Builder, type CheckKeepAliveOptions, type Extrinsic, type IPolkadotXCMTransfer, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidCurrencyError, type JunctionType, NODES_WITH_RELAY_CHAINS, NODE_NAMES, NoXCMSupportImplementedError, NodeNotSupportedError, Parents, type PolkadotXCMTransferInput, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TAssetDetails, type TAssetJsonMap, type TCloseChannelInternalOptions, type TCloseChannelOptions, type TCurrency, type TCurrencyInput, type TCurrencySelection, type TCurrencySelectionHeader, type TCurrencySelectionHeaderArr, type TDestination, type TEdJsonMap, type TJunction, type TMultiAsset, type TMultiLocation, type TMultiLocationHeader, type TNativeAssetDetails, type TNode, type TNodeAssets, type TNodeToAssetModuleMap, type TNodeWithRelayChains, type TOpenChannelInternalOptions, type TOpenChannelOptions, type TPallet, type TPalletJsonMap, type TPalletMap, type TRelayChainSymbol, type TRelayChainType, type TRelayToParaCommonOptions, type TRelayToParaInternalOptions, type TRelayToParaOptions, type TScenario, type TSendBaseOptions, type TSendInternalOptions, type TSendOptions, type TSendOptionsCommon, type TSerializedApiCall, type TVersionClaimAssets, Version, type XTokensTransferInput, type XTransferTransferInput, index as assets, index$1 as closeChannels, createApiInstanceForNode, getAllAssetsSymbols, getAllNodeProviders, getAssetDecimals, getAssetId, getAssetsObject, getDefaultPallet, getExistentialDeposit, getNativeAssets, getNode, getNodeEndpointOption, getNodeProvider, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedPallets, getTNode, hasSupportForAsset, index$2 as openChannels, index$3 as xcmPallet };
519
+ export { Builder, type CheckKeepAliveOptions, type Extrinsic, type IPolkadotXCMTransfer, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidCurrencyError, type JunctionType, NODES_WITH_RELAY_CHAINS, NODE_NAMES, NoXCMSupportImplementedError, NodeNotSupportedError, Parents, type PolkadotXCMTransferInput, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TAssetDetails, type TAssetJsonMap, type TCloseChannelInternalOptions, type TCloseChannelOptions, type TCurrency, type TCurrencyInput, type TCurrencySelection, type TCurrencySelectionHeader, type TCurrencySelectionHeaderArr, type TDestination, type TEdJsonMap, type TJunction, type TMultiAsset, type TMultiLocation, type TMultiLocationHeader, type TNativeAssetDetails, type TNode, type TNodeAssets, type TNodeToAssetModuleMap, type TNodeWithRelayChains, type TOpenChannelInternalOptions, type TOpenChannelOptions, type TPallet, type TPalletJsonMap, type TPalletMap, type TRelayChainSymbol, type TRelayChainType, type TRelayToParaCommonOptions, type TRelayToParaInternalOptions, type TRelayToParaOptions, type TScenario, type TSendBaseOptions, type TSendInternalOptions, type TSendOptions, type TSendOptionsCommon, type TSerializedApiCall, type TVersionClaimAssets, Version, type XTokensTransferInput, type XTransferTransferInput, index as assets, index$1 as closeChannels, createApiInstanceForNode, getAllAssetsSymbols, getAllNodeProviders, getAssetDecimals, getAssetId, getAssetsObject, getBalanceForeign, getBalanceNative, getDefaultPallet, getExistentialDeposit, getNativeAssets, getNode, getNodeEndpointOption, getNodeProvider, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedPallets, getTNode, getTransferInfo, hasSupportForAsset, index$2 as openChannels, index$3 as xcmPallet };