import * as protocol from '../protocol.pb'; import { EncryptionKeys } from './encryption'; export type { EncryptionKeys }; export declare enum CommandType { setKey = "setKey", unlock = "unlock", timeSync = "timeSync", nuke = "nuke", protect = "protect" } export interface CommandMap { [CommandType.setKey]: protocol.SetKey; [CommandType.unlock]: protocol.Unlock; [CommandType.timeSync]: protocol.TimeSync; [CommandType.nuke]: protocol.Nuke; [CommandType.protect]: protocol.Protect; } export declare type Command = { [K in keyof CommandMap]-?: Required> & Partial>>; }[keyof CommandMap]; export declare enum EncodingEncryptionStrategy { secretCode = "secretcode", key = "key" } export interface EncodingOptions { commandId?: number; expireAt?: number; boxId?: string | Iterable; secretCode?: string | Iterable; keys?: EncryptionKeys; encryptionStrategy?: EncodingEncryptionStrategy; } export declare const splitCommandV1: (buffer: Uint8Array, chunkSize?: number) => Promise; export declare const parseResultV1: (response: DataView | ArrayBuffer, characteristicUUID: string | number) => Promise; export declare const createCommandV1: (privateKey: Uint8Array, publicKey: Uint8Array, expireAt?: number, payload?: Iterable) => Promise; export declare const encodeCommandV2: (command: Command, options?: EncodingOptions) => Promise; export declare const encodeResultV2: (commandId: number, value?: number, errorCode?: number) => Promise; export declare const chunkBufferV2: (buffer: ArrayBufferLike) => Promise; export declare const parseBufferChunkV2: (chunk: DataView) => Promise<{ buffer: number[]; isLast: boolean; }>; export declare const decodeChunkedResultV2: (chunks: number[][]) => Promise; export declare const decodeChunkedPacketV2: (chunks: number[][], options?: EncodingOptions) => Promise<{ packet: protocol.Packet; encryptedPacket: protocol.EncryptedPacket; }>;