-
Notifications
You must be signed in to change notification settings - Fork 175
/
validators.yaml
76 lines (74 loc) · 2.77 KB
/
validators.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
get:
operationId: "getStateValidators"
summary: "Get validators from state"
description: |
Returns filterable list of validators with their balance, status and index.
Information will be returned for all indices or public key that match known validators. If an index or public key does not
match any known validator, no information will be returned but this will not cause an error. There are no guarantees for the
returned data in terms of ordering; both the index and public key are returned for each validator, and can be used to confirm
for which inputs a response has been returned.
tags:
- Beacon
parameters:
- name: state_id
in: path
$ref: '../../../beacon-node-oapi.yaml#/components/parameters/StateId'
- name: id
description: "Either hex encoded public key (any bytes48 with 0x prefix) or validator index"
in: query
required: false
schema:
type: array
maxItems: 30
uniqueItems: true
items:
description: "Either hex encoded public key (any bytes48 with 0x prefix) or validator index"
type: string
- name: status
description: "[Validator status specification](https://hackmd.io/ofFJ5gOmQpu1jjHilHbdQQ)"
in: query
required: false
schema:
type: array
uniqueItems: true
items:
allOf:
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/ValidatorStatus'
- enum: ["active", "pending", "exited", "withdrawal"]
responses:
"200":
description: Success
content:
application/json:
schema:
title: GetStateValidatorsResponse
type: object
properties:
execution_optimistic:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic"
finalized:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/Finalized"
data:
type: array
items:
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/ValidatorResponse'
"400":
description: "Invalid state or validator ID, or status"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 400
message: "Invalid state ID: current"
"404":
description: "State not found"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 404
message: "State not found"
"500":
$ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError"