BSHA3  0.17.99
P2P Blockchain, based on Bitcoin
Enumerations | Functions
outputtype.h File Reference
#include <keystore.h>
#include <script/standard.h>
#include <string>
#include <vector>
Include dependency graph for outputtype.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

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

Functions

bool ParseOutputType (const std::string &str, OutputType &output_type)
 
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. More...
 
std::vector< CTxDestinationGetAllDestinationsForKey (const CPubKey &key)
 Get all destinations (potentially) supported by the wallet for the given key. More...
 
CTxDestination AddAndGetDestinationForScript (CKeyStore &keystore, const CScript &script, OutputType)
 Get a destination of the requested type (if possible) to the specified script. More...
 

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).

Definition at line 15 of file outputtype.h.

Function Documentation

◆ AddAndGetDestinationForScript()

CTxDestination AddAndGetDestinationForScript ( CKeyStore 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.

Definition at line 76 of file outputtype.cpp.

Here is the call graph for this function:

◆ FormatOutputType()

const std::string& FormatOutputType ( OutputType  type)

Definition at line 35 of file outputtype.cpp.

Here is the caller graph for this function:

◆ GetAllDestinationsForKey()

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

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

Definition at line 64 of file outputtype.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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.

Definition at line 45 of file outputtype.cpp.

Here is the call graph for this function:

◆ ParseOutputType()

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

Definition at line 20 of file outputtype.cpp.

Here is the caller graph for this function: