# Buying Mate with WalletConnect - Pedro Gomes (pedrouid)

- Speakers: [Pedro Gomes](https://streameth.org/speakers/pedro-gomes)
- Channel: [Devcon](https://streameth.org/devcon)
- Date: 2019-10-09
- Duration: 12:09
- Topics: blockchain, smart contracts, distributed ledger, Science & Technology
- Watch: https://streameth.org/watch/yt-hFO7ydsLa_w
- YouTube: https://www.youtube.com/watch?v=hFO7ydsLa_w

## Description

Berlin Ethereum Meetup 2019/05/24

## Transcript

there we go so hopefully you guys already know about wallets connect because I've shouted enough times with many conferences and but while the connect is an open protocol for connecting wallets and apps and it's nothing too complicated it's just a QR codes instead of connecting to a browser extension and it basically just came to the conclusion of browser extensions are not the best way of interacting and there's so many good mobile wallets if we could just like connected really easily but with all wallets because you port Connect has existed for three years but only works with you port connect a new port wha app and now we have wall Connect which is a standard that anyone can integrate you can just go to the QuickStart you have examples Ford apps and wallets and integrated right now and there's wall of there's toe canary there's trust wallet meta mask is also gonna release with world connect support rainbow balance and I think that's it we have six walls so far so there has been some good developments so for example I released wet reconnect which is basically an extension for dabs to have both support for meta mask and wall connect with a simple UI that immediately will connect and trust wallet recently supported with bindings decks which was a big win for us which is provided a lot of developers came to to the community and Eunice talks also released which is pretty cool so you would be able to bid on the unit's talks with wall connect me Tomas who represented at et Ariel and even Bruno from Mehta mosque also did the demo where he used connect which is a state channel a platform for paying with wall connect which is pretty cool also recently someone tweeted about how they access the binding stacks on its Tesla with wall connect so there has been some quite interesting developments it's pretty cool because like this very simple UI the just allows you to build so many experiences you just have a QR code anywhere so you could be in a Tesla it could be in a tablet and you get these messages send a cross between the DAP and the wallets and it's all secure because the private keys never shared so you're able to have a loot box like Lee has built to open with your wallet and you're verifying that you are who you are and you can always control the session at all times so what I'm building is called wall connect pay which is basically I want all of these wallets to kind of explore the outside world and for example this bar and other bars and many other bars to have the experience of buying drinks with Walt connect this is a UI that I've built the provides a simple enough user interface to create an order where you can add remove and you have order and you can create different shops so for example I have two different shops this is a coffee shop and this one is in dollars this one is euros it can support multiple chains the UI doesn't even reflect any of this it's only when you actually pay that you encounter anything blockchain related so I'm gonna get a Matta and a cola when I get to pay I get to the wallet connect screen so you pick your favorite wallet the supports wallet connect for example I'm gonna use rainbow and just get the QR code and once you scan the QR code you will initiate a session and immediately be requested to to connect or to a different chain or have a transaction in this scenario rainbow doesn't have X tied chain but if you had wall if you could just switch to X I chain and you would be able to pay in the future you'd be able to switch between chains and depending on the permissions that the vendor would have so for example if the vendor would support X I chain you and it cerium you could use both of them if it supported any other chain as long as it's a VM chain it should be fine so I'm gonna try with the coffee shop so I get an expresso and maybe Casa I get to the payment a scan the QR code and I get a simple interaction which says with the converted rate which you can see here 750 and here says 748 given the exchange rate of dye and I can just sign it from my phone and now the transaction is pending and wanting to confirm you'll have your order and basically this is just a prototype that I'm building which is trying to provide a much better use case for just naps trying to get like some utility to having because a lot of what I have experienced even in the cryptic communities that people don't have mobile wallets and even if they do they don't actually have value on them because they there's not many use cases first of all like we didn't have the apps interacting with mobile wallets if you had trust wallet or cypher yeah the DEF browser that was a good enough use case but it was still not good enough to make for a daily use case where you hold like fifty or hundred dollars on your phone but if you were able to just pay lunch and drinks after work this would be a good experience the problem is this is the blockchain and this is one of the things I want to improve which is can we integrate wall connect with state channels and this is something we're still working on which is providing better standards because well connect one of the problem is that like I said it's an open protocol between wallets and apps yet as the protocol developer I have no control either on the wall to that development that's why I'm so passionate about the IP is in standard because it's it provides me like a coordination tool between the apps and wallets so that I can tell wallets to follow the EIP 13:28 and go to the apps and say the same and now we can coordinate between multiple walls and apps to communicate with each other and one of the things that I'm currently pushing for is the 2050 15 which is yeah basically just provides wow that's terrible there we go so basically even if you connect with wall connect or meta mask it would be great to have the ability to update the chain to a different chain so in this scenario where we had the where we had the the point where it requested me to connect to a different chain it would be much better experience as a user if I scan my QR code and instead of having a transaction request I would have the vendor is asking you to change chain and the only thing you would require is for taps and wallets to support a very simple request where they provide the enough information to switch to any chain and here I described how you could potentially integrate this this is a proposal so far it's still in draft but also it provides a list of best practices where the wallet if it knows the Gourley interface it wouldn't actually require all of that information as long as you have the chain ID the network ID you'd be able to switch to any chain very easily and providing a simple UI so a lot of this stuff that it's like part of the wall connect is about the intercommunication between the two devices but not necessarily what they actually communicate and that's where IP has really come forward because provides a much better user experience for users if we all have better signage to interoperate with each other so yeah I hope like one day this interface for with volcanic pay becomes very common and we can easily just buy a muffin and coffee or mati and we all use our wall connect wallets to pay for lunch Thanks questions forgot about that who has a question will wallet Kinect support polka-dots the thing is for example when it came to finance tax finance sex is technically a cosmic chain well technically a tender mint chain but what they did was basically they created as an interface using JSON RPC all the communications between Wallet connect are JSON RPC calls so they just created a b-and-b namespace JSON RPC calls for all their ordering matching and whatever so you can sign all these transactions on on wallop on on trust wallet because they supported these calls so if you have a Walt connecting Abel wallets doesn't mean you can actually assign messages from the binding stacks it just means that you can interoperate between the two so can it support polka dot if they provide an interface in JSON RPC and the wallets then follow that interface yes yeah so maybe what's what's what information is actually encoded in the qr-code good question let's get into the technical thing so basically here it is there's a topic there's an initial topic for the request there's the bridge URL and the key to encrypting the messages you you posted a session request which includes a peer ID which is going to be used to send messages to that app and peer Mehta which is scraped from the web page using like an icon description a title the URL so it basically provides you the same interface as you would get with the meta mask pop-up that says do you want to connect to this website and you would get the same thing on mobile it posts to the bridge server and the bridge server is a WebSocket server which has caching that wait until at least one of the parties requests for one of these topics when you display the QR code you display the topic and the wallet is then able to get the session request you that topic and he's able to decrypt with the key so you basically just have the minimum information to that get that session request once you have the session requests you basically just interchange messages that are encrypted using that key and they all have a topic and a payload why would the wallet need to know which chain the DEP is on it could just sign the transaction and Center sign draw transaction back to the DEP that's actually not correct actually it's part of the EIP 1155 switches provides the simple replay attack transaction which basically the V field on the signature actually contains the chain ID as you can see chain ad plus two plus 35 so basically you need the chain ID to sign transactions and in the future type type data messages the same way we track the network ID we need to track the chain ID to sign the message actually we shouldn't even track the network ID it's pointless and it's just the same as a coincidence anyway don't get in that but the the wallet the ballot so what you're discussing is not whether you have the chain ID it's whether who decides on the chain ID so with the parity signer you're providing the chain ID from the dump into the wallet instead of having the wall to the dump the reason I did it in this way it was to keep the wallets as in control of the session so just like with meta masks and other wallets they decide which chain is the active one and then they would provide the that information to the dab with the EIP 2015 you would be able to request this change instead of forcing this change theoretically with Wahls connect you could force this change but this would be the wallet developer that would actually okay so thank you so much for the awesome thanks [Applause]
