ETH RPC API 文档

[ 基本网址: http:///api/eth-rpc ]

提供此 API 是为了支持某些为以太坊节点指定的确切格式的 rpc 方法,可以找到 这里。 这对于允许向浏览器发送请求而无需更改有关请求的任何内容很有用。 然而,总的来说, 自定义 RPC 被推荐。 不支持不在此列表中的任何内容。 单击要转到该方法文档的方法,并检查注释部分是否存在任何潜在差异。

eth_blockNumber

curl -X POST --data '{"id":0,"jsonrpc":"2.0","method": "eth_blockNumber", "params": []}'


        

参数

名称

描述

Curl

          
服务器响应

代码

明细

响应体


            

响应

代码

描述
200
successful operation

            

eth_getBalance

The `earliest` parameter will not work as expected currently, because genesis block balances are not currently imported

curl -X POST --data '{"id":0,"jsonrpc":"2.0","method": "eth_getBalance", "params": []}'


        

参数

名称

描述

Data *必需

20 Bytes - address to check for balance

Quantity|Tag *必需

Integer block number, or the string "latest", "earliest" or "pending"

Curl

          
服务器响应

代码

明细

响应体


            

响应

代码

描述
200
successful operation

            

eth_getLogs

Will never return more than 1000 log entries. For this reason, you can use pagination options to request the next page. Pagination options params: {"logIndex": "3D", "blockNumber": "6423AC", "transactionIndex": 53} which include parameters from the last log received from the previous request. These three parameters are required for pagination.

curl -X POST --data '{"id":0,"jsonrpc":"2.0","method": "eth_getLogs", "params": []}'


        

参数

名称

描述

Object *必需

The filter options

Curl

          
服务器响应

代码

明细

响应体


            

响应

代码

描述
200
successful operation