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 { EventsGetMessage, EventsGetReply, PermissionsGrantMessage, PermissionsRequestMessage, PermissionsRevokeMessage, ProtocolsConfigureMessage, ProtocolsQueryMessage, ProtocolsQueryReply } from './index.js';
import type { GenericMessageReply, UnionMessageReply } from './core/message-reply.js';
import type { MessagesGetMessage, MessagesGetReply } from './types/messages-types.js';
import type { RecordsDeleteMessage, 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: EventsGetMessage): Promise<EventsGetReply>;
    processMessage(tenant: string, rawMessage: MessagesGetMessage): Promise<MessagesGetReply>;
    processMessage(tenant: string, rawMessage: ProtocolsConfigureMessage): Promise<GenericMessageReply>;
    processMessage(tenant: string, rawMessage: ProtocolsQueryMessage): Promise<ProtocolsQueryReply>;
    processMessage(tenant: string, rawMessage: PermissionsRequestMessage): Promise<GenericMessageReply>;
    processMessage(tenant: string, rawMessage: PermissionsGrantMessage): Promise<GenericMessageReply>;
    processMessage(tenant: string, rawMessage: PermissionsRevokeMessage): Promise<GenericMessageReply>;
    processMessage(tenant: string, rawMessage: RecordsDeleteMessage): Promise<GenericMessageReply>;
    processMessage(tenant: string, rawMessage: RecordsQueryMessage): Promise<RecordsQueryReply>;
    processMessage(tenant: string, rawMessage: RecordsReadMessage): Promise<RecordsReadReply>;
    processMessage(tenant: string, rawMessage: RecordsWriteMessage, dataStream?: Readable): Promise<GenericMessageReply>;
    processMessage(tenant: string, rawMessage: unknown, dataStream?: Readable): Promise<UnionMessageReply>;
    /**
     * 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>;
}
/**
 * DWN configuration.
 */
export type DwnConfig = {
    didResolver?: DidResolver;
    tenantGate?: TenantGate;
    messageStore: MessageStore;
    dataStore: DataStore;
    eventLog: EventLog;
};
//# sourceMappingURL=dwn.d.ts.map