-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
302 lines (277 loc) · 8.25 KB
/
schema.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
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
type Tld @entity {
"Unique identifier for the TLD"
id: ID!
"The account that claimed the TLD"
claimant: Account
"The account that owns the TLD"
owner: Account!
"The unique token ID associated with the TLD"
tokenId: BigInt!
"The label of the TLD"
label: String!
"The block number of the registration event"
registrationBlockNumber: BigInt!
"Block timestamp when the TLD was registered"
registrationBlockTimestamp: BigInt
"Transaction hash of the registration"
registrationTransactionHash: Bytes
"The block number of the last update event"
lastUpdateBlockNumber: BigInt!
"Block timestamp when the tld was last updated"
lastUpdateTimestamp: BigInt
"Transaction hash of the last update"
lastUpdateTransactionHash: Bytes
"The sales settings for this TLD"
saleSettings: SaleSettings @derivedFrom(field: "tld")
"The array of SLDs associated with this TLD"
slds: [Sld!] @derivedFrom(field: "parentTld")
"The royalty settings for this TLD"
royalty: Royalty
"The history of royalty changes for this TLD"
royaltyHistory: [RoyaltyHistory!] @derivedFrom(field: "tld")
"The resolver settings for this TLD"
resolver: Resolver
"Count of transfers"
transferCount: BigInt!
"array of transfers of the TLD"
transfers: [TldTransfer!]! @derivedFrom(field: "tld")
"Current version of resolver"
resolverVersion: BigInt!
"The delegate account for resolver changes"
delegate: Account
}
type Royalty @entity {
"Unique identifier for the Royalty"
id: ID!
"The percentage of royalties to be paid out"
percentage: BigInt
"The address to which royalties will be paid"
payoutAddress: Account
}
type RoyaltyHistory @entity {
"Unique identifier for the RoyaltyHistory"
id: ID!
"The TLD to which this history item belongs"
tld: Tld!
"The percentage of the royalty"
percentage: BigInt
"The payout address for the royalty"
payoutAddress: Account
"The block number of the event"
blockNumber: BigInt!
"Block timestamp when the settings were last updated"
blockTimestamp: BigInt
"Transaction hash of the last update"
transactionHash: Bytes
}
type ResolverHistory @entity {
"Unique identifier for the ResolverHistory"
id: ID!
"Link to main Resolver entity"
resolver: Resolver!
"Type of change: added, modified, deleted"
changeType: String!
"Timestamp of the change"
changedAt: BigInt!
}
type Sld @entity {
"Unique identifier for the SLD"
id: ID!
"The label of the SLD"
label: String!
"The full name of the SLD"
fullName: String!
"The account that owns the SLD"
owner: Account!
"The account that registered the SLD"
registrant: Account!
"The parent TLD of this SLD"
parentTld: Tld!
"The block number of the registration event"
registrationBlockNumber: BigInt!
"Block timestamp when the sld was registered"
registrationTimestamp: BigInt
"Transaction hash of the registration"
registrationTransactionHash: Bytes
"The block number of the last update event"
lastUpdateBlockNumber: BigInt!
"Block timestamp when the sld was last updated"
lastUpdateTimestamp: BigInt
"Transaction hash of the last update"
lastUpdateTransactionHash: Bytes
"The expiry date of the SLD as a number"
expirationTimestamp: BigInt!
"The resolver settings for this TLD"
resolver: Resolver
"Count of renewals of the SLD"
renewalCount: BigInt!
"array of renewals of the SLD"
renewals: [Renewal!]! @derivedFrom(field: "sld")
"Count of transfers"
transferCount: BigInt!
"array of transfers of the SLD"
transfers: [SldTransfer!]! @derivedFrom(field: "sld")
"Current version of resolver"
resolverVersion: BigInt!
"The delegate account for resolver changes"
delegate: Account
}
type Renewal @entity {
id: ID!
expirationTimestamp: BigInt!
sld: Sld!
owner: Account!
"The person who performed the renewal"
renewer: Account!
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}
type SldTransfer @entity {
id: ID!
sld: Sld!
oldOwner: Account!
newOwner: Account!
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}
type TldTransfer @entity {
id: ID!
tld: Tld!
oldOwner: Account!
newOwner: Account!
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}
type SaleSettings @entity {
"Unique identifier for the SaleSettings, same as the TLD's id for a one-to-one relation"
id: ID!
"The TLD associated with these sale settings"
tld: Tld!
"Indicates if the sale is enabled"
enabled: Boolean
"Array of prices, each corresponding to the length of the label for the TLD"
prices: [BigInt!]
"Array of discounts for multiple years"
discounts: [BigInt!]
"Premium prices for specific labels"
premiumPrices: [PremiumPrice!] @derivedFrom(field: "saleSettings")
"List of reserved names"
reservedNames: [ReservedName!] @derivedFrom(field: "saleSettings")
"Block number when the settings were last updated"
blockNumber: BigInt
"Block timestamp when the settings were last updated"
blockTimestamp: BigInt
"Transaction hash of the last update"
transactionHash: Bytes
}
type Account @entity {
"The unique identifier for the account"
id: ID!
"The TLDs owned by the account"
tlds: [Tld!]! @derivedFrom(field: "owner")
"The SLDs owned by the account"
slds: [Sld!]! @derivedFrom(field: "owner")
}
type Resolver @entity {
"Unique identifier for the Resolver"
id: ID!
"Array of Addresses associated with this Resolver"
addresses: [Address!] @derivedFrom(field: "resolver")
"Array of Text Records associated with this Resolver"
textRecords: [TextRecord!] @derivedFrom(field: "resolver")
"Array of Text Record History items associated with this Resolver"
textRecordHistory: [TextRecordHistory!] @derivedFrom(field: "resolver")
"Content hash associated with this Resolver"
contenthash: Bytes
"Array of DNS Records associated with this Resolver"
dnsRecords: [DnsRecord!] @derivedFrom(field: "resolver")
"Array of DNS Record History items associated with this Resolver"
dnsRecordHistory: [DnsRecordHistory!] @derivedFrom(field: "resolver")
"Array of Resolver History items associated with this Resolver"
resolverHistory: [ResolverHistory!]! @derivedFrom(field: "resolver")
"DNS Zone hash associated with this Resolver"
dnsZonehash: Bytes
"Current version number of the Resolver"
version: BigInt!
}
type Delegate @entity {
"Unique identifier for the Delegate, a combination of node and owner"
id: ID!
"The delegate address"
delegate: Bytes
}
type Address @entity {
"Unique identifier for the Address"
id: ID!
"Address in string format"
address: String!
"Coin type as a number"
cointype: BigInt!
"Parent Resolver of this Address"
resolver: Resolver!
}
type TextRecord @entity {
"Unique identifier for the Text Record"
id: ID!
"The key for the Text Record"
key: String!
"The value for the Text Record"
value: String!
"Parent Resolver of this Text Record"
resolver: Resolver!
}
type DnsRecord @entity {
"Unique identifier for the DNS Record"
id: ID!
"Node identifier in bytes32 format"
node: Bytes!
"Name in bytes format"
name: Bytes!
"Resource type as a uint16"
resource: BigInt!
"Record in bytes format"
record: Bytes!
"Parent Resolver of this DNS Record"
resolver: Resolver!
}
type PremiumPrice @entity {
"Unique identifier for PremiumPrice, could be a combination of SaleSettings ID and label for uniqueness"
id: ID!
"The sale settings associated with this premium price"
saleSettings: SaleSettings!
"The label for which the premium price is set"
label: String!
"The premium price in BigInt"
price: BigInt
}
type ReservedName @entity {
"Unique identifier for ReservedName, could be a combination of SaleSettings ID and label for uniqueness"
id: ID!
"The sale settings associated with this reserved name"
saleSettings: SaleSettings!
"The label that is reserved"
label: String!
"The claimant of the reserved name"
claimant: Bytes
}
type TextRecordHistory @entity {
id: ID!
resolver: Resolver!
key: String!
value: String!
changedAt: BigInt!
changeType: String! # Could be 'Created', 'Updated', 'Deleted'
}
type DnsRecordHistory @entity {
id: ID!
resolver: Resolver!
node: Bytes!
name: Bytes!
resource: BigInt!
record: Bytes!
changedAt: BigInt!
changeType: String! # Could be 'Created', 'Updated', 'Deleted'
}