🖥️Firn's MetaMask Snap

Firn's Snap makes integration easy.

One of Firn's key features is that its privacy is pluggable: you can call arbitrary smart contracts privately.

One difficult aspect, though, comes from the problem of assembling calldata. In normal (non-private) blockchain interactions, sophisticated front-ends like Uniswap's (or Firn's!) do the job of assembling transaction arguments for you, and also guide you through the process of submitting these to the blockchain.

In the setting where we want to do a complex contract interaction and get privacy at the same time, we'd like to still be able to leverage front-ends in order to populate our transactions, as we usually do. On the other hand, using Firn directly for this task—see the God Mode page—has the clear drawback that you have to enter your transaction arguments (or raw calldata) manually, and can't use the target site's web-based interface.

Firn's MetaMask Snap offers a way of reconciling these two needs. Using our Snap, arbitrary third-party websites can integrate Firn's privacy functionality directly into their front-ends. Specifically, these applications can populate transaction arguments through a graphical interface, as they usually do, but then directly pipe these into Firn on the user's behalf. This can be viewed as a much-more-direct alternative to using God Mode.

Our Snap is fully working, and is ready for integration today. You can access it through npm. For a live, hosted example app which uses our Snap, check out tome.fm. Tome is, in fact, open-source; by inspecting it, anyone interested in integrating Firn's pluggable privacy into his own project will find an invaluable template.

Last updated