Skip to content

Web3

Entity Version
Source 1.11.23-unstable/generated-at:2021-04-30T19:24:24+03:00
OpenRPC 1.2.6

web3_clientVersion

ClientVersion returns the node name

Params (0)

None

Result

string

  • Required: ✓ Yes

Client Method Invocation Examples

1
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "web3_clientVersion", "params": []}'
1
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "web3_clientVersion", "params": []}'
1
web3.clientVersion();
Source code

1
2
3
func (s *publicWeb3API) ClientVersion() string {
    return s.stack.Server().Name
}// ClientVersion returns the node name
View on GitHub →


web3_sha3

Sha3 applies the ethereum sha3 implementation on the input. It assumes the input is hex encoded.

Params (1)

Parameters must be given by position.

1: input hexutil.Bytes

  • Required: ✓ Yes
1
2
3
4
- description: `Hex representation of some bytes`
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: string
1
2
3
4
5
6
7
8
{
    "description": "Hex representation of some bytes",
    "pattern": "^0x([a-fA-F\\d])+$",
    "title": "dataWord",
    "type": [
        "string"
    ]
}

Result

hexutil.Bytes

  • Required: ✓ Yes
1
2
3
4
- description: `Hex representation of some bytes`
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: string
1
2
3
4
5
6
7
8
{
    "description": "Hex representation of some bytes",
    "pattern": "^0x([a-fA-F\\d])+$",
    "title": "dataWord",
    "type": [
        "string"
    ]
}

Client Method Invocation Examples

1
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "web3_sha3", "params": [<input>]}'
1
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "web3_sha3", "params": [<input>]}'
1
web3.sha3(input);
Source code

1
2
3
4
func (s *publicWeb3API) Sha3(input hexutil.Bytes) hexutil.Bytes {
    return crypto.Keccak256(input)
}// Sha3 applies the ethereum sha3 implementation on the input.
// It assumes the input is hex encoded.
View on GitHub →



Last update: 2022-06-28