2022-01-31 09:34:13 +00:00
|
|
|
import json
|
|
|
|
import core, utils
|
|
|
|
import response_type
|
2021-09-08 18:05:39 +00:00
|
|
|
|
2022-01-31 09:34:13 +00:00
|
|
|
export response_type
|
2021-09-08 18:05:39 +00:00
|
|
|
|
2022-01-31 09:34:13 +00:00
|
|
|
proc adminPeers*(): RpcResponse[JsonNode] {.raises: [Exception].} =
|
|
|
|
let payload = %* []
|
|
|
|
result = callPrivateRPC("admin_peers", payload)
|
2021-09-08 18:05:39 +00:00
|
|
|
|
2022-01-31 09:34:13 +00:00
|
|
|
proc wakuV2Peers*(): RpcResponse[JsonNode] {.raises: [Exception].} =
|
|
|
|
let payload = %* []
|
|
|
|
result = callPrivateRPC("peers", payload)
|
2021-09-08 18:05:39 +00:00
|
|
|
|
2022-01-31 09:34:13 +00:00
|
|
|
proc sendRPCMessageRaw*(inputJSON: string): string {.raises: [Exception].} =
|
|
|
|
result = callPrivateRPCRaw(inputJSON)
|
|
|
|
|
|
|
|
proc getBloomFilter*(): RpcResponse[JsonNode] {.raises: [Exception].} =
|
|
|
|
let payload = %* []
|
|
|
|
result = callPrivateRPC("bloomFilter".prefix, payload)
|