-
Notifications
You must be signed in to change notification settings - Fork 175
/
state.v2.yaml
68 lines (67 loc) · 2.63 KB
/
state.v2.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
get:
operationId: "getStateV2"
summary: "Get full BeaconState object"
description: |
Returns full BeaconState object for given stateId.
Depending on `Accept` header it can be returned either as json or as bytes serialized by SSZ
tags:
- Debug
parameters:
- name: state_id
in: path
required: true
$ref: '../../beacon-node-oapi.yaml#/components/parameters/StateId'
responses:
"200":
description: Success
headers:
Eth-Consensus-Version:
$ref: '../../beacon-node-oapi.yaml#/components/headers/Eth-Consensus-Version'
content:
application/json:
schema:
title: GetStateV2Response
type: object
required: [version, execution_optimistic, finalized, data]
properties:
version:
type: string
enum: [phase0, altair, bellatrix, capella, deneb, electra]
example: "phase0"
execution_optimistic:
$ref: "../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic"
finalized:
$ref: "../../beacon-node-oapi.yaml#/components/schemas/Finalized"
data:
anyOf:
- $ref: '../../beacon-node-oapi.yaml#/components/schemas/BeaconState'
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconState"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BeaconState"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BeaconState"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BeaconState"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Electra.BeaconState"
application/octet-stream:
schema:
description: "SSZ serialized state bytes. Use Accept header to choose this response type"
"400":
description: "Invalid state ID"
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"
"406":
$ref: "../../beacon-node-oapi.yaml#/components/responses/NotAcceptable"
"500":
$ref: '../../beacon-node-oapi.yaml#/components/responses/InternalError'