本頁面使用機器翻譯自英語,可能包含錯誤或不清楚的語言。如需最準確的信息,請參閱英文原文。由於更新頻繁,部分內容可能與英文原文有出入。請加入我們在 Crowdin 上的努力,幫助我們改進本頁面的翻譯。 (Crowdin translation page, Contributing guide)
[Block] kaia_getCouncilSize
Returns the size of the council at the specified block. If the parameter is not set, returns the size of the council at the latest block.
NOTE: In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.
JSONRPC: kaia_getCouncilSize
Request
- application/json
Body
Array [
- IntegerBlockNumber
- HexadecimalBlockNumber
- BlockTag
]
params
undefined[]
required
BlockNumberOrTag
object
oneOf
the block number with type integer
number
the block number with type hexadecimal
string
the block tag [latest, pending, earliest]
string
Responses
- 200
Integer - The size of the council, or -1 when no council was found
- application/json
- Schema
- Example (from schema)
Schema
error
object
result number
The size of the council
{
"jsonrpc": "2.0",
"id": 0,
"error": {
"code": -32700,
"message": "Parse error",
"data": "string"
},
"result": 4
}
- curl
- python
- nodejs
- java
- Curl
curl -X 'POST' \
'https://public-en-kairos.node.kaia.io/kaia/getCouncilSize' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"method": "kaia_getCouncilSize",
"id": 1,
"jsonrpc": "2.0",
"params": ["0x1b4"]
}'
- CURL
curl -L 'https://public-en-kairos.node.kaia.io/' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"method": "kaia_getCouncilSize",
"id": 1,
"jsonrpc": "2.0",
"params": [
"0x1b4"
]
}'
ResponseClear