New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Push Protocol 🛠️ Onboarding 1 Billion Users through Web3 Communication: Push Protocol - Harsh Rajat

ETHGlobalMon, Oct 9, 2023, 12:00 AM

Join Harsh Rajat from Push Protocol for a workshop titled "Onboarding 1 Billion Users through Web3 Communication: Push Protocol". This workshop will dive into the strategies and technologies behind onboarding a massive user base onto Web3 platforms using the power of Push Protocol. We will explore the seamless integration of push notifications, chat, and video to create an engaging and scalable user experience. Thank you to everyone who joined us for ETHGlobal Paris 2023! Paris is the city of light and birthplace of many revolutions. Therefore we were thrilled to be back in one of the most buzzing and free-spirited cities in Europe for ETHGlobal Paris 2023. A lot has changed in the European ecosystem since the last time we hosted a hackathon in 2019. ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

foreign [Music] founder and Project Lead of push protocol uh what does push protocol do that's what we are going to find out uh in this workshop and then we are going to dive site into coding so let's get started so what is push protocol uh well push protocol is sure decentralized communication middleware using which any smart contract any protocol any dap any backend can send notifications gaslessly and data directly tied to a wallet address why so because when you are interacting or when web3 user is interacting with the protocol they are interacting with a web 3 wallet address and therefore notifications or messaging directly to wallet address made so much sense than any other sort of alerts and that's what push did we started notification for webpray back in 2020 from it Global so we eat Global alumni hackers all right so just to elaborate a little bit more why so daus they are not able to talk whenever governance proposal happens whenever anything happens around voting there's no way that you can notify those voters or wallet addresses and that's where push helps D5 loan liquidates farming epochs all of these things can be eliminated if you're using push notification to wallet addresses and it gets interesting like if you're even building a l22 L1 bridge if you are even targeting nfts anything and everything that we do happens from notification and that's what we want you to use in web3 as well yeah I already spoke about the solution but a little bit about it the solution is blockchain agnostic platform agnostic it's open yet secure and it works with your dapps it works with backend it works with smart contract whatever you are using all right right after that we realized that once you do notifications you have something that we use on daily basis which is WhatsApp and telegram right and that is messaging so notification usually happens from a protocol to user perspective or a one-way communication and messaging is what drives the social nature of our everyday life so think about it when we are talking on WhatsApp we are talking via messaging and we are utilizing notification for the engagement and that is the idea of pushad as well you can basically use push chart to create support charts you can even token gate and create a very unique webc native Dow chat or you can use it in your web 3 social and of course per shot is available right now to build a chart the sdks are out and as I said the group chat enables public or private token getting transaction getting and so much more so yeah just by using these two tools we actually are proud to say that we transformed or terraformed the web3 communication era we have from 2020 eat Global to now we have sent over 45 million notifications we have over 95 000 subscribers and over 650 plus integration some of which are on your screen we power notifications and messaging for a lot of Partners uh uniswap or socially uh get coin polygon are some of our favorites all right so what's next before we dive into the workshop what we have made a culture is to announce products around it Global because we started from it Global right so we launched push notifications at the global 2020 we launched push notifications or per shot at beat bugota 2022 next game push video which is like of his same level video that we launched at Tokyo 2023 and we have a very special video which we are sharing with all of you guys about what's coming next awesome so yeah we are launching push pieces right from each Global Paris 2023 uh what is push pieces well it's just like Twitter's pieces but for web 3 peer-to-peer supports any identity including wallets including dot polygon dot crypto profile any nft profile even and it can be access control which means that these spaces can be token gated and empty gated even when someone is listening or someone is talking so very very cool things that you can do with this and yeah just to announce our messaging and Twitter space launch Partners they are revised socializing on Lynch lens play uh these are playing around web 3 socials and we would love you guys to uh check them out all right time for the demo uh the demo video is not accessible but that's cool thankfully I basically did a rework on my technical talk so we can get started directly from the workshop so all right how to do notifications right and before that I'll just uh put this slide out so there's a live workshop and live Discord Link in case you guys want to join that uh I will show it out to you guys again so you don't have to really scan it right now but yeah to get started let's talk about notification first so notification sending notifications is extremely easy all you have to do first is you have to activate your protocol on our protocol and you can the best way to do it is from the dab when you do that we call you as a channel and I'll come to Via channels are important but as you see when I go to staging.push.org and I'm signed in with a wallet address I see all these channels and channels are important because we don't want user to be spammed right the we want users to be opted in to Notifications just like how web2 does it so over here when I go to channels I can see all the channels let's say I want to opt in to Ryan's channel it's looking interesting so I just click on opt-in this is again a protocol level event I'm just gaslessly signing everything you don't even have to come to the tab to do it you can do it from your front end as well but yeah once I'm opted in I'm all ready to receive notification from Ryan's Channel when you want to uh when you have to send notification you have to create a channel I've already created one but you can if you go over here you'll see create a channel instead of the channel name and you can just walk down the steps to create the channel it's very easy just five steps making sure that you own the Proto protocol wallet address that's all uh what push wants to know okay once you have the channel you can send notification from anywhere over here we are going to send it out from the DAP itself first and then we are going to go deeper and deeper so let's do he hackers and notification doesn't have to be just text you can do so much more with it uh you can basically also it adds a YouTube link or a Mets link or the encrypted transaction whatever you want to do so over here I want to attach a cat meme because cats so perfect so I'm just going to paste this as a media URL it will show me the preview I'm selecting broadcast broadcast means that I'm saying going to send this notification to all the users who opted into my channel but is targeted which is directly uh to a single wallet address and this subset as well which is I'm going to send a notification to a part of the wallet addresses that have subscribed but yeah let's do broadcast hit send notification just sign it gaslessly and you have the notification delivered as well because I have opted into my own channel so you can see it over here but not only that you can see notifications everywhere um where they are integrated so you can see notifications on the extension and very excited to announce that you will be seeing these notifications and chat on Unstoppable domain website and mobile app as well we recently announce enabling messaging and notification for 4 million of their wallet addresses so it's totally into interoperable it's story webc so yeah just try it out uh so yeah coming back this is one way to send notification but this is basically a manual weight how to do it uh via programmatically so the first thing you need to do or your best bet is going to dogs.push.org and once you are there you can go to developer Docs and you have everything over here on how to get started with the channel push notification web 3 and you can even see how to send notification from so many other things like from a spark contract uh from possession from pushed up even using showrunners which is basically a scaffold framework that we have to get you going uh like in an instant and using subgraph as well because sub graph and graph and push the we work together so let's see how to send notification from push SDK so I've prepared some of the things but one thing like only couple of things you have to keep in mind first you need to make sure that you're going to our GitHub and your cloning push SDK push SDK has all the examples about everything so it really really helps to clone it out that's what I've done and the other thing I've done is I've just created a boilerplate npm repo just in advance to show you how we can do cool things with the notifications and bits add all right so over here I've just opened the push SDK and what I'm going to do is I'm going to go to packages I'm going to go to examples backend node uh but there are examples of content as well and I am going to try uh hitting notifications and over here I have the example of all the things that the notification and can enable and how to use them the scroll is not working hold on let me just restart vs code all right okay as I said notification index and yeah good so we can see all the ways by which we can send notifications uh get Channel get subscription opt-in opt out all of these things are here but for this example let's let's try to first get uh my notifications so this is I mean internally the function hasn't been named as get feeds but all I have to do is I'll just copy this function out and this is a boilerplate I have created so I've just imported the apis of push protocol imported ethers have a channel private key which I have already dosed and using which I'm creating a Sino so over here what I want to do is I want to retrieve all the notifications that have been sent uh to the channel address we use something called the keep 10 format because pushes the pre agnostic which means that it can deliver notification not only to ethereum but to binance to Solana whatever and that's why I keep 10 because Captain defines exact blockchain address not exact ethereum address so eip155 is evm 5 is Googly and then you have the address and yeah that's about it uh this is just one line of code and once I do a yarn sort oh over here yeah I can see all the notifications that have been sent so that's retrieving notifications let's look at one more example from notification site which is sending notifications out so yeah I think my vs code is a little buggy but yeah uh what we what do we want to do we want to send a direct payload to a single recipient so let's see that so yeah again extremely easy to do this fun line of code a couple of lines of code this is because we want to do console log as well cool so I'm using the push API to send notifications if we want we can also have delegate signers which basically means if we go back to our Channel not only we can send notification from our Channel wallet we can add delegates as well and that delegates can be different for it and can that can send notification on behalf of our Channel just in case you are using backend and you don't want the private key to be in the back end as well you can use this to add an additional form of security layer but for now we have already talked my private key so sign up will be the signer Channel type 3 is targeted notification again if you go to documentation you will see all the notification standards and how to use them so over here you can see notification standards Advanced and basic they will tell you like what are the types and how to use it uh you can even actually go ahead and Define your content to have bold italics or whatever but yeah check that out coming back type 3 is targeted we want to send a direct payload uh to the notification uh wallet uh push basically supports any storage protocol and that basically means that you can send notifications from Smart contract from ipfs from a direct payload or anything else that basically is what identity type is because we are sending it from not from a smart contract but directly as a Json we basically say that then we have notification title and body we will say eat global cats and hackers notification title and body and payload title and body they can be different but in most of the time people usually choose to have the same thing so notification is something that you see on screen and the payload is something that you see when you go inside any app that is supporting push sometimes it's different because it can be a video call right so notification will be someone is calling you but when you go inside that might be the face of the person or the real life fee so that's why recipient I want to send this to the recipient which is my channel address only so I'll just do oh you know what let me have the recipient yeah so the recipient in this case because I'm just sending notification to me that's why it's the signer Channel dot address but that can be any address and environment should be staging so I'll just do this and that is it if I run and give it a few seconds oh yeah silent is something that I haven't defined so I'll just take this out run it again and yeah if I go to the dab yeah it's already here so that's how easy it is to send any sort of notification from any platform any protocol any smart contract now let's talk about chat which is also very interesting because you can do support chats you can even do AI chat something that we have done uh and you can do so so much more so for charts I mean I'm just going to chat over here and I'm going to chat with another person over here chats are again user and spam are controlled or has anti spam mechanism which means that when you send a chat to someone the first time they have to accept the chart request only then the notification are enabled and only then they can see it in the charts but yeah you have the request app that basically acts like an anti-spam mechanism same for notifications like if I send a notification to a wallet address that has not opted in it lands on the inbox but yeah over here let me find this guy I mean I can find this guy which is 792 so yeah take my click yeah cool so sending chat again very very easy to do I am going to go back to vs code example I'm going to go to chat and we have chat with this wallet tool it's at we also have an ft chart which means that you can have your nfts defined as a chat so your body can also talk to uh one another if you want to uh The Only Exception is that the nft chart has a different standard so instead of using eip155 you basically have the nft addresses standard again it's mentioned in the dogs so no worries around it over here we are just going to go with a normal wallet to all its ad so I want to do a send chat example so I'm just going to copy this example out and I'm going to explain it to you guys well we work this out together so yeah thanks peace it out and yeah so first thing charts are very encrypted yeah charts are extremely encrypted so the first thing that we need to do is we need to make sure that we are first getting the encrypted chat address then we are doing a staging EnV file then once we have that encrypted chat pgb key which is what WhatsApp also uses that encrypted chat PCB key we put together a decrypted helper function and we passed that encrypted private key along with the address of the sign up to decrypt it out once we have decrypted the PCP key we can send charts as as a normal user that's how we achieve end-to-end encryption so that's why you have double way encryption and encryption so yeah once you have that all you have to do is again send your sign up sign is the sign the channel in this uh example we also basically did a sinus second account which is a random account that we have but uh what we can do is instead of random account let me just do a copy on this account so receiver address is going to be eib 155 and the receiver wallet address notifications has like the chain ID but chat doesn't have the chain ID just the blockchain uh which can be like chart because it's like ebm compatible right so it's eip155 which means all em evm and then the chat address and over here we are just going to do staging and hopefully yeah console.

log response if everything looks good this should work good so this is done and if I go to charts yeah I can see a chart delivered right now so yeah it's that easy to do just go to the backend node and you can figure everything out we also have something called NX control which is a UI plugin which if you install and then uh you generate a front-end interface or you serve a front-end interface it works pretty well uh I think we are running out of time so I will not be able to uh explain that to you right now but happy to do it on our booth again the best way is go to docs.push.org and lastly if you go to npm uh you have all the examples of everything that you need to do and how to do it right uh along with the patterns and the expected response we also have cheat sheets which the girl in pink is basically having so yeah just have that and uh a Discord and uh our Discord is 24x7 so is our booth so I just scandaling and ask you a technical question either on Discord or come to us and talk to us directly the live Workshop link basically takes you to all the examples that we have in the SDK thank you so much if you have any questions yeah got it so of course like those notifications are visible it can be visible on your dap as well so there is a contender SDK functionality in which you can have those notification integrated on your dab content and because of that you can show it over there or you can have your app also have a pop-up notification which you can achieve by delivery notes but yeah because it's interoperable all the adapts that support push as well as like as he said Unstoppable uh dap and Unstoppable wallet also supports push right so as long as the users the your notification will be there and that's why we recommend that you add it to your dab as well yeah yeah hi I want to ask you something about this push modification for broadcast so as I see in the demo everyone can send a notification so is there any way at this option because it can be used as a malicious modification so got it so not everybody can send a notification like that's why you have your channel and only your channel can send a notification to all the users uh or a Channel or a delegated uh person that you have delegated can send a notification on your behalf so we are working like we are publishing notification for uniswap and safe and so many more companies using this logic and because of that it's only unisa wallet that can send notification to you no one can spoop it we also have like a blue verified tick mark which basically allows user to know that this is coming from a legit Channel and not a spoof Channel thank you awesome thanks thanks everyone thanks for coming and happy hacking

Automatic transcript — names and jargon may be misspelled.