quartz/wallet/node_modules/@3rdweb/sdk/dist/utils/blockTimeEstimator.d.ts
2022-03-04 20:05:23 +08:00

19 lines
668 B
TypeScript

import { Provider } from "@ethersproject/providers";
import { ChainId, SUPPORTED_CHAIN_ID } from "../common/chain";
/**
* Fallback map of default block mining times in seconds.
*/
export declare const DEFAULT_BLOCK_TIMES_FALLBACK: Record<SUPPORTED_CHAIN_ID | ChainId.Hardhat, {
secondsBetweenBlocks: number;
synced: boolean;
}>;
/**
* Given a time in second, return the block number that the time is in.
*
* @param timeInEpochSeconds - The time in seconds.
* @param chainId - The chain id.
* @returns - The block number.
*/
export declare function estimateBlockAtTime(timeInEpochSeconds: number, provider: Provider): Promise<number>;