Documentation
    Preparing search index...

    Interface PajaLlmVault

    Encrypted-at-rest credential store with a session-only tier.

    interface PajaLlmVault {
        clear(): void;
        create(password: string): Promise<void>;
        getCredential(connectionId: string): string | undefined;
        hasStoredSecrets(): boolean;
        isUnlocked(): boolean;
        lock(): void;
        removeCredential(connectionId: string): Promise<void>;
        setCredential(
            connectionId: string,
            credential: string,
            storage: "session" | "vault",
        ): Promise<void>;
        subscribe(listener: () => void): () => void;
        unlock(password: string): Promise<boolean>;
    }
    Index

    Methods

    • Create an empty vault with a new password. Replaces any existing document.

      Parameters

      • password: string

      Returns Promise<void>

    • Read a credential from the unlocked vault or the session tier.

      Parameters

      • connectionId: string

      Returns string | undefined

    • Remove a credential from both tiers; vault removal requires an unlocked vault.

      Parameters

      • connectionId: string

      Returns Promise<void>

    • Store a credential. vault requires an unlocked vault and re-encrypts the document.

      Parameters

      • connectionId: string
      • credential: string
      • storage: "session" | "vault"

      Returns Promise<void>

    • Derive the key and decrypt stored secrets. Resolves false for a wrong password or corrupt document.

      Parameters

      • password: string

      Returns Promise<boolean>