Proof-of-Stake JSON-RPC Methods

state_get_auction_info

This method returns the bids and validators as of either a specific Block (by height or hash). If you do not provide a block_identifier, state_get_auction_info will return information from the most recent Block.

Method: POST

https://casper.nownodes.io/rpc

Example body (raw)

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "state_get_auction_info",
  "params": [
    {
      "Hash": "13c2d7a68ecdd4b74bf4393c88915c836c863fc4bf11d7f2bd930a1bbccacdcb"
    }
  ]
}

Example response: 200

{
    "jsonrpc": "2.0",
    "id": 1,
    "error": {
        "code": -32001,
        "message": "No such block",
        "data": {
            "message": "block 13c2d7a68ecdd4b74bf4393c88915c836c863fc4bf11d7f2bd930a1bbccacdcb not stored on this node",
            "available_block_range": {
                "low": 2753016,
                "high": 2780302
            }
        }
    }
}

info_get_validator_changes

This method returns status changes of active validators. Listed changes occurred during the EraId contained within the response itself. A validator may show more than one change in a single era.

Method: POST

https://casper.nownodes.io/rpc

Example body (raw)

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "info_get_validator_changes",
  "params": []
}

Example response: 200

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "api_version": "1.5.6",
        "changes": []
    }
}

chain_get_era_info_by_switch_block

This method returns an EraInfo from the network. Only the last Block in an era, known as a switch block, will contain an era_summary.

Method: POST

https://casper.nownodes.io

Example body (raw)

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "chain_get_era_info_by_switch_block",
  "params": [
    {
      "Hash": "13c2d7a68ecdd4b74bf4393c88915c836c863fc4bf11d7f2bd930a1bbccacdcb"
    }
  ]
}

Example response: 200

{
    "jsonrpc": "2.0",
    "id": 1,
    "error": {
        "code": -32001,
        "message": "No such block",
        "data": {
            "message": "block 13c2d7a68ecdd4b74bf4393c88915c836c863fc4bf11d7f2bd930a1bbccacdcb not stored on this node",
            "available_block_range": {
                "low": 2416846,
                "high": 2780313
            }
        }
    }
}

Last updated