mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-18 20:31:40 +03:00
azimuth-rpc: remove aggregator-related rpc code
This commit is contained in:
parent
72d424e68a
commit
2e9d412c21
@ -1,6 +1,6 @@
|
||||
:: Azimuth JSON-RPC API
|
||||
::
|
||||
/- rpc=json-rpc, *aggregator
|
||||
/- rpc=json-rpc
|
||||
/+ naive,
|
||||
azimuth-rpc,
|
||||
json-rpc,
|
||||
@ -71,7 +71,7 @@
|
||||
:: TODO: method not supported
|
||||
::
|
||||
(give-simple-payload:app id not-found:gen)
|
||||
?~ rpc-request=(validate-request:json-rpc body.req parse-method)
|
||||
?~ rpc-request=(validate-request:json-rpc body.req)
|
||||
:: TODO: malformed request
|
||||
::
|
||||
(give-simple-payload:app id not-found:gen)
|
||||
@ -83,11 +83,7 @@
|
||||
?~ data ~
|
||||
:_ $(data t.data)
|
||||
^- card
|
||||
[%pass / %agent [our.bowl %aggregator] %poke i.data]
|
||||
:: TODO: validate that format is e.g. 'getPoint'
|
||||
:: TODO: maybe use getPoint and translate to %get-point
|
||||
::
|
||||
++ parse-method |=(t=@t `term`t)
|
||||
[%pass / %agent [our.bowl %azimuth] %poke i.data]
|
||||
--
|
||||
--
|
||||
::
|
||||
@ -150,30 +146,8 @@
|
||||
[~ ~(parse error:json-rpc id)]
|
||||
=/ method=@tas (enkebab method)
|
||||
?+ method [~ ~(method error:json-rpc id)]
|
||||
%get-point `(get-point id +.params point:scry)
|
||||
%get-points `(get-points id +.params points:scry)
|
||||
%get-dns `(get-dns id +.params dns:scry)
|
||||
%transfer-point (transfer-point id +.params)
|
||||
%cancel-transaction (cancel-tx id +.params)
|
||||
%get-spawned `(get-spawned id +.params spawned:scry)
|
||||
%configure-keys (configure-keys id +.params)
|
||||
%spawn (spawn id +.params)
|
||||
%escape (escape id +.params method)
|
||||
%cancel-escape (cancel-escape id +.params method)
|
||||
%adopt (adopt id +.params method)
|
||||
%detach (detach id +.params method)
|
||||
%reject (reject id +.params method)
|
||||
%set-management-proxy (management-proxy id +.params method)
|
||||
%set-spawn-proxy (spawn-proxy id +.params method)
|
||||
%set-transfer-proxy (transfer-proxy id +.params method)
|
||||
%get-all-pending `(all:pending id +.params all:pending:scry)
|
||||
%get-pending-by-ship `(ship:pending id +.params ship:pending:scry)
|
||||
%get-pending-by-address `(addr:pending id +.params addr:pending:scry)
|
||||
%get-transaction-status `(status id +.params tx-status:scry)
|
||||
%when-next-batch `(next-batch id +.params next-batch:scry)
|
||||
%get-nonce `(nonce id +.params nonce:scry)
|
||||
%get-history `(history id +.params addr:history:scry)
|
||||
%get-roller-config `(get-config id +.params config:scry)
|
||||
%get-point `(get-point id +.params point:scry)
|
||||
%get-dns `(get-dns id +.params dns:scry)
|
||||
==
|
||||
--
|
||||
::
|
||||
@ -183,77 +157,7 @@
|
||||
|= =ship
|
||||
.^ (unit point:naive)
|
||||
%gx
|
||||
(~(scry agentio bowl) %aggregator /point/(scot %p ship)/noun)
|
||||
==
|
||||
::
|
||||
++ points
|
||||
|= =address:naive
|
||||
.^ (list [ship point:naive])
|
||||
%gx
|
||||
(~(scry agentio bowl) %azimuth /points/(scot %ux address)/noun)
|
||||
==
|
||||
::
|
||||
++ spawned
|
||||
|= =ship
|
||||
.^ (list [@p @ux])
|
||||
%gx
|
||||
(~(scry agentio bowl) %aggregator /spawned/(scot %p ship)/noun)
|
||||
==
|
||||
::
|
||||
++ pending
|
||||
|%
|
||||
++ all
|
||||
.^ (list pend-tx)
|
||||
%gx
|
||||
(~(scry agentio bowl) %aggregator /pending/noun)
|
||||
==
|
||||
::
|
||||
++ ship
|
||||
|= =^ship
|
||||
.^ (list pend-tx)
|
||||
%gx
|
||||
(~(scry agentio bowl) %aggregator /pending/(scot %p ship)/noun)
|
||||
==
|
||||
::
|
||||
++ addr
|
||||
|= =address:naive
|
||||
.^ (list pend-tx)
|
||||
%gx
|
||||
%+ ~(scry agentio bowl) %aggregator
|
||||
/pending/[(scot %ux address)]/noun
|
||||
==
|
||||
--
|
||||
::
|
||||
++ history
|
||||
|%
|
||||
++ addr
|
||||
|= =address:naive
|
||||
.^ (list roller-tx)
|
||||
%gx
|
||||
(~(scry agentio bowl) %aggregator /history/(scot %ux address)/noun)
|
||||
==
|
||||
--
|
||||
::
|
||||
++ tx-status
|
||||
|= keccak=@ux
|
||||
.^ ^tx-status
|
||||
%gx
|
||||
(~(scry agentio bowl) %aggregator /tx/(scot %ux keccak)/status/noun)
|
||||
==
|
||||
::
|
||||
++ next-batch
|
||||
.^ time
|
||||
%gx
|
||||
(~(scry agentio bowl) %aggregator /next-batch/noun)
|
||||
==
|
||||
::
|
||||
++ nonce
|
||||
|= [=ship =proxy:naive]
|
||||
.^ (unit @)
|
||||
%gx
|
||||
%+ ~(scry agentio bowl)
|
||||
%aggregator
|
||||
/nonce/(scot %p ship)/[proxy]/noun
|
||||
(~(scry agentio bowl) %azimuth /point/(scot %p ship)/noun)
|
||||
==
|
||||
::
|
||||
++ dns
|
||||
@ -263,13 +167,5 @@
|
||||
%azimuth
|
||||
/dns/noun
|
||||
==
|
||||
::
|
||||
++ config
|
||||
.^ roller-config
|
||||
%gx
|
||||
%+ ~(scry agentio bowl)
|
||||
%aggregator
|
||||
/config/noun
|
||||
==
|
||||
--
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user