Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
outputtype.h
Go to the documentation of this file.
1// Copyright (c) 2009-2010 Satoshi Nakamoto
2// Copyright (c) 2009-2017 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
10#include <script/standard.h>
11
12#include <array>
13#include <string>
14#include <vector>
15
16enum class OutputType { LEGACY };
17
18extern const std::array<OutputType, 1> OUTPUT_TYPES;
19
20[[nodiscard]] bool ParseOutputType(const std::string &str,
22const std::string &FormatOutputType(OutputType type);
23
29
33std::vector<CTxDestination> GetAllDestinationsForKey(const CPubKey &key);
34
41 const CScript &script, OutputType);
42
43#endif // BITCOIN_OUTPUTTYPE_H
An encapsulated public key.
Definition pubkey.h:31
Serialized script, used inside transaction inputs and outputs.
Definition script.h:424
Fillable signing provider that keeps keys in an address->secret map.
OutputType
Definition outputtype.h:16
bool ParseOutputType(const std::string &str, OutputType &output_type)
std::vector< CTxDestination > GetAllDestinationsForKey(const CPubKey &key)
Get all destinations (potentially) supported by the wallet for the given key.
const std::string & FormatOutputType(OutputType type)
CTxDestination GetDestinationForKey(const CPubKey &key, OutputType)
Get a destination of the requested type (if possible) to the specified key.
const std::array< OutputType, 1 > OUTPUT_TYPES
CTxDestination AddAndGetDestinationForScript(FillableSigningProvider &keystore, const CScript &script, OutputType)
Get a destination of the requested type (if possible) to the specified script.
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85
std::variant< CNoDestination, PKHash, ScriptHash > CTxDestination
A txout script template with a specific destination.
Definition standard.h:85