UNPKG

@opendatalabs/vana-sdk

Version:

A TypeScript library for interacting with Vana Network smart contracts.

30 lines (29 loc) 1.08 kB
/** * Browser-safe exports for platform adapters * * This file provides browser-safe exports that avoid importing Node.js dependencies * when bundling for browser environments. */ import type { VanaPlatformAdapter } from "./interface"; /** * Dynamically imports the NodePlatformAdapter only when needed * This prevents Node.js modules from being bundled in browser builds * * @returns Promise resolving to a NodePlatformAdapter instance * @throws {Error} If running in a browser environment */ export declare function createNodePlatformAdapter(): Promise<VanaPlatformAdapter>; /** * Creates a BrowserPlatformAdapter instance * * @returns A BrowserPlatformAdapter instance */ export declare function createBrowserPlatformAdapter(): VanaPlatformAdapter; /** * Browser-safe platform adapter factory * * @returns Promise resolving to the appropriate platform adapter */ export declare function createPlatformAdapterSafe(): Promise<VanaPlatformAdapter>; export type { VanaPlatformAdapter } from "./interface"; export type { BrowserPlatformAdapter } from "./browser";