convertToHex($npub); } catch (\Throwable) { $h = ''; } return (\is_string($h) && 64 === \strlen($h) && ctype_xdigit($h)) ? strtolower($h) : ''; } }