Veröffentlichte Quellen
Quellen als ZIP herunterladen
CH-J Tools
Durchsuchen Sie Verzeichnisse und Dateien einer bestimmten Anwendungsausgabe.
CH-J / Server Manager
872 Dateien
core-20261030T220507Z-61e4558d889f
Hinzugefügt: · Erstellt:
1
/** Encrypted vault and OS-protected (biometric) unlocking. Secrets never leave the Rust Core. */2
import { call } from "../transport";3
import type { BiometricStatus, Result, VaultStatus } from "../types";5
async function unwrap<T>(command: string, channel: string): Promise<T> {6
const result = await call<Result<T>>(command, channel);7
if (!result.ok) throw Object.assign(new Error(result.error.message), { code: result.error.code });8
return result.value;9
}11
export const vault = Object.freeze({12
status: () => call<VaultStatus>("core_vault_status", "vault:status"),13
create: (password: string) => call<VaultStatus>("core_vault_create", "vault:create", { password }),14
unlock: (password: string) => call<VaultStatus>("core_vault_unlock", "vault:unlock", { password }),15
lock: () => call<VaultStatus>("core_vault_lock", "vault:lock"),16
reset: (confirmation: string) => call<VaultStatus>("core_vault_reset", "vault:reset", { confirmation })17
});19
export const biometrics = Object.freeze({20
status: () => unwrap<BiometricStatus>("core_biometrics_status", "biometrics:status"),21
enable: () => unwrap<BiometricStatus>("core_biometrics_enable", "biometrics:enable"),22
disable: () => unwrap<{ enabled: false; enrolled: false }>("core_biometrics_disable", "biometrics:disable"),23
unlock: () => unwrap<VaultStatus>("core_biometrics_unlock", "biometrics:unlock"),24
autoUnlock: () => unwrap<{ attempted: boolean; reason?: string; status?: VaultStatus; error?: { code: string } }>("core_biometrics_auto_unlock", "biometrics:autoUnlock"),25
authenticate: () => unwrap<{ authenticated: true }>("core_biometrics_authenticate", "biometrics:authenticate")26
});SHA-256
21b41491ea0d7008f21a59ab7c65d0a07f73e558f8a9878a74e477b48f2c978aCH-J Proprietary Software License 1.14 · Die Quellen werden unter der CH-J Proprietary Software License 1.14 bereitgestellt. Ihre Verfügbarkeit ändert die Lizenzbedingungen nicht und gewährt keine zusätzlichen Rechte.
SHA-256 des Archivs
77380d4805485ffa4027fbe7858b5836f197a4aa9d52358a43e2d12d018744df