Build your Farcaster Frames with Airstack frog middleware. Seamlessly integrate Farcaster data into your Frames easily.
The Airstack Frog Middleware is available as a community-built middleware and can be easily incorporated into any Frog app by installing the Airstack Frames SDK. (The Airstack Frog Middleware can also be accessed via the Airstack Frog Recipes)
Farcaster Data Middleware
You can use the farcasterData middleware to seamlessly incorporate the interactor's Farcaster data directly into your Farcaster Frames. Simply specify the Farcaster data to retrieve in the features field and integrate the middleware into the desired route for data access:
import { farcasterDataFrogMiddleware } from"@airstack/frames";constfarcasterDataMiddleware=farcasterDataFrogMiddleware({ features: { userDetails: {}, }, env:"dev",});app.frame("/",// Add Farcaster Data Middleware to the routes that need to access// User's Farcaster data farcasterDataMiddleware,asyncfunction (c) {const { status } = c;if (status ==="response") console.log(c.var);c.res({}); });
Enhance your Farcaster Frames with user's onchain data using the allowList middleware from Airstack Frog Recipes. Effortlessly set up by specifying your criteria in the allowListCriteria field and incorporating the middleware into the route where you wish to access the data: