The `web3` Module - Wiki OpenEthereum Documentation

JSON-RPC methods

JSON-RPC API Reference

web3_clientVersion

Returns the current client version.

Parameters

None

Returns

Example

Request

curl --data '{"method":"web3_clientVersion","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545

Response

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": "OpenEthereum//v3.0.1-stable-8ca8089-20200601/x86_64-unknown-linux-gnu/rustc1.43.1"
}

web3_sha3

Returns Keccak-256 (not the standardized SHA3-256) of the given data.

Parameters

  1. String - The data to convert into a SHA3 hash.
params: [
  "0x68656c6c6f20776f726c64" // "hello world"
]

Returns

Example

Request

curl --data '{"method":"web3_sha3","params":["0x68656c6c6f20776f726c64"],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545

Response

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad"
}