The One Question bounty closes Thursday 10 December.

Join in
We Them Media logo We Them Media Support us

Web3bridge Students (Cohort XI) Share What They’ve Learned: MetaMask & MetaMask SDK

The picture loads from YouTube. The player loads only when you press Play. Turn on captions in the player if you need them.

A Web3Bridge student covers connecting wallets to front ends. They explain the two Ethereum proposals for this, one where a wallet injects an object into the page and a newer one where wallets announce themselves, then describe what a wallet SDK adds for developers connecting an app to the blockchain.

Not by We Them Media Channel: Web3Bridge. Published Thursday 26 December 2024.

Titles are the owner’s. It plays from their channel.

Transcript

This transcript may contain errors. This video belongs to Web3Bridge. Letters mark each change of speaker.

These are the speakers’ own words. We have not checked their claims.

0:00 A: This video is proudly brought to you by Web3 Bridge with LIX, our official sponsors for Cohort 11.

0:08 B: And this week we'll be talking about MetaMask and the MetaMask SDK. We went through, uh, the front-end side of things in Web3, how to integrate, uh, your smart contract into your frontend to create a fully decentralized app. And one of the ways of- a crucial point of doing that is to connect your wallet to your app so that your users can interact with the blockchain, right? And in previous weeks, we've already gone through what a wallet is. It's an interface for handling private keys and enabling users to sign transactions to the blockchain, right? So one example is one of the most popular Web3 wallets in use right now is MetaMask, and MetaMask adheres to certain Ethereum Improvement Proposals, that's EIPs, that ensure that any user can communicate with your smart contract backend. So the 2 EIPs that are relevant to wallets, that's specifically MetaMask, are EIP-1193 and EIP-6963. So 1193 is an older EIP. Using that method, MetaMask or MetaMask and wallets in general have to inject their details into the dApp using a window.ethereum object, right? And then you as a developer, you can now listen to certain events from your dApp, including when accounts change, that's when a user changes accounts in the MetaMask wallet, chain change, when a user changes a specific network that the dApp is on, and then disconnect and connect, which are, you know, methods that communicate with a client or a provider- a client. And then 6960 is an upgrade to that whereby you don't need to use the window.ethereum object, but the MetaMask wallet itself announces that it is present in the browser. And then your dApp will also dispatch an event to request the MetaMask provider. This provider is like a JavaScript object that contains certain details about the wallet, including the info, the UID, a special string, and the icon- that's the logo.

2:29 C: An SDK is a software development kit that comprises of libraries and tools that enable We develop our build for a specific platform. In this case, we are referring to the MetaMask SDK. So this SDK helps us to connect to the MetaMask API, which it provides, and also helps us to abstract all of the Web3 provider methods so that the developer can have a seamless experience when trying to connect with the Ethereum blockchain. So yeah, thank you guys for joining us this week. Follow, like, and subscribe for more content like this. Peace.

More from this hub

Something wrong, or a video you want off this page? Write to wethem.xyz@gmail.com and it is fixed or taken down within 48 hours.