/**
 * Semantic BTR fields covered by HMAC.
 *
 * The envelope is not a wire DTO. It carries domain meaning and leaves
 * canonical byte production to the boundary codec adapter.
 */
import BoundaryTransitionProvenance from "./BoundaryTransitionProvenance.js";
export default class BtrSigningEnvelope {
    version;
    h_in;
    h_out;
    t;
    #initialStateBytes;
    #provenance;
    constructor(input) {
        this.version = input.version;
        this.h_in = input.h_in;
        this.h_out = input.h_out;
        this.#initialStateBytes = new Uint8Array(input.U_0);
        this.#provenance = input.P instanceof BoundaryTransitionProvenance
            ? input.P
            : new BoundaryTransitionProvenance(input.P);
        this.t = input.t;
        Object.freeze(this);
    }
    get U_0() {
        return new Uint8Array(this.#initialStateBytes);
    }
    get P() {
        return this.#provenance.entries();
    }
    get provenance() {
        return this.#provenance;
    }
}
export { BtrSigningEnvelope };
