Guide: Ship as a Farcaster Mini App
Distribute your ChainRender app as a Farcaster Mini App using @chainrender/client/miniapp. Your app stays fully
on-chain; the adapter just builds the Farcaster manifest and embed metadata around it.
Build the manifest
import { buildManifest, capabilitiesForEnvelope } from "@chainrender/client/miniapp";
const manifest = buildManifest({
name: "My App",
homeUrl: "https://myapp.example",
accountAssociation, // your Farcaster account association
});
capabilitiesForEnvelope maps your app's capability envelope to the wallet requirement the host should expect —
write/value/sign map to a wallet requirement; read/gpu need none. This keeps the Mini App's declared needs honest
and minimal.
Build the embed + meta tags
import { buildEmbed, buildEmbedMetaTags } from "@chainrender/client/miniapp";
const embed = buildEmbed({ /* your app URL + launch action */ });
const metaTags = buildEmbedMetaTags(embed); // emits both fc:miniapp and the fc:frame alias
// inject metaTags into your page <head>
Fail-closed outside a host
The miniapp runtime hooks (identity, wallet, notifications) degrade safely when the app runs outside a
Farcaster host: inMiniAppHost is false, signalReady is a safe no-op, and identity/wallet/notifications return
null/false. So the same app works as a normal web page and as a Mini App — no branching, no breakage.
The app itself is unchanged
Nothing about your ChainRender app changes to become a Mini App — it's the same on-chain component, rendered the same way. The adapter only adds the Farcaster distribution wrapper. Your app stays Grade A and fully on-chain.