mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-11-02 10:16:44 +00:00
add constructor to optionally rewrite derivation path
This commit is contained in:
parent
0e08478294
commit
87b5f992d0
1 changed files with 5 additions and 1 deletions
|
@ -17,9 +17,13 @@ public class KeyDerivation {
|
|||
}
|
||||
|
||||
public KeyDerivation(String masterFingerprint, String derivationPath) {
|
||||
this(masterFingerprint, derivationPath, false);
|
||||
}
|
||||
|
||||
public KeyDerivation(String masterFingerprint, String derivationPath, boolean rewritePath) {
|
||||
this.masterFingerprint = masterFingerprint == null ? null : masterFingerprint.toLowerCase(Locale.ROOT);
|
||||
this.derivationPath = derivationPath;
|
||||
this.derivation = parsePath(derivationPath);
|
||||
this.derivationPath = rewritePath ? writePath(derivation) : derivationPath;
|
||||
}
|
||||
|
||||
public String getMasterFingerprint() {
|
||||
|
|
Loading…
Reference in a new issue