-
Notifications
You must be signed in to change notification settings - Fork 1
/
swagger.yml
218 lines (217 loc) · 5.96 KB
/
swagger.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
openapi: '3.0.2'
info:
title: Masp Indexer
version: '1.0'
servers:
- url: https://localhost:5000/api/v1
paths:
/block-index:
get:
responses:
'200':
description: Compressed (lossy) index of all blocks containing masp txs.
content:
application/json:
schema:
$ref: '#/components/schemas/BlockIndexResponse'
/health:
get:
responses:
'200':
description: OK
/commitment-tree:
get:
parameters:
- in: query
name: height
required: true
schema:
type: integer
responses:
'200':
description: The commitment tree at the given height.
content:
application/json:
schema:
$ref: '#/components/schemas/TreeResponse'
/height:
get:
responses:
'200':
description: The last indexed block height.
content:
application/json:
schema:
$ref: '#/components/schemas/LatestHeightResponse'
/notes-index:
get:
parameters:
- in: query
name: height
required: true
schema:
type: integer
minimum: 0
responses:
'200':
description: The notes map up to some block height.
content:
application/json:
schema:
$ref: '#/components/schemas/NotesIndexResponse'
/witness-map:
get:
parameters:
- in: query
name: height
required: true
schema:
type: integer
minimum: 0
responses:
'200':
description: The witness map of a specific block height.
content:
application/json:
schema:
$ref: '#/components/schemas/WitnessMapResponse'
/tx:
get:
parameters:
- in: query
name: height
required: true
schema:
type: integer
minimum: 0
- in: query
name: height_offset
required: true
schema:
type: integer
minimum: 0
responses:
'200':
description: The masp transactions between `height` and `height + height_offset`.
content:
application/json:
schema:
$ref: '#/components/schemas/TxResponse'
components:
schemas:
TreeResponse:
type: object
properties:
commitment_tree:
type: string
format: byte
description: The commitment tree bytes.
block_height:
type: integer
minimum: 0
description: The block height of the commitment tree.
LatestHeightResponse:
type: object
properties:
block_height:
type: integer
minimum: 0
description: The last indexed block height.
WitnessMapResponse:
type: object
properties:
witnesses:
type: array
items:
type: object
properties:
bytes:
type: string
format: byte
description: The witness bytes.
index:
type: integer
minimum: 0
description: The witness index.
description: The commitment tree bytes.
block_height:
type: integer
minimum: 0
description: The block height of the commitment tree.
NotesIndexResponse:
type: object
properties:
notes_index:
type: array
items:
type: object
properties:
block_height:
type: integer
minimum: 0
description: The block height containing the note.
block_index:
type: integer
minimum: 0
description: The block index containing the note.
masp_tx_index:
type: integer
minimum: 0
description: The index of the masp tx containing the note in the block.
note_position:
type: integer
minimum: 0
description: The note position in the commitment tree.
description: The vector of notes map.
TxResponse:
type: object
properties:
txs:
type: array
items:
type: object
properties:
block_height:
type: integer
minimum: 0
description: The note block height.
block_index:
type: integer
minimum: 0
description: The index of the transaction batch in the block.
batch:
type: object
properties:
bytes:
type: string
format: byte
description: The masp transaction bytes.
masp_tx_index:
type: integer
minimum: 0
description: The index of the individual masp transaction in the block.
description: The batch of masp transactions in this slot.
description: The vector of masp transactions.
BlockIndexResponse:
type: object
properties:
block_height:
type: integer
minimum: 0
description: The block height of the index.
index:
description: Compressed (lossy) index of all blocks containing masp txs.
type: object
properties:
seed:
type: integer
segment_length:
type: integer
segment_length_mask:
type: integer
segment_count_length:
type: integer
fingerprints:
type: array
items:
type: integer