TriportRPC

web3_sha3

Polygon / https://triport.io/polygon

Minimum tier: Free

Polygon method guide

Last updated:

web3_sha3 takes a single 0x-prefixed hex byte string, computes its keccak256 digest server-side, and returns the 32-byte result as a 0x-prefixed hex string. This is the same keccak256 used throughout the EVM (function selectors, event topics, storage slots), not the NIST SHA3-256 variant — despite the method name.

In practice you rarely need this method in production. Every major client library (ethers, web3.js, web3.py) computes keccak256 locally without a network round-trip, which is faster and avoids spending your rate-limit budget. Reach for web3_sha3 only when you have no local hashing primitive available, or when you want to confirm a hash against the node's own implementation.

The method is read-only and available on the free tier under the polygon_read_rpc category.

Parameters

This method takes no parameters.

Returns

web3_sha3 return value
FieldType
resultobject

Examples

curl https://triport.io/polygon \
  -X POST -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <api-key>' \
  -d '{"jsonrpc":"2.0","id":1,"method":"web3_sha3","params":[]}'
const res = await fetch("https://triport.io/polygon", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
  body: JSON.stringify({
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": []
}),
});
const data = await res.json();
import requests
resp = requests.post(
    "https://triport.io/polygon",
    headers={"Authorization": "Bearer <api-key>"},
    json={"jsonrpc":"2.0","id":1,"method":"web3_sha3","params":[]},
)
print(resp.json())

Usage

  1. Transport: HTTP (JSON-RPC).
  2. Chain: Polygon.
  3. Clusters: mainnet.
  4. Credit cost: 1 per call.

FAQ

What does web3_sha3 do?
Computes the keccak256 (SHA3) hash of the given data on the server and returns it as a hex string.
How many credits does web3_sha3 cost?
web3_sha3 costs 1 credit(s) per call on Triport by default.
Is web3_sha3 available over WebSocket?
web3_sha3 is an HTTP JSON-RPC method.