From 00334d582eeaa604e2fa2a5921708c9eb89a8b91 Mon Sep 17 00:00:00 2001 From: yosoyubik Date: Tue, 4 May 2021 10:36:50 +0200 Subject: [PATCH] naive: use +pairs:enjs for point-to-json reponse --- pkg/arvo/lib/azimuth-rpc.hoon | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/pkg/arvo/lib/azimuth-rpc.hoon b/pkg/arvo/lib/azimuth-rpc.hoon index 3045658eda..7ad8763dff 100644 --- a/pkg/arvo/lib/azimuth-rpc.hoon +++ b/pkg/arvo/lib/azimuth-rpc.hoon @@ -70,15 +70,13 @@ ++ point-to-json |= =point:naive ^- json + =, enjs:format |^ - :- %o - %- molt - ^- (list [@t json]) + %- pairs :~ ['dominion' s+dominion.point] :: :- 'ownership' - :- %o - %- molt + %- pairs =* own own.point ^- (list [@t json]) :~ ['owner' (own-to-json owner.own)] @@ -89,15 +87,12 @@ == :: :- 'network' - :- %o - =, enjs:format - %- molt ^- (list [@t json]) + %- pairs =* net net.point :* ['rift' (numb rift.net)] :: :- 'keys' - :- %o - %- molt ^- (list [@t json]) + %- pairs :~ ['life' (numb life.keys.net)] ['suite' (numb suite.keys.net)] ['auth' (numb auth.keys.net)] @@ -106,8 +101,7 @@ :: ['rift' (numb rift.net)] :- 'sponsor' - :- %o - %- molt ^- (list [@t json]) + %- pairs ~[['has' b+has.sponsor.net] ['who' (ship who.sponsor.net)]] :: ?~ escape.net ~ @@ -117,8 +111,7 @@ ++ own-to-json |= [=address:naive =nonce:naive] ^- json - :- %o - %- molt ^- (list [@t json]) + %- pairs :~ ['address' s+(crip "0x{((x-co:co 20) address)}")] ['nonce' (numb:enjs:format nonce)] ==