curl --request POST \
--url https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14 \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "web3_sha3",
"id": 1,
"params": [
"0x436861696E737461636B"
]
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}curl --request POST \
--url https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14 \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "web3_sha3",
"id": 1,
"params": [
"0x436861696E737461636B"
]
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}web3_sha3 computes the Keccak-256 hash of the given data. This method is a utility function often used in Base for generating hashes of arbitrary data, which is a common requirement for various cryptographic operations.
This example computes Keccak-256 for the value Chainstack.
Chainstack in hex: 0x436861696E737461636B.
data — the data to hash, typically provided as a hexadecimal string.result — the Keccak-256 hash of the input data, returned as a hexadecimal string.web3_sha3 method is essential for:
Was this page helpful?