diff --git a/src/main/java/com/sparrowwallet/drongo/wallet/Wallet.java b/src/main/java/com/sparrowwallet/drongo/wallet/Wallet.java index 7a08229..3126ac8 100644 --- a/src/main/java/com/sparrowwallet/drongo/wallet/Wallet.java +++ b/src/main/java/com/sparrowwallet/drongo/wallet/Wallet.java @@ -259,9 +259,14 @@ public class Wallet { } public Map getWalletOutputScripts() { + return getWalletOutputScripts(KeyPurpose.RECEIVE, KeyPurpose.CHANGE); + } + + public Map getWalletOutputScripts(KeyPurpose... keyPurposes) { Map walletOutputScripts = new LinkedHashMap<>(); - getWalletOutputScripts(walletOutputScripts, getNode(KeyPurpose.RECEIVE)); - getWalletOutputScripts(walletOutputScripts, getNode(KeyPurpose.CHANGE)); + for(KeyPurpose keyPurpose : keyPurposes) { + getWalletOutputScripts(walletOutputScripts, getNode(keyPurpose)); + } return walletOutputScripts; }