From b5c2c6077aa9aa1d6e64d09f5daee0fa6e9a67e3 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Sun, 23 Nov 2025 02:39:45 -0800 Subject: [PATCH] Fix key derivation in vault to support curve parameter. --- src/lib/vault/vault-worker.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/vault/vault-worker.ts b/src/lib/vault/vault-worker.ts index 02776b1..d5613a1 100644 --- a/src/lib/vault/vault-worker.ts +++ b/src/lib/vault/vault-worker.ts @@ -187,9 +187,9 @@ export class VaultWorker { if (typeof index !== 'number') { throw new Error('Invalid wallet account index') } - const derive = this.#type === 'BIP-44' - ? Bip44.ckd(this.#seed, BIP44_COIN_NANO, index) - : Blake2b.ckd(this.#seed, index) + const derive = this.#type === 'BLAKE2b' + ? Blake2b.ckd(this.#seed, index) + : Bip44.ckd(this.#type === 'Exodus' ? 'Bitcoin seed' : 'ed25519 seed', this.#seed, BIP44_COIN_NANO, index) return derive.then(prv => { const pub = NanoNaCl.convert(new Uint8Array(prv)) this.#timer = new VaultTimer(() => this.lock(), this.#timeout) -- 2.47.3