import GitWarpTickWitnessLadder from "./GitWarpTickWitnessLadder.js";
import ProvenancePayload from "../services/provenance/ProvenancePayload.js";
/** Replay-bearing hologram for one admitted git-warp tick. */
export default class GitWarpTickHologram {
    witnessLadder;
    payload;
    constructor(fields) {
        this.witnessLadder = new GitWarpTickWitnessLadder(fields);
        this.payload = new ProvenancePayload([{ patch: fields.patch, sha: fields.patchSha }]);
        Object.freeze(this);
    }
    get patchSha() {
        return this.witnessLadder.replayCore.patchSha;
    }
    get writer() {
        return this.witnessLadder.replayCore.writer;
    }
    get lamport() {
        return this.witnessLadder.replayCore.lamport;
    }
    /** Deterministically materializes the successor state for this tick. */
    materializeFrom(initialState) {
        return this.payload.replay(initialState);
    }
}
