mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-11-02 18:26:43 +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) {
|
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.masterFingerprint = masterFingerprint == null ? null : masterFingerprint.toLowerCase(Locale.ROOT);
|
||||||
this.derivationPath = derivationPath;
|
|
||||||
this.derivation = parsePath(derivationPath);
|
this.derivation = parsePath(derivationPath);
|
||||||
|
this.derivationPath = rewritePath ? writePath(derivation) : derivationPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMasterFingerprint() {
|
public String getMasterFingerprint() {
|
||||||
|
|
Loading…
Reference in a new issue