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.

896 B
Raw Blame
// GET /api/rider/info
//
// Public terms of the rider pass: where to send $THREE, which mint, and how much.
// `accepting_payments` is false when RIDER_VAULT_ADDRESS is unset, so a client
// never renders a "send 8,000 $THREE" call to action with no destination.

import { cors, json, method, wrap } from '../_lib/http.js';
import { env } from '../_lib/env.js';
import { REQUIRED_AMOUNT } from '../_lib/rider.js';
import { TOKEN_MINT as THREE_MINT, TOKEN_SYMBOL } from '../_lib/token/config.js';

export default wrap(async (req, res) => {
	if (cors(req, res, { methods: 'GET,OPTIONS' })) return;
	if (!method(req, res, ['GET'])) return;

	const vaultAddress = env.RIDER_VAULT_ADDRESS ?? null;
	return json(res, 200, {
		vault_address: vaultAddress,
		token_mint: THREE_MINT,
		token_symbol: TOKEN_SYMBOL,
		required_amount: REQUIRED_AMOUNT,
		accepting_payments: Boolean(vaultAddress),
	});
});