nwaku/waku/node/jsonrpc/marshalling.nim
Hanno Cornelius b9d5d28af5
chore: remove references to v2 (#1898)
* chore: remove references to v2

* fix: lingering rln-relay import path
2023-08-09 18:11:50 +01:00

20 lines
317 B
Nim

import
stew/byteutils,
json,
json_rpc/rpcserver
func invalidMsg*(name: string): string =
"When marshalling from JSON, parameter \"" & name & "\" is not valid"
## JSON marshalling
# seq[byte]
proc `%`*(value: seq[byte]): JsonNode =
if value.len > 0:
%("0x" & value.toHex())
else:
newJArray()