[#Solver]
= Solver
:mrdocs:

Parse a scriptPubKey and identify script type for standard scripts&period; If successful, returns script type and parsed pubkeys or hashes, depending on the type&period; For example, for a P2SH script, vSolutionsRet will contain the script hash, for P2PKH it will contain the key hash, etc&period;

== Synopsis

Declared in `&lt;script&sol;solver&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:TxoutType.adoc[TxoutType]
Solver(
    xref:CScript.adoc[CScript] const& scriptPubKey,
    std::vector&lt;std::vector&lt;unsigned char&gt;&gt;& vSolutionsRet);
----

== Return Value

The script type&period; TxoutType&colon;&colon;NONSTANDARD represents a failed solve&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *scriptPubKey* [in]
| Script to parse
| *vSolutionsRet* [out]
| Vector of parsed pubkeys and hashes
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
