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

    Class NodePlatformAdapter

    Provides complete platform abstraction for Node.js environments.

    This adapter aggregates all Node.js-specific implementations of platform operations using a custom ECIES implementation with native secp256k1 for optimal performance and provides consistent APIs across all operations.

    // Create a custom Node.js adapter instance
    const adapter = new NodePlatformAdapter();

    // Use for encryption
    const encrypted = await adapter.crypto.encryptWithPublicKey(
    'secret data',
    publicKeyHex
    );

    // Use for caching
    adapter.cache.set('signature_key', signatureValue);

    Implements

    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: "node" = ...

    Identifies the platform type.

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