mirror of
https://github.com/sparrowwallet/drongo.git
synced 2025-11-05 11:56:38 +00:00
fix issue of including parent path elements in deterministic key when deriving child xpub from an output descriptor containing more than two child path elements
This commit is contained in:
parent
13e1fafbe8
commit
e1f2ce41ad
1 changed files with 2 additions and 1 deletions
|
|
@ -449,7 +449,8 @@ public class OutputDescriptor {
|
|||
keyDerivation = keyDerivation.extend(childPath);
|
||||
childPath.addFirst(extendedKey.getKeyChildNumber());
|
||||
DeterministicKey derivedKey = extendedKey.getKey(childPath);
|
||||
extendedKey = new ExtendedKey(derivedKey, derivedKey.getParentFingerprint(), childPath.getLast());
|
||||
DeterministicKey pubKey = new DeterministicKey(List.of(derivedKey.getPath().getLast()), derivedKey.getChainCode(), derivedKey.getPubKey(), derivedKey.getDepth(), derivedKey.getParentFingerprint());
|
||||
extendedKey = new ExtendedKey(pubKey, pubKey.getParentFingerprint(), childPath.getLast());
|
||||
}
|
||||
} catch(Exception e) {
|
||||
//ignore and continue
|
||||
|
|
|
|||
Loading…
Reference in a new issue