* @param {number} index - Index of the account
* @returns {Promise<Account>}
*/
-onmessage = (event) => {
+globalThis.onmessage = (event) => {
let result = null
const { type, seed, index } = event.data
switch (type) {
import { ADDRESS_GAP, SEED_LENGTH_BIP44, SEED_LENGTH_BLAKE2B } from './constants.js'\r
import { bytes, dec } from './convert.js'\r
import { Entropy } from './entropy.js'\r
-// import { Pool } from './pool.js'\r
+import { Pool } from './pool.js'\r
import { Rpc } from './rpc.js'\r
import { Safe } from './safe.js'\r
import Tools from './tools.js'\r
import type { Ledger } from './ledger.js'\r
\r
-// const ckdPool = new Pool('./ckd.js')\r
+const ckdPool = new Pool('./ckd.js')\r
\r
/**\r
* Represents a wallet containing numerous Nano accounts derived from a single\r
* @returns {Promise<Account>}\r
*/\r
async ckd (index: number): Promise<Account> {\r
- const key = await nanoCKD(this.seed, index)\r
- return await Account.fromPrivateKey(key, index)\r
- // return await ckdPool.work({ type: 'bip44', seed: this.seed, index })\r
+ // const key = await nanoCKD(this.seed, index)\r
+ // return await Account.fromPrivateKey(key, index)\r
+ return await ckdPool.work({ type: 'bip44', seed: this.seed, index })\r
}\r
}\r
\r