import { Consumable, TransformStream } from "@yume-chan/stream-extra"; import type { StructInit, StructValue } from "@yume-chan/struct"; export declare const AdbCommand: { readonly Auth: 1213486401; readonly Close: 1163086915; readonly Connect: 1314410051; readonly Okay: 1497451343; readonly Open: 1313165391; readonly Write: 1163154007; }; export type AdbCommand = (typeof AdbCommand)[keyof typeof AdbCommand]; export declare const AdbPacketHeader: import("@yume-chan/struct").Struct<{ command: import("@yume-chan/struct").NumberField; arg0: import("@yume-chan/struct").NumberField; arg1: import("@yume-chan/struct").NumberField; payloadLength: import("@yume-chan/struct").NumberField; checksum: import("@yume-chan/struct").NumberField; magic: import("@yume-chan/struct").NumberField; }, undefined, import("@yume-chan/struct").FieldsValue<{ command: import("@yume-chan/struct").NumberField; arg0: import("@yume-chan/struct").NumberField; arg1: import("@yume-chan/struct").NumberField; payloadLength: import("@yume-chan/struct").NumberField; checksum: import("@yume-chan/struct").NumberField; magic: import("@yume-chan/struct").NumberField; }>>; export type AdbPacketHeader = StructValue; export declare const AdbPacket: import("@yume-chan/struct").Struct<{ command: import("@yume-chan/struct").NumberField; arg0: import("@yume-chan/struct").NumberField; arg1: import("@yume-chan/struct").NumberField; payloadLength: import("@yume-chan/struct").NumberField; checksum: import("@yume-chan/struct").NumberField; magic: import("@yume-chan/struct").NumberField; } & { payload: import("@yume-chan/struct").Field, "payloadLength", Record<"payloadLength", number>, Uint8Array>; }, undefined, import("@yume-chan/struct").FieldsValue<{ command: import("@yume-chan/struct").NumberField; arg0: import("@yume-chan/struct").NumberField; arg1: import("@yume-chan/struct").NumberField; payloadLength: import("@yume-chan/struct").NumberField; checksum: import("@yume-chan/struct").NumberField; magic: import("@yume-chan/struct").NumberField; } & { payload: import("@yume-chan/struct").Field, "payloadLength", Record<"payloadLength", number>, Uint8Array>; }>>; export type AdbPacket = StructValue; /** * `AdbPacketData` contains all the useful fields of `AdbPacket`. * * `AdvDaemonConnection#connect` will return a `ReadableStream`, * allow each connection to encode `AdbPacket` in different methods. * * `AdbDaemonConnection#connect` will return a `WritableStream`, * however, `AdbDaemonTransport` will transform `AdbPacketData` to `AdbPacketInit` for you, * so `AdbSocket#writable#write` only needs `AdbPacketData`. */ export type AdbPacketData = Omit, "checksum" | "magic">; export type AdbPacketInit = StructInit; export declare function calculateChecksum(payload: Uint8Array): number; export declare class AdbPacketSerializeStream extends TransformStream, Consumable> { constructor(); } //# sourceMappingURL=packet.d.ts.map