/** * Encrypted value prefix * Format: relic:v1:base64(salt + iv + ciphertext) */ export declare const ENCRYPTED_VALUE_PREFIX = "relic:v1:"; /** * Secrets data type - flat or nested key/value mapping */ export type SecretsData = Record; /** * Options for createRelic */ export interface RelicOptions { /** The encrypted artifact string. If not provided, reads from artifactPath or artifactEnv */ artifact?: string; /** Path to the artifact file. Reads file at runtime (Node.js only, not Edge) */ artifactPath?: string; /** Environment variable name for artifact. Default: "RELIC_ARTIFACT" */ artifactEnv?: string; /** Environment variable name for master key. Default: "RELIC_MASTER_KEY" */ masterKeyEnv?: string; /** Master key string. If not provided, reads from masterKeyEnv */ masterKey?: string; /** Whether to cache decrypted secrets. Default: true */ cache?: boolean; /** * Path to local override file (plain JSON). Values override encrypted secrets. * Set to false to disable. Default: "config/relic.local.json" */ localOverrides?: string | false; } /** * Relic instance interface */ export interface RelicInstance { /** Load and decrypt all secrets, returns cached result if available */ load(): Promise; /** Load only public secrets (from the "public" key), safe for frontend exposure */ loadPublic(): Promise; /** Get a specific secret by key, throws if not found */ get(key: string): Promise; /** Check if a key exists */ has(key: string): Promise; /** Get all keys */ keys(): Promise; } /** * Options for encryption (internal) */ export interface EncryptOptions { /** PBKDF2 iterations. Default: 150000 */ iterations?: number; } /** * Default configuration values */ export declare const Defaults: { readonly ARTIFACT_ENV: "RELIC_ARTIFACT"; readonly MASTER_KEY_ENV: "RELIC_MASTER_KEY"; readonly ARTIFACT_FILE: "config/relic.enc"; readonly KEY_FILE: "config/relic.key"; readonly LOCAL_OVERRIDES_FILE: "config/relic.local.json"; readonly TYPES_FILE: "config/relic.d.ts"; readonly KDF_ITERATIONS: 600000; readonly SALT_BYTES: 16; readonly IV_BYTES: 12; };