a = a.replace('%c', '<span style="font-weight:bold">')
output.innerHTML += `<pre>${a}</pre>`
consoleGroup(...args)
+ window?.scrollTo(0, document.body.scrollHeight)
}
const consoleError = console.error
console.error = (...args) => {
a = a.replace('%cFAIL ,color:red,', '<span style="color:red">FAIL </span>')
output.innerHTML += `<pre>${a}</pre>`
consoleError(...args)
+ window?.scrollTo(0, document.body.scrollHeight)
}
const consoleLog = console.log
console.log = (...args) => {
a = a.replace('%cTESTING COMPLETE,color:orange;font-weight:bold', '<span style="color:orange;font-weight:bold">TESTING COMPLETE</span>')
output.innerHTML += `<pre>${a}</pre>`
consoleLog(...args)
+ window?.scrollTo(0, document.body.scrollHeight)
}
})()
</script>
if (typeof index !== 'number' || index < 0 || index >= HARDENED_OFFSET) {\r
throw new TypeError('Invalid account index')\r
}\r
+ console.log('Waiting for signature confirmation on Ledger device...')\r
if (input instanceof Uint8Array) {\r
// input is a nonce\r
return await this.#signNonce(index, input)\r
if (typeof index !== 'number' || index < 0 || index >= HARDENED_OFFSET) {\r
throw new TypeError('Invalid account index')\r
}\r
- const purpose = dec.toBytes(BIP44_PURPOSE + HARDENED_OFFSET, 4)\r
- const coin = dec.toBytes(BIP44_COIN_NANO + HARDENED_OFFSET, 4)\r
const account = dec.toBytes(index + HARDENED_OFFSET, 4)\r
- const data = new Uint8Array([LEDGER_ADPU_CODES.bip32DerivationLevel, ...purpose, ...coin, ...account])\r
+ const data = new Uint8Array([...LedgerWallet.#derivationPath, ...account])\r
\r
const transport = await this.DynamicTransport.create(this.openTimeout, this.listenTimeout)\r
const response = await transport\r
} else {
fail(`${name}: test cannot execute on ${typeof fn} ${fn}`)
}
- window?.scrollTo(0, document.body.scrollHeight)
}
export const assert = {
// SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
// SPDX-License-Identifier: GPL-3.0-or-later
-// import './test.blake2b.mjs'
-// import './test.calculate-pow.mjs'
-// import './test.create-wallet.mjs'
-// import './test.derive-accounts.mjs'
-// import './test.import-wallet.mjs'
+import './test.blake2b.mjs'
+import './test.calculate-pow.mjs'
+import './test.create-wallet.mjs'
+import './test.derive-accounts.mjs'
+import './test.import-wallet.mjs'
import './test.ledger.mjs'
-// import './test.lock-unlock.mjs'
-// import './test.manage-rolodex.mjs'
-// import './test.refresh-accounts.mjs'
-// import './test.sign-blocks.mjs'
-// import './test.tools.mjs'
+import './test.lock-unlock.mjs'
+import './test.manage-rolodex.mjs'
+import './test.refresh-accounts.mjs'
+import './test.sign-blocks.mjs'
+import './test.tools.mjs'
console.log('%cTESTING COMPLETE', 'color:orange;font-weight:bold')