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

    Function generateEncryptionKey

    • Generate an encryption key by signing the canonical Vana encryption seed

      This is the standard protocol function for creating encryption keys in Vana. The signature serves as a symmetric encryption key for user data.

      Parameters

      • wallet: {}

        The user's wallet client for signing

      • seed: string = DEFAULT_ENCRYPTION_SEED

        Optional custom encryption seed (defaults to Vana standard)

      Returns Promise<string>

      The signature that serves as the encryption key

      When wallet account is required but not provided

      const encryptionKey = await generateEncryptionKey(walletClient);
      console.log('Generated encryption key:', encryptionKey);

      // Use with custom seed
      const customKey = await generateEncryptionKey(walletClient, 'my-custom-seed');