import { IncomingMessage } from 'http';
import { ServiceSignatureType } from '../../proto/api';
/**
 * Sign message using the PRIVATE_KEY env var.
 */
export declare function signAsAttestor(data: Uint8Array | string, scheme: ServiceSignatureType): Uint8Array<ArrayBufferLike> | Promise<Uint8Array<ArrayBufferLike>>;
/**
 * Obtain the address on chain, from the PRIVATE_KEY env var.
 */
export declare function getAttestorAddress(scheme: ServiceSignatureType): string;
/**
 * Nice parse JSON with a key.
 * If the data is empty, returns an empty object.
 * And if the JSON is invalid, throws a bad request error,
 * with the key in the error message.
 */
export declare function niceParseJsonObject(data: string, key: string): any;
/**
 * Extract any initial messages sent via the query string,
 * in the `messages` parameter.
 */
export declare function getInitialMessagesFromQuery(req: IncomingMessage): import("../../proto/api").RPCMessage[];
