[#VerifyScript]
= VerifyScript
:mrdocs:

Verify that an input&apos;s scriptSig and witness satisfy the output&apos;s scriptPubKey&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
VerifyScript(
    xref:CScript.adoc[CScript] const& scriptSig,
    xref:CScript.adoc[CScript] const& scriptPubKey,
    xref:CScriptWitness.adoc[CScriptWitness] const* witness,
    xref:script_verify_flags.adoc[script&lowbar;verify&lowbar;flags] flags,
    xref:BaseSignatureChecker.adoc[BaseSignatureChecker] const& checker,
    xref:ScriptError.adoc[ScriptError]* serror = nullptr);
----

== Return Value

`true` if the spend is valid under the given flags&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *scriptSig*
| The input&apos;s signature script&period;
| *scriptPubKey*
| The output script being spent&period;
| *witness*
| The input&apos;s witness stack, or null when absent&period;
| *flags*
| The active script verification flags&period;
| *checker*
| The signature checker bound to the spending transaction&period;
| *serror*
| Set to the script error when verification fails&period;
|===


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