def read_cred

cswap-bend-cli@0.1.0.0 · store/io.bend:109

import cswap-bend-cli@0.1.0.0/store/io.bend as Io
import Base
import cswap-bend-cli@0.1.0.0/fs.bend as Fs
import cswap-bend-cli@0.1.0.0/act.bend as Act
import cswap-bend-cli@0.1.0.0/store/base.bend as SBase

109# A slot's stored credential: the decoded text, "" when absent or undecodable.
110def read_cred(+root: String, +slot: String, +email: String) -> Act.of(String):
111  do ActM<String>:
112    ex : Bool <- Act.lift(Bool, Fs.exists(SBase.enc_path(root, slot, email)))
113    read_cred2(ex, SBase.enc_path(root, slot, email))

Uses (9)

Used by (12)