-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.graphql
More file actions
55 lines (49 loc) · 1.09 KB
/
schema.graphql
File metadata and controls
55 lines (49 loc) · 1.09 KB
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
type Account @entity {
id: ID!
protocols: [Protocol!]! @derivedFrom(field: "architect")
escrows: [Escrow!]! @derivedFrom(field: "oracles") ## which escrows this account is an oracle for
whitelist: [Escrow!]! @derivedFrom(field: "whitelist") ## which escrows this account is whitelisted for
}
type Protocol @entity {
id: ID!
name: String!
architect: Account!
escrow: Escrow
}
type Escrow @entity {
id: ID!
token: String!
tokenThreshold: BigInt!
timeLimit: BigInt!
whitelist: [Account!]!
oracles: [Account!]!
protocols: [Protocol!]! @derivedFrom(field: "escrow")
transactions: [EscrowTransaction!]! @derivedFrom(field: "escrow")
}
type EscrowTransaction @entity {
id: ID!
txid: String!
escrow: Escrow!
origin: Account!
protocol: Protocol!
dst: Account!
token: String!
amount: BigInt!
status: Status!
counter: BigInt!
}
enum Status {
PENDING
ACCEPTED
DENIED
}
type EpnsNotificationCounter @entity {
id: ID!
totalCount: BigInt!
}
type EpnsPushNotification @entity {
id: ID!
notificationNumber: BigInt!
recipient: String!
notification: String!
}