Proof of Humanity subgraph reference
Subgraph indexes the verified users from the SBTIdentityVerifier
contract and serves the data via a GraphQL API.
Deployments
GraphQL endpoints:
-
Mainnet(indexes events from Polygon):
https://api.thegraph.com/subgraphs/name/volodymyrzolotukhin/sbtidentityverifier-polygon/graphql
-
Testnet(indexes events from Goerli testnet):
https://api.thegraph.com/subgraphs/name/volodymyrzolotukhin/sbtidentityverifier/graphql
Querying
The subgraph contains the following entity:
type User @entity {
id: ID!
senderAddr: Bytes!
tokenAddr: Bytes!
tokenID: BigInt!
transactionHash: Bytes!
}
Use the following query (you should provide the sender address):
query info($address: String!) {
users(where: { senderAddr: $address }) {
id
}
}
A non-empty response like this indicates that the user is verified:
{
"users": [
{
"id": ":"19643409028078272448762374992644569744201332795590556384983511405206634497"
}
]
}
Data source
The subgraph ingests the following events:
event SBTIdentityProved(
uint256 indexed identityId,
address senderAddr,
address tokenAddr,
uint256 tokenID
)
identityID
- identity identifiersenderAddr
- sender (of the transaction) addresstokenAddr
- address of the Souldbound tokentokenID
- ID of the token that was issued to the user after he passed identity verification
The subgraph stores the same information plus the transaction hash.