UNPKG

@five-vm/cli

Version:

High-performance CLI for Five VM development with WebAssembly integration

61 lines 1.86 kB
/** * VLE (Variable Length Encoding) Encoder for Five VM Protocol * * Uses the existing WASM VLE and Parameter encoders for protocol-compliant * encoding of execute instructions used by the frontend implementation. * * Execute instruction format: * [discriminator(2), vle_function_index, vle_param_count, ...vle_parameters] */ export interface ParameterDefinition { name: string; type: string; } export interface ParameterValue { [key: string]: any; } /** * VLE Encoder utility class that uses WASM module for protocol compliance */ export declare class VLEEncoder { /** * Get type ID for VLE encoding */ static getTypeId(type: string): number; /** * Encode execute instruction data using WASM ParameterEncoder * This matches the frontend implementation that successfully executes complex functions */ static encodeExecuteVLE(functionIndex: number, parameters?: ParameterDefinition[], values?: ParameterValue): Promise<Buffer>; /** * Parse parameter definitions from JSON string */ static parseParameters(parametersJson: string): { definitions: ParameterDefinition[]; values: ParameterValue; }; /** * Load WASM module explicitly - NO SILENT FALLBACKS (Engineering Integrity Rule #9) */ static loadWasmModuleSecurely(): Promise<void>; /** * Validate WASM module availability */ static validateWasmModule(): Promise<{ available: boolean; error?: string; }>; /** * Create typed parameter definitions with validation */ static createTypedParameters(params: Array<{ name: string; type: string; value: any; optional?: boolean; }>): { definitions: ParameterDefinition[]; values: ParameterValue; }; } //# sourceMappingURL=vle-encoder.d.ts.map