OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-wallet / tests / manual / test-keet-bare.cjs

25 lines · javascript ref:
// Test if keet-identity-key works with Bare (CommonJS)
const IdentityKey = require('keet-identity-key')

console.log('Testing keet-identity-key with Bare...')
console.log('IdentityKey:', typeof IdentityKey)

async function test() {
  try {
    const mnemonic = IdentityKey.generateMnemonic()
    console.log('✅ Generated mnemonic:', mnemonic.split(' ').length, 'words')
    
    // Try creating an identity
    const id = await IdentityKey.from({ mnemonic })
    console.log('✅ Created identity')
    console.log('   Public key:', id.identityKeyPair.publicKey.toString('hex').slice(0, 16) + '...')
    console.log('')
    console.log('🎉 keet-identity-key works with Bare!')
  } catch (err) {
    console.error('❌ Error:', err.message)
    if (process.env.DEBUG) console.error(err.stack)
  }
}

test()