Запрос
curl https://eth.l0vdinfra.com/YOUR_KEY \
-X POST \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_protocolVersion","params":[]}'
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x44"
}
Параметры и свой эндпоинт
Параметры
У метода нет параметров.
Возвращает
string Protocol version, hex: "0x44" is eth/68.
Когда использовать
See which devp2p eth protocol the node speaks, when you debug client compatibility.
Как читать ответ
Hex number: 0x44 = 68, the eth/68 protocol.
Советы
- Rarely needed in applications; eth_chainId and web3_clientVersion are more useful checks.
Связанные методы