status-lib/status/node_config.nim
Sale Djenic 4eab2fa86b refactor: repo cleaning
- all unused/unnecessary files remove
- `statusgo_backend_new` content promoted to main content
- only necessary submodules for `status-lib` are kept
2022-02-01 11:16:20 +01:00

19 lines
481 B
Nim

import json, json_serialization, chronicles
import ./core
import ./response_type
import status_go
export response_type
logScope:
topics = "rpc-node-config"
proc getNodeConfig*(): RpcResponse[JsonNode] {.raises: [Exception].} =
try:
let response = status_go.getNodeConfig()
result.result = response.parseJSON()
except RpcException as e:
error "error doing rpc request", methodName = "getNodeConfig", exception=e.msg
raise newException(RpcException, e.msg)