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 info from most recent Block.

This method will use 3000 Compute Units.


Reference: Here

Parameters

  1. block_identifier - object the block identifier hash or height [BlockIdentifier]

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

Returned Value:

  • api_version - string RPC API version

  • auction_state - object the auction state

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "api_version": "1.4.13",
    "auction_state": {
      "bids": [
        {
          "bid": {
            "bonding_purse": "uref-fafafafafafafafafafafafafafafafafafafafafafafafafafafafafafafafa-007",
            "delegation_rate": 0,
            "delegators": [],
            "inactive": false,
            "staked_amount": "10"
          },
          "public_key": "01197f6b23e16c8532c6abc838facd5ea789be0c76b2920334039bfa8b3d368d61"
        }
      ],
      "block_height": 10,
      "era_validators": [
        {
          "era_id": 10,
          "validator_weights": [
            {
              "public_key": "01197f6b23e16c8532c6abc838facd5ea789be0c76b2920334039bfa8b3d368d61",
              "weight": "10"
            }
          ]
        }
      ],
      "state_root_hash": "0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b"
    }
  }
}
curl https://mainnet.casper.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"id":1,"jsonrpc":"2.0","method":"state_get_auction_info","params":[]}'

Last updated