by airalab

airalab / hs-web3

Web3 API for Haskell.

126 Stars 36 Forks Last release: about 2 years ago (v0.8.0.0) Other 558 Commits 24 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Web3 API for Haskell

This library implements Haskell API client for popular Web3 platforms.

Documentation Status Build Status Hackage Matrix Hackage LTS-14 nightly Code Triagers


stack install web3


{-# LANGUAGE OverloadedStrings #-}
module Main where

-- Basic imports import Network.Ethereum import Network.Web3

-- Eth API support import qualified Network.Ethereum.Api.Eth as Eth import Network.Ethereum.Api.Types

-- ENS support import qualified Network.Ethereum.Ens as Ens

-- Lens to simple param setting import Lens.Micro ((.~))

main :: IO () main = do -- Use default provider on http://localhost:8545 ret Eth.accounts

    -- Get balance of default account on latest block
    myBalance  error $ show e
    Right v -> print (v :: Ether)  -- Print returned value in ethers

Read more in the documentation on ReadTheDocs.


  • Network.Polkadot
    is licensed under Apache 2.0
  • All other source is licensed under BSD-3-Clause

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.