/// <reference types="node" />
import { Datastore } from 'interface-datastore';
import { ThreadID, LogInfo, ThreadInfo, LogID } from '@textile/threads-core';
import { KeyBook } from './keybook';
/**
 * LogStore is an internal store of log information.
 * Currently, it simply wraps a Key Store for managing local Thread and Log keys.
 */
export declare class LogStore {
    keys: KeyBook;
    constructor(keys: KeyBook);
    /**
     * Create a new LogStore from an existing datastore instance.
     * @param store
     */
    static fromDatastore(store: Datastore<Buffer>): LogStore;
    /**
     * Close the underlying key store.
     */
    close(): Promise<void>;
    /**
     * Threads returns all threads in the store.
     */
    threads(): Promise<Set<ThreadID>>;
    /**
     * Logs returns all logs under the given thread.
     * @param id Thread ID.
     */
    logs(id: ThreadID): Promise<Set<LogID>>;
    /**
     * AddThread adds a thread with keys.
     * @param info Thread information.
     */
    addThread(info: ThreadInfo): Promise<void>;
    /**
     * deleteThread removes a thread from the store.
     * @param id Thread ID.
     */
    deleteThread(id: ThreadID): Promise<void>;
    /**
     * threadInfo returns info about a thread.
     * @param id Thread ID.
     */
    threadInfo(id: ThreadID): Promise<ThreadInfo>;
    /**
     * addLog adds a log to a thread.
     * @param id Thread ID.
     * @param info Log information.
     */
    addLog(id: ThreadID, info: LogInfo): Promise<void>;
    /**
     * deleteLog removes a log under the given thread.
     * @param id Thread ID.
     * @param log Log ID.
     */
    deleteLog(id: ThreadID, log: LogID): Promise<void>;
    /**
     * logInfo returns info about a given log.
     * @param id The Thread ID.
     * @param log The Log ID.
     */
    logInfo(id: ThreadID, log: LogID): Promise<LogInfo>;
}
