mirror of
https://github.com/status-im/status-lib.git
synced 2025-01-29 21:55:49 +00:00
refactor(node): Add node methods (#146)
This commit is contained in:
parent
240c7a3650
commit
6cb419fedb
20
status/statusgo_backend_new/node.nim
Normal file
20
status/statusgo_backend_new/node.nim
Normal file
@ -0,0 +1,20 @@
|
||||
import json
|
||||
import core, utils
|
||||
import response_type
|
||||
|
||||
export response_type
|
||||
|
||||
proc adminPeers*(): RpcResponse[JsonNode] {.raises: [Exception].} =
|
||||
let payload = %* []
|
||||
result = callPrivateRPC("admin_peers", payload)
|
||||
|
||||
proc wakuV2Peers*(): RpcResponse[JsonNode] {.raises: [Exception].} =
|
||||
let payload = %* []
|
||||
result = callPrivateRPC("peers", payload)
|
||||
|
||||
proc sendRPCMessageRaw*(inputJSON: string): string {.raises: [Exception].} =
|
||||
result = callPrivateRPCRaw(inputJSON)
|
||||
|
||||
proc getBloomFilter*(): RpcResponse[JsonNode] {.raises: [Exception].} =
|
||||
let payload = %* []
|
||||
result = callPrivateRPC("bloomFilter".prefix, payload)
|
Loading…
x
Reference in New Issue
Block a user