haskell-abci: Haskell Application BlockChain Interface (ABCI) Server Library

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Haskell library for writing Application BlockChain Interface (ABCI) servers. Licensed under BSD 3-clause (see LICENSE).


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.0
Change log None available
Dependencies base (>=4.7 && <5), binary, bytestring, conduit, conduit-combinators, conduit-extra, foundation, haskell-abci, lens, network-conduit, proto-lens, proto-lens-arbitrary, proto-lens-protoc, text [details]
License BSD-3-Clause
Copyright 2017 Christopher Goes
Author Christopher Goes
Maintainer cwgoes@protonmail.ch
Category Web
Home page https://github.com/cwgoes/haskell-abci#readme
Source repo head: git clone git://github.com/cwgoes/haskell-abci.git
Uploaded by cwgoes at 2017-08-10T01:05:30Z

Modules

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for haskell-abci-0.1.0.0

[back to package description]

Haskell ABCI Server Library

Haskell library for writing Application BlockChain Interface (ABCI) servers. Licensed under BSD 3-clause (see LICENSE).

Usage

Available as a library on Hackage.

If you're using Stack, simply add haskell-abci to the build-depends in your project's Cabal file.

If you're using Cabal directly, cabal install haskell-abci should do the trick.

This library exposes a request-response API. Usage is simple:

  1. Import the library
import qualified Network.ABCI as ABCI
  1. Define your application (for more information, see the ABCI application development documentation)

    See the example counter app for a template.

app :: ABCI.Request -> IO ABCI.Response
app = undefined
  1. Specify a host and port on which to bind the ABCI server, or use the defaults
host :: String
host = ABCI.defaultHost

port :: Int
port = ABCI.defaultPort
  1. Launch the server
run :: IO ()
run = ABCI.serve host port app

Development / Testing

You'll need Stack and a relatively recent version of protobuf.

git clone https://github.com/cwgoes/haskell-abci.git
cd haskell-abci
stack build --install-ghc

Note that src/types.proto is used to generate a Haskell interface file whenever you run stack build.

Optionally, to also install the example counter application (haskell-abci-counter) in ~/.local/bin:

stack install

Once you've installed haskell-abci-counter, to run the counter example application with the standard ABCI Golang tests: (note that you'll need ~/.local/bin on your shell path and Tendermint installed)

git clone https://github.com/tendermint/abci.git
cd abci/tests/test_app
ABCI_APP="haskell-abci-counter" go run ./*.go