Skip to content

readUnaryResult

function readUnaryResult(data): Promise<UnaryResult | null>;

Defined in: src/wire/public.ts:172

Unwrap a unary-RPC response into its envelope schema and raw result bytes.

A unary response is an IPC stream of zero or more leading log batches (0-row, carrying vgi_rpc.log_level) followed by one data batch whose result column holds the serialized response object. This returns the raw bytes — no typed decode — for an intermediary that inspects or rewrites the response and re-wraps it via writeUnaryResult.

Lenient: returns null for an error, empty, or non-result stream, so the caller can forward it unchanged.

Parameter Type
data Uint8Array

Promise<UnaryResult | null>