/** * Encoding and fail-closed decoding for the application outbox's index * records (WFT-85): the per-outbox header, the idempotency binding, and the * delivery-id entries the due, listing, and terminal indexes hold. * * @module core/outbox-index-codec */ import type { ApplicationDeliveryIdempotencyRecord, OutboxRecord } from './outbox-types.ts'; /** * Decode the per-outbox header. * * @throws {PersistedDataCorruptError} When the stored bytes are malformed or * name a different outbox than the key does. */ export declare function decodeOutboxRecord(bytes: Uint8Array, key: string): OutboxRecord; /** Encode the per-outbox header. */ export declare function encodeOutboxRecord(record: OutboxRecord): Uint8Array; /** * Decode an idempotency binding. * * @throws {PersistedDataCorruptError} When the stored bytes are malformed. */ export declare function decodeApplicationDeliveryIdempotencyRecord(bytes: Uint8Array, key: string): ApplicationDeliveryIdempotencyRecord; /** Encode an idempotency binding. */ export declare function encodeApplicationDeliveryIdempotencyRecord(record: ApplicationDeliveryIdempotencyRecord): Uint8Array; /** * Decode a due, listing, or terminal index entry: the delivery id it points at. * * @throws {PersistedDataCorruptError} When the entry is not a usable identifier. */ export declare function decodeApplicationDeliveryEntry(bytes: Uint8Array, key: string): string; /** Encode a due, listing, or terminal index entry. */ export declare function encodeApplicationDeliveryEntry(deliveryId: string): Uint8Array;