UNPKG

@five-vm/cli

Version:

High-performance CLI for Five VM development with WebAssembly integration

67 lines 1.69 kB
/** * Five VM WASM Integration * * Real integration with Five VM WASM bindings for script execution, * partial execution, and bytecode analysis. */ import { VMExecutionOptions, VMExecutionResult, AccountInfo, Logger } from '../types.js'; export declare class FiveVM { private vm; private logger; private initialized; constructor(logger: Logger); /** * Initialize the VM with real Five VM WASM module */ initialize(): Promise<void>; /** * Execute bytecode using real Five VM */ execute(options: VMExecutionOptions): Promise<VMExecutionResult>; /** * Execute with function parameters using proper VLE encoding */ executeFunction(bytecode: Uint8Array, functionIndex: number, parameters: Array<{ type: string; value: any; }>, accounts?: AccountInfo[]): Promise<VMExecutionResult>; /** * Get VM state information */ getState(): Promise<any>; /** * Validate bytecode before execution */ validateBytecode(bytecode: Uint8Array): Promise<{ valid: boolean; error?: string; }>; /** * Get VM constants and opcodes */ getVMConstants(): any; /** * Convert accounts to WASM format */ private convertAccountsToWasm; /** * Create a standardized VM error */ private createVMError; /** * Get VM capabilities and version info */ getVMInfo(): { version: string; features: string[]; }; /** * Check if VM is ready for execution */ isReady(): boolean; /** * Clean up VM resources */ cleanup(): void; } //# sourceMappingURL=vm.d.ts.map