const coinKey = await this.CKDpriv(purposeKey, coin + HARDENED_OFFSET)
const accountKey = await this.CKDpriv(coinKey, account + HARDENED_OFFSET)
if (chain == null) return accountKey.privateKey
- const chainKey = await this.CKDpriv(accountKey, chain)
+ const chainKey = await this.CKDpriv(accountKey, chain + HARDENED_OFFSET)
if (address == null) return chainKey.privateKey
- const addressKey = await this.CKDpriv(chainKey, address)
+ const addressKey = await this.CKDpriv(chainKey, address + HARDENED_OFFSET)
return addressKey.privateKey
}