aboutsummaryrefslogtreecommitdiff
path: root/src/scriptutils.h
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2014-09-08 20:34:01 +0200
committerPieter Wuille <[email protected]>2014-09-08 20:34:01 +0200
commiteecd3c0fb0625b036f68a7830dda8edde21fcb90 (patch)
tree1017c1bfb9599c9dfa3d6d8327d8b65862ee0d74 /src/scriptutils.h
parentMerge pull request #4865 (diff)
parentSeparate script/sign (diff)
downloaddiscoin-eecd3c0fb0625b036f68a7830dda8edde21fcb90.tar.xz
discoin-eecd3c0fb0625b036f68a7830dda8edde21fcb90.zip
Merge pull request #4754
e088d65 Separate script/sign (jtimon) 9294a4b Separate CScriptCompressor (jtimon) c4408a6 Separate script/standard (jtimon) da03e6e Separate script/interpreter (jtimon) cbd22a5 Move CScript class and dependencies to script/script (jtimon) 86dbeea Rename script.h/.cpp to scriptutils.h/.cpp (plus remove duplicated includes) (jtimon) Rebased-by: Pieter Wuille
Diffstat (limited to 'src/scriptutils.h')
-rw-r--r--src/scriptutils.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/scriptutils.h b/src/scriptutils.h
new file mode 100644
index 000000000..98080fc45
--- /dev/null
+++ b/src/scriptutils.h
@@ -0,0 +1,29 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2013 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef H_BITCOIN_SCRIPTUTILS
+#define H_BITCOIN_SCRIPTUTILS
+
+#include "key.h"
+#include "script/script.h"
+
+class CKeyStore;
+
+/** IsMine() return codes */
+enum isminetype
+{
+ ISMINE_NO = 0,
+ ISMINE_WATCH_ONLY = 1,
+ ISMINE_SPENDABLE = 2,
+ ISMINE_ALL = ISMINE_WATCH_ONLY | ISMINE_SPENDABLE
+};
+/** used for bitflags of isminetype */
+typedef uint8_t isminefilter;
+
+isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey);
+isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest);
+void ExtractAffectedKeys(const CKeyStore &keystore, const CScript& scriptPubKey, std::vector<CKeyID> &vKeys);
+
+#endif // H_BITCOIN_SCRIPT