From 4e5f727a5b01e6cd25fc012c3de0967f5529bddf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Feb 2026 03:15:50 +0000 Subject: [PATCH 1/2] Initial plan From e1dbf47337c0a1be7faacf753787ba82774381af Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Feb 2026 03:17:45 +0000 Subject: [PATCH 2/2] Add comment explaining BIP32 hardened derivation indicators Co-authored-by: Corey-Code <37006206+Corey-Code@users.noreply.github.com> --- src/lib/crypto/bitcoin.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/crypto/bitcoin.ts b/src/lib/crypto/bitcoin.ts index fbc1b01..6735cce 100644 --- a/src/lib/crypto/bitcoin.ts +++ b/src/lib/crypto/bitcoin.ts @@ -349,6 +349,8 @@ function isValidDerivationPath(path: string): boolean { if (parts.length === 0 || parts.length > 10) return false; // Reasonable depth limit for (const part of parts) { + // Both ' and h are valid hardened derivation indicators per BIP32 + // See: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki const cleaned = part.replace(/['h]$/, ''); const index = parseInt(cleaned, 10); if (isNaN(index) || index < 0 || index >= 0x80000000) return false;