export declare const PROTOCOL_VERSION = 2; export declare const SUPPORTED_PROTOCOL_VERSIONS: readonly number[]; export declare const MAX_PROTOCOL_BYTES: number; export declare const ENGINE_CONTRACT = 1; export interface EngineStamp { contract: number; version: string; } export interface HandshakeResult { protocol: number; contract?: number; version?: string; operations: Record; } export interface ProtocolRequest { v: 1 | 2; id: string; op: string; args: unknown[]; contract?: number; context?: { allowedBundles?: string[]; scope?: string; }; } export type ProtocolResponse = { v: 1 | 2; id: string; ok: true; result: unknown; engine?: EngineStamp; } | { v: 1 | 2; id: string; ok: false; error: { code: string; message: string; }; engine?: EngineStamp; }; export declare function encodeWire(value: unknown): unknown; export declare function decodeWire(value: unknown): unknown;