aboutsummaryrefslogtreecommitdiff
path: root/src/key_io.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2017-09-19 18:12:25 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2018-02-19 18:55:21 -0800
commit119b0f85e2c8b9729228aad5d946144d57ad0f5b (patch)
tree995176b950d3a072f68e3f799d166362407c5c08 /src/key_io.h
parentebfe217b15d21656a173e5c102f826d17c6c8be4 (diff)
Split key_io (address/key encodings) off from base58
Diffstat (limited to 'src/key_io.h')
-rw-r--r--src/key_io.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/key_io.h b/src/key_io.h
new file mode 100644
index 0000000000..6fc9a8059a
--- /dev/null
+++ b/src/key_io.h
@@ -0,0 +1,29 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_KEYIO_H
+#define BITCOIN_KEYIO_H
+
+#include <chainparams.h>
+#include <key.h>
+#include <pubkey.h>
+#include <script/standard.h>
+
+#include <string>
+
+CKey DecodeSecret(const std::string& str);
+std::string EncodeSecret(const CKey& key);
+
+CExtKey DecodeExtKey(const std::string& str);
+std::string EncodeExtKey(const CExtKey& extkey);
+CExtPubKey DecodeExtPubKey(const std::string& str);
+std::string EncodeExtPubKey(const CExtPubKey& extpubkey);
+
+std::string EncodeDestination(const CTxDestination& dest);
+CTxDestination DecodeDestination(const std::string& str);
+bool IsValidDestinationString(const std::string& str);
+bool IsValidDestinationString(const std::string& str, const CChainParams& params);
+
+#endif // BITCOIN_KEYIO_H