Farcaster Integration API
Overview
Vartovii Farcaster integration exposes Mini App, Frame-compatible, and deep-link
endpoints under /api/farcaster, plus the Farcaster manifest at
/.well-known/farcaster.json.
For production rollout and user-facing QA flow, see:
/docs/features/farcaster-miniapp-launch-checklist.
The current scanner contract follows a hybrid mode:
- Deterministic guardrails for validation and baseline risk checks.
- AI layer for contextual explanation when available within latency budget.
Production Status Snapshot (2026-02-28)
- Manifest for
sentryanalytic.comvalidates in Farcaster Developers dashboard. - Mini App response includes
mode,confidence,reason_codes,analysis_version,cached. - Deep-link route
/app/forensics/:addressis active and linked from Mini App.
Manifest
GET /.well-known/farcaster.json
Returns Farcaster account association and Mini App frame metadata.
Key listing/discovery fields now supported:
primaryCategorytags[]screenshotUrls[]subtitletaglineogTitleogDescriptionogImageUrlcastShareUrlnoindex
Farcaster metadata constraints to respect:
subtitle: max 30 charstagline: max 30 chars
Frame / Mini App Endpoints
GET /api/farcaster/frame
Returns the start HTML for the scanner experience.
Includes:
fc:miniappmetadata- backward-compatible
fc:framemetadata - in-page scanner UI (
address -> score -> risks -> share -> full report)
POST /api/farcaster/frame/check
Runs contract analysis from Farcaster UI actions.
Accepted input patterns:
- Frame-style payload:
untrustedData.inputText - Direct Mini App payload:
address
Validation:
- Strict EVM address format (
0x+ 40 hex chars) - Invalid payloads return deterministic
400JSON
Response fields (JSON mode)
{
"address": "0x...",
"trust_score": 0,
"risk_level": "LOW|MEDIUM|HIGH|CRITICAL|UNKNOWN",
"summary": "string",
"key_risks": ["string"],
"positive_factors": ["string"],
"contract_type": "string",
"name": "string",
"symbol": "string",
"code_size": 0,
"tx_count": 0,
"owner": "0x... | null",
"owner_renounced": "true | false | null",
"total_supply": "number | string | null",
"analysis_version": "string",
"confidence": "low|medium|high",
"reason_codes": ["string"],
"mode": "deterministic|hybrid_ai",
"cached": false,
"source": "string",
"latency_ms": {
"total": 0,
"chain": 0,
"ai": 0
}
}
If the client requests HTML, the endpoint renders frame_result.html.
Deep-Link / Core Platform Endpoint
GET /api/farcaster/contract/{address}
Read-only full-view endpoint for dashboard deep-link routing
(/app/forensics/:address).
Behavior:
- Validates address format
- Returns normalized analysis payload
- Adds navigation links:
links.dashboardUrllinks.baseScanUrl
Use query param source to preserve funnel attribution (source=farcaster).
Growth Analytics Endpoint
POST /api/farcaster/events
Event ingestion endpoint for Mini App growth funnel instrumentation.
Allowed events:
miniapp_openscan_submitscan_successscan_share_clickdeep_link_open
Request shape:
{
"event": "scan_submit",
"source": "farcaster_miniapp",
"session_id": "optional",
"payload": {}
}
Unknown events return 400.
Environment Variables
Important env-backed manifest and behavior controls:
FARCASTER_DOMAINFARCASTER_HOME_URLFARCASTER_WEBHOOK_URLFARCASTER_CAST_SHARE_URLFARCASTER_URL_VERSION(optional cache-busting query suffix for Mini App URLs)FARCASTER_PRIMARY_CATEGORYFARCASTER_TAGS(comma-separated)FARCASTER_SCREENSHOT_URLS(comma-separated)FARCASTER_OG_TITLEFARCASTER_OG_DESCRIPTIONFARCASTER_OG_IMAGE_URLFARCASTER_NOINDEXFARCASTER_ANALYSIS_VERSIONFORENSIC_CACHE_TTL_SECONDSFORENSIC_AI_TIMEOUT_SECONDSFORENSIC_CHAIN_TIMEOUT_SECONDSBASE_RPC_TIMEOUT_SECONDS
Caching & Client Refresh
Runtime adds no-cache headers on Farcaster endpoints to reduce stale UI risk.
If Farcaster client still serves older metadata/UI, bump FARCASTER_URL_VERSION
and re-refresh the manifest in Farcaster Developers dashboard.