import type { DataStore } from './types/data-store.js';
import type { EventLog } from './types/event-log.js';
import type { MessageStore } from './types/message-store.js';
import type { Readable } from 'readable-stream';
import type { TenantGate } from './core/tenant-gate.js';
import type { GenericMessageReply, UnionMessageReply } from './core/message-reply.js';
import type { MessagesGetMessage, MessagesGetReply } from './types/messages-types.js';
import type { RecordsQueryMessage, RecordsQueryReply, RecordsReadMessage, RecordsReadReply, RecordsWriteMessage } from './types/records-types.js';
import { DidResolver } from './did/did-resolver.js';
import { DwnInterfaceName, DwnMethodName } from './core/message.js';
export declare class Dwn {
    private methodHandlers;
    private didResolver;
    private messageStore;
    private dataStore;
    private eventLog;
    private tenantGate;
    private constructor();
    /**
     * Creates an instance of the DWN.
     */
    static create(config?: DwnConfig): Promise<Dwn>;
    private open;
    close(): Promise<void>;
    /**
     * Processes the given DWN message and returns with a reply.
     * @param tenant The tenant DID to route the given message to.
     */
    processMessage(tenant: string, rawMessage: any, dataStream?: Readable): Promise<UnionMessageReply>;
    /**
     * Handles a `RecordsQuery` message.
     */
    handleRecordsQuery(tenant: string, message: RecordsQueryMessage): Promise<RecordsQueryReply>;
    /**
     * Handles a `RecordsRead` message.
     */
    handleRecordsRead(tenant: string, message: RecordsReadMessage): Promise<RecordsReadReply>;
    /**
     * Handles a `MessagesGet` message.
     */
    handleMessagesGet(tenant: string, message: MessagesGetMessage): Promise<MessagesGetReply>;
    /**
     * Privileged method for writing a pruned initial `RecordsWrite` to a DWN without needing to supply associated data.
     */
    synchronizePrunedInitialRecordsWrite(tenant: string, message: RecordsWriteMessage): Promise<GenericMessageReply>;
    /**
     * Checks tenant gate to see if tenant is allowed.
     * @param tenant The tenant DID to route the given message to.
     * @returns GenericMessageReply if the message has an integrity error, otherwise undefined.
     */
    validateTenant(tenant: string): Promise<GenericMessageReply | undefined>;
    /**
     * Validates structure of DWN message
     * @param tenant The tenant DID to route the given message to.
     * @param dwnMessageInterface The interface of DWN message.
     * @param dwnMessageMethod The interface of DWN message.
  
     * @returns GenericMessageReply if the message has an integrity error, otherwise undefined.
     */
    validateMessageIntegrity(rawMessage: any, expectedInterface?: DwnInterfaceName, expectedMethod?: DwnMethodName): Promise<GenericMessageReply | undefined>;
}
export type DwnConfig = {
    didResolver?: DidResolver;
    messageStore?: MessageStore;
    dataStore?: DataStore;
    tenantGate?: TenantGate;
    eventLog?: EventLog;
};
//# sourceMappingURL=dwn.d.ts.map