Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lnd: replicate btcwallet's key derivation exactly
There's this special case in lnd's wallet (btcwallet) where the coin type and account keys are always serialized as a string and encrypted, which actually fixes the key padding issue that makes the difference between DeriveNonStandard and Derive. To replicate lnd's behavior exactly, we need to serialize and de-serialize the extended key at the coin type and account level (depth = 2 or depth = 3). This does not apply to the default account (id = 0) because that is always derived directly.
- Loading branch information