forked from ethereum-optimism/optimism
-
Notifications
You must be signed in to change notification settings - Fork 1
/
openapi.yml
345 lines (328 loc) · 9.65 KB
/
openapi.yml
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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
openapi: 3.0.0
info:
title: Ethereum Optimism Data Transport Later
description: |
Make sequencer or contract data available behind a common API
version: 0.1.0
components:
schemas:
EthereumContext:
type: object
properties:
blockNumber:
type: uint64
timestamp:
type: uint64
blockHash:
type: string
EnqueueEntry:
type: object
properties:
index:
type: number
target:
type: string
data:
type: string
gasLimit:
type: number
origin:
type: string
blockNumber:
type: number
timestamp:
type: number
ctcIndex:
type: number
BatchEntry:
type: object
properties:
index:
type: number
blockNumber:
type: number
timestamp:
type: number
submitter:
type: string
size:
type: number
root:
type: string
prevTotalElements:
type: number
extraData:
type: string
l1TransactionHash:
type: string
TransactionEntry:
type: object
properties:
index:
type: number
batchIndex:
type: number
data:
type: string
blockNumber:
type: number
timestamp:
type: number
gasLimit:
type: number
target:
type: string
origin:
type: string
queueOrigin:
type: string
queueIndex: number
type: string
decoded:
type: object
$ref: '#/components/schemas/DecodedSequencerBatchTransaction'
TransactionResponse:
type: object
properties:
batch:
type: object
$ref: '#/components/schemas/BatchEntry'
transaction:
type: object
$ref: '#/components/schemas/TransactionEntry'
TransactionBatchResponse:
type: object
properties:
batch:
type: object
$ref: '#/components/schemas/BatchEntry'
transactions:
type: array
items:
type: object
$ref: '#/components/schemas/TransactionEntry'
DecodedSequencerBatchTransaction:
type: object
properties:
sig:
type: object
$ref: '#/components/schemas/ECDSASignature'
gasLimit:
type: number
gasPrice:
type: number
nonce:
type: number
target:
type: string
data:
type: string
ECDSASignature:
type: object
properties:
r:
type: string
s:
type: string
v:
type: number
StateRootEntry:
type: object
properties:
index:
type: number
batchIndex:
type: number
value:
type: string
StateRootResponse:
type: object
properties:
batch:
type: object
$ref: '#/components/schemas/BatchEntry'
stateRoot:
type: object
$ref: '#/components/schemas/StateRootEntry'
StateRootBatchResponse:
type: object
properties:
batch:
type: object
$ref: '#/components/schemas/BatchEntry'
stateRoots:
type: array
items:
type: object
$ref: '#/components/schemas/StateRootEntry'
paths:
/eth/syncing:
get:
summary: Returns the sync status
description: |
The node may still be syncing to the tip and downstream services can learn up to what
point has been indexed.
responses:
'200':
description: An object representing the progression of the service
content:
application/json:
schema:
type: object
properties:
syncing:
type: boolean
currentTransactionIndex:
type: uint64
highestKnownTransactionIndex:
type: uint64
/eth/context/latest:
get:
summary: Returns the latest Ethereum Layer one context
description: |
This returns the L1 blocknumber, block hash and timestamp corresponding to the most
recently ingested block
responses:
'200':
description: An object representing the Ethereum context
content:
application/json:
schema:
$ref: '#/components/schemas/EthereumContext'
/eth/context/blocknumber/{number}:
get:
summary: Returns the Ethereum Layer one context at a specific height
description: |
This returns the L1 blocknumber, block hash and timestamp corresponding to a specific
Ethereum context
responses:
'200':
description: An object representing the Ethereum context
content:
application/json:
schema:
$ref: '#/components/schemas/EthereumContext'
/enqueue/latest:
get:
summary: Returns the latest enqueued transaction
description: |
This returns the latest transaction sent to the Canonical Transaction Chain `enqueue()`
responses:
'200':
description: An object representing the latest enqueued transaction
content:
application/json:
schema:
$ref: '#/components/schemas/EnqueueEntry'
/enqueue/index/{index}:
get:
summary: Returns the enqueued transaction by index
description: |
This returns the Canonical Transaction Chain `enqueue()` by index
responses:
'200':
description: An object representing the enqueued transaction by index
content:
application/json:
schema:
$ref: '#/components/schemas/EnqueueEntry'
/transaction/latest:
get:
summary: Returns the latest Canonical Transaction Chain transaction
description: |
This returns the latest transaction to be appended to the Canonical Transaction
Chain via a `sequencerBatchAppend()` or `queueBatchAppend()`
responses:
'200':
description: An object representing the latest transaction
content:
application/json:
schema:
$ref: '#/components/schemas/EnqueueEntry'
/transaction/index/{index}:
get:
summary: Returns a Canonical Transaction Chain transaction by index
description: |
This returns a transaction that has been appended to the Canonical Transaction
Chain via a `sequencerBatchAppend()` or `queueBatchAppend()` by index
responses:
'200':
description: An object representing a Transaction by index
content:
application/json:
schema:
$ref: '#/components/schemas/TransactionResponse'
/batch/transaction/latest:
get:
summary: Returns the latest Batch to be appended to the Canonical Transaction Chain
description: |
This returns the latest batch that has been appended to the Canonical Transaction
Chain via a `sequencerBatchAppend()`
responses:
'200':
description: An object representing the latest batch
content:
application/json:
schema:
$ref: '#/components/schemas/TransactionBatchResponse'
/batch/transaction/index/{index}:
get:
summary: Returns the Batch to be appended to the Canonical Transaction Chain by index
description: |
This returns a batch that has been appended to the Canonical Transaction
Chain via a `sequencerBatchAppend()` by index
responses:
'200':
description: An object representing the latest batch
content:
application/json:
schema:
$ref: '#/components/schemas/TransactionBatchResponse'
/stateroot/latest:
get:
summary: Returns the latest state root
description: |
This returns the latest state root appended to the State Commitment Chain
responses:
'200':
description: An object representing the latest state root
content:
application/json:
schema:
$ref: '#/components/schemas/StateRootResponse'
/stateroot/index/{index}:
get:
summary: Returns the state root by index
description: |
This returns a state root appended to the State Commitment Chain by index
responses:
'200':
description: An object representing the a state root
content:
application/json:
schema:
$ref: '#/components/schemas/StateRootResponse'
/batch/stateroot/latest:
get:
summary: Returns the latest state root batch
description: |
This returns the latest batch of state roots appended to the State Commitment Chain
responses:
'200':
description: An object representing the latest state root batch
content:
application/json:
schema:
$ref: '#/components/schemas/StateRootBatchResponse'
/batch/stateroot/index/{index}:
get:
summary: Returns the state root batch by index
description: |
This returns a state root batch appended to the State Commitment Chain by index
responses:
'200':
description: An object representing the state root batch by index
content:
application/json:
schema:
$ref: '#/components/schemas/StateRootBatchResponse'