SighashFromStr

Parse a signature-hash type from its textual name.

Synopsis

Declared in <core_io.h>

[[nodiscard]]
util::Result<int>
SighashFromStr(std::string const& sighash);

Return Value

The numeric signature-hash type, or an error if the name is unrecognized.

NOTE

The return value should not be discarded.

Parameters

NameDescription
sighashName of the signature-hash type (for example "ALL" or "NONE|ANYONECANPAY").