]> zoso.dev Git - libnemo.git/commitdiff
Fix invalid index size.
authorChris Duncan <chris@zoso.dev>
Mon, 11 Nov 2024 09:58:23 +0000 (01:58 -0800)
committerChris Duncan <chris@zoso.dev>
Mon, 11 Nov 2024 09:58:23 +0000 (01:58 -0800)
src/lib/ckd.ts

index f7e2d050d9ee7c7b6fe4baabb7e8131c70c804c4..615774eb8123ee0ed7eb685636c710fd5894b549 100644 (file)
@@ -51,7 +51,7 @@ async function ckdBip44 (seed: string, index: number): Promise<Account> {
 * @returns {Promise<Account>}
 */
 async function ckdBlake2b (seed: string, index: number): Promise<Account> {
-       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)
 }