import type { DeviceEntry } from "./AppKeys"; import type { InvitePurpose } from "./Invite"; export type AppKeysSnapshotDecision = "advanced" | "stale" | "merged_equal_timestamp"; type MergeableAppKeys = { merge: (other: T) => T; }; export interface AppKeysSnapshotUpdate { decision: AppKeysSnapshotDecision; appKeys: T; createdAt: number; } export interface ApplyAppKeysSnapshotOptions> { currentAppKeys?: T | null; currentCreatedAt?: number; incomingAppKeys: T; incomingCreatedAt: number; } export declare function applyAppKeysSnapshot>(options: ApplyAppKeysSnapshotOptions): AppKeysSnapshotUpdate; export interface DeviceRegistrationState { isCurrentDeviceRegistered: boolean; hasKnownRegisteredDevices: boolean; noPreviousDevicesFound: boolean; requiresDeviceRegistration: boolean; canSendPrivateMessages: boolean; } export interface EvaluateDeviceRegistrationStateOptions { currentDevicePubkey?: string | null; registeredDevices: Array>; hasLocalAppKeys?: boolean; appKeysManagerReady?: boolean; sessionManagerReady?: boolean; } export declare function evaluateDeviceRegistrationState(options: EvaluateDeviceRegistrationStateOptions): DeviceRegistrationState; export declare function shouldRequireRelayRegistrationConfirmation(options: EvaluateDeviceRegistrationStateOptions): boolean; type SessionStateLike = { theirCurrentNostrPublicKey?: string; theirNextNostrPublicKey?: string; }; type SessionLike = { state?: SessionStateLike | null; }; type SessionDeviceLike = { activeSession?: SessionLike | null; inactiveSessions?: Array; }; type SessionAppKeysLike = { getAllDevices?: () => Array<{ identityPubkey?: string | null; }>; }; export type SessionUserRecordLike = { devices?: Map; appKeys?: SessionAppKeysLike | null; }; export type SessionUserRecordsLike = Map; export declare function isOwnDevicePubkey(pubkey: string, ownerPubkey: string, identityPubkey: string | null, devices: DeviceEntry[]): boolean; export declare function isOwnDeviceEvent(eventPubkey: string, sessionPubkey: string, ownerPubkey: string, identityPubkey: string | null, devices: DeviceEntry[]): boolean; export declare function hasExistingSessionWithRecipient(userRecords: SessionUserRecordsLike | null | undefined, recipientPubkey: string): boolean; export declare function resolveSessionPubkeyToOwner(userRecords: SessionUserRecordsLike | null | undefined, pubkey: string): string; export type RumorLike = { pubkey: string; tags?: string[][]; }; export declare function resolveRumorPeerPubkey(options: { ownerPubkey: string; rumor: RumorLike; senderPubkey?: string | null; }): string | undefined; export declare function resolveConversationCandidatePubkeys(options: { ownerPubkey: string; rumor: RumorLike; senderPubkey: string; }): string[]; export interface InviteOwnerRoutingResolution { ownerPublicKey: string; claimedOwnerPublicKey: string; verifiedWithAppKeys: boolean; usedLinkBootstrapException: boolean; fellBackToDeviceIdentity: boolean; } export declare function resolveInviteOwnerRouting(options: { devicePubkey: string; claimedOwnerPublicKey?: string | null; invitePurpose?: InvitePurpose; currentOwnerPublicKey: string; appKeys?: { getAllDevices: () => Array>; } | null; }): InviteOwnerRoutingResolution; export {}; //# sourceMappingURL=multiDevice.d.ts.map