-
Notifications
You must be signed in to change notification settings - Fork 65
/
reader.graphql
218 lines (199 loc) · 7.46 KB
/
reader.graphql
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
"Data that can be used as proof to validate notices and execute vouchers on the base layer blockchain"
type Proof {
"Validity proof for an output"
validity: OutputValidityProof!
"Data that allows the validity proof to be contextualized within submitted claims, given as a payload in Ethereum hex binary format, starting with '0x'"
context: String!
}
enum CompletionStatus {
UNPROCESSED
ACCEPTED
REJECTED
EXCEPTION
MACHINE_HALTED
CYCLE_LIMIT_EXCEEDED
TIME_LIMIT_EXCEEDED
PAYLOAD_LENGTH_LIMIT_EXCEEDED
}
"Request submitted to the application to advance its state"
type Input {
"Input index starting from genesis"
index: Int!
"Status of the input"
status: CompletionStatus!
"Address responsible for submitting the input"
msgSender: String!
"Timestamp associated with the input submission, as defined by the base layer's block in which it was recorded"
timestamp: BigInt!
"Number of the base layer block in which the input was recorded"
blockNumber: BigInt!
"Input payload in Ethereum hex binary format, starting with '0x'"
payload: String!
"Get voucher from this particular input given the voucher's index"
voucher(index: Int!): Voucher!
"Get notice from this particular input given the notice's index"
notice(index: Int!): Notice!
"Get report from this particular input given the report's index"
report(index: Int!): Report!
"Get vouchers from this particular input with support for pagination"
vouchers(first: Int, last: Int, after: String, before: String): VoucherConnection!
"Get notices from this particular input with support for pagination"
notices(first: Int, last: Int, after: String, before: String): NoticeConnection!
"Get reports from this particular input with support for pagination"
reports(first: Int, last: Int, after: String, before: String): ReportConnection!
}
"Validity proof for an output"
type OutputValidityProof {
"Local input index within the context of the related epoch"
inputIndexWithinEpoch: Int!
"Output index within the context of the input that produced it"
outputIndexWithinInput: Int!
"Merkle root of all output hashes of the related input, given in Ethereum hex binary format (32 bytes), starting with '0x'"
outputHashesRootHash: String!
"Merkle root of all voucher hashes of the related epoch, given in Ethereum hex binary format (32 bytes), starting with '0x'"
vouchersEpochRootHash: String!
"Merkle root of all notice hashes of the related epoch, given in Ethereum hex binary format (32 bytes), starting with '0x'"
noticesEpochRootHash: String!
"Hash of the machine state claimed for the related epoch, given in Ethereum hex binary format (32 bytes), starting with '0x'"
machineStateHash: String!
"Proof that this output hash is in the output-hashes merkle tree. This array of siblings is bottom-up ordered (from the leaf to the root). Each hash is given in Ethereum hex binary format (32 bytes), starting with '0x'."
outputHashInOutputHashesSiblings: [String!]!
"Proof that this output-hashes root hash is in epoch's output merkle tree. This array of siblings is bottom-up ordered (from the leaf to the root). Each hash is given in Ethereum hex binary format (32 bytes), starting with '0x'."
outputHashesInEpochSiblings: [String!]!
}
"Representation of a transaction that can be carried out on the base layer blockchain, such as a transfer of assets"
type Voucher {
"Voucher index within the context of the input that produced it"
index: Int!
"Input whose processing produced the voucher"
input: Input!
"Transaction destination address in Ethereum hex binary format (20 bytes), starting with '0x'"
destination: String!
"Transaction payload in Ethereum hex binary format, starting with '0x'"
payload: String!
"Proof object that allows this voucher to be validated and executed on the base layer blockchain"
proof: Proof
}
"Top level queries"
type Query {
"Get input based on its identifier"
input(index: Int!): Input!
"Get voucher based on its index"
voucher(voucherIndex: Int!, inputIndex: Int!): Voucher!
"Get notice based on its index"
notice(noticeIndex: Int!, inputIndex: Int!): Notice!
"Get report based on its index"
report(reportIndex: Int!, inputIndex: Int!): Report!
"Get inputs with support for pagination"
inputs(first: Int, last: Int, after: String, before: String, where: InputFilter): InputConnection!
"Get vouchers with support for pagination"
vouchers(first: Int, last: Int, after: String, before: String): VoucherConnection!
"Get notices with support for pagination"
notices(first: Int, last: Int, after: String, before: String): NoticeConnection!
"Get reports with support for pagination"
reports(first: Int, last: Int, after: String, before: String): ReportConnection!
}
"Pagination entry"
type NoticeEdge {
"Node instance"
node: Notice!
"Pagination cursor"
cursor: String!
}
"Pagination result"
type InputConnection {
"Total number of entries that match the query"
totalCount: Int!
"Pagination entries returned for the current page"
edges: [InputEdge!]!
"Pagination metadata"
pageInfo: PageInfo!
}
"Pagination result"
type VoucherConnection {
"Total number of entries that match the query"
totalCount: Int!
"Pagination entries returned for the current page"
edges: [VoucherEdge!]!
"Pagination metadata"
pageInfo: PageInfo!
}
"Informational statement that can be validated in the base layer blockchain"
type Notice {
"Notice index within the context of the input that produced it"
index: Int!
"Input whose processing produced the notice"
input: Input!
"Notice data as a payload in Ethereum hex binary format, starting with '0x'"
payload: String!
"Proof object that allows this notice to be validated by the base layer blockchain"
proof: Proof
}
"Pagination entry"
type ReportEdge {
"Node instance"
node: Report!
"Pagination cursor"
cursor: String!
}
"Pagination result"
type ReportConnection {
"Total number of entries that match the query"
totalCount: Int!
"Pagination entries returned for the current page"
edges: [ReportEdge!]!
"Pagination metadata"
pageInfo: PageInfo!
}
"Filter object to restrict results depending on input properties"
input InputFilter {
"Filter only inputs with index lower than a given value" indexLowerThan: Int
"Filter only inputs with index greater than a given value" indexGreaterThan: Int
}
scalar BigInt
"Pagination result"
type NoticeConnection {
"Total number of entries that match the query"
totalCount: Int!
"Pagination entries returned for the current page"
edges: [NoticeEdge!]!
"Pagination metadata"
pageInfo: PageInfo!
}
"Pagination entry"
type InputEdge {
"Node instance"
node: Input!
"Pagination cursor"
cursor: String!
}
"Page metadata for the cursor-based Connection pagination pattern"
type PageInfo {
"Cursor pointing to the first entry of the page"
startCursor: String
"Cursor pointing to the last entry of the page"
endCursor: String
"Indicates if there are additional entries after the end curs"
hasNextPage: Boolean!
"Indicates if there are additional entries before the start curs"
hasPreviousPage: Boolean!
}
"Application log or diagnostic information"
type Report {
"Report index within the context of the input that produced it"
index: Int!
"Input whose processing produced the report"
input: Input!
"Report data as a payload in Ethereum hex binary format, starting with '0x'"
payload: String!
}
"Pagination entry"
type VoucherEdge {
"Node instance"
node: Voucher!
"Pagination cursor"
cursor: String!
}
schema {
query: Query
}