diff --git a/llarp/rpc/rpc.cpp b/llarp/rpc/rpc.cpp index e2830389b..7c0458749 100644 --- a/llarp/rpc/rpc.cpp +++ b/llarp/rpc/rpc.cpp @@ -1,5 +1,6 @@ #include +#include #include #include #include @@ -259,6 +260,13 @@ namespace llarp return resp; } + Response + DumpVersion() const + { + const Response resp{{"version", LLARP_VERSION}}; + return resp; + } + absl::optional< Response > HandleJSONRPC(Method_t method, ABSL_ATTRIBUTE_UNUSED const Params& params) override @@ -279,6 +287,10 @@ namespace llarp { return DumpStatus(); } + if(method == "llarp.version") + { + return DumpVersion(); + } return false; } };