def state_of

cswap-bend-cli@0.1.0.0 · daemon/view.bend:73

import cswap-bend-cli@0.1.0.0/daemon/view.bend as View
import Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
import cswap-bend-cli@0.1.0.0/policy/types.bend as T
import cswap-bend-cli@0.1.0.0/daemon/rows.bend as Rows
import cswap-bend-cli@0.1.0.0/daemon/state.bend as St

73def state_of(+st: Json.Json) -> T.State:
74  T.State{Rows.nat_opt(St.last_switch_at(st)), slot_nat(Json.get("lastSwitchTo", st)), num_nat(Json.get("lastSwitchFrom", st)), snap_of(st)}

Uses (8)

Used by (1)