Exploring new composability primitives and interaction modes with Farcaster and Privy
Ankush Swarnakar
|Feb 2, 2024
The title of this blog post is meant to be read to the tune of Princeâs âPurple Rain.â
A key principle of Privyâs philosophy is that a user is more than just a wallet address, and should be treated as such. Gaining a comprehensive understanding of who users are, across all parts of the Internet, is a major unlock for building innovative and delightful experiences in web3.
Farcaster Frames stands out as an innovative take on these topics. Frames enable you to embed interactive experiences directly within your casts, which then allow other users to take signed, verified actions elsewhere â without ever leaving their Farcaster client. This dramatically reduces friction for user engagement, and can even serve as a bridge between a userâs Farcaster presence and their digital identity outside of the protocol. New UX, better composability.
Weâve seen dozens of incredible frames over the past week â from an e-commerce checkout flow for Girl Scout cookies to an embedded game of chess â and we think theyâre uniquely suited to enable cross-app experiences when combined with two other composable primitives:
Sign-in With Farcaster: Users donât have to connect their wallet to verify their Farcaster identity. They can just login using their preferred Farcaster client and you can instantly contextualize their identity in your app with their engagement on Farcaster.
Embedded Wallets: Users donât have to connect a wallet, period. After signing-in with Farcaster, they can instantly access any rewards you gift them for their engagement, helping them get value out of your product instantly. This is doubly important with Farcaster signers being off-chain (and rightfully so đ)
We built a small demo with Frames to play around with exciting these new primitives: by interacting with our Frame on Farcaster, users can automatically generate an embedded wallet associated with their Farcaster account, and can claim their wallet (and an NFT) by logging in with Farcaster to demo.privy.io.
Click on this frame and see if you can spot your NFT when you sign-in to demo.privy.io!
You can skip this section if youâre already familiar!
For those who donât know, Farcaster is a sufficiently decentralized social network that allows users to build a digital social identity on-chain that can be leveraged interoperably by any client (website, mobile app, PWA â you name it). The most popular Farcaster client today is Warpcast, but you can also use other clients like Supercast, Crew, and Yup.
Frames are a standard to allow Farcaster clients to embed interactive experiences in interoperable ways. Frames extend the existing OpenGraph standard (used to show link previews on Facebook, Twitter, and more) with a set of new tags that encode the embedded experience that Farcaster clients should show their users.
When users take an action within a Frame, like clicking a button, the Farcaster client sends a signed message to the developer that encodes the action the user took. Developers can verify this action against one of Farcasterâs hubs, and then can handle it as they please, such as by updating the Frameâs UIs or adding in other logic outside of Farcaster.
One of the reasons weâre most excited about Frames is that it easily enables developers to leverage a userâs verified interactions on Farcaster elsewhere. To demonstrate this point, letâs explore how the example works.
When you click the âMintâ button in this Frame, Privy determines your Farcaster fid from the Frameâs signed message, and pre-generates an embedded wallet that can be accessed by this fid. We then airdrop a (testnet) NFT to it.
Once youâve interacted with the Frame, you can head over to the Privy Demo and login with your Farcaster account. Even if this is your first time using Privy, once you sign in with that Farcaster fid, youâll see your NFT already there in your wallet.
This is a small example of whatâs emerging as a bigger narrative in web3 â new UX, better composability. Weâre excited to see apps to leverage the UX of Frames to create rich connections between a userâs off-chain and on-chain identity â a userâs Farcaster account; their Ethereum wallet; their Discord handle; whatever their digital presence may be.
Frames are an exciting design space for composing interoperable primitives to create novel UX. We canât wait to see what the community builds with it.
If youâre thinking about Frames, wallet interactions, or cross-app experiences, reach out â weâre just a direct cast away đ