Copyright | Alexander Krupenkin 2016 |
---|---|
License | BSD3 |
Maintainer | mail@akru.me |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
Ethereum node JSON-RPC API methods with eth_
prefix.
- protocolVersion :: Web3 Int
- syncing :: Web3 SyncingState
- coinbase :: Web3 Address
- mining :: Web3 Bool
- hashrate :: Web3 Quantity
- getStorageAt :: Address -> Quantity -> DefaultBlock -> Web3 Bytes
- getTransactionCount :: Address -> DefaultBlock -> Web3 Quantity
- getBlockTransactionCountByHash :: Bytes -> Web3 Quantity
- getBlockTransactionCountByNumber :: Quantity -> Web3 Quantity
- getUncleCountByBlockHash :: Bytes -> Web3 Quantity
- getUncleCountByBlockNumber :: Quantity -> Web3 Quantity
- getCode :: Address -> DefaultBlock -> Web3 Bytes
- sign :: Address -> Bytes -> Web3 Bytes
- sendTransaction :: Call -> Web3 Bytes
- sendRawTransaction :: Bytes -> Web3 Bytes
- getBalance :: Address -> DefaultBlock -> Web3 Quantity
- newFilter :: Filter e -> Web3 FilterId
- getFilterChanges :: FilterId -> Web3 [Change]
- uninstallFilter :: FilterId -> Web3 Bool
- getLogs :: Filter e -> Web3 [Change]
- call :: Call -> DefaultBlock -> Web3 Bytes
- estimateGas :: Call -> Web3 Quantity
- getBlockByHash :: Bytes -> Web3 Block
- getBlockByNumber :: Quantity -> Web3 Block
- getTransactionByHash :: Bytes -> Web3 (Maybe Transaction)
- getTransactionByBlockHashAndIndex :: Bytes -> Quantity -> Web3 (Maybe Transaction)
- getTransactionByBlockNumberAndIndex :: DefaultBlock -> Quantity -> Web3 (Maybe Transaction)
- accounts :: Web3 [Address]
- newBlockFilter :: Web3 Bytes
- getBlockFilterChanges :: Quantity -> Web3 [Bytes]
- blockNumber :: Web3 BlockNumber
- gasPrice :: Web3 Quantity
- getUncleByBlockHashAndIndex :: Bytes -> Quantity -> Web3 Block
- getUncleByBlockNumberAndIndex :: DefaultBlock -> Quantity -> Web3 Block
- newPendingTransactionFilter :: Web3 Quantity
- getFilterLogs :: Quantity -> Web3 [Change]
- getWork :: Web3 [Bytes]
- submitWork :: Bytes -> Bytes -> Bytes -> Web3 Bool
- submitHashrate :: Bytes -> Bytes -> Web3 Bool
Documentation
protocolVersion :: Web3 Int Source #
Returns the current ethereum protocol version.
syncing :: Web3 SyncingState Source #
Returns an object with data about the sync status or false.
hashrate :: Web3 Quantity Source #
Returns the number of hashes per second that the node is mining with.
getStorageAt :: Address -> Quantity -> DefaultBlock -> Web3 Bytes Source #
Returns the value from a storage position at a given address.
getTransactionCount :: Address -> DefaultBlock -> Web3 Quantity Source #
Returns the number of transactions sent from an address.
getBlockTransactionCountByHash :: Bytes -> Web3 Quantity Source #
Returns the number of transactions in a block from a block matching the given block hash.
getBlockTransactionCountByNumber :: Quantity -> Web3 Quantity Source #
Returns the number of transactions in a block matching the given block number.
getUncleCountByBlockHash :: Bytes -> Web3 Quantity Source #
Returns the number of uncles in a block from a block matching the given block hash.
getUncleCountByBlockNumber :: Quantity -> Web3 Quantity Source #
Returns the number of uncles in a block from a block matching the given block number.
sign :: Address -> Bytes -> Web3 Bytes Source #
Returns an Ethereum specific signature with: sign(keccak256("x19Ethereum Signed Message:n" + len(message) + message))).
sendTransaction :: Call -> Web3 Bytes Source #
Creates new message call transaction or a contract creation, if the data field contains code.
sendRawTransaction :: Bytes -> Web3 Bytes Source #
Creates new message call transaction or a contract creation for signed transactions.
getBalance :: Address -> DefaultBlock -> Web3 Quantity Source #
Returns the balance of the account of given address.
newFilter :: Filter e -> Web3 FilterId Source #
Creates a filter object, based on filter options, to notify when the
state changes (logs). To check if the state has changed, call
getFilterChanges
.
getFilterChanges :: FilterId -> Web3 [Change] Source #
Polling method for a filter, which returns an array of logs which occurred since last poll.
uninstallFilter :: FilterId -> Web3 Bool Source #
Uninstalls a filter with given id. Should always be called when watch is no longer needed.
getLogs :: Filter e -> Web3 [Change] Source #
Returns an array of all logs matching a given filter object.
call :: Call -> DefaultBlock -> Web3 Bytes Source #
Executes a new message call immediately without creating a transaction on the block chain.
estimateGas :: Call -> Web3 Quantity Source #
Makes a call or transaction, which won't be added to the blockchain and returns the used gas, which can be used for estimating the used gas.
getBlockByNumber :: Quantity -> Web3 Block Source #
Returns information about a block by block number.
getTransactionByHash :: Bytes -> Web3 (Maybe Transaction) Source #
Returns the information about a transaction requested by transaction hash.
getTransactionByBlockHashAndIndex :: Bytes -> Quantity -> Web3 (Maybe Transaction) Source #
Returns information about a transaction by block hash and transaction index position.
getTransactionByBlockNumberAndIndex :: DefaultBlock -> Quantity -> Web3 (Maybe Transaction) Source #
Returns information about a transaction by block number and transaction index position.
accounts :: Web3 [Address] Source #
Returns the receipt of a transaction by transaction hash. TODO must create new type, TxReceipt getTransactionReceipt :: Text -> Web3 TxReceipt getTransactionReceipt = remote "getTransactionReceipt"
Returns a list of addresses owned by client.
getBlockFilterChanges :: Quantity -> Web3 [Bytes] Source #
Polling method for a block filter, which returns an array of block hashes occurred since last poll.
blockNumber :: Web3 BlockNumber Source #
Returns the number of most recent block.
getUncleByBlockHashAndIndex :: Bytes -> Quantity -> Web3 Block Source #
Returns information about a uncle of a block by hash and uncle index position.
getUncleByBlockNumberAndIndex :: DefaultBlock -> Quantity -> Web3 Block Source #
Returns information about a uncle of a block by number and uncle index position.
newPendingTransactionFilter :: Web3 Quantity Source #
Creates a filter in the node, to notify when new pending transactions arrive. To check if the state has changed, call getFilterChanges. Returns a FilterId.
getFilterLogs :: Quantity -> Web3 [Change] Source #
Returns an array of all logs matching filter with given id.
getWork :: Web3 [Bytes] Source #
Returns the hash of the current block, the seedHash, and the boundary condition to be met ("target").