Building web3 with MetaMask Snaps - @MirkoGarozzoat @ETHDubaiConf

ETHDubai 2022 · 31 Mar 2022 · 6:59

Mirko Garozzo introduces MetaMask Snaps and their potential to extend Web3 development.

Speakers

Topics

From ETHDubai 2022, hosted by DeFi Dubai.

Transcript

i'm mirko grotzo i'm a web 3 engineer at metamask been working with 3 for a number of years thank you what i really like about web3 and what really kind of makes mistakes around this field it's that i love how decentralization allows developer creativity to build amazing things that's why today i'm super excited to talk to you about metamask and especially a project called snaps so snaps is what we are meta must consider the most important feature in our roadmap simply put the snap is a program that runs on top of metamaskin as an oxide environment and it extends the metamask functionality without asking metamask or anyone else except for the user itself

for permission to use the snap any developer can build a snap that's why we refer to it as decentralized decentralized web because it really allows the developer to make amazing things and to take weaponry development to the next level so what can you actually build on snap so some example use cases let's say you want to connect to solana or terra luna or any non-evm compatible chain [Music] at the moment with metamask out of the box this this is not possible but with snap you will be able to do it or if you want to connect to something like file coin if you want to integrate the charts and metric and meta mask and really anything that your

that you can think about it you will probably be able to do it so why snap so important for web3 what snap really does is empowers developers to implement things that are not currently present in metamask are not available in metamask at the moment but what i think is the most important thing is that it by building a snap you can find a way to increase visibility to your product you can contribute to the web3 community and you might think about a crazy way to to monetize the snap and make tons of money and also you will have access to to a community of 35 plus millions user that use metamask monthly and i cannot

think of any other web3 platform that is going to give you so much visibility in it and that it lets you reach such a broader audience so yeah habit for the actual cool slash boring part so what is exactly snap in a nutshell snap is just an npm package contains some source code which can be javascript typescript with web assembly and a set of metadata everything is then packed into a single javascript file and you don't even have to bundle it but we can provide the tools for you to do that so just you guys think about this anyone that knows the javascript html css and as a just some basic knowledge of

blockchain and how metamask works can build this on snap and and can publish it and this is actually what i said before so as you can see this is uh this is an app as app this is the file coin built by the by the demo protocol labs so as you can see it's just an npm package and i i will actually show you a few screenshots about the snap before i do that there is a bit of disclaimer at the moment the snaps is not available in metamask production and extension that you might be familiar with but you can go to to google chrome store and

search for flask which is just a canary distribution for metamask so basically anything that we are not ready to ship to production and we just hide it behind a build flag and that's what flask is so if you go to the to the chrome store you can actually look for flask and you will see that there's a purple fox instead of an orange one so yeah this is the the firecoin snap what else i was talking about before so when you actually click on connect to metamask you will see [Music] sorry i miss uh so you will see that it's asking me to connect to my account

okay i give permission to do that and this is where the actual cool stuff starts to happen so as you can see this stamp is asking me okay do you want to access the internet display confirmation method manage your filecoin keys store and manage data on your device so that's what i was actually talking about before that only snap can ask only this program can ask the user for permission to to do these actions only the user can actually grant this permission so okay so as you can see well this is mark this is a hyperlink and when you click it will redirect you to the npm registry

we did this so you can actually check that the snap you're trying to install is a genuine it's not malicious so if i click on approve and install yup so you will ask again are you sure you want to use the snap okay i'll click again on pre-installed and boom so this is my file coin account connected to my metamask as you can see i have my address my public key my balance which is which is fairly low and [Music] what i can also do is i can also access the metamask core methods so let's say i want to i want to sign a message yeah so i can just come come down here write down hello metamask from chainsafe.io

click on sign and this will call the metamask api so it's asking me again do you want to say this message i click on approve and this is the actual message signature so yeah this is this was just uh for you to have a taste of what you can do for snaps but really what i recommend is to go to this url log go to metamask.org look for the stamp section try to download flask maybe use the filecoin snap try to build something yourself yeah wishing a couple of months couple of years you can come back and tell me that you built something amazing and you've got tons of users using it oh yeah before i let you go guys and

we are consensus we are in a lot of people developer designers product manager devrel so if you're interested just look at their consensus career so look around for me or for anyone else in this consensus team yeah that's it thank you so much you