Skip to content

PaymagicXYZ/frame-wallet-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Frame Wallet Examples

Farcaster Frames recently launched resulting in many crypto developers starting to build new interactive apps from within Warpcast. Many of these app developers would like to send crypto transactions but that's not currently possible with Frame buttons. In parallel, Patch Wallet deployed EIP-4337 account abstraction wallets on top of all Farcaster users last year as part of the purp.game project.

Those wallets have now be retrofitted to work with Frames. We call them Frame Wallets. 🤗

⚠️ This is an experiment. Users are trusting the developer of a Frame with the assets in their Frame Wallet. Do not interact with Frame developers you do not trust or your tokens/NFTs may be stolen. Safety and fraud detection features have not been implemented yet.

How to Integrate

As specified in the Farcaster Frames docs, when a user taps a Frame button, the Frame server receives the FID of the user and a Signed Message to verify the user. Use both these fields, along with the data for the Ethereum transaction, to call the Patch API. The Patch API re-validates the user and sends the transaction onchain through the user's Frame Wallet if valid.

See the example script on how to integrate.

DM corbin.eth for a client_id and secret. These are used to make sure nefarious Frames don't drain users' wallets. They'll be removed once mature.

Best Practices

  • Let users know you're about to initiate a transaction on their behalf but adding a lightening emoji "⚡️ Buy" to the button text.
  • Frame Wallets have built in batched transactions, so you can pass many Ethereum transactions into one API call. For instance, the user can mint an NFT and send it to one of their verified wallets for safe keeping.
  • Frame Wallets have gas sponsorship in some cases. At launch, most transaction fees on Base will be sponsored so consider deploying there.
  • Be wary of speed clickers. Design your Frame server to only do an action once per user, even if they click many times.

Resources

Example Frame

Coming Soon

Fund your Frame Wallet

Coming Soon

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published