Vana SDK - v0.1.0
    Preparing search index...

    Interface VanaPGPAdapter

    PGP operations that require different configurations per platform

    interface VanaPGPAdapter {
        encrypt(data: string, publicKey: string): Promise<string>;
        decrypt(encryptedData: string, privateKey: string): Promise<string>;
        generateKeyPair(
            options?: { name?: string; email?: string; passphrase?: string },
        ): Promise<{ publicKey: string; privateKey: string }>;
    }
    Index

    Methods

    • Encrypt data using PGP with proper platform configuration

      Parameters

      • data: string

        The data to encrypt

      • publicKey: string

        The PGP public key

      Returns Promise<string>

      Promise resolving to encrypted data

    • Decrypt data using PGP with proper platform configuration

      Parameters

      • encryptedData: string

        The encrypted data

      • privateKey: string

        The PGP private key

      Returns Promise<string>

      Promise resolving to decrypted data

    • Generate a new PGP key pair with platform-appropriate configuration

      Parameters

      • Optionaloptions: { name?: string; email?: string; passphrase?: string }

        Key generation options

        • Optionalname?: string

          The name for the PGP key

        • Optionalemail?: string

          The email for the PGP key

        • Optionalpassphrase?: string

          Optional passphrase to protect the private key

      Returns Promise<{ publicKey: string; privateKey: string }>

      Promise resolving to public and private key pair