Ponder indexer for STP, the protocol behind Hypersub.
Get all collections:
{
collections(limit: 1000, orderBy: "createdAt", orderDirection: "desc") {
items {
id
name
symbol
chainId
totalRewardPoints
totalCreatorEarnings
totalReferrerRewards
}
}
}
Get all subscriptions for a given address:
{
subscriptions(
where: {
account: "0xb6f6Dce6000cA88cC936B450cEDB16a5c15f157f"
expiresAt_gt: "1717995000" # timestamp as of this query
}
) {
items {
expiresAt
createdAt
collection {
id
name
symbol
chainId
totalRewardPoints
totalCreatorEarnings
totalReferrerRewards
}
}
}
}
Learn more about querying the GraphQL API in Ponder's docs.
Read more in Ponder's docs.
Install dependencies:
pnpm install
Navigate to the ponder app:
cd apps/indexer
Set your environment variables (RPC URLs):
cp .env.example .env.local
Run the indexer:
pnpm dev