공개된 소스
소스 ZIP 다운로드
CH-J Tools
특정 애플리케이션 릴리스의 디렉터리와 파일을 살펴보세요.
CH-J / Server Manager
872 개 파일
core-20261030T220507Z-61e4558d889f
추가됨: · 빌드됨:
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 · 소스는 CH-J Proprietary Software License 1.14에 따라 제공됩니다. 소스를 공개한다고 해서 라이선스 조항이 바뀌거나 추가 권리가 부여되지는 않습니다.
압축 파일 SHA-256
77380d4805485ffa4027fbe7858b5836f197a4aa9d52358a43e2d12d018744df