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