import { Provider, TransactionLike, TransactionResponse, SigningKey, Transaction } from "ethers"; import { SignatureLike } from "@kaiachain/js-ext-core"; import { TransactionRequest } from "./types.js"; export declare function getTransactionRequest(transactionOrRLP: TransactionRequest | string | Transaction): Promise>; export declare function populateFrom(tx: TransactionRequest, expectedFrom: string): Promise; export declare function populateTo(tx: TransactionRequest, provider: Provider | null): Promise; export declare function populateNonce(tx: TransactionRequest, provider: Provider | null, fromAddress: string): Promise; export declare function populateGasLimit(tx: TransactionRequest, provider: Provider | null): Promise; export declare function populateGasPrice(tx: TransactionRequest, provider: Provider | null): Promise; export declare function eip155sign(key: SigningKey, digest: string, chainId: number): SignatureLike; export declare function populateChainId(tx: TransactionRequest, provider: Provider | null): Promise; export declare function populateFeePayerAndSignatures(tx: TransactionRequest, expectedFeePayer: string): Promise; /** * Delay the execution inside an async function in miliseconds. * * @param time (miliseconds) the amount of time to be delayed. */ export declare function sleep(time: number): Promise; /** * The poll function implements a retry mechanism for asynchronous operations. * It repeatedly calls the callback function to fetch data and then uses the * verify function to check if the retrieved data meets the desired criteria. * * @param callback A callback function that is responsible for fetching or retrieving data. It should be an asynchronous function that returns a Promise. * @param verify A callback function that determines if the retrieved data meets the desired criteria. It should accept the data returned by callback and return a boolean value (true if the data is valid, false otherwise). * @param retries (optional): An integer specifying the maximum number of times the function will attempt to poll before giving up. Defaults to 100. * @returns A Promise that resolves to the data retrieved by callback when the verify function returns true, or rejects with an error if the maximum number of retries is reached. */ export declare function poll(callback: () => Promise, verify: CallableFunction, retries?: number): Promise; export declare function pollTransactionInPool(txhash: string, provider: Provider): Promise;