/** * @fileoverview chainweb_chain_time - read the latest block header's time. * * The chainweb-node REST API has no single "latest header" endpoint. The * documented pattern is: * 1. GET /chainweb/0.0/{net}/cut → { hashes: { "{chainId}": { height, hash } } } * 2. GET /chainweb/0.0/{net}/chain/{id}/header/{hash} * Accept: application/json;blockheader-encoding=object * → { creationTime (μs), height, hash, ... } * * creationTime in the header is microseconds; we divide by 1_000_000 to * return seconds-since-epoch. This eliminates the documented devnet fresh- * container trap (genesis blocks have 2019 timestamps; chain catches up to * wall-clock within ~10-20 s of mining). */ import { z } from 'zod'; import type { ChainwebClient } from '../client/fetch.js'; export declare const ChainTimeInputShape: { chainId: z.ZodString; }; export declare const ChainTimeInputSchema: z.ZodObject<{ chainId: z.ZodString; }, z.core.$strip>; export interface ChainTimeResult { chainId: string; creationTimeSec: number; blockHeight: number; blockHash: string; } export interface ChainTimeToolConfig { client: ChainwebClient; } export declare function createChainTimeTool(config: ChainTimeToolConfig): (args: unknown) => Promise<{ content: ChainTimeResult[]; }>; //# sourceMappingURL=chain-time.d.ts.map