Vana SDK - v2.2.2
    Preparing search index...

    Class BrowserPlatformAdapter

    Provides complete platform abstraction for browser environments.

    This adapter aggregates all browser-specific implementations of platform operations. It uses native Web APIs where possible and browser-compatible libraries for crypto and PGP operations using a custom ECIES implementation with @noble/secp256k1 for pure JavaScript cryptography.

    // Create a browser adapter instance
    const adapter = new BrowserPlatformAdapter();

    // All platform operations are available
    const encrypted = await adapter.crypto.encryptWithPublicKey(
    'secret',
    publicKey
    );

    const response = await adapter.http.fetch('/api/data');

    adapter.cache.set('key', 'value'); // Uses sessionStorage

    Implements

    Index

    Properties

    crypto: BrowserCryptoAdapter = ...

    Provides cryptographic operations.

    Handles ECIES, wallet encryption, and password-based encryption.

    pgp: BrowserPGPAdapter = ...

    Provides PGP operations.

    Handles PGP encryption, decryption, and key generation.

    http: BrowserHttpAdapter = ...

    Provides HTTP operations.

    Wraps fetch API for consistent cross-platform behavior.

    cache: BrowserCacheAdapter = ...

    Provides caching operations.

    Platform-appropriate storage for temporary data.

    platform: "browser" = ...

    Identifies the platform type.

    Used for debugging, telemetry, and conditional logic. Must be 'node' or 'browser'.