import { GError, GOutput } from './types'; export declare const HEADER_SIZE = 5; export declare const GRPC_STATUS = "grpc-status"; export declare const GRPC_MESSAGE = "grpc-message"; export declare const encodeRequest: (serialized: Uint8Array) => Uint8Array; export declare function toInt8(xhr: XMLHttpRequest): false | Uint8Array; export declare function bufToString(xhr: XMLHttpRequest): string; export declare const safeJSON: (data: string) => unknown; export declare const snakeCase: (str: string, delim?: string) => string; export declare function clone(source: T): T; export declare function cloneInternal(source: unknown, objs: unknown[]): unknown; export declare function unwrap(result: GOutput | Promise>, onSuccess: (data: K) => S | Promise, onError: ((error: GError['error']) => E | Promise) | undefined): Promise; export declare function unwrap(result: GOutput | Promise>, onSuccess: (data: K) => S | Promise): Promise; export declare function unwrap(result: GOutput | Promise>, onSuccess: undefined, onError: ((error: GError['error']) => E | Promise) | undefined): Promise;