import WarpError from "./errors/WarpError.js";
export default class WarpWorldlineOpticBasis {
    kind = 'checkpoint-tail-optic-basis';
    worldlineName;
    checkpointSha;
    constructor(options) {
        assertNonEmpty(options.worldlineName, 'worldlineName');
        assertNonEmpty(options.checkpointSha, 'checkpointSha');
        this.worldlineName = options.worldlineName;
        this.checkpointSha = options.checkpointSha;
        Object.freeze(this);
    }
}
function assertNonEmpty(value, field) {
    if (typeof value !== 'string' || value.trim().length === 0) {
        throw new WarpError('WarpWorldline optic basis requires non-empty identity fields', 'E_WARP_WORLDLINE_OPTIC_BASIS', { context: { field } });
    }
}
