mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 00:13:12 +03:00
naive: support camel case rpc method name
This commit is contained in:
parent
c4f8d6c672
commit
8ada986f78
@ -125,31 +125,32 @@
|
|||||||
=, azimuth-rpc
|
=, azimuth-rpc
|
||||||
?. ?=([%map *] params)
|
?. ?=([%map *] params)
|
||||||
[~ ~(parse error:json-rpc id)]
|
[~ ~(parse error:json-rpc id)]
|
||||||
|
=/ method=@tas (enkebab method)
|
||||||
?+ method [~ ~(method error:json-rpc id)]
|
?+ method [~ ~(method error:json-rpc id)]
|
||||||
%get-point [~ (get-point id +.params point:scry)]
|
%get-point `(get-point id +.params point:scry)
|
||||||
%get-points [~ (get-points id +.params points:scry)]
|
%get-points `(get-points id +.params points:scry)
|
||||||
%get-dns [~ (get-dns id +.params dns:scry)]
|
%get-dns `(get-dns id +.params dns:scry)
|
||||||
%transfer-point (transfer-point id +.params)
|
%transfer-point (transfer-point id +.params)
|
||||||
%cancel-tx (cancel-tx id +.params)
|
%cancel-transaction (cancel-tx id +.params)
|
||||||
%get-spawned [~ (get-spawned id +.params spawned:scry)]
|
%get-spawned `(get-spawned id +.params spawned:scry)
|
||||||
%configure-keys (configure-keys id +.params)
|
%configure-keys (configure-keys id +.params)
|
||||||
%spawn (spawn id +.params)
|
%spawn (spawn id +.params)
|
||||||
%escape (escape id +.params method)
|
%escape (escape id +.params method)
|
||||||
%cancel-escape (cancel-escape id +.params method)
|
%cancel-escape (cancel-escape id +.params method)
|
||||||
%adopt (adopt id +.params method)
|
%adopt (adopt id +.params method)
|
||||||
%detach (detach id +.params method)
|
%detach (detach id +.params method)
|
||||||
%reject (reject id +.params method)
|
%reject (reject id +.params method)
|
||||||
%set-management-proxy (management-proxy id +.params method)
|
%set-management-proxy (management-proxy id +.params method)
|
||||||
%set-spawn-proxy (spawn-proxy id +.params method)
|
%set-spawn-proxy (spawn-proxy id +.params method)
|
||||||
%set-transfer-proxy (transfer-proxy id +.params method)
|
%set-transfer-proxy (transfer-proxy id +.params method)
|
||||||
%pending [~ (all:pending id +.params all:pending:scry)]
|
%get-all-pending `(all:pending id +.params all:pending:scry)
|
||||||
%pending-by-ship [~ (ship:pending id +.params ship:pending:scry)]
|
%get-pending-by-ship `(ship:pending id +.params ship:pending:scry)
|
||||||
%pending-by-address [~ (addr:pending id +.params addr:pending:scry)]
|
%get-pending-by-address `(addr:pending id +.params addr:pending:scry)
|
||||||
%status [~ (status id +.params tx-status:scry)]
|
%get-transaction-status `(status id +.params tx-status:scry)
|
||||||
%next-batch [~ (next-batch id +.params next-batch:scry)]
|
%when-next-batch `(next-batch id +.params next-batch:scry)
|
||||||
%nonce [~ (nonce id +.params nonce:scry)]
|
%get-nonce `(nonce id +.params nonce:scry)
|
||||||
%history [~ (history id +.params addr:history:scry)]
|
%get-history `(history id +.params addr:history:scry)
|
||||||
%get-config [~ (get-config id +.params config:scry)]
|
%get-roller-config `(get-config id +.params config:scry)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ scry
|
++ scry
|
||||||
|
@ -40,6 +40,24 @@
|
|||||||
`(rash p.jon dem)
|
`(rash p.jon dem)
|
||||||
?. ?=([%s *] jon) ~
|
?. ?=([%s *] jon) ~
|
||||||
`(rash p.jon ;~(pfix sig fed:ag))
|
`(rash p.jon ;~(pfix sig fed:ag))
|
||||||
|
:: TODO: from /lib/group-store (move to zuse?)
|
||||||
|
++ enkebab
|
||||||
|
|= str=cord
|
||||||
|
^- @tas
|
||||||
|
~| str
|
||||||
|
=- (fall - str)
|
||||||
|
%+ rush str
|
||||||
|
=/ name
|
||||||
|
%+ cook
|
||||||
|
|= part=tape
|
||||||
|
^- tape
|
||||||
|
?~ part part
|
||||||
|
:- (add i.part 32)
|
||||||
|
t.part
|
||||||
|
;~(plug hig (star low))
|
||||||
|
%+ cook
|
||||||
|
|=(a=(list tape) (crip (zing (join "-" a))))
|
||||||
|
;~(plug (star low) (star name))
|
||||||
::
|
::
|
||||||
++ from-json
|
++ from-json
|
||||||
=, dejs-soft:format
|
=, dejs-soft:format
|
||||||
@ -52,7 +70,7 @@
|
|||||||
%- ot
|
%- ot
|
||||||
:~ ['encrypt' so]
|
:~ ['encrypt' so]
|
||||||
['auth' so]
|
['auth' so]
|
||||||
['crypto-suite' so]
|
['cryptoSuite' so]
|
||||||
['breach' bo]
|
['breach' bo]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
@ -166,8 +184,9 @@
|
|||||||
^- json
|
^- json
|
||||||
%- pairs
|
%- pairs
|
||||||
:~ ['force' b+force]
|
:~ ['force' b+force]
|
||||||
|
['address' s+(crip "0x{((x-co:co 20) address)}")]
|
||||||
::
|
::
|
||||||
:- 'raw-tx'
|
:- 'rawTx'
|
||||||
%- pairs
|
%- pairs
|
||||||
:~ ['tx' (tx:to-json tx.raw-tx)]
|
:~ ['tx' (tx:to-json tx.raw-tx)]
|
||||||
::
|
::
|
||||||
@ -219,7 +238,7 @@
|
|||||||
^- (list [@t json])
|
^- (list [@t json])
|
||||||
:~ ['encrypt' (numb encrypt)]
|
:~ ['encrypt' (numb encrypt)]
|
||||||
['auth' (numb auth)]
|
['auth' (numb auth)]
|
||||||
['crypto-suite' (numb crypto-suite)]
|
['cryptoSuite' (numb crypto-suite)]
|
||||||
['breach' b+breach]
|
['breach' b+breach]
|
||||||
==
|
==
|
||||||
--
|
--
|
||||||
@ -312,27 +331,17 @@
|
|||||||
['address' s+(crip "0x{((x-co:co 20) addr)}")]
|
['address' s+(crip "0x{((x-co:co 20) addr)}")]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ tx-status
|
++ tx-status |=(=^tx-status ^-(json s+status.tx-status))
|
||||||
|= =^tx-status
|
|
||||||
^- json
|
|
||||||
%- pairs
|
|
||||||
:~ ['status' s+status.tx-status]
|
|
||||||
::
|
|
||||||
:- 'pointer'
|
|
||||||
?~ pointer.tx-status ~
|
|
||||||
=* pointer u.pointer.tx-status
|
|
||||||
(ownership address.pointer nonce.pointer)
|
|
||||||
==
|
|
||||||
::
|
::
|
||||||
++ config
|
++ config
|
||||||
|= roller-config
|
|= roller-config
|
||||||
^- json
|
^- json
|
||||||
%- pairs
|
%- pairs
|
||||||
:~ ['next-batch' (time next-batch)]
|
:~ ['nextBatch' (time next-batch)]
|
||||||
['frequency' (numb (div frequency ~s1))]
|
['frequency' (numb (div frequency ~s1))]
|
||||||
['refresh-time' (numb (div refresh-time ~s1))]
|
['refreshTime' (numb (div refresh-time ~s1))]
|
||||||
['contract' s+(crip "0x{((x-co:co 20) contract)}")]
|
['contract' s+(crip "0x{((x-co:co 20) contract)}")]
|
||||||
['chain-id' (numb chain-id)]
|
['chainId' (numb chain-id)]
|
||||||
==
|
==
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
|
Loading…
Reference in New Issue
Block a user