import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
console.log('Testing WASM module loading...');
try {
const proofmode = await import('@guardianproject/proofmode');
console.log('✓ Module imported successfully');
console.log('Available exports:', Object.keys(proofmode));
if (proofmode.get_file_hash) {
const testData = new Uint8Array([1, 2, 3, 4, 5]);
const hash = proofmode.get_file_hash(testData);
console.log('✓ get_file_hash works:', hash);
}
} catch (error) {
console.error('✗ Failed to load module:', error.message);
console.error('Stack:', error.stack);
}