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.

819 B
Raw Blame
// GET /api/cron/revenue-ledger-reconcile: bring the revenue ledger up to date
// from every income source, prove it still matches those sources, verify a
// sample of mainnet transactions on-chain, announce milestones and alert owners
// to drift. Idempotent: the ledger upsert is keyed by (source, source_ref).
// Library: api/_lib/revenue-reconcile.js. Guide: docs/revenue-ledger.md.

import { json, method, wrapCron } from '../_lib/http.js';
import { requireCron } from '../_lib/cron-auth.js';
import { runReconcile } from '../_lib/revenue-reconcile.js';

export default wrapCron(async (req, res) => {
	if (!method(req, res, ['GET', 'POST'])) return;
	if (!requireCron(req, res)) return;

	const summary = await runReconcile();
	return json(res, 200, { ok: true, ...summary }, { 'cache-control': 'no-store' });
});