MetaMask Everywhere: Bringing Web3 to Games and Apps with the MetaMask SDK Lauren Dutton

ETHDenver 2023 · February 2023 · 5:19

Lauren Dutton introduces the MetaMask SDK at ETHDenver 2023, a toolkit that lets game and app developers embed MetaMask wallet connections directly into their products. The SDK extends Ethereum wallet access beyond the browser extension, routing signing and transaction requests straight into mobile games and native apps.

Speakers

Topics

From ETHDenver 2023, hosted by ETH Denver.

Transcript

hello hello I am a Lauren developer experience at consensus uh today I'm going to be talking about the unity SDK um so this has inspired me to pick up game development and start learning and I hope that I can do the same for you guys um before we jump into gaming let's talk about the metamask SDK many of you might already be familiar with this SDK it's basically just a library that can be installed by devs to be used in your project and it'll guide the users to connect with the metamask wallet so some or hopefully most of you have a metamask extension already installed in Chrome or Brave and up until now it's been really difficult and sometimes weird to connect with metamask from mobile apps so it wasn't an option to directly integrate and so we had to use

a third-party solution enter metamasks Unity SDK this SDK provided direct integration with the unity development suite for seamless connection to mobile dapps and games so the power of web3 gaming as you all know is that users can truly own their characters they build them up they put them in their wallets and they can take them with them when they leave the game you can sell them you can play them in another game the magic here is really endless so never forget vitalik built ethereum

because World of Warcraft nerfed his warlock gaming was his inspiration behind decentralization he wanted to have full control over the characters that he built without having a centralized power having the authority to Nerf his warlocks so what does this have to do with metamask metamask is just a wallet right the metamask unity SDK enables gamers to log in with their metamask account it enables them to do true play to own gaming and it is compatible multi-platform so what we're looking at now is pretty much the login authentication with metamask enabled

Rebecca previously what we've been able to do with Facebook or Google to log into different accounts we can now do with metamask for web3 so players want to buy an item and they want to be able to own it what we have here is an example of a game leveraging our SDK you click and you buy and you'll see it populated in the wallet almost immediately so metamask is right now the magic behind hyper play hyper play is pretty much a web 3 game launcher and game store aggregator so like I mentioned before we are

SDK can be used in web apps with react languages pure JavaScript node.js or electron on mobile using react native for iPhone IOS and Android and for gaming unity and soon we will have Unreal Engine awesome so first comes initialization this is a quick example I love having no Wi-Fi all right hopefully that'll stay there so a quick example of what initialization will look like here

um the main class you'll be interfacing with is called metamask wallet this handles the connection to the user's wallet as well as processing all of the requests via the socket implementation and in order to use this inside of unity we're going to need to attach the component called metamask Unity to the game object within the editor and the instance property so this is just to show that this is really really easy setup um the actual component can be scanned here from this QR code and pulled up in the unity asset store we also as of yesterday have launched for inferior and truffle as well so here we'll see a quick video of what this looks like in the unity code editor

no we won't because there is still no Wi-Fi this um video is on the metamask documentation on the website so if you guys want to check that out all right so in remembrance of italics nerfed warlock use metamask SDK and give your users play to own all right so we have the early adopter program this is going to be going until April 20th you can go ahead and sign up basically we're going to have the option to learn all about web3 development leveraging the metamask and inferior Suite

um April 28th again this is when the deadline is so uh yeah go ahead and check that out if you guys have any other questions I'll be around thank you happy building