{"version":3,"file":"ThresholdSession.mjs","names":[],"sources":["../../src/models/ThresholdSession.ts"],"sourcesContent":["/**\n * Threshold Session Model\n *\n * Tracks multi-party threshold reconstruction sessions\n */\n\n/**\n * A collected share during threshold reconstruction\n * Different from ThresholdShare in VaultHeader which is the encrypted share data\n */\nexport interface CollectedShare {\n  identifier: number\n  data: string // base64url\n  providedBy: string // DID\n  providedAt: Date\n}\n\nexport interface ThresholdSession {\n  id: string // Session UUID\n  vaultId: string\n  docId: string\n  threshold: number\n  shares: CollectedShare[]\n  status: 'pending' | 'complete' | 'expired' | 'failed'\n  reconstructedCek?: Uint8Array\n  initiatedBy: string // DID\n  createdAt: Date\n  expiresAt?: Date\n  purpose?: string\n}\n\nexport type ThresholdSessionStatus = ThresholdSession['status']\n\n/**\n * Check if session has met threshold\n */\nexport function hasMetThreshold(session: ThresholdSession): boolean {\n  return session.shares.length >= session.threshold\n}\n\n/**\n * Check if session is expired\n */\nexport function isSessionExpired(session: ThresholdSession): boolean {\n  if (!session.expiresAt) return false\n  return new Date() > session.expiresAt\n}\n"],"mappings":";;;;AAoCA,SAAgB,gBAAgB,SAAoC;AAClE,QAAO,QAAQ,OAAO,UAAU,QAAQ;;;;;AAM1C,SAAgB,iBAAiB,SAAoC;AACnE,KAAI,CAAC,QAAQ,UAAW,QAAO;AAC/B,wBAAO,IAAI,MAAM,GAAG,QAAQ"}