示例工程 39-secrets-safestorage

39-secrets-safestorage/app/.tsc/shared/vault.d.ts

typescript · 0.7 KB

import type { EncryptedValue } from "./crypto";
export type VaultSecret = {
    id: string;
    name: string;
    createdAt: string;
    updatedAt: string;
    value: EncryptedValue;
};
export type VaultDoc = {
    version: 1;
    keyId: number;
    wrappedKey: string;
    secrets: VaultSecret[];
};
export declare function vaultFile(dir: string): string;
export declare function isVaultDoc(value: unknown): value is VaultDoc;
export declare function saveVault(dir: string, doc: VaultDoc): number;
export declare function loadVault(dir: string): {
    doc: VaultDoc | null;
    error: string;
    bytes: number;
};
export declare function vaultReadableText(dir: string): string;
//# sourceMappingURL=vault.d.ts.map