import { type LexValue } from '@atproto/lex-data'; import { type ErrorFrameBody, type ErrorFrameHeader, type FrameHeader, FrameType, type MessageFrameHeader } from './types.js'; export declare abstract class Frame { abstract header: FrameHeader; abstract body: T; get op(): FrameType; toBytes(): Uint8Array; isMessage(): this is MessageFrame; isError(): this is ErrorFrame; static fromBytes(bytes: Uint8Array): ErrorFrame | MessageFrame; } export declare class MessageFrame extends Frame { header: MessageFrameHeader; body: T; constructor(body: T, opts?: { type?: string; }); get type(): string | undefined; static fromLexValue(data: LexValue, nsid: string): MessageFrame<{ [x: string]: LexValue | undefined; }> | MessageFrame; } export declare class ErrorFrame extends Frame> { header: ErrorFrameHeader; body: ErrorFrameBody; constructor(body: ErrorFrameBody); get code(): T; get message(): string | undefined; static fromError(err: unknown): ErrorFrame; } //# sourceMappingURL=frames.d.ts.map