cometa-0.1.0.0: Idiomatic Haskell bindings to cardano-c
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cometa.Provider

Description

Inject blockchain queries and explicit transaction effects as ordinary IO functions. Missing values use Maybe, successful empty queries use empty lists, and expected failures use Either. These independent observations do not imply an atomic ledger snapshot. Operations never submit a transaction implicitly.

fake = (unavailable "Offline fixture" 42) {utxosAt = _ -> pure (Right [])}
Synopsis

Documentation

data Provider Source #

An application-supplied backend. Fields may perform network effects, use a local cache or return deterministic fixtures. Exceptions propagate normally; expected backend failures belong in Left. No equality or Show instance is defined for function-valued capabilities.

Constructors

Provider 

Fields

unavailable :: Text -> Word32 -> Provider Source #

Total default backend with explicit metadata. Override only the capabilities required by a workflow. Every operation initially returns UnsupportedOperation naming that operation; none acquires a connection or performs network work.