BSHA3  0.17.99
P2P Blockchain, based on Bitcoin
outputtype.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2018 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef BITCOIN_OUTPUTTYPE_H
7 #define BITCOIN_OUTPUTTYPE_H
8 
9 #include <keystore.h>
10 #include <script/standard.h>
11 
12 #include <string>
13 #include <vector>
14 
15 enum class OutputType {
16  LEGACY,
18  BECH32,
19 
27 };
28 
29 bool ParseOutputType(const std::string& str, OutputType& output_type);
30 const std::string& FormatOutputType(OutputType type);
31 
37 
39 std::vector<CTxDestination> GetAllDestinationsForKey(const CPubKey& key);
40 
47 
48 #endif // BITCOIN_OUTPUTTYPE_H
49 
std::vector< CTxDestination > GetAllDestinationsForKey(const CPubKey &key)
Get all destinations (potentially) supported by the wallet for the given key.
Definition: outputtype.cpp:64
bool ParseOutputType(const std::string &str, OutputType &output_type)
Definition: outputtype.cpp:20
CTxDestination AddAndGetDestinationForScript(CKeyStore &keystore, const CScript &script, OutputType)
Get a destination of the requested type (if possible) to the specified script.
Definition: outputtype.cpp:76
OutputType
Definition: outputtype.h:15
CTxDestination GetDestinationForKey(const CPubKey &key, OutputType)
Get a destination of the requested type (if possible) to the specified key.
Definition: outputtype.cpp:45
boost::variant< CNoDestination, CKeyID, CScriptID, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessUnknown > CTxDestination
A txout script template with a specific destination.
Definition: standard.h:123
An encapsulated public key.
Definition: pubkey.h:30
Special output type for change outputs only.
const std::string & FormatOutputType(OutputType type)
Definition: outputtype.cpp:35
Serialized script, used inside transaction inputs and outputs.
Definition: script.h:384
A virtual base class for key stores.
Definition: keystore.h:19