Bitcoin
Functions | Variables
outputtype.cpp File Reference
#include <outputtype.h>
#include <pubkey.h>
#include <script/script.h>
#include <script/sign.h>
#include <script/signingprovider.h>
#include <script/standard.h>
#include <assert.h>
#include <string>

Functions

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

Variables

static const std::string OUTPUT_TYPE_STRING_LEGACY = "legacy"
 
static const std::string OUTPUT_TYPE_STRING_P2SH_SEGWIT = "p2sh-segwit"
 
static const std::string OUTPUT_TYPE_STRING_BECH32 = "bech32"
 

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

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

Variable Documentation

◆ OUTPUT_TYPE_STRING_BECH32

const std::string OUTPUT_TYPE_STRING_BECH32 = "bech32"
static

◆ OUTPUT_TYPE_STRING_LEGACY

const std::string OUTPUT_TYPE_STRING_LEGACY = "legacy"
static

◆ OUTPUT_TYPE_STRING_P2SH_SEGWIT

const std::string OUTPUT_TYPE_STRING_P2SH_SEGWIT = "p2sh-segwit"
static