[ENV]: { alloc: (n: bigint) => bigint; free: (addr: number) => void; load_u8: (addr: bigint) => number; load_u64: (addr: bigint) => bigint; store_u8: () => void; store_u64: () => void; input_offset: () => bigint; input_length: () => bigint; input_load_u8: (addr: bigint) => number; input_load_u64: (addr: bigint) => bigint; output_set: () => void; error_set: (addr: bigint) => void; config_get: (addr: bigint) => bigint; var_get: (addr: bigint) => bigint; var_set: () => 0 | undefined; http_request: () => bigint; http_status_code: () => number; length: (addr: bigint) => bigint; length_unsafe: (addr: bigint) => bigint; log_warn: (addr: bigint) => unknown; log_info: (addr: bigint) => unknown; log_debug: (addr: bigint) => unknown; log_error: (addr: bigint) => unknown; }
[EXPORT_STATE](): CallState
[GET_BLOCK](index: number): Block
[IMPORT_STATE](state: CallState,copy?: boolean,): void
[RESET](): void
[SET_HOST_CONTEXT](hostContext: any): void
[STORE](input?: string | Uint8Array): number | null
Allocate a chunk of host memory visible to plugins via other extism host functions. Returns the start address of the block.
getVariable(name: string): PluginOutput | null
Read a variable from extism memory by name.
hostContext<T = any>(): T
read(addr: bigint | number): PluginOutput | null
Given an address in extism memory, return a PluginOutput that represents a view of that memory. Returns null if the address is invalid.
setVariable(name: string,value: string | Uint8Array,): bigint
Set a variable to a given string or byte array value. Returns the start address of the variable. The start address is reused when changing the value of an existing variable.
store(input: string | Uint8Array): bigint
Store a string or Uint8Array value in extism memory.