def b58hex(b58): try: return base58.b58decode(b58, None).encode('hex_codec') except Exception: raise PageNotFound()