Move generic JSON RPC logic into its own files.

This commit is contained in:
Fang 2018-03-13 14:42:49 +01:00
parent d8ddcbf386
commit de116bbb2a
3 changed files with 8 additions and 23 deletions

View File

@ -1,7 +1,7 @@
::
/- ethereum
/- json-rpc
/+ httr-to-json
=, json-rpc:ethereum
=, json-rpc
::
|_ res=response
::

View File

@ -39,25 +39,4 @@
[%label l=?(%earliest %latest %pending)]
==
--
::
:: json-rpc
::
++ json-rpc
|%
++ response
$% [%result res=@t]
[%error code=@t message=@t] ::TODO data?
==
::
++ request
$: method=@t
params=parameters
id=(unit @t) ::TODO ?
==
::
++ parameters
$% [%array (list @t)]
[%object (map @t @t)]
==
--
--

6
sur/json/rpc.hoon Normal file
View File

@ -0,0 +1,6 @@
|%
++ response ::TODO id and jsonrpc fields?
$% [%result res=@t]
[%error code=@t message=@t] ::TODO data?
==
--