const fs = require('fs'); const path = require('path'); // Read the SPF file const spfPath = path.join(process.env.HOME, 'sharenet_passport_creator', 'Test.spf'); const spfData = fs.readFileSync(spfPath); console.log('SPF file info:'); console.log(' Size:', spfData.length, 'bytes'); console.log(' First 32 bytes (hex):', spfData.slice(0, 32).toString('hex')); // Try to parse as CBOR to see the structure const cbor = require('cbor'); try { const parsed = cbor.decode(spfData); console.log('\nCBOR structure:'); console.log(JSON.stringify(parsed, null, 2)); } catch (error) { console.log('\nFailed to parse as CBOR:', error.message); // Try to see if it's a different format console.log('\nFirst few bytes as text:'); console.log(spfData.slice(0, 100).toString()); }