fromProtocolMagic static method
Implementation
static ADANetwork fromProtocolMagic(int? protocolMagic) {
if (protocolMagic == null) return ADANetwork.mainnet;
return values.firstWhere(
(element) => element.protocolMagic == protocolMagic,
orElse: () => throw const AddressConverterException(
"Invalid protocol magic or network does not supported."),
);
}