WalletConnect: Connecting wallets to dapps with Pedro Gomes
ETH Warsaw·Thu, Oct 7, 2021, 12:00 AM
Speaker
BOUNTY LINKS: Hermez Network: https://gitcoin.co/issue/hermeznetwork/0xhack/1/100025692 https://gitcoin.co/issue/hermeznetwork/0xhack/2/100025700 https://gitcoin.co/issue/hermeznetwork/0xhack/3/100025693 https://gitcoin.co/issue/hermeznetwork/0xhack/4/100025694 DevCon: https://gitcoin.co/issue/EthWorks/hackathons/1/100025722 Golem: https://gitcoin.co/issue/golemfactory/hackathons/18/100025686 Polygon: https://gitcoin.co/issue/maticnetwork/matic-bounties/21/100025715 Status: https://gitcoin.co/issue/status-im/0xHack/3/100025685 https://gitcoin.co/issue/status-im/0xHack/2/100025680 https://gitcoin.co/issue/status-im/0xHack/2/100025680 https://gitcoin.co/issue/status-im/0xHack/1/100025679 Ethworks: https://gitcoin.co/issue/EthWorks/useDApp/181/100025575 https://gitcoin.co/issue/EthWorks/useDApp/180/100025574 https://gitcoin.co/issue/EthWorks/useDApp/179/100025573 https://gitcoin.co/issue/EthWorks/useDApp/178/100025570 https://gitcoin.co/issue/EthWorks/useDApp/176/100025566 Moonbeam: https://gitcoin.co/issue/PureStake/hackathon-0x-moonbeam/2/100025702 https://gitcoin.co/issue/PureStake/hackathon-0x-moonbeam/1/100025701 Ramp: https://gitcoin.co/issue/RampNetwork/0xHack/1/100025724 https://gitcoin.co/issue/RampNetwork/0xHack/2/100025725 https://gitcoin.co/issue/RampNetwork/0xHack/3/100025726 Chainlink: https://gitcoin.co/issue/smartcontractkit/chainlink/4375/100025683
Transcript
hello hackers welcome to xerox hack day 2. uh we are launching of today with pedro gomez founder of wallet connect a protocol that many of us use on the on the daily and um hi pedro hi nice to be here welcome good to have you uh so pedro is going to give us an introduction to wallet connect and he'll tell you more how to use it in your dabs so the stages are awesome thanks for having me i've done this presentation many many times but it definitely gets easier as people actually get to experience wall connect on the daily basis as they try to interface with applications that use nfts or decentralized finance and it has become more and more prominent that the apps do also offer wall connect support for their users well connect is a open protocol which is shared by many wallets and it allows you to interpret between dapps across the ethereum main net and also other ethereum compatible chains like xdi or binance chain and in the future other rollups as well my name is pedro gomez i'm the founder of wall connect labs we developed the wallet connect open source software and today i would like to talk a bit more of how wallet neck works so you have an understanding about what is actually happening in the background it's in a few sentence it's a secure remote signing protocol allows you to sign with your wallet in a separate device so that you don't have to have the wallet on the same as the application and this dome not only works from mobile to desktop but it also works between mobile and mobile that means that if it's in the browser and if it's in the mobile app it allows you to actually connect one to another and this makes for a more secure web tree experience across platforms where you don't have to copy and paste siege phrases because most of the time people want to copy between multiple devices and that actually is not very secure and how does it work when you have a dap you actually connect to metamask it has this little connection between the extension and the web page but because of sorry let me as you can see uh on the browser you have this connection with the metamask extension which is present because browser extensions have access to the web page but when you actually make it to the mobile you know you need to create this linking or dispairing across different platforms so walla connect provides that extension it provides the ability for you to sign across a different platform very securely by providing an end-to-end encrypted protocol it will look very similar to the experience you have in metamask and even metamosque has both the extension and the mobile and they give you the exact same interface as if you're going to connect with the pop-up and then when you have the metamask mobile that you're able to connect and approve a session and this happens uh if we skip to this part uh through the relay infrastructure where both the application and the wallet run these clients that encrypt messages across web sockets and you're able to relay messages back and forth very easily but i think the best way to demonstrate is with an example and there's this very simple example where you can go to exam.wallconnect.org that uses wall connect the first thing that you get is a qr code to be scanned that allows you to pair the device securely uh we can even copy the clipboard like this and actually paste it to get the information on this side very easily you can see that it identifies the application that it's requesting and you can approve that you actually want to connect to this application you now have both accounts uh matching so on the app you show the same network and the same account and now you can actually sign some requests let's say we want to send a personal sign it shows here as a pending and the user is able to approve this happens through json rpc and once you approve you actually get the response here and you're able to control the session from your wallet very easily here you have a network mainnet and we can switch to a testant on robston and that change reflects on the application all of this happens through simply having a json rpc connection that is encrypted through the relay that resembles what the metamask extension does on the browser but it can go any platform we can think between mobile to mobile mobile to ipad mobile to desktop desktop the desktop it really there's no boundaries there because by using end-to-end encrypted communication you have the same capabilities of a cloud infrastructure but without the compromise of any privacy concerns and you can see that it's even able to disconnect from both sides so the experience can be designed that either the user has control from the app or the wallet and it's able to cut off the session right away uh so what is well connect 2.0 uh wall connect 2.
0 is basically going to introduce multi-chain support nowadays we support only ethereum but we're going to support cosmos volca dot and we're going to have many other chains also being supported all connect 2.0 works just like as well connect one but introduces a bunch of capabilities that improve the user experience overall and also improve the blockchain support this is a little bit more technical about if you want to actually participate in the development of waller connect you can actually read more about the differences between the version one and version two version one is currently production in over 200 applications version two is in beta development which we hope to release within the next six months to all wallets and applications and we developed a bunch of standards in terms of cross-chain applications uh which we defined as caips which if you're interested more on that but most importantly i think that the developers should look into the documentation and our libraries to actually start playing with it so if we go to doc documentations or docs.wallconnect.org you can simply click on quick start select what you want to use for example for dabs and the most recommended one would definitely be the website provider for you to use with your web2js and etherjs uh you're able to just pass in an ifura id to connect to the blockchain and you enable the provider and then you have all toggles between webtree and etherjs that you want to use most importantly you should listen to eip1193 because as you saw in the example in order to reflect those changes when the accounts change or when the change changes there are these event listeners and also there is a disconnect event for when the wallet closes the connection and after that you'll be able to use all the methods that you've used which gets accounts chain ids networks and transactions and etc uh i'll leave some time for questions now see we've we've had this example here for the webtrip provider which i believe most users most developers would be using this because it's the easiest experience for wall connect you are able to use your favorite library like webgs or interjs with wall connect and it will handle the qr codes it will handle everything even including mobile linking which has its own properties that are described here in the documentation for that developers it is a quite easy experience because once you install the website provider from npm you can build your dap without having to worry how wallet connect works the only thing that i would definitely recommend reading about is how to handle smart control wallets like gnosis safe and argent where you actually have to take in some considerations about how to verify messages because in the user usual sense you have a private key and a public key pair an account but for smart contract wallets you have a smart contract which means that when you recover a message that it's signed you have to take into account the eip 1271 which is the standard to how to validate signatures for smart contracts you sign a message with the delegate key that owns that contract and then you use that signature by calling that is valid signature method which you can use the eater.js by hashing it and providing it as an if call and even for transactions there is the concept of a relay where the relay will process the transaction for the user and you might have to see if the transaction actually comes from a different sender rather than the one you actually seen it sign it's a matter of taking these nuances between smart project wallets and normal wallets that will make a significant better experience because some users would want to use a smartwatch wallet for the social recovery properties that they have and this is something that the app developers have to take into account but most of the the features are already abstracted by the website provider where you simply need an inferior id and you inject it in your into jso web to gs and you just need to listen to these events to update your ui you can already find in registry.
wallconnect.org all the wallets that support wallace connect and also the dapps uh you can select here to only show the apps there's hundreds of apps and there's over 60 wallets supporting wall connect today so it's a very very very diverse ecosystem and it's growing every day and it allows for a much better user experience overall because we are not relying on a single wallet or in a single app to provide the experience that the users need to manage their private keys if anyone has any questions please do put in the chat if no more questions definitely visit us on github on discord uh and documentations and definitely participate because the more people that participates in open source the better we can have feedback and contributions from all over the world thank you also a small note if any of you are looking to get into crypto and you would like to participate more than just open source and would like to potentially look for a part-time or a full-time position while connect will start hiring and we would like to know about your set of skills what you would like to participate what would you like to actually build on wall connect and make this ecosystem even better for developers especially if you're interested in the devops or back end because we want to make sure that our infrastructure for relaying messages is the most performant and most reliable that makes the user experience seamless no matter where they connect their wallet cool if there is any other questions uh i hope this presentation kind of encompass all the details that you would like to know about how wallet connect works today and where do we want to go in the future with wall connect 2.0 and if you would like to dive in more feel free to reach me on twitter at pedro uid or on github and we're always available on discord as well so i'm always open to new questions and you can find me everywhere with this handle thanks for having me
Automatic transcript — names and jargon may be misspelled.