#!/usr/bin/env bare
// Full hyper-wallet with keet-identity + WDK
import 'bare-node-runtime/global'
const IdentityKey = require('keet-identity-key')
import WDK from '@tetherto/wdk'
import WalletManagerEvm from '@tetherto/wdk-wallet-evm'
import WalletManagerBtc from '@tetherto/wdk-wallet-btc'
console.log('🔐 Testing Full Hyper-Wallet Stack...')
console.log('')
// Generate keet identity (24 words)
const mnemonic = IdentityKey.generateMnemonic()
const identity = await IdentityKey.from({ mnemonic })
console.log('✅ Identity (keet-identity-key):')
console.log(` Public Key: ${identity.identityKeyPair.publicKey.toString('hex').slice(0, 32)}...`)
console.log('')
// Use first 12 words for WDK wallet
const wdkMnemonic = mnemonic.split(' ').slice(0, 12).join(' ')
const wdk = new WDK(wdkMnemonic)
.registerWallet('ethereum', WalletManagerEvm, {
provider: 'https://ethereum-sepolia-rpc.publicnode.com'
})
.registerWallet('bitcoin', WalletManagerBtc, {
network: 'testnet',
host: 'electrum.blockstream.info',
port: 60001
})
const ethAccount = await wdk.getAccount('ethereum', 0)
const btcAccount = await wdk.getAccount('bitcoin', 0)
const ethAddress = await ethAccount.getAddress()
const btcAddress = await btcAccount.getAddress()
console.log('✅ Wallet (Tether WDK):')
console.log(` ETH: ${ethAddress}`)
console.log(` BTC: ${btcAddress}`)
console.log('')
console.log('🎉 COMPLETE STACK WORKS!')
console.log(' ✅ keet-identity-key (multi-device)')
console.log(' ✅ Tether WDK (Bitcoin + Ethereum)')
console.log(' ✅ Bare runtime v1.26.0')