forked from ethereum/beacon-APIs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
beacon-node-oapi.yaml
215 lines (199 loc) · 7.51 KB
/
beacon-node-oapi.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
openapi: "3.0.3"
info:
title: "Eth2 Beacon Node API"
description: |
API specification for the beacon node, which enables users to query and participate in Ethereum 2.0 phase 0 beacon chain.
All requests by default send and receive JSON, and as such should have either or both of the "Content-Type: application/json"
and "Accept: application/json" headers.
In addition, some request can return data in the SSZ format.
To indicate that SSZ data is required in response to a request the header "Accept: application/octet-stream" should be sent.
Note that only a subset of requests can respond with data in SSZ format; these are noted in each individual request.
version: "Dev - Eth2Spec v1.0.1"
contact:
name: Ethereum Github
url: https://github.com/ethereum/eth2.0-apis/issues
license:
name: "Apache 2.0"
url: "https://www.apache.org/licenses/LICENSE-2.0.html"
servers:
- url: "{server_url}"
variables:
server_url:
description: "Beacon node API url"
default: "http://public-mainnet-node.ethereum.org/api"
tags:
- name: Beacon
description: Set of endpoints to query beacon chain.
- name: Config
description: Endpoints to query chain configuration, specification, and fork schedules.
- name: Debug
description: Set of endpoints to debug chain and shouldn't be exposed publicly.
- name: Events
description: Set of endpoints to for event subscription.
- name: Node
description: Endpoints to query node related informations
- name: Validator
description: Endpoints intended for validator clients
- name: ValidatorRequiredApi
description: |
Minimal set of endpoints to enable a working validator implementation.
[Checkout validator flow](./validator-flow.md) to learn how to use this api.
paths:
/eth/v1/beacon/genesis:
$ref: "./apis/beacon/genesis.yaml"
/eth/v1/beacon/states/{state_id}/root:
$ref: "./apis/beacon/states/root.yaml"
/eth/v1/beacon/states/{state_id}/fork:
$ref: "./apis/beacon/states/fork.yaml"
/eth/v1/beacon/states/{state_id}/finality_checkpoints:
$ref: "./apis/beacon/states/finality_checkpoints.yaml"
/eth/v1/beacon/states/{state_id}/validators:
$ref: "./apis/beacon/states/validators.yaml"
/eth/v1/beacon/states/{state_id}/validators/{validator_id}:
$ref: "./apis/beacon/states/validator.yaml"
/eth/v1/beacon/states/{state_id}/validator_balances:
$ref: "./apis/beacon/states/validator_balances.yaml"
/eth/v1/beacon/states/{state_id}/committees:
$ref: "./apis/beacon/states/committee.yaml"
/eth/v1/beacon/headers:
$ref: "./apis/beacon/blocks/headers.yaml"
/eth/v1/beacon/headers/{block_id}:
$ref: "./apis/beacon/blocks/header.yaml"
/eth/v1/beacon/blocks:
$ref: "./apis/beacon/blocks/blocks.yaml"
/eth/v1/beacon/blocks/{block_id}:
$ref: "./apis/beacon/blocks/block.yaml"
/eth/v1/beacon/blocks/{block_id}/root:
$ref: "./apis/beacon/blocks/root.yaml"
/eth/v1/beacon/blocks/{block_id}/attestations:
$ref: "./apis/beacon/blocks/attestations.yaml"
/eth/v1/beacon/pool/attestations:
$ref: "./apis/beacon/pool/attestations.yaml"
/eth/v1/beacon/pool/attester_slashings:
$ref: "./apis/beacon/pool/attester_slashings.yaml"
/eth/v1/beacon/pool/proposer_slashings:
$ref: "./apis/beacon/pool/proposer_slashings.yaml"
/eth/v1/beacon/pool/voluntary_exits:
$ref: "./apis/beacon/pool/voluntary_exists.yaml"
/eth/v1/debug/beacon/states/{state_id}:
$ref: './apis/debug/state.yaml'
/eth/v1/debug/beacon/heads:
$ref: './apis/debug/heads.yaml'
/eth/v1/node/identity:
$ref: "./apis/node/identity.yaml"
/eth/v1/node/peers:
$ref: "./apis/node/peers.yaml"
/eth/v1/node/peers/{peer_id}:
$ref: "./apis/node/peer.yaml"
/eth/v1/node/peer_count:
$ref: "./apis/node/peer_count.yaml"
/eth/v1/node/version:
$ref: "./apis/node/version.yaml"
/eth/v1/node/syncing:
$ref: "./apis/node/syncing.yaml"
/eth/v1/node/health:
$ref: "./apis/node/health.yaml"
/eth/v1/config/fork_schedule:
$ref: "./apis/config/fork_schedule.yaml"
/eth/v1/config/spec:
$ref: "./apis/config/spec.yaml"
/eth/v1/config/deposit_contract:
$ref: "./apis/config/deposit_contract.yaml"
/eth/v1/validator/duties/attester/{epoch}:
$ref: "./apis/validator/duties/attester.yaml"
/eth/v1/validator/duties/proposer/{epoch}:
$ref: "./apis/validator/duties/proposer.yaml"
/eth/v1/validator/blocks/{slot}:
$ref: "./apis/validator/block.yaml"
/eth/v1/validator/attestation_data:
$ref: "./apis/validator/attestation_data.yaml"
/eth/v1/validator/aggregate_attestation:
$ref: "./apis/validator/aggregate_attestation.yaml"
/eth/v1/validator/aggregate_and_proofs:
$ref: "./apis/validator/aggregate_and_proofs.yaml"
/eth/v1/validator/beacon_committee_subscriptions:
$ref: "./apis/validator/beacon_committee_subscriptions.yaml"
/eth/v1/events:
$ref: "./apis/eventstream/index.yaml"
components:
schemas:
BeaconState:
$ref: './types/state.yaml#/BeaconState'
BeaconBlock:
$ref: './types/block.yaml#/BeaconBlock'
SignedBeaconBlock:
$ref: './types/block.yaml#/SignedBeaconBlock'
SignedBeaconBlockHeader:
$ref: './types/block.yaml#/SignedBeaconBlockHeader'
ValidatorResponse:
$ref: './types/api.yaml#/ValidatorResponse'
ValidatorBalanceResponse:
$ref: './types/api.yaml#/ValidatorBalanceResponse'
ValidatorStatus:
$ref: './types/api.yaml#/ValidatorStatus'
Committee:
$ref: './types/api.yaml#/Committee'
AttesterSlashing:
$ref: './types/attester_slashing.yaml#/AttesterSlashing'
ProposerSlashing:
$ref: './types/proposer_slashing.yaml#/ProposerSlashing'
SignedVoluntaryExit:
$ref: './types/voluntary_exit.yaml#/SignedVoluntaryExit'
AttesterDuty:
$ref: './types/validator.yaml#/AttesterDuty'
ProposerDuty:
$ref: './types/validator.yaml#/ProposerDuty'
SignedAggregateAndProof:
$ref: './types/validator.yaml#/SignedAggregateAndProof'
Attestation:
$ref: './types/attestation.yaml#/Attestation'
AttestationData:
$ref: './types/attestation.yaml#/AttestationData'
Fork:
$ref: './types/misc.yaml#/Fork'
Checkpoint:
$ref: './types/misc.yaml#/Checkpoint'
Uint64:
$ref: './types/primitive.yaml#/Uint64'
NetworkIdentity:
$ref: './types/p2p.yaml#/NetworkIdentity'
Peer:
$ref: './types/p2p.yaml#/Peer'
PeerId:
$ref: './types/p2p.yaml#/PeerId'
PeerConnectionState:
$ref: './types/p2p.yaml#/PeerConnectionState'
PeerConnectionDirection:
$ref: './types/p2p.yaml#/PeerConnectionDirection'
GenesisTime:
$ref: './types/primitive.yaml#/GenesisTime'
Version:
$ref: './types/primitive.yaml#/Version'
ForkVersion:
$ref: './types/primitive.yaml#/ForkVersion'
DependentRoot:
$ref: './types/primitive.yaml#/DependentRoot'
Root:
$ref: './types/primitive.yaml#/Root'
Hex:
$ref: './types/primitive.yaml#/Hex'
Graffiti:
$ref: './types/primitive.yaml#/Graffiti'
Signature:
$ref: './types/primitive.yaml#/Signature'
ErrorMessage:
$ref: './types/http.yaml#/ErrorMessage'
IndexedErrorMessage:
$ref: './types/http.yaml#/IndexedErrorMessage'
parameters:
StateId:
$ref: './params/index.yaml#/StateId'
BlockId:
$ref: './params/index.yaml#/BlockId'
responses:
InvalidRequest:
$ref: './types/http.yaml#/InvalidRequest'
InternalError:
$ref: './types/http.yaml#/InternalError'
CurrentlySyncing:
$ref: './types/http.yaml#/CurrentlySyncing'