* Regenerate censures watcher * Update config data * Update ports in config --------- Co-authored-by: neeraj <neeraj.rtly@gmail.com>
107 lines
2.1 KiB
GraphQL
107 lines
2.1 KiB
GraphQL
directive @cacheControl(maxAge: Int, inheritMaxAge: Boolean, scope: CacheControlScope) on FIELD_DEFINITION | OBJECT | INTERFACE | UNION
|
|
|
|
enum CacheControlScope {
|
|
PUBLIC
|
|
PRIVATE
|
|
}
|
|
|
|
scalar BigInt
|
|
|
|
scalar BigDecimal
|
|
|
|
scalar Bytes
|
|
|
|
type Proof {
|
|
data: String!
|
|
}
|
|
|
|
type _Block_ {
|
|
cid: String
|
|
hash: String!
|
|
number: Int!
|
|
timestamp: Int!
|
|
parentHash: String!
|
|
}
|
|
|
|
type _Transaction_ {
|
|
hash: String!
|
|
index: Int!
|
|
from: String!
|
|
to: String!
|
|
}
|
|
|
|
type ResultEvent {
|
|
block: _Block_!
|
|
tx: _Transaction_!
|
|
contract: String!
|
|
eventIndex: Int!
|
|
event: Event!
|
|
proof: Proof
|
|
}
|
|
|
|
union Event = CensuredEvent | ForgivenEvent
|
|
|
|
type CensuredEvent {
|
|
by: Int!
|
|
who: BigInt!
|
|
}
|
|
|
|
type ForgivenEvent {
|
|
by: Int!
|
|
who: BigInt!
|
|
}
|
|
|
|
type ResultBigInt {
|
|
value: BigInt!
|
|
proof: Proof
|
|
}
|
|
|
|
type ResultBigIntArray {
|
|
value: [BigInt!]!
|
|
proof: Proof
|
|
}
|
|
|
|
type ResultIntArray {
|
|
value: [Int!]!
|
|
proof: Proof
|
|
}
|
|
|
|
type ResultState {
|
|
block: _Block_!
|
|
contractAddress: String!
|
|
cid: String!
|
|
kind: String!
|
|
data: String!
|
|
}
|
|
|
|
type SyncStatus {
|
|
latestIndexedBlockHash: String!
|
|
latestIndexedBlockNumber: Int!
|
|
latestCanonicalBlockHash: String!
|
|
latestCanonicalBlockNumber: Int!
|
|
initialIndexedBlockHash: String!
|
|
initialIndexedBlockNumber: Int!
|
|
latestProcessedBlockHash: String!
|
|
latestProcessedBlockNumber: Int!
|
|
}
|
|
|
|
type Query {
|
|
events(blockHash: String!, contractAddress: String!, name: String): [ResultEvent!]
|
|
eventsInRange(fromBlockNumber: Int!, toBlockNumber: Int!): [ResultEvent!]
|
|
getCensuringCount(blockHash: String!, contractAddress: String!, _whose: Int!): ResultBigInt!
|
|
getCensuring(blockHash: String!, contractAddress: String!, _whose: Int!): ResultBigIntArray!
|
|
getCensuredByCount(blockHash: String!, contractAddress: String!, _who: Int!): ResultBigInt!
|
|
getCensuredBy(blockHash: String!, contractAddress: String!, _who: Int!): ResultIntArray!
|
|
getStateByCID(cid: String!): ResultState
|
|
getState(blockHash: String!, contractAddress: String!, kind: String): ResultState
|
|
getSyncStatus: SyncStatus
|
|
}
|
|
|
|
type Mutation {
|
|
watchContract(address: String!, kind: String!, checkpoint: Boolean!, startingBlock: Int): Boolean!
|
|
}
|
|
|
|
type Subscription {
|
|
onEvent: ResultEvent!
|
|
}
|