Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type API t walletId = "api" :> (("healthcheck" :> (Description "Is the server alive?" :> Get '[JSON] ())) :<|> (("fullreport" :> (Description "Details of the contracts: the signatures and their states." :> Get '[JSON] (FullReport t))) :<|> ("contract" :> (("activate" :> (ReqBody '[JSON] (ContractActivationArgs t) :> (Description "Start a new instance." :> Post '[JSON] ContractInstanceId))) :<|> (("instance" :> (Capture "contract-instance-id" ContractInstanceId :> (("status" :> (Description "Current status of contract instance." :> Get '[JSON] (ContractInstanceClientState t))) :<|> (("schema" :> (Description "Endpoints' schema of contract instance." :> Get '[JSON] (ContractSignatureResponse t))) :<|> (("endpoint" :> (Capture "endpoint-name" String :> (ReqBody '[JSON] Value :> (Description "Call an endpoint." :> Post '[JSON] ())))) :<|> ("stop" :> (Description "Terminate the instance." :> Put '[JSON] ()))))))) :<|> (("instances" :> ("wallet" :> (Capture "wallet-id" walletId :> (QueryParam "status" Text :> (Description "List of contract instances for the wallet filtered by status (active, stopped, done). All by default." :> Get '[JSON] [ContractInstanceClientState t]))))) :<|> (("instances" :> (QueryParam "status" Text :> (Description "List of contract instances filtered by status (active, stopped, done). All by default." :> Get '[JSON] [ContractInstanceClientState t]))) :<|> ("definitions" :> (Description "list of available contracts." :> Get '[JSON] [ContractSignatureResponse t])))))))))
- type WSAPI = "ws" :> ((Capture "contract-instance-id" ContractInstanceId :> WebSocketPending) :<|> WebSocketPending)
- type SwaggerAPI = "swagger" :> SwaggerSchemaUI "swagger-ui" "swagger.json"
Documentation
type API t walletId = "api" :> (("healthcheck" :> (Description "Is the server alive?" :> Get '[JSON] ())) :<|> (("fullreport" :> (Description "Details of the contracts: the signatures and their states." :> Get '[JSON] (FullReport t))) :<|> ("contract" :> (("activate" :> (ReqBody '[JSON] (ContractActivationArgs t) :> (Description "Start a new instance." :> Post '[JSON] ContractInstanceId))) :<|> (("instance" :> (Capture "contract-instance-id" ContractInstanceId :> (("status" :> (Description "Current status of contract instance." :> Get '[JSON] (ContractInstanceClientState t))) :<|> (("schema" :> (Description "Endpoints' schema of contract instance." :> Get '[JSON] (ContractSignatureResponse t))) :<|> (("endpoint" :> (Capture "endpoint-name" String :> (ReqBody '[JSON] Value :> (Description "Call an endpoint." :> Post '[JSON] ())))) :<|> ("stop" :> (Description "Terminate the instance." :> Put '[JSON] ()))))))) :<|> (("instances" :> ("wallet" :> (Capture "wallet-id" walletId :> (QueryParam "status" Text :> (Description "List of contract instances for the wallet filtered by status (active, stopped, done). All by default." :> Get '[JSON] [ContractInstanceClientState t]))))) :<|> (("instances" :> (QueryParam "status" Text :> (Description "List of contract instances filtered by status (active, stopped, done). All by default." :> Get '[JSON] [ContractInstanceClientState t]))) :<|> ("definitions" :> (Description "list of available contracts." :> Get '[JSON] [ContractSignatureResponse t]))))))))) Source #
PAB client API for contracts of type t
. An example of t
are
* Builtin contracts that run in the same process as the PAB (ie. the PAB is compiled & distributed with these contracts)
type WSAPI = "ws" :> ((Capture "contract-instance-id" ContractInstanceId :> WebSocketPending) :<|> WebSocketPending) Source #
type SwaggerAPI = "swagger" :> SwaggerSchemaUI "swagger-ui" "swagger.json" Source #