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

    Interface VanaPlatformAdapter

    Aggregates all platform-specific adapters into a single interface.

    This is the main interface for platform abstraction. Implementations must provide all required adapters while maintaining consistent behavior and data formats across platforms.

    Implementation Guidelines:

    1. All methods must maintain consistent behavior across platforms
    2. Error types and messages should be unified
    3. Data formats (encoding, serialization) must be identical
    4. Performance characteristics can vary but API must be consistent
    // Custom implementation for specialized environment
    class EdgePlatformAdapter implements VanaPlatformAdapter {
    crypto = new EdgeCryptoAdapter();
    pgp = new EdgePGPAdapter();
    http = new EdgeHttpAdapter();
    cache = new EdgeCacheAdapter();
    platform = 'browser' as const; // Edge is browser-like
    }

    // Use with SDK
    const client = createClient({
    platformAdapter: new EdgePlatformAdapter()
    });
    interface VanaPlatformAdapter {
        crypto: VanaCryptoAdapter;
        pgp: VanaPGPAdapter;
        http: VanaHttpAdapter;
        cache: VanaCacheAdapter;
        platform: PlatformType;
    }

    Implemented by

    Index

    Properties

    crypto: VanaCryptoAdapter

    Provides cryptographic operations.

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

    pgp: VanaPGPAdapter

    Provides PGP operations.

    Handles PGP encryption, decryption, and key generation.

    http: VanaHttpAdapter

    Provides HTTP operations.

    Wraps fetch API for consistent cross-platform behavior.

    cache: VanaCacheAdapter

    Provides caching operations.

    Platform-appropriate storage for temporary data.

    platform: PlatformType

    Identifies the platform type.

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