ChainTypeFromString

Parse a chain type from its canonical string name.

Synopsis

Declared in <util/chaintype.h>

std::optional<ChainType>
ChainTypeFromString(std::string_view chain);

Return Value

The matching chain type, or std::nullopt if the name is unknown.

Parameters

NameDescription
chainThe chain name to parse.