diff --git a/pkg/arvo/app/roller-rpc.hoon b/pkg/arvo/app/roller-rpc.hoon index f16f4c4031..e899eb807d 100644 --- a/pkg/arvo/app/roller-rpc.hoon +++ b/pkg/arvo/app/roller-rpc.hoon @@ -156,6 +156,7 @@ %cancel-transaction (cancel-tx id +.params) %get-spawned `(get-spawned id +.params spawned:scry) %get-unspawned `(get-spawned id +.params unspawned:scry) + %spawns-remaining `(spawns-remaining id +.params unspawned:scry) %get-owned-points `(get-ships id +.params owned:scry) %get-transferring-for `(get-ships id +.params transfers:scry) %get-manager-for `(get-ships id +.params manager:scry) diff --git a/pkg/arvo/lib/azimuth-roll-rpc.hoon b/pkg/arvo/lib/azimuth-roll-rpc.hoon index 31e16eb6d1..f33d669bb9 100644 --- a/pkg/arvo/lib/azimuth-roll-rpc.hoon +++ b/pkg/arvo/lib/azimuth-roll-rpc.hoon @@ -491,6 +491,15 @@ ~(params error:json-rpc id) [%result id (ships:to-json (scry u.ship))] :: +++ spawns-remaining + |= [id=@t params=(map @t json) scry=$-(@p (list @p))] + ^- response:rpc + ?. =((lent ~(tap by params)) 1) + ~(params error:json-rpc id) + ?~ ship=(ship:from-json params) + ~(params error:json-rpc id) + [%result id (numb:enjs:format (lent (scry u.ship)))] +:: ++ process-rpc |= [id=@t params=(map @t json) action=l2-tx over-quota=$-(@p ?)] ^- [(unit cage) response:rpc]