status-lib/status/statusgo_backend_new/mailservers.nim

18 lines
509 B
Nim

import json
import core
import response_type
export response_type
proc saveMailserver*(id: string, name: string, enode: string, fleet: string):
RpcResponse[JsonNode] {.raises: [Exception].} =
let payload = %* [{
"id": id,
"name": name,
"address": enode,
"fleet": fleet
}]
result = core.callPrivateRPC("mailservers_addMailserver", payload)
proc getMailservers*(): RpcResponse[JsonNode] {.raises: [Exception].} =
result = core.callPrivateRPC("mailservers_getMailservers")