Bitcoin ABC  0.26.3
P2P Digital Currency
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2015 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or
6 #ifndef BITCOIN_KEY_IO_H
7 #define BITCOIN_KEY_IO_H
9 #include <key.h>
10 #include <pubkey.h>
11 #include <script/standard.h>
13 #include <string>
15 class Config;
16 class CChainParams;
18 CKey DecodeSecret(const std::string &str);
19 CKey DecodeSecret(const std::string &str, const CChainParams &params);
20 std::string EncodeSecret(const CKey &key);
21 std::string EncodeSecret(const CKey &key, const CChainParams &params);
23 CExtKey DecodeExtKey(const std::string &str);
24 std::string EncodeExtKey(const CExtKey &extkey);
25 CExtPubKey DecodeExtPubKey(const std::string &str);
26 std::string EncodeExtPubKey(const CExtPubKey &extpubkey);
28 std::string EncodeDestination(const CTxDestination &dest, const Config &config);
29 CTxDestination DecodeDestination(const std::string &addr, const CChainParams &);
30 bool IsValidDestinationString(const std::string &str,
31  const CChainParams &params);
33 std::string EncodeLegacyAddr(const CTxDestination &dest,
34  const CChainParams &params);
35 CTxDestination DecodeLegacyAddr(const std::string &str,
36  const CChainParams &params);
38 #endif // BITCOIN_KEY_IO_H
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system.
Definition: chainparams.h:74
An encapsulated secp256k1 private key.
Definition: key.h:28
Definition: config.h:17
std::string EncodeDestination(const CTxDestination &dest, const Config &config)
Definition: key_io.cpp:167
bool IsValidDestinationString(const std::string &str, const CChainParams &params)
Definition: key_io.cpp:183
CExtPubKey DecodeExtPubKey(const std::string &str)
Definition: key_io.cpp:118
std::string EncodeExtPubKey(const CExtPubKey &extpubkey)
Definition: key_io.cpp:132
std::string EncodeSecret(const CKey &key)
Definition: key_io.cpp:102
std::string EncodeExtKey(const CExtKey &extkey)
Definition: key_io.cpp:156
CKey DecodeSecret(const std::string &str)
Definition: key_io.cpp:77
CTxDestination DecodeDestination(const std::string &addr, const CChainParams &)
Definition: key_io.cpp:174
CTxDestination DecodeLegacyAddr(const std::string &str, const CChainParams &params)
Definition: key_io.cpp:193
std::string EncodeLegacyAddr(const CTxDestination &dest, const CChainParams &params)
Definition: key_io.cpp:188
CExtKey DecodeExtKey(const std::string &str)
Definition: key_io.cpp:142
std::variant< CNoDestination, PKHash, ScriptHash > CTxDestination
A txout script template with a specific destination.
Definition: standard.h:92
Definition: key.h:164