-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
56 lines (50 loc) · 1.16 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
type EscrowAccount @entity{
# Thaw transaction hash is used as ID
id: Bytes!
payer: Payer!
collector: Collector!
receiver: Receiver!
balance: BigInt!
totalAmountThawing: BigInt!
thawEndTimestamp: BigInt!
}
type Collector @entity{
id: Bytes!
type: String
escrowAccounts: [EscrowAccount!]! @derivedFrom(field: "collector")
}
# Will contain only the latest rav
type LatestRav @entity{
id: Bytes!
payer: Payer!
dataService: DataService!
serviceProvider: Receiver!
valueAggregate: BigInt!
timestamp: BigInt!
metadata: Bytes!
signature:Bytes!
}
type DataService @entity{
id: Bytes!
latestRav: [LatestRav!]! @derivedFrom(field: "dataService")
}
# Represents the gateway
type Payer @entity {
# payer address
id: Bytes!
# Payer Escrow
escrowAccounts: [EscrowAccount!]! @derivedFrom(field: "payer")
signers: [Signer!]! @derivedFrom(field: "payer")
}
# Represents the indexer
type Receiver @entity {
# receiver address
id: Bytes!
escrowAccounts: [EscrowAccount!]! @derivedFrom(field: "receiver")
}
type Signer @entity{
id: Bytes!
isAuthorized: Boolean!
payer: Payer!
thawEndTimestamp: BigInt!
}