import type { GenericMessage } from '../types/message-types.js';
import type { MessageStore } from '../types/message-store.js';
import type { RecordsWrite } from './records-write.js';
import type { InternalRecordsWriteMessage, RecordsWriteMessage } from '../types/records-types.js';
/**
 * Gets the initial write from the given list of messages.
 */
export declare function getInitialWrite(messages: GenericMessage[]): Promise<RecordsWriteMessage>;
/**
 * Verifies that immutable properties of the two given messages are identical.
 * @throws {DwnError} if immutable properties between two RecordsWrite messages differ.
 */
export declare function verifyEqualityOfImmutableProperties(existingWriteMessage: RecordsWriteMessage, newMessage: RecordsWriteMessage): boolean;
/**
 * Gets the DID of the attesters of the given message.
 */
export declare function getAttesters(message: InternalRecordsWriteMessage): string[];
/**
 * Fetches the newest RecordsWrite for a given recordId from the message store.
 * @throws {DwnError} if no write is found.
 */
export declare function fetchNewestRecordsWrite(messageStore: MessageStore, tenant: string, recordId: string): Promise<RecordsWriteMessage>;
/**
 * Fetches the initial RecordsWrite of a record.
 * @returns The initial RecordsWrite if found; `undefined` otherwise.
 */
export declare function fetchInitialRecordsWrite(messageStore: MessageStore, tenant: string, recordId: string): Promise<RecordsWrite | undefined>;
/**
 * Fetches the initial RecordsWrite message of a record.
 * @returns The initial RecordsWriteMessage if found; `undefined` otherwise.
 */
export declare function fetchInitialRecordsWriteMessage(messageStore: MessageStore, tenant: string, recordId: string): Promise<RecordsWriteMessage | undefined>;
//# sourceMappingURL=records-write-query.d.ts.map