import type { OpcodeStep } from "../types.js"; /** * EVM call-family opcodes — anything that hands execution to another context. * Used by `nextCall()` to seek to the next sub-call site. */ export declare function isCallOp(op: string): boolean; /** * Storage-touching opcodes (persistent + transient). Used by `nextStorage()` * to seek to the next storage read/write. */ export declare function isStorageOp(op: string): boolean; /** * LOG0–LOG4. Used by `nextLog()` to seek to the next event emission. */ export declare function isLogOp(op: string): boolean; export interface OpcodeNavigation { /** Index of the current step in the `steps` array. Always in `[0, totalSteps-1]` when totalSteps > 0; otherwise 0. */ currentIndex: number; /** The current step, or `undefined` if `steps` is empty. */ step: OpcodeStep | undefined; totalSteps: number; canGoForward: boolean; canGoBack: boolean; /** Advance one step. No-op at the end. */ goForward: () => void; /** Retreat one step. No-op at the start. */ goBack: () => void; /** Jump to a specific index. Clamped to `[0, totalSteps-1]`. */ jumpTo: (index: number) => void; /** * Advance to the next step whose opcode matches `predicate`. No-op if none * found. The search starts strictly after `currentIndex`, so calling * `jumpToNext` on a step that itself matches will skip to the *next* match. */ jumpToNext: (predicate: (op: string) => boolean) => void; /** Convenience: `jumpToNext(isCallOp)`. */ nextCall: () => void; /** Convenience: `jumpToNext(isStorageOp)`. */ nextStorage: () => void; /** Convenience: `jumpToNext(isLogOp)`. */ nextLog: () => void; } export interface UseOpcodeNavigationOptions { /** Position to start at on first mount and on `steps`-identity change. Clamped. */ initialIndex?: number; } /** * Pure step-navigation hook for an EVM opcode trace. Owns no source-map or * contract metadata — consumers wrap with their own enrichment hooks. Resets * to `initialIndex` (default 0) whenever the `steps` array identity changes, * so swapping in a different trace rewinds navigation predictably. */ export declare function useOpcodeNavigation(steps: OpcodeStep[], options?: UseOpcodeNavigationOptions): OpcodeNavigation; //# sourceMappingURL=useOpcodeNavigation.d.ts.map