/**
 * Runtime-backed immutable byte value for public snapshots.
 */
export default class ImmutableBytes {
    #bytes;
    constructor(bytes) {
        this.#bytes = new Uint8Array(bytes);
        Object.freeze(this);
    }
    get length() {
        return this.#bytes.length;
    }
    at(index) {
        return this.#bytes.at(index);
    }
    toUint8Array() {
        return new Uint8Array(this.#bytes);
    }
    toArray() {
        return Object.freeze([...this.#bytes]);
    }
    values() {
        return this.#bytes.values();
    }
    [Symbol.iterator]() {
        return this.values();
    }
}
