import { type PayloadRefReader, type PayloadRefWriter } from "./payload-ref.ts";
import { type PayloadRef } from "./protocol.ts";
export type PackedPayload = {
    inline: true;
    value: unknown;
} | {
    inline: false;
    ref: PayloadRef;
};
/** Inline at or below `REF_THRESHOLD` JSON bytes; above it, by acknowledged reference. Same rule in both directions. */
export declare function packPayload(value: unknown, writer: PayloadRefWriter): Promise<PackedPayload>;
export declare function unpackPayload(ref: PayloadRef, reader: PayloadRefReader, signal?: AbortSignal): Promise<unknown>;
//# sourceMappingURL=payload-wire.d.ts.map