-
Notifications
You must be signed in to change notification settings - Fork 2
/
schema.graphql
126 lines (117 loc) · 2.4 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
type GlobalStats {
id: ID!
signups: BigInt!
transfers: BigInt!
trusts: BigInt!
}
# new schema
enum TransferType {
Erc20WrapperTransfer
TransferSingle
TransferBatch
StreamCompleted
HubTransfer
Transfer
}
type Transfer {
# id is: transactionHash-logIndex
id: ID!
safeTxHash: String
blockNumber: Int!
timestamp: Int!
transactionIndex: Int!
transactionHash: String! @index
logIndex: Int!
# batchIndex: Int!
# v1 or v2
version: Int!
# only for v2
operator: String
from: String!
to: String!
value: BigInt!
# transaction type; either: Erc20WrapperTransfer | TransferSingle | TransferBatch | StreamCompleted | HubTransfer | Transfer
transferType: TransferType!
# is either the v2 token-id or the v1 token address; both in address format
token: String!
}
type TrustRelation {
# is is truster-trustee-version
id: ID!
blockNumber: Int!
timestamp: Int!
transactionIndex: Int!
logIndex: Int!
version: Int!
trustee: String!
truster: String!
# v2 only or always UInt256.MAX in case of v1
expiryTime: BigInt!
# v1 only or always '100' in case of v2
limit: BigInt!
isMutual: Boolean!
}
enum AvatarType {
Signup
OrganizationSignup
RegisterHuman
InviteHuman
RegisterGroup
RegisterOrganization
}
type AvatarBalance {
# id is avatar-token
id: ID!
# token address in v1 and token id in v2
token: Token!
avatar: Avatar!
balance: BigInt!
version: Int!
isWrapped: Boolean!
inflationaryValue: BigInt
lastCalculated: Int
}
type Avatar {
# the avatar address
id: ID!
blockNumber: Int!
timestamp: Int!
transactionIndex: Int!
logIndex: Int!
transactionHash: String!
version: Int!
avatarType: AvatarType!
invitedBy: String
# v1 token address or equal to avatar address if v2
tokenId: String
# v2 wrapped token id
wrappedTokenId: String
# groups only
name: String
# IPFS CID of the avatar's profile
cidV0Digest: String
# balances of all tokens
balances: [AvatarBalance!]! @derivedFrom(field: "avatar")
# balance of all tokens aggregated
balance: BigInt!
lastMint: BigInt!
}
enum TokenType {
RegisterGroup
RegisterHuman
Signup
WrappedDemurrageToken
WrappedStaticToken
}
type Token {
# token address in v1 and token id in v2
id: ID!
blockNumber: Int!
timestamp: Int!
transactionIndex: Int!
logIndex: Int!
transactionHash: String!
version: Int!
tokenType: TokenType!
tokenOwner: String!
}