UNPKG

charms-js

Version:

TypeScript SDK for decoding Bitcoin transactions containing Charms data

29 lines (28 loc) 1.01 kB
/** * WASM Integration for Charms.js * Provides a simplified API that uses WASM when available, falls back to current implementation */ import { CharmExtractionResult } from './types.js'; /** * Initialize WASM module (to be called by consuming applications) * @param wasm - The loaded WASM module */ export declare function initializeWasm(wasm: any): void; /** * Check if WASM is available */ export declare function isWasmAvailable(): boolean; /** * Extract charms using WASM (when available) * @param txHex - Transaction hex string * @param txId - Transaction ID * @returns Standardized CharmExtractionResult */ export declare function extractCharmsWithWasm(txHex: string, txId: string, network?: 'mainnet' | 'testnet4'): Promise<CharmExtractionResult>; /** * Returns diagnostic information about the WASM module state. * Useful for troubleshooting initialization issues. * * @returns Object containing availability status and module metadata */ export declare function getWasmInfo(): any;