Indexer

Indexer Hooks

The hooks provide tools for interacting with the B3TR indexer service, offering sustainability and voting data:

Sustainability Hooks

  • useSustainabilityActions: Fetches sustainability actions with pagination for a user or app, returning detailed impact data including:

    • Environmental metrics (carbon, water, energy)

    • Waste metrics (mass, items, reduction)

    • Social impact (biodiversity, people)

    • Resource conservation (timber, plastic)

    • Educational impact (learning time)

    • Activity metrics (trees planted, calories burned)

    • Energy metrics (clean energy production)

    • Health metrics (sleep quality)

Voting & Allocation Hooks

  • useRoundAppVotes: Retrieves voting results for a specific round, including:

    • Number of voters

    • Total votes cast

    • App-specific voting data

    • Round statistics

Usage Example

Was this helpful?