import { EvmSigner, SourceChainTransferData } from '@moonbeam-network/xcm-sdk'; import * as _moonbeam_network_xcm_types from '@moonbeam-network/xcm-types'; import { AnyChain, AssetAmount, Parachain, EvmChain, EvmParachain, Ecosystem, AnyAsset } from '@moonbeam-network/xcm-types'; import { Signer } from '@polkadot/api/types'; import { IKeyringPair, ISubmittableResult } from '@polkadot/types/types'; import { TokenTransfer } from '@wormhole-foundation/sdk-connect'; import { WalletClient } from 'viem'; import { ConfigService } from '@moonbeam-network/xcm-config'; interface Signers { evmSigner?: WalletClient; polkadotSigner?: Signer | IKeyringPair; } interface TransferData { destination: DestinationTransferData; getEstimate(amount: number | string): AssetAmount; isAutomaticPossible: boolean; max: AssetAmount; min: AssetAmount; bridgeChain: BridgeChainTransferData; source: SourceTransferData; transfer(params: TransferParams): Promise; } interface TransferParams { amount: number | string; isAutomatic: boolean; signers: Signers; statusCallback?: (status: ISubmittableResult) => void; sendOnlyRemoteExecution?: boolean; } interface FeeWithBalance { fee: AssetAmount; balance: AssetAmount; } interface MrlExtraFees { /** Deducted from source balance */ local?: FeeWithBalance; /** Deducted from transfer amount*/ remote?: FeeWithBalance; } interface SourceTransferData extends SourceChainTransferData { destinationFeeBalance: AssetAmount; bridgeChainFeeBalance?: AssetAmount; feeBalance: AssetAmount; max: AssetAmount; extraFees: MrlExtraFees; } interface DestinationTransferData extends ChainTransferData { } type BridgeChainTransferData = Omit & { chain: Parachain; address: string; feeBalance: AssetAmount; }; interface ChainTransferData { chain: AnyChain; balance: AssetAmount; fee: AssetAmount; min: AssetAmount; } interface ExecuteTransferData { vaa: TokenTransfer.VAA; tokenTransfer: TokenTransfer; executeTransfer(signer: EvmSigner): Promise; } interface WormholeExecuteTransferParams { txId: string; chain: EvmChain | EvmParachain; } interface MrlOptions { configService?: ConfigService; ecosystem?: Ecosystem; } declare function Mrl(options?: MrlOptions): { sources: AnyChain[]; setSource(source: string | AnyChain): { destinations: AnyChain[]; setDestination(destination: string | AnyChain): { assets: _moonbeam_network_xcm_types.Asset[]; setAsset(asset: string | AnyAsset): { setIsAutomatic(isAutomatic: boolean): { setAddresses({ sourceAddress, destinationAddress, }: { sourceAddress: string; destinationAddress: string; }): Promise; }; }; }; }; getExecuteTransferData({ txId, chain }: WormholeExecuteTransferParams): Promise; }; export { type BridgeChainTransferData, type ChainTransferData, type DestinationTransferData, type ExecuteTransferData, type FeeWithBalance, Mrl, type MrlExtraFees, type MrlOptions, type Signers, type SourceTransferData, type TransferData, type TransferParams };