UNPKG

viem

Version:

TypeScript Interface for Ethereum

30 lines 1.3 kB
import type { TestClient, TestClientMode } from '../../clients/createTestClient.js'; import type { Transport } from '../../clients/transports/createTransport.js'; import type { ErrorType } from '../../errors/utils.js'; import type { Account } from '../../types/account.js'; import type { Chain } from '../../types/chain.js'; import type { RequestErrorType } from '../../utils/buildRequest.js'; export type GetAutomineReturnType = boolean; export type GetAutomineErrorType = RequestErrorType | ErrorType; /** * Returns the automatic mining status of the node. * * - Docs: https://viem.sh/docs/actions/test/getAutomine * * @param client - Client to use * @returns Whether or not the node is auto mining. {@link GetAutomineReturnType} * * @example * import { createTestClient, http } from 'viem' * import { foundry } from 'viem/chains' * import { getAutomine } from 'viem/test' * * const client = createTestClient({ * mode: 'anvil', * chain: 'foundry', * transport: http(), * }) * const isAutomining = await getAutomine(client) */ export declare function getAutomine<chain extends Chain | undefined, account extends Account | undefined>(client: TestClient<TestClientMode, Transport, chain, account, false>): Promise<GetAutomineReturnType>; //# sourceMappingURL=getAutomine.d.ts.map