keynotes — API
useMixIdSync
Section titled “useMixIdSync”src/shared/hooks/useMixIdSync.ts
export function useMixIdSync()useVault
Section titled “useVault”export function useVault()EntryType
Section titled “EntryType”export type EntryType = 'note' | 'key' | 'password'BaseEntry
Section titled “BaseEntry”export interface BaseEntry { id: string type: EntryType title: string category?: string tags: string[] createdAt: string updatedAt: string encrypted: boolean}NoteEntry
Section titled “NoteEntry”export interface NoteEntry extends BaseEntry { type: 'note' content: string language?: string // For code snippets}KeyEntry
Section titled “KeyEntry”export interface KeyEntry extends BaseEntry { type: 'key' key: string publicKey?: string algorithm?: string keySize?: number notes?: string}PasswordEntry
Section titled “PasswordEntry”export interface PasswordEntry extends BaseEntry { type: 'password' username?: string password: string url?: string notes?: string}export type Entry = NoteEntry | KeyEntry | PasswordEntryexport interface Vault { passwordHash: string entries: Entry[] version: number createdAt: string updatedAt: string}AppSettings
Section titled “AppSettings”export interface AppSettings { masterPasswordHash?: string mixIdConnected: boolean syncEnabled: boolean autoLock: boolean lockTimeout: number // in minutes lastUnlockTime?: number}encrypt
Section titled “encrypt”src/shared/utils/encryption.ts
export function encrypt(data: string, password: string): stringdecrypt
Section titled “decrypt”src/shared/utils/encryption.ts
export function decrypt(encryptedData: string, password: string): stringhashPassword
Section titled “hashPassword”src/shared/utils/encryption.ts
export function hashPassword(password: string): stringverifyPassword
Section titled “verifyPassword”src/shared/utils/encryption.ts
export function verifyPassword(password: string, hash: string): boolean