Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

1.1 KB
Raw Blame
// `vanity_leaderboard` — top grinders by USDC earned. Read-only.
//
// Wraps GET /api/vanity/bounties?view=leaderboard. The ranking shifts as workers
// win bounties — NOT idempotent.

import { z } from 'zod';

import { apiRequest } from '../lib/api.js';

export const def = {
	name: 'vanity_leaderboard',
	title: 'Top grinders by USDC earned',
	annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: false, openWorldHint: true },
	description:
		'Rank the worker fleet: the top grinders by total USDC earned from winning vanity-address bounties. Each entry shows a worker id and its cumulative payout. Use this to see who is winning bounties; for market totals call vanity_stats. Read-only.',
	inputSchema: {
		limit: z.number().int().min(1).max(100).default(10).describe('How many top grinders to return (1–100, default 10).'),
	},
	async handler(args) {
		const data = await apiRequest('/api/vanity/bounties', {
			query: { view: 'leaderboard', limit: args?.limit ?? 10 },
		});
		return {
			ok: true,
			grinders: data?.grinders ?? [],
			count: data?.count ?? (Array.isArray(data?.grinders) ? data.grinders.length : 0),
		};
	},
};