import ApertureOpeningProof from "./ApertureOpeningProof.js";
import ZKWormholeEdge from "./ZKWormholeEdge.js";
import WarpError from "../../errors/WarpError.js";
/** Successful opening-proof verification for one cold wormhole coordinate. */
export default class VerifiedApertureOpening {
    edge;
    opening;
    constructor(edge, opening) {
        if (!(edge instanceof ZKWormholeEdge)) {
            throw new WarpError('edge must be a ZKWormholeEdge', 'E_VALIDATION');
        }
        if (!(opening instanceof ApertureOpeningProof)) {
            throw new WarpError('opening must be an ApertureOpeningProof', 'E_VALIDATION');
        }
        this.edge = edge;
        this.opening = opening;
        Object.freeze(this);
    }
    evaluatedValueBytes() {
        return this.opening.evaluatedValueBytes();
    }
}
