πŸ›°
Subgraph
All on-chain data and events from HyperVIBES are indexed via TheGraph.
You can build HyperVIBES-based applications without ever having to deploy a smart contract by creating a realm and building a web3 dapp frontend.
A unique subgraph is deployed for each blockchain network HyperVIBES is on.

Examples Queries

Like all GraphQL APIs, you can use introspection to explore the schema, types, and queries available in the subgraph. Below are a few possible ways of using the subgraph:

List all realms

1
{
2
realms(orderBy: createdAtTimestamp, orderDirection: desc) {
3
id
4
name
5
description
6
token { address symbol name decimals }
7
createdAtTimestamp
8
}
9
}
Copied!

Get infusion info for an NFT across all realms

1
{
2
nfts(where: {
3
collection: "0xc0877d217b1b83a3347c1703032ae1e013a8fd9f"
4
tokenId: "11"
5
}) {
6
tokenId
7
collection { address }
8
owner { address }
9
​
10
# there will be 1 Infusion entity for-each Realm this NFT is infused in
11
infusions {
12
realm { id name token { symbol } }
13
balance
14
lastClaimAtTimestamp
15
​
16
# all discrete infusion and claim events will be here
17
events {
18
eventType
19
amount
20
msgSender { address }
21
target { address }
22
createdAtTimestamp
23
}
24
}
25
}
26
}
Copied!

Get details and infused NFTs for a specific realm

1
{
2
realm(id: "3") {
3
id
4
name
5
description
6
token { address symbol decimals }
7
createdAtBlock
8
createdAtTimestamp
9
dailyRate
10
​
11
# constraints
12
​
13
minInfusionAmount
14
maxTokenBalance
15
allowMultiInfuse
16
allowPublicInfusion
17
allowAllCollections
18
requireNftIsOwned
19
​
20
# configuration
21
​
22
realmAdmins { account { address } }
23
realmInfusers { account { address } }
24
realmClaimers { account { address } }
25
realmCollections { collection { address } }
26
​
27
# get all infused nfts, balances, info, and events (claims and infusions)
28
​
29
infusions {
30
balance
31
lastClaimAtTimestamp
32
nft { tokenId tokenUri collection { address } owner { address } }
33
events {
34
createdAtTimestamp
35
target { address }
36
amount
37
eventType
38
}
39
}
40
}
41
}
Copied!

Get details about a specific account (wallet / agent)

1
{
2
account(id:"0xa34c3476ae0c4863fc39e32c0e666219503bed9f") {
3
address
4
​
5
# realms this account is admin for
6
realmAdmins { realm { id name } }
7
​
8
# realms this account is an infuser for
9
realmInfusers { realm { id name } }
10
11
# realms this account is a claimer for
12
realmClaimers { realm { id name } }
13
​
14
# realms this account has created
15
createdRealms {id name}
16
​
17
# any accounts this account can infuse/claim on behalf of
18
proxiesAsProxy { realm { id name } delegator { address } }
19
​
20
# any accounts that can infuse/claim on behalf of this account
21
proxiesAsDelegator { realm { id name } proxy { address } }
22
​
23
# all nfts owned by this account that have been infused across all realms
24
ownedNFTs {
25
tokenId
26
collection { address }
27
infusions { realm { id name } balance }
28
}
29
​
30
# find all discrete infusions this account has executed
31
infusionEventsAsTarget(where:{ eventType: INFUSE }) {
32
amount
33
infusion {
34
realm { id name }
35
nft { tokenId collection {address} owner { address } }
36
}
37
}
38
}
39
}
Copied!
Export as PDF
Copy link
Edit on GitHub