Changeset View
Changeset View
Standalone View
Standalone View
src/outputtype.h
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2017 The Bitcoin Core developers | // Copyright (c) 2009-2017 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_OUTPUTTYPE_H | #ifndef BITCOIN_OUTPUTTYPE_H | ||||
#define BITCOIN_OUTPUTTYPE_H | #define BITCOIN_OUTPUTTYPE_H | ||||
#include <attributes.h> | #include <attributes.h> | ||||
#include <script/signingprovider.h> | #include <script/signingprovider.h> | ||||
#include <script/standard.h> | #include <script/standard.h> | ||||
#include <array> | #include <array> | ||||
#include <string> | #include <string> | ||||
#include <vector> | #include <vector> | ||||
enum class OutputType { | enum class OutputType { LEGACY }; | ||||
LEGACY, | |||||
/** | |||||
* Special output type for change outputs only. Automatically choose type | |||||
* based on address type setting and the types other of non-change outputs. | |||||
*/ | |||||
CHANGE_AUTO, | |||||
}; | |||||
extern const std::array<OutputType, 1> OUTPUT_TYPES; | extern const std::array<OutputType, 1> OUTPUT_TYPES; | ||||
NODISCARD bool ParseOutputType(const std::string &str, OutputType &output_type); | NODISCARD bool ParseOutputType(const std::string &str, OutputType &output_type); | ||||
const std::string &FormatOutputType(OutputType type); | const std::string &FormatOutputType(OutputType type); | ||||
/** | /** | ||||
* Get a destination of the requested type (if possible) to the specified key. | * Get a destination of the requested type (if possible) to the specified key. | ||||
Show All 18 Lines |