GenLayer SDK API Documentation# Contents: Public API Package genlayer Top level gl Address Array DynArray Keccak256() TreeMap allow_storage() Integer aliases gl Contract Event Lazy MessageRawType MessageType contract_interface() deploy_contract() get_contract_at() message message_raw private() public gl.vm Return UserError VMError run_nondet() run_nondet_unsafe() spawn_sandbox() unpack_result() gl.advanced emit_raw_event() user_error_immediate() gl.calldata CalldataEncodable DecodingError decode() encode() to_str() gl.storage Array DynArray Indirection Manager Root Slot TreeMap VLA allow_storage() inmem_allocate() gl.evm ContractDeclaration ContractProxy InplaceTuple MethodEncoder contract_interface() decode() encode() selector_of() signature_of() type_name_of() gl.eq_principle prompt_comparative() prompt_non_comparative() strict_eq() gl.nondet Image exec_prompt() gl.nondet.web Response delete() get() head() patch() post() render() request() Package genlayer_embeddings Distance Distance.__call__() Distance.__init__() EuclideanDistanceSquared EuclideanDistanceSquared.__call__() EuclideanDistanceSquared.__gl_allow_storage__ EuclideanDistanceSquared.batch() SentenceTransformer() SentenceTransformerFromPath() VecDB VecDB.Element VecDB.Id VecDB.__gl_allow_storage__ VecDB.__init__() VecDB.__iter__() VecDB.__len__() VecDB.get_by_id() VecDB.get_by_id_or_none() VecDB.insert() VecDB.knn() get_model() Change Log v0.1.8 Breaking Changes New Features API Improvements v0.1.3 Migration Guide Breaking Changes New Features API Improvements v0.1.0 GenVM Specification Glossary Core Architecture GenVM Components Overview Introduction Architecture Overview Sub-VM Architecture Overview WebAssembly Foundation VM Execution Modes VM Instance Management Memory Model Gas and Resource Metering Execution Modes Error Handling Execution Environment WASM Utilization Enabled WASM Features and Proposals gvm-def-det-mode Additional Limitations RAM Consumption WASI Preview 1 Implementation Overview WASI Preview 1 Foundation Deterministic Modifications WASI Specification Compliance Always Erroring Operations Functions Virtual File System gvm-def-det-mode FD Allocation and Deallocation GenLayer WASI SDK WASI Interface Overview Interface Design Interface Definition Backwards Compatibility Functions gl_call Functions Runners Runner Architecture Runner Layout version file runner.json File Startup VM Specification VM Execution Result Result Kinds InternalError Non-Deterministic Block Result Encoding Contract Result Encoding Sandboxing Resource Limiting RAM Consumption RAM Release Switching To gvm-def-non-det-mode Leader Mode Sync Mode Validator Mode Contract Interface Calldata Encoding Types Format Application Binary Interface Method Calling Convention Special Methods Storage System Storage Architecture Default Derivation Algorithm Root Slot Contract Upgradability Upgrade Control Mechanism Contract Execution Flow 1. Contract Deployment (if needed) 2. Contract Loading 3. WebAssembly Execution 4. Contract Entry Point Processing Appendix runner.json JSON Schema GenVM Implementation Specification Glossary Core Architecture GenVM Components Overview Introduction High-Level Architecture GenVM Executor Modules Manager Host Interface Protocol Overview Process Management Communication Protocol Data Types and Results Method ID Reference Error Handling Modules Overview Module Architecture Large Language Model (LLM) Module Web Module Manager HTTP API Endpoints Error Responses VM and Supervisor Architecture Modified Wasmtime Runtime Appendix Host Loop Pseudocode Protocol Loop Message Argument JSON Schema Runners Versions