mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-26 18:16:45 +00:00
support retreiving output scripts for different key purposes
This commit is contained in:
parent
1003527854
commit
59d610f539
1 changed files with 7 additions and 2 deletions
|
@ -259,9 +259,14 @@ public class Wallet {
|
|||
}
|
||||
|
||||
public Map<Script, WalletNode> getWalletOutputScripts() {
|
||||
return getWalletOutputScripts(KeyPurpose.RECEIVE, KeyPurpose.CHANGE);
|
||||
}
|
||||
|
||||
public Map<Script, WalletNode> getWalletOutputScripts(KeyPurpose... keyPurposes) {
|
||||
Map<Script, WalletNode> walletOutputScripts = new LinkedHashMap<>();
|
||||
getWalletOutputScripts(walletOutputScripts, getNode(KeyPurpose.RECEIVE));
|
||||
getWalletOutputScripts(walletOutputScripts, getNode(KeyPurpose.CHANGE));
|
||||
for(KeyPurpose keyPurpose : keyPurposes) {
|
||||
getWalletOutputScripts(walletOutputScripts, getNode(keyPurpose));
|
||||
}
|
||||
return walletOutputScripts;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue