UNPKG

@opendatalabs/vana-sdk

Version:

A TypeScript library for interacting with Vana Network smart contracts.

24 lines (23 loc) 924 B
/** * Shared error utilities for platform adapters * * IMPORTANT: This module contains NO IMPORTS to avoid affecting bundle loading. * All functions are pure utilities that can be safely shared across platforms. */ /** * Wrap platform-specific errors with consistent messaging * Provides consistent error formatting across all crypto operations * * @param operation The operation that failed (e.g., "encryption", "decryption") * @param error The original error that occurred * @returns Wrapped error with consistent format */ export declare function wrapCryptoError(operation: string, error: unknown): Error; /** * Validate encrypted data structure has required fields * Ensures encrypted data objects contain the expected properties * * @param data The data structure to validate * @throws Error if data structure is invalid */ export declare function validateEncryptedDataStructure(data: unknown): void;