mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-11-05 03:26:43 +00:00
add retrieval of wallet nodes and history
This commit is contained in:
parent
4a4a62f239
commit
da14a9bf34
1 changed files with 7 additions and 0 deletions
|
@ -509,6 +509,13 @@ public class Wallet extends Persistable implements Comparable<Wallet> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<WalletNode, Set<BlockTransactionHashIndex>> getWalletNodes() {
|
||||||
|
Map<WalletNode, Set<BlockTransactionHashIndex>> walletNodes = new LinkedHashMap<>();
|
||||||
|
getNode(KeyPurpose.RECEIVE).getChildren().forEach(childNode -> walletNodes.put(childNode, childNode.getTransactionOutputs()));
|
||||||
|
getNode(KeyPurpose.CHANGE).getChildren().forEach(childNode -> walletNodes.put(childNode, childNode.getTransactionOutputs()));
|
||||||
|
return walletNodes;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isWalletAddress(Address address) {
|
public boolean isWalletAddress(Address address) {
|
||||||
return getWalletAddresses().containsKey(address);
|
return getWalletAddresses().containsKey(address);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue