import CID from 'cids';
import { Event, LogRecord, Identity, Public } from '@textile/threads-core';
import { Options } from './coding';
/**
 * EncodedRecord is a serialized version of a record that contains link data.
 */
export interface EncodedRecord {
    recordnode: Uint8Array | string;
    eventnode: Uint8Array | string;
    headernode: Uint8Array | string;
    bodynode: Uint8Array | string;
}
export interface CreateRecordConfig {
    /**
     * The private key to use for signing.
     */
    privKey: Identity;
    /**
     * The public key of the Record author.
     */
    pubKey: Public;
    /**
     * The symmetric key to use for encrypting the record body.
     */
    servKey: Uint8Array;
    /**
     * An optional previous Record CID.
     */
    prev?: CID;
}
/**
 * CreateRecord returns a new record from the given block and log private key.
 * @param data Input Event data.
 * @param config A set of key/CID options for creating the new record.
 * @param opts Additional encoding/encryption options.
 */
export declare function createRecord(data: Event, config: CreateRecordConfig, opts?: Options): Promise<LogRecord>;
/**
 * RecordToProto returns a proto version of a record for transport. Nodes are sent encrypted.
 * @param rec The input record to encode as a protobuf-like object.
 */
export declare function recordToProto(rec: LogRecord): EncodedRecord;
/**
 * RecordFromProto returns a node from a serialized version that contains link data.
 * @param proto The input protobuf-like object.
 * @param key The symmetric key.
 * @param opts Additional encoding/encryption options.
 */
export declare function recordFromProto(proto: EncodedRecord, key: Uint8Array, opts?: Options): LogRecord;
