Bitcoin ABC 0.34.2
P2P Digital Currency
Enumerations | Functions
solver.h File Reference
#include <pubkey.h>
#include <string>
Include dependency graph for solver.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum class  TxoutType {
  NONSTANDARD , PUBKEY , PUBKEYHASH , SCRIPTHASH ,
  MULTISIG , NULL_DATA
}
 

Functions

std::string GetTxnOutputType (TxoutType t)
 Get the name of a TxoutType as a string. More...
 
TxoutType Solver (const CScript &scriptPubKey, std::vector< std::vector< uint8_t > > &vSolutionsRet)
 Parse a scriptPubKey and identify script type for standard scripts. More...
 
CScript GetScriptForRawPubKey (const CPubKey &pubkey)
 Generate a P2PK script for the given pubkey. More...
 
CScript GetScriptForMultisig (int nRequired, const std::vector< CPubKey > &keys)
 Generate a multisig script. More...
 

Enumeration Type Documentation

◆ TxoutType

enum class TxoutType
strong
Enumerator
NONSTANDARD 
PUBKEY 
PUBKEYHASH 
SCRIPTHASH 
MULTISIG 
NULL_DATA 

Definition at line 15 of file solver.h.

Function Documentation

◆ GetScriptForMultisig()

CScript GetScriptForMultisig ( int  nRequired,
const std::vector< CPubKey > &  keys 
)

Generate a multisig script.

Definition at line 148 of file solver.cpp.

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

◆ GetScriptForRawPubKey()

CScript GetScriptForRawPubKey ( const CPubKey &  pubkey)

Generate a P2PK script for the given pubkey.

Definition at line 143 of file solver.cpp.

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

◆ GetTxnOutputType()

std::string GetTxnOutputType ( TxoutType  t)

Get the name of a TxoutType as a string.

Definition at line 14 of file solver.cpp.

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

◆ Solver()

TxoutType Solver ( const CScript &  scriptPubKey,
std::vector< std::vector< uint8_t > > &  vSolutionsRet 
)

Parse a scriptPubKey and identify script type for standard scripts.

If successful, returns script type and parsed pubkeys or hashes, depending on the type. For example, for a P2SH script, vSolutionsRet will contain the script hash, for P2PKH it will contain the key hash, etc.

Parameters
[in]scriptPubKeyScript to parse
[out]vSolutionsRetVector of parsed pubkeys and hashes
Returns
The script type. TxoutType::NONSTANDARD represents a failed solve.

Definition at line 93 of file solver.cpp.

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