Skip to main content

Documentation Index

Fetch the complete documentation index at: https://core.anylayer.org/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Use batch APIs to query multiple users or perform bulk operations efficiently.

Implementation

// Batch get scores
async function getLeaderboard(addresses) {
  const scores = await Promise.all(
    addresses.map(addr => zkScore.getScore(addr))
  );
  
  return addresses.map((addr, i) => ({
    address: addr,
    score: scores[i].total
  })).sort((a, b) => b.score - a.score);
}