forked from ArweaveTeam/gateway
-
Notifications
You must be signed in to change notification settings - Fork 5
/
types.graphql
251 lines (229 loc) · 4.9 KB
/
types.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
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
type Query {
"""
Get a transaction by its id
"""
transaction(id: ID!): Transaction
"""
Get a paginated set of matching transactions using filters.
"""
transactions(
"""
Find transactions from a list of ids.
"""
ids: [ID!]
"""
Find transactions from a list of owner wallet addresses, or wallet owner public keys.
"""
owners: [String!]
"""
Find transactions from a list of recipient wallet addresses.
"""
recipients: [String!]
"""
Find transactions using tags.
"""
tags: [TagFilter!]
"""
Only match the first n transactions.
"""
first: Int = 10
"""
A pagination cursor value, for fetching subsequent pages from a result set.
"""
after: String
"""
Find transactions within the given block range
"""
block: BlockFilter
"""
Optionally specify the result sort order.
"""
sort: SortOrder = HEIGHT_DESC
): TransactionConnection!
}
"""
Optionally reverse the result sort order from `HEIGHT_DESC` (default) to `HEIGHT_ASC`.
"""
enum SortOrder {
"""
Results are sorted by the transaction block height in ascending order, with the oldest transactions appearing first, and the most recent and pending/unconfirmed appearing last.
"""
HEIGHT_ASC
"""
Results are sorted by the transaction block height in descending order, with the most recent and unconfirmed/pending transactions appearing first.
"""
HEIGHT_DESC
}
"""
Find transactions with the folowing tag name and value
"""
input TagFilter {
"""
The tag name
"""
name: String!
"""
An array of values to match against. If multiple values are passed then transactions with _any_ matching tag value from the set will be returned.
e.g.
\`{name: "app-name", values: ["app-1"]}\`
Returns all transactions where the \`app-name\` tag has a value of \`app-1\`.
\`{name: "app-name", values: ["app-1", "app-2", "app-3"]}\`
Returns all transactions where the \`app-name\` tag has a value of either \`app-1\` _or_ \`app-2\` _or_ \`app-3\`.
"""
values: [String!]!
"""
The operator to apply to to the tag filter. Defaults to EQ (equal).
"""
op: TagOperator = EQ
}
"""
Find transactions within the given block range
"""
input BlockFilter {
"""
Minimum block height to filter from
"""
min: Int
"""
Maximum block height to filter to
"""
max: Int
}
"""
Paginated result set using the GraphQL cursor spec,
see: https://relay.dev/graphql/connections.htm.
"""
type TransactionConnection {
pageInfo: PageInfo!
edges: [TransactionEdge!]!
}
"""
Paginated result set using the GraphQL cursor spec.
"""
type TransactionEdge {
"""
The cursor value for fetching the next page.
Pass this to the \`after\` parameter in \`transactions(after: $cursor)\`, the next page will start from the next item after this.
"""
cursor: String!
"""
A transaction object.
"""
node: Transaction!
}
"""
Paginated page info using the GraphQL cursor spec.
"""
type PageInfo {
hasNextPage: Boolean!
}
type Transaction {
id: ID!
anchor: String!
signature: String!
recipient: String!
owner: Owner!
fee: Amount!
quantity: Amount!
data: MetaData!
tags: [Tag!]!
"""
Transactions with a null block are recent and unconfirmed, if they aren't mined into a block within 60 minutes they will be removed from results.
"""
block: Block
"""
Transactions with parent are Bundled Data Items as defined in the ANS-102 data spec. https://github.com/ArweaveTeam/arweave-standards/blob/master/ans/ANS-102.md
"""
parent: Parent
}
"""
The parent transaction for bundled transactions,
see: https://github.com/ArweaveTeam/arweave-standards/blob/master/ans/ANS-102.md.
"""
type Parent {
id: ID!
}
"""
The block in which the transaction was included.
"""
type Block {
id: ID!
timestamp: Int!
height: Int!
previous: ID!
}
"""
Basic metadata about the transaction data payload.
"""
type MetaData {
"""
Size of the associated data in bytes.
"""
size: Int!
"""
Type is derrived from the \`content-type\` tag on a transaction.
"""
type: String
}
"""
Representation of a value transfer between wallets, in both winson and ar.
"""
type Amount {
"""
Amount as a winston string e.g. \`"1000000000000"\`.
"""
winston: String!
"""
Amount as an AR string e.g. \`"0.000000000001"\`.
"""
ar: String!
}
"""
Representation of a transaction owner.
"""
type Owner {
"""
The owner's wallet address.
"""
address: String!
"""
The owner's public key as a base64url encoded string.
"""
key: String!
}
type Tag {
"""
UTF-8 tag name
"""
name: String!
"""
UTF-8 tag value
"""
value: String!
}
"""
The operator to apply to a tag value.
"""
enum TagOperator {
"""
Equal
"""
EQ
"""
Not equal
"""
NEQ
}
# """
# Transaction statuses
# """
# enum Status {
# """
# Transaction is included in a block
# """
# CONFIRMED
# """
# Transaction is not yet included in a block
# """
# PENDING
# }