Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type App a b = PABAction ( Builtin a) ( AppEnv a) b
- runApp :: forall a b. ( FromJSON a, ToJSON a, HasDefinitions a, Typeable a) => StorageBackend -> Trace IO ( PABLogMsg ( Builtin a)) -> BuiltinHandler a -> Config -> App a b -> IO ( Either PABError b)
-
data
AppEnv
a =
AppEnv
{
- dbPool :: DBConnection
- walletClientEnv :: Maybe ClientEnv
- nodeClientEnv :: ClientEnv
- chainQueryEnv :: ChainQueryEnv
- txSendHandle :: Maybe TxSendHandle
- chainSyncHandle :: ChainSyncHandle
- appConfig :: Config
- appTrace :: Trace IO ( PABLogMsg ( Builtin a))
- appInMemContractStore :: InMemInstances ( Builtin a)
- data StorageBackend
- migrate :: DbConfig -> Trace IO ( PABLogMsg ( Builtin a)) -> IO ()
- dbConnect :: DbConfig -> Trace IO ( PABLogMsg ( Builtin a)) -> IO DBConnection
- handleContractDefinition :: forall a effs. HasDefinitions a => ContractDefinition ( Builtin a) ~> Eff effs
Documentation
:: forall a b. ( FromJSON a, ToJSON a, HasDefinitions a, Typeable a) | |
=> StorageBackend | |
-> Trace IO ( PABLogMsg ( Builtin a)) |
Top-level tracer |
-> BuiltinHandler a | |
-> Config |
Client configuration |
-> App a b |
Action |
-> IO ( Either PABError b) |
Application environment with a contract type
a
.
AppEnv | |
|
data StorageBackend Source #
Instances
Eq StorageBackend Source # | |
Defined in Plutus.PAB.App (==) :: StorageBackend -> StorageBackend -> Bool Source # (/=) :: StorageBackend -> StorageBackend -> Bool Source # |
|
Ord StorageBackend Source # | |
Defined in Plutus.PAB.App compare :: StorageBackend -> StorageBackend -> Ordering Source # (<) :: StorageBackend -> StorageBackend -> Bool Source # (<=) :: StorageBackend -> StorageBackend -> Bool Source # (>) :: StorageBackend -> StorageBackend -> Bool Source # (>=) :: StorageBackend -> StorageBackend -> Bool Source # max :: StorageBackend -> StorageBackend -> StorageBackend Source # min :: StorageBackend -> StorageBackend -> StorageBackend Source # |
|
Show StorageBackend Source # | |
Defined in Plutus.PAB.App |
App actions
handleContractDefinition :: forall a effs. HasDefinitions a => ContractDefinition ( Builtin a) ~> Eff effs Source #