nwaku/waku/v2/node/jsonrpc/debug_api.nim

30 lines
604 B
Nim
Raw Normal View History

2022-03-23 13:20:07 +00:00
{.push raises: [Defect].}
2021-07-22 08:43:41 +00:00
import
2021-06-09 14:37:08 +00:00
chronicles,
json_rpc/rpcserver,
../wakunode2
logScope:
topics = "debug api"
const
git_version {.strdefine.} = "n/a"
proc installDebugApiHandlers*(node: WakuNode, rpcsrv: RpcServer) =
## Debug API version 1 definitions
rpcsrv.rpc("get_waku_v2_debug_v1_info") do() -> WakuInfo:
## Returns information about WakuNode
debug "get_waku_v2_debug_v1_info"
return node.info()
rpcsrv.rpc("get_waku_v2_debug_v1_version") do() -> string:
## Returns information about WakuNode
debug "get_waku_v2_debug_v1_version"
return git_version