import { H2A_PROTOCOL, H2A_VERSION, type H2AActorRef, type H2AEnvelopeType, type H2ASignature } from "./types.js";
export interface H2AJournalPayload
{
id: string;
type: H2AEnvelopeType;
actor: H2AActorRef;
body: TBody;
createdAt: string;
target?: Partial;
artifactKind?: string;
contractId?: string;
engagementId?: string;
negotiationId?: string;
policyIds?: string[];
baseArtifactHash?: string;
causationId?: string;
correlationId?: string;
signatures?: H2ASignature[];
}
export interface H2AJournalEntry extends H2AJournalPayload {
protocol: typeof H2A_PROTOCOL;
version: typeof H2A_VERSION;
sequence: number;
prevHash?: string;
contentHash: string;
}
export declare function createJournalEntry(payload: H2AJournalPayload): H2AJournalEntry;
export declare function appendJournalEntry(previous: H2AJournalEntry, payload: H2AJournalPayload): H2AJournalEntry;
export type H2AJournalVerification = {
ok: true;
} | {
ok: false;
index: number;
reason: string;
};
export declare function verifyJournalChain(entries: ReadonlyArray>): H2AJournalVerification;
export declare function journalEntryAsCanonicalString(entry: H2AJournalEntry): string;
//# sourceMappingURL=journal.d.ts.map