mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-17 15:25:35 +00:00
21 lines
521 B
C++
21 lines
521 B
C++
#include "common.hpp"
|
|
|
|
#include "router_id.hpp"
|
|
|
|
namespace llarp
|
|
{
|
|
void
|
|
RouterID_Init(py::module & mod)
|
|
{
|
|
py::class_<RouterID>(mod, "RouterID")
|
|
.def("FromHex",
|
|
[](RouterID* r, const std::string& hex) -> bool {
|
|
return HexDecode(hex.c_str(), r->data(), r->size());
|
|
})
|
|
.def("__repr__", &RouterID::ToString)
|
|
.def("__str__", &RouterID::ToString)
|
|
.def("ShortString", &RouterID::ShortString)
|
|
.def("__eq__", &RouterID::operator==);
|
|
}
|
|
}
|