mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-27 02:26:44 +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() {
|
public Map<Script, WalletNode> getWalletOutputScripts() {
|
||||||
|
return getWalletOutputScripts(KeyPurpose.RECEIVE, KeyPurpose.CHANGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<Script, WalletNode> getWalletOutputScripts(KeyPurpose... keyPurposes) {
|
||||||
Map<Script, WalletNode> walletOutputScripts = new LinkedHashMap<>();
|
Map<Script, WalletNode> walletOutputScripts = new LinkedHashMap<>();
|
||||||
getWalletOutputScripts(walletOutputScripts, getNode(KeyPurpose.RECEIVE));
|
for(KeyPurpose keyPurpose : keyPurposes) {
|
||||||
getWalletOutputScripts(walletOutputScripts, getNode(KeyPurpose.CHANGE));
|
getWalletOutputScripts(walletOutputScripts, getNode(keyPurpose));
|
||||||
|
}
|
||||||
return walletOutputScripts;
|
return walletOutputScripts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue