import { ethers } from "ethers"; import { RevertOptions, TxOptions } from "../types/contracts.types"; import { ParseAbiValuesReturnType } from "../types/parseAbiValues.types"; /** * Available gateway method names */ type GatewayMethodName = "call" | "depositNative" | "depositAndCallNative" | "depositErc20" | "depositAndCallErc20"; /** * Creates a revert data object from revert options */ export declare const createRevertData: (revertOptions: RevertOptions) => RevertOptions; /** * Retrieves function fragments from the gateway interface by method name. * * @param {string} methodName - The name of the function to find in the gateway interface * @returns {ethers.FunctionFragment[]} The function fragments from the gateway interface */ export declare const getGatewayFunctionsByName: (methodName: string) => ethers.FunctionFragment[]; /** * Retrieves function signatures from the gateway interface * @returns The requested function signature */ export declare const getGatewayFunctionSignatureByName: (methodName: GatewayMethodName) => ethers.FunctionFragment | undefined; /** * Generates calldata for a specific gateway method */ export declare const generateGatewayCallData: (methodName: GatewayMethodName, args: unknown[]) => string; /** * Prepares a gateway transaction for broadcasting */ export declare const prepareGatewayTx: (methodName: GatewayMethodName, args: unknown[], value?: string) => { data: string; value?: string; }; /** * Generates calldata for EVM call without broadcasting the transaction */ export declare const generateEvmCallData: (args: { receiver: string; revertOptions: RevertOptions; types: string[]; values: ParseAbiValuesReturnType; }) => { data: string; value?: string; }; /** * Generates calldata for EVM deposit without broadcasting the transaction */ export declare const generateEvmDepositData: (args: { amount: string; decimals?: number; erc20?: string; receiver: string; revertOptions: RevertOptions; }) => { data: string; value?: string; }; /** * Generates calldata for EVM deposit and call without broadcasting the transaction */ export declare const generateEvmDepositAndCallData: (args: { amount: string; decimals?: number; erc20?: string; receiver: string; revertOptions: RevertOptions; types: string[]; values: ParseAbiValuesReturnType; }) => { data: string; value?: string; }; interface BroadcastGatewayTxArgs { signer: ethers.Signer; txData: { data: string; to: string; value?: string; }; txOptions: TxOptions; } /** * Broadcasts a gateway transaction */ export declare const broadcastGatewayTx: ({ signer, txData, txOptions, }: BroadcastGatewayTxArgs) => Promise; export {};