Bitcoin
Enumerations | Functions
outputtype.h File Reference
#include <attributes.h>
#include <script/signingprovider.h>
#include <script/standard.h>
#include <string>
#include <vector>

Go to the source code of this file.

Enumerations

enum  OutputType { OutputType::LEGACY, OutputType::P2SH_SEGWIT, OutputType::BECH32, OutputType::CHANGE_AUTO }
 

Functions

NODISCARD bool ParseOutputType (const std::string &str, OutputType &output_type)
 
const std::string & FormatOutputType (OutputType type)
 
CTxDestination GetDestinationForKey (const CPubKey &key, OutputType)
 
std::vector< CTxDestinationGetAllDestinationsForKey (const CPubKey &key)
 
CTxDestination AddAndGetDestinationForScript (FillableSigningProvider &keystore, const CScript &script, OutputType)
 

Enumeration Type Documentation

◆ OutputType

enum OutputType
strong
Enumerator
LEGACY 
P2SH_SEGWIT 
BECH32 
CHANGE_AUTO 

Special output type for change outputs only. Automatically choose type based on address type setting and the types other of non-change outputs (see -changetype option documentation and implementation in CWallet::TransactionChangeType for details).

Function Documentation

◆ AddAndGetDestinationForScript()

CTxDestination AddAndGetDestinationForScript ( FillableSigningProvider keystore,
const CScript script,
OutputType   
)

Get a destination of the requested type (if possible) to the specified script. This function will automatically add the script (and any other necessary scripts) to the keystore.

◆ FormatOutputType()

const std::string& FormatOutputType ( OutputType  type)

◆ GetAllDestinationsForKey()

std::vector<CTxDestination> GetAllDestinationsForKey ( const CPubKey key)

Get all destinations (potentially) supported by the wallet for the given key.

◆ GetDestinationForKey()

CTxDestination GetDestinationForKey ( const CPubKey key,
OutputType   
)

Get a destination of the requested type (if possible) to the specified key. The caller must make sure LearnRelatedScripts has been called beforehand.

◆ ParseOutputType()

NODISCARD bool ParseOutputType ( const std::string &  str,
OutputType output_type 
)