Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static async init () {
const supported = await LedgerNode.isSupported()
if (!supported) { throw new Error(`Your computer does not support the ledger!`) }
const paths = await NeonLedger.list()
if (paths.length === 0) throw new Error('USB Error: No device found.')
const ledger = new NeonLedger(paths[0])
return ledger.open()
}