2021-08-26 06:00:58 +03:00
|
|
|
:: json-rpc: protocol types
|
|
|
|
::
|
|
|
|
|%
|
2021-10-26 21:46:32 +03:00
|
|
|
+$ batch-request
|
|
|
|
$% [%a p=(list request)]
|
|
|
|
[%o p=request]
|
|
|
|
==
|
|
|
|
::
|
2021-08-26 06:00:58 +03:00
|
|
|
+$ request
|
|
|
|
$: id=@t
|
2021-10-26 21:46:32 +03:00
|
|
|
jsonrpc=@t
|
2021-08-26 06:00:58 +03:00
|
|
|
method=@t
|
|
|
|
params=request-params
|
|
|
|
==
|
|
|
|
::
|
|
|
|
+$ request-params
|
|
|
|
$% [%list (list json)]
|
2021-10-26 21:46:32 +03:00
|
|
|
[%map (map @t json)]
|
2021-08-26 06:00:58 +03:00
|
|
|
[%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)]
|
|
|
|
==
|
|
|
|
--
|