import { RequestOptions } from '../Chat.js'; import { ServiceId } from '../../Address.js'; import { PublicKey } from '../../EcKeys.js'; import { PreKeyBundle } from '../../ProtocolTypes.js'; import GroupSendFullToken from '../../zkgroup/groupsend/GroupSendFullToken.js'; declare module '../Chat' { interface UnauthenticatedChatConnection extends UnauthKeysService { } } export interface UnauthKeysService { /** * Fetch the prekeys for a given target user * * @throws {RequestUnauthorizedError} if `auth` is not valid for the target * @throws {ServiceIdNotFound} if the requested identity or device does * not exist or device has no available prekeys. */ getPreKeys: (request: { target: ServiceId; device: 'all' | { deviceId: number; }; auth: { accessKey: Uint8Array; } | GroupSendFullToken | 'unrestricted'; }, options?: RequestOptions) => Promise<{ identityKey: PublicKey; preKeyBundles: PreKeyBundle[]; }>; }