module Network.Ethereum.Web3.Api where
import Network.Ethereum.Web3.Address
import Network.Ethereum.Web3.JsonRpc
import Network.Ethereum.Web3.Types
import Data.Text (Text)
web3_clientVersion :: Web3 Text
web3_clientVersion = remote "web3_clientVersion"
web3_sha3 :: Text -> Web3 Text
web3_sha3 = remote "web3_sha3"
eth_getBalance :: Address -> CallMode -> Web3 Text
eth_getBalance = remote "eth_getBalance"
eth_newFilter :: Filter -> Web3 FilterId
eth_newFilter = remote "eth_newFilter"
eth_getFilterChanges :: FilterId -> Web3 [Change]
eth_getFilterChanges = remote "eth_getFilterChanges"
eth_uninstallFilter :: FilterId -> Web3 Bool
eth_uninstallFilter = remote "eth_uninstallFilter"
eth_call :: Call -> CallMode -> Web3 Text
eth_call = remote "eth_call"
eth_sendTransaction :: Call -> Web3 Text
eth_sendTransaction = remote "eth_sendTransaction"
eth_accounts :: Web3 [Address]
eth_accounts = remote "eth_accounts"
eth_newBlockFilter :: Web3 Text
eth_newBlockFilter = remote "eth_newBlockFilter"
eth_getBlockFilterChanges :: Text -> Web3 [Text]
eth_getBlockFilterChanges = remote "eth_getFilterChanges"
eth_getBlockByHash :: Text -> Web3 Block
eth_getBlockByHash = flip (remote "eth_getBlockByHash") True