import { CrdtWriter } from '../../util/binary/CrdtWriter';
import { type ITimespanStruct, type ITimestampStruct } from '../../clock';
import { CborEncoder } from '@jsonjoy.com/json-pack/lib/cbor/CborEncoder';
import type { JsonCrdtPatchOperation, Patch } from '../../Patch';
/**
 * JSON CRDT Patch "binary" codec encoder.
 */
export declare class Encoder extends CborEncoder<CrdtWriter> {
    readonly writer: CrdtWriter;
    private patchSid;
    /**
     * Creates a new encoder instance.
     *
     * @param writer An optional custom implementation of CRDT writer.
     */
    constructor(writer?: CrdtWriter);
    /**
     * Encodes a JSON CRDT Patch into a {@link Uint8Array} blob.
     *
     * @param patch A JSON CRDT Patch to encode.
     * @returns A {@link Uint8Array} blob containing the encoded JSON CRDT Patch.
     */
    encode(patch: Patch): Uint8Array;
    protected encodeOperations(patch: Patch): void;
    protected encodeId(id: ITimestampStruct): void;
    protected encodeTss(span: ITimespanStruct): void;
    private writeInsStr;
    protected encodeOperation(op: JsonCrdtPatchOperation): void;
}
