Solver

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.

Synopsis

Declared in <script/solver.h>

TxoutType
Solver(
    CScript const& scriptPubKey,
    std::vector<std::vector<unsigned char>>& vSolutionsRet);

Return Value

The script type. TxoutType::NONSTANDARD represents a failed solve.

Parameters

NameDescription
scriptPubKey [in]Script to parse
vSolutionsRet [out]Vector of parsed pubkeys and hashes