airalab / Hs Web3
Licence: apache-2.0
Web3 API for Haskell.
Stars: ✭ 127
Programming Languages
haskell
3896 projects
Projects that are alternatives of or similar to Hs Web3
Cyb Archeology
🌎 Personal immortal robot for the The Great Web
Stars: ✭ 117 (-7.87%)
Mutual labels: ethereum, web3, ipfs
Awesome Web3
🚀 A curated list of tools, libs and resources to help you build awesome dapps
Stars: ✭ 104 (-18.11%)
Mutual labels: ethereum, web3, ipfs
Ipfs Mini
A super tiny module for querying IPFS that works in the browser and node.
Stars: ✭ 115 (-9.45%)
Mutual labels: ethereum, web3, ipfs
Vue Ethereum Ipfs
Distributed Application Starter: Vue front-end, Ethereum / IPFS Backend
Stars: ✭ 1,312 (+933.07%)
Mutual labels: ethereum, ipfs
Ethvtx
🌀🛰 ethereum-ready & framework-agnostic redux store configuration
Stars: ✭ 125 (-1.57%)
Mutual labels: ethereum, web3
Myetherapi
An API by MyEtherWallet. ETH / Ropsten / JSON RPC / Web3
Stars: ✭ 95 (-25.2%)
Mutual labels: ethereum, web3
Starter Kit
An OpenZeppelin starter kit containing React, OpenZeppelin SDK & OpenZeppelin Contracts.
Stars: ✭ 101 (-20.47%)
Mutual labels: ethereum, web3
Web3 Vs Ethers
A basic cheatsheet of Web3.js vs Ethers (along w/ example apps!)
Stars: ✭ 103 (-18.9%)
Mutual labels: ethereum, web3
Truffle Assertions
🛠 Assertions and utilities for testing Ethereum smart contracts with Truffle unit tests
Stars: ✭ 109 (-14.17%)
Mutual labels: ethereum, web3
Element
DID Method implementation using the Sidetree protocol on top of Ethereum and IPFS
Stars: ✭ 80 (-37.01%)
Mutual labels: ethereum, ipfs
Connect
(Aragon 1) Seamlessly integrate DAO functionality into web and node.js apps.
Stars: ✭ 81 (-36.22%)
Mutual labels: ethereum, web3
Trust Wallet Ios
📱 Trust - Ethereum Wallet and Web3 DApp Browser for iOS
Stars: ✭ 1,228 (+866.93%)
Mutual labels: ethereum, web3
Marketprotocol
Ethereum based derivatives trading protocol creating digital tokens for any asset
Stars: ✭ 78 (-38.58%)
Mutual labels: ethereum, web3
Ethjs Provider Signer
A simple web3 standard provider that signs eth_sendTransaction payloads.
Stars: ✭ 65 (-48.82%)
Mutual labels: ethereum, web3
Supply Chain
Supply chain management on blockchain using Angular 4 + Truffle + IPFS + Ethereum
Stars: ✭ 76 (-40.16%)
Mutual labels: ethereum, ipfs
Ipfscloud Web
IpfsCloud: A Decentralized, Anonymous Cloud Storage web client on IPFS.
Stars: ✭ 105 (-17.32%)
Mutual labels: ethereum, ipfs
Web3 API for Haskell
This library implements Haskell API client for popular Web3 platforms.
Install
stack install web3
Usage
{-# 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 <- runWeb3 $ do
-- Get address of default account
me <- head <$> Eth.accounts
-- Get balance of default account on latest block
myBalance <- Eth.getBalance me Latest
-- Get half of balance
let halfBalance = fromWei (myBalance / 2)
-- Use default account
withAccount () $ do
-- Get Ethereum address via ENS
alice <- Ens.resolve "alice.address.on.eth"
bob <- Ens.resolve "bob.address.on.eth"
-- Send transaction with value
withParam (value .~ halfBalance) $ do
-- Send transaction to alice account
withParam (to .~ alice) $ send ()
-- Send transaction to bob account
withParam (to .~ bob) $ send ()
-- Return sended value
return halfBalance
-- Web3 error handling
case ret of
Left e -> error $ show e
Right v -> print (v :: Ether) -- Print returned value in ethers
Read more in the documentation on ReadTheDocs.
License
-
Network.Polkadot
andCodec.Scale
is licensed under Apache 2.0 - All other source is licensed under BSD-3-Clause
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].