diff options
Diffstat (limited to 'src/outputtype.h')
-rw-r--r-- | src/outputtype.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/outputtype.h b/src/outputtype.h index 0c55ac9b18..21623e3b49 100644 --- a/src/outputtype.h +++ b/src/outputtype.h @@ -6,6 +6,7 @@ #ifndef BITCOIN_OUTPUTTYPE_H #define BITCOIN_OUTPUTTYPE_H +#include <keystore.h> #include <script/standard.h> #include <string> @@ -37,5 +38,12 @@ CTxDestination GetDestinationForKey(const CPubKey& key, OutputType); /** Get all destinations (potentially) supported by the wallet for the given key. */ std::vector<CTxDestination> GetAllDestinationsForKey(const CPubKey& key); +/** + * Get a destination of the requested type (if possible) to the specified script. + * This function will automatically add the script (and any other + * necessary scripts) to the keystore. + */ +CTxDestination AddAndGetDestinationForScript(CKeyStore& keystore, const CScript& script, OutputType); + #endif // BITCOIN_OUTPUTTYPE_H |