UNPKG

charms-js

Version:

TypeScript SDK for decoding Bitcoin transactions containing Charms data

22 lines (21 loc) 1.07 kB
import { BitcoinNetwork, NetworkConfig, CharmExtractionResult } from './shared/types.js'; /** * Extracts and verifies charms from a Bitcoin transaction. * * @param txHex - Raw transaction in hexadecimal format * @param network - Bitcoin network ('mainnet' or 'testnet4') * @returns Extraction result containing charms array and success status */ export declare function extractAndVerifySpell(txHex: string, network?: BitcoinNetwork): Promise<CharmExtractionResult>; /** * Fetches raw transaction hex from mempool.space API. * * @param txId - Transaction ID to fetch * @param config - Optional network configuration * @returns Transaction hex string, or null if not found */ export declare function fetchTransactionHex(txId: string, config?: NetworkConfig): Promise<string | null>; export * from './shared/types.js'; export * from './shared/utils.js'; export { initializeWasm, isWasmAvailable, getWasmInfo, extractCharmsWithWasm } from './shared/wasm-integration.js'; export { normalizeCharmForWallet, extractCharmsForWallet } from './shared/wallet-adapter.js';