更新时间:2023-09-11 GMT+08:00

执行层请求示例

Request example(With Credential):

curl -X POST https://your-http-endpoint/your-credential \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method":  "eth_blockNumber",
"params": [],
"id": 1
}'
Request example(With IAM Token):
curl -X POST -H 'X-Auth-Token:your-iam-token' https://your-http-endpoint \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method":  "eth_blockNumber",
"params": [],
"id": 1
}'

Response example:

{
"jsonrpc": "2.0",
"id": 1,
"result": "00f3c34b"
}