const data: any = []\r
indexes.forEach(i => data.push({ seed: this.seed, index: i }))\r
const privateKeys: KeyPair[] = await this.#poolBip44Ckd.assign(data)\r
+ for (let i = 0; i < privateKeys.length; i++) {\r
+ if (privateKeys[i].privateKey == null) {\r
+ privateKeys.splice(i, 1)\r
+ }\r
+ }\r
return privateKeys\r
}\r
}\r
static async work (data: any[]): Promise<any[]> {
for (const d of data) {
- if (d.coin != null && d.coin !== this.BIP44_PURPOSE) {
- d.privateKey = await this.ckd(d.seed, d.coin, d.index)
- } else {
- d.privateKey = await this.nanoCKD(d.seed, d.index)
+ try {
+ if (d.coin != null && d.coin !== this.BIP44_PURPOSE) {
+ d.privateKey = await this.ckd(d.seed, d.coin, d.index)
+ } else {
+ d.privateKey = await this.nanoCKD(d.seed, d.index)
+ }
+ } catch (err) {
+ d.privateKey = null
}
}
return data