From: Chris Duncan Date: Fri, 8 Aug 2025 02:40:44 +0000 (-0700) Subject: Remove deprecated separate blake ckd file. X-Git-Tag: v0.10.5~43^2~33 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=bd799ed55f7140c51908a78d3acb1d8e9e900389;p=libnemo.git Remove deprecated separate blake ckd file. --- diff --git a/src/lib/blake2b-ckd.ts b/src/lib/blake2b-ckd.ts deleted file mode 100644 index d498981..0000000 --- a/src/lib/blake2b-ckd.ts +++ /dev/null @@ -1,27 +0,0 @@ -//! SPDX-FileCopyrightText: 2025 Chris Duncan -//! SPDX-License-Identifier: GPL-3.0-or-later - -import { Blake2b } from './blake2b' - -/** -* Derives account private keys from a wallet seed using the BLAKE2b hashing -* algorithm. -* -* Separately, account public keys are derived from the private key using the -* Ed25519 key algorithm, and account addresses are derived from the public key -* as described in the Nano documentation. -* https://docs.nano.org/integration-guides/the-basics/ -* -* @param {ArrayBuffer} seed - 32-byte secret seed of the wallet -* @param {number} index - 4-byte index of account to derive -* @returns {ArrayBuffer} Private key for the account -*/ -export class Blake2bCkd { - static ckd (seed: ArrayBuffer, index: number): ArrayBuffer { - const b = new ArrayBuffer(4) - new DataView(b).setUint32(0, index, false) - const s = new Uint8Array(seed) - const i = new Uint8Array(b) - return new Blake2b(32).update(s).update(i).digest().buffer - } -} diff --git a/src/lib/safe.ts b/src/lib/safe.ts index 89a67b3..74a773b 100644 --- a/src/lib/safe.ts +++ b/src/lib/safe.ts @@ -7,7 +7,6 @@ import { parentPort } from 'node:worker_threads' import { Bip39Mnemonic } from './bip39' import { Bip44Ckd } from './bip44' import { Blake2b } from './blake2b' -import { Blake2bCkd } from './blake2b-ckd' import { default as Constants, BIP44_COIN_NANO } from './constants' import { default as Convert, bytes, hex, utf8 } from './convert' import { Entropy } from './entropy' @@ -534,7 +533,6 @@ export default ` const Bip39Mnemonic = ${Bip39Mnemonic} const Bip44Ckd = ${Bip44Ckd} const Blake2b = ${Blake2b} - const Blake2bCkd = ${Blake2bCkd} const Entropy = ${Entropy} const NanoNaCl = ${NanoNaCl} const Safe = ${Safe}