Fix getLongTermPrivateKey derivation index hardcoded to 0 (closes #3) #8

Open
clawbot wants to merge 1 commits from clawbot/secret:fix/issue-3 into main

1 Commits

Author SHA1 Message Date
clawbot
2a4ceb2045 fix: use vault derivation index in getLongTermPrivateKey instead of hardcoded 0
Previously, getLongTermPrivateKey() always used derivation index 0 when
deriving the long-term key from a mnemonic. This caused wrong key
derivation for vaults with index > 0 (second+ vault from same mnemonic),
leading to silent data corruption in keychain unlocker creation.

Now reads the vault's actual DerivationIndex from vault-metadata.json.
2026-02-08 12:03:06 -08:00