From: Chris Duncan Date: Mon, 11 Nov 2024 09:58:23 +0000 (-0800) Subject: Fix invalid index size. X-Git-Tag: v0.0.20~25 X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=25a91ca000672435d143f6517860f486caf51e51;p=libnemo.git Fix invalid index size. --- diff --git a/src/lib/ckd.ts b/src/lib/ckd.ts index f7e2d05..615774e 100644 --- a/src/lib/ckd.ts +++ b/src/lib/ckd.ts @@ -51,7 +51,7 @@ async function ckdBip44 (seed: string, index: number): Promise { * @returns {Promise} */ async function ckdBlake2b (seed: string, index: number): Promise { - const hash = await Tools.blake2b([seed, dec.toHex(index, 4)]) + const hash = await Tools.blake2b([seed, dec.toHex(index, 8)]) const key = bytes.toHex(hash) return await Account.fromPrivateKey(key, index) }