CScript::IsWitnessProgram

Returns whether this script is a witness program and extracts its parts.

Synopsis

Declared in <script/script.h>

bool
IsWitnessProgram(
    int& version,
    std::vector<unsigned char>& program) const;

Return Value

true if this script is a witness program.

Parameters

NameDescription
versionSet to the witness program version.
programSet to the witness program bytes.