mirror of
https://github.com/sparrowwallet/hummingbird.git
synced 2024-12-26 01:56:45 +00:00
follow up
This commit is contained in:
parent
2ac6c346cd
commit
5aabf3a830
3 changed files with 12 additions and 4 deletions
|
@ -19,7 +19,7 @@ public class CryptoKeypath extends RegistryItem {
|
||||||
private final Integer depth;
|
private final Integer depth;
|
||||||
|
|
||||||
public CryptoKeypath(List<PathComponent> components, byte[] sourceFingerprint) {
|
public CryptoKeypath(List<PathComponent> components, byte[] sourceFingerprint) {
|
||||||
this(components, sourceFingerprint, 0);
|
this(components, sourceFingerprint, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public CryptoKeypath(List<PathComponent> components, byte[] sourceFingerprint, Integer depth) {
|
public CryptoKeypath(List<PathComponent> components, byte[] sourceFingerprint, Integer depth) {
|
||||||
|
|
|
@ -7,11 +7,11 @@ public class URHDKey extends CryptoHDKey {
|
||||||
super(key, chainCode);
|
super(key, chainCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
public URHDKey(Boolean privateKey, byte[] key, byte[] chainCode, CryptoCoinInfo useInfo, CryptoKeypath origin, CryptoKeypath children, byte[] parentFingerprint) {
|
public URHDKey(Boolean privateKey, byte[] key, byte[] chainCode, URCoinInfo useInfo, URKeypath origin, URKeypath children, byte[] parentFingerprint) {
|
||||||
super(privateKey, key, chainCode, useInfo, origin, children, parentFingerprint);
|
super(privateKey, key, chainCode, useInfo, origin, children, parentFingerprint);
|
||||||
}
|
}
|
||||||
|
|
||||||
public URHDKey(Boolean privateKey, byte[] key, byte[] chainCode, CryptoCoinInfo useInfo, CryptoKeypath origin, CryptoKeypath children, byte[] parentFingerprint, String name, String note) {
|
public URHDKey(Boolean privateKey, byte[] key, byte[] chainCode, URCoinInfo useInfo, URKeypath origin, URKeypath children, byte[] parentFingerprint, String name, String note) {
|
||||||
super(privateKey, key, chainCode, useInfo, origin, children, parentFingerprint, name, note);
|
super(privateKey, key, chainCode, useInfo, origin, children, parentFingerprint, name, note);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,15 @@ public class UROutputDescriptor extends RegistryItem {
|
||||||
if(keys != null && !keys.isEmpty()) {
|
if(keys != null && !keys.isEmpty()) {
|
||||||
Array array = new Array();
|
Array array = new Array();
|
||||||
for(RegistryItem key : keys) {
|
for(RegistryItem key : keys) {
|
||||||
array.add(key.toCbor());
|
DataItem keyItem = key.toCbor();
|
||||||
|
if(key instanceof URHDKey) {
|
||||||
|
keyItem.setTag(RegistryType.HDKEY.getTag());
|
||||||
|
} else if(key instanceof URECKey) {
|
||||||
|
keyItem.setTag(RegistryType.ECKEY.getTag());
|
||||||
|
} else if(key instanceof URAddress) {
|
||||||
|
keyItem.setTag(RegistryType.ADDRESS.getTag());
|
||||||
|
}
|
||||||
|
array.add(keyItem);
|
||||||
}
|
}
|
||||||
map.put(new UnsignedInteger(KEYS), array);
|
map.put(new UnsignedInteger(KEYS), array);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue