def read_state

cswap-bend-cli@0.1.0.0 · daemon/state.bend:55

import cswap-bend-cli@0.1.0.0/daemon/state.bend as State
import Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
import cswap-bend-cli@0.1.0.0/fs.bend as Fs

55# The state object; {} when the file is missing, torn or not an object.
56def read_state(+root: String) -> IO(Json.Json):
57  IO.bind(Fs.Res(String), Json.Json, Fs.read_file(state_path(root)), r => IO.pure(Json.Json, read2(r)))

Uses (9)

Used by (6)