diff options
| author | Pieter Wuille <[email protected]> | 2017-09-19 18:12:25 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2018-02-19 18:55:21 -0800 |
| commit | 119b0f85e2c8b9729228aad5d946144d57ad0f5b (patch) | |
| tree | 995176b950d3a072f68e3f799d166362407c5c08 /src/key_io.h | |
| parent | Stop using CBase58Data for ext keys (diff) | |
| download | discoin-119b0f85e2c8b9729228aad5d946144d57ad0f5b.tar.xz discoin-119b0f85e2c8b9729228aad5d946144d57ad0f5b.zip | |
Split key_io (address/key encodings) off from base58
Diffstat (limited to 'src/key_io.h')
| -rw-r--r-- | src/key_io.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/key_io.h b/src/key_io.h new file mode 100644 index 000000000..6fc9a8059 --- /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 |