///
import type { ProcessableUnit } from "../processor.js";
import type { Block, BlockData, BlockJson } from "./block.js";
export interface CommitJson {
readonly block: BlockJson;
readonly proof: CommitProof;
readonly serialized: string;
}
export interface Commit {
readonly block: Block;
readonly proof: CommitProof;
readonly serialized: string;
}
export interface CommitData {
readonly block: BlockData;
readonly proof: CommitProof;
readonly serialized: string;
}
export type CommitSerializable = Omit;
export interface CommitFactory {
fromBytes(buff: Buffer): Promise;
fromJson(json: CommitJson): Promise;
}
export interface CommitProof {
readonly round: number;
readonly signature: string;
readonly validators: boolean[];
}
export interface CommitSerializer {
proofSize(): number;
serializeCommitProof(proof: CommitProof): Promise;
serializeCommit(commit: CommitSerializable): Promise;
}
export interface CommitDeserializer {
deserializeCommitProof(serialized: Buffer): Promise;
}
export interface CommitHandler {
onCommit(unit: ProcessableUnit): Promise;
}
//# sourceMappingURL=commit.d.ts.map