shrub/pkg/base-dev/sur/json/rpc.hoon
2021-09-17 14:51:19 +10:00

22 lines
394 B
Plaintext

:: json-rpc: protocol types
::
|%
+$ request
$: id=@t
method=@t
params=request-params
==
::
+$ request-params
$% [%list (list json)]
[%object (list (pair @t json))]
==
+$ response
$~ [%fail *httr:eyre]
$% [%result id=@t res=json]
[%error id=@t code=@t message=@t] ::TODO data?
[%fail hit=httr:eyre]
[%batch bas=(list response)]
==
--