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

Loading player…

This is Squarelink by Alex Patin of Squarelink, Inc.

ETHGlobalFri, Oct 9, 2020, 12:00 AM

Alex Patin - Co-founder & Chief Technology Officer of Squarelink, gives a talk at ETHBoston about the basics of Squarelink. ETHBoston was an ethereum focused hackathon that took place Sep. 6-8, 2019 at Northwest Building, Harvard Campus. ETHBoston was a hackathon organized by ETHGlobal and a team of hackers, developers and enthusiasts interested in building and creating in the ethereum ecosystem. The ethereum focused hackathon took place for 3 days at Northwest Building, Harvard Campus in Cambridge, MA. For more information visit eth.boston and ethglobal.co

Transcript

hey guys I'm Alex from square-link yeah so I guess the point of this talk I'm just gonna give you like a quick overview of like what square-link is and then I'm gonna jump in really quick to like basics of our SDK our API the beauty of square-link it's like super easy to integrate so they're like shouldn't be any confusion for the most part but we do have a lot of like small custom functionality that you know you can tie into your adapt to oh what will go over it but let's let's start off with just like what Square link is how many of you have bought food at the food trucks yet awesome okay do you guys like it can you be honest yes I I heard someone someone gave me this like beautiful analogy he was like I feel like you you built me this beautiful chair and I just sat on the table anyway so Square link isn't just what you were doing for the food trucks it isn't just that like burner wallet kind of solution what our core product is is actually a an end-to-end onboarding solution for apps to attract mainstream users into their application so we offer like a standard web 3 provider you can integrate it the same way you'd integrate meta masks it takes like literally seven additional lines of code you can copy and paste it and it just works so super super easy like literally like off of our landing page copy and paste it so like I guess one of the one of the core advantages in terms of UX so obviously like all of you have probably used meta mask right yeah so like new users coming into the space they they see adapt they want to use it think it's cool whatever they have to like download a Chrome extension like they have to be on desktop using Chrome I guess metamath now has their their mobile version but just like the the onboarding friction for getting into adapt at this point in time is just absolutely ridiculous and unnecessary so what we tried what what we're basically doing is allowing people to interact with taps with a bait like a totally web to you user experience and completely non-custodial security so users can sign up sign in/sign transactions even recover their account always just an email and password and it still keeps everything completely non-custodial it's awesome so I'll give I'll give a demo at the end so I'll just like jump straight into the integration like this at the end of the day if you guys are building an app that already supports meta masks like this is all you need like literally all you need just register a DAP in the square link developer console copy and paste your client ID and you should be ready to go like that's that's this is literally it you're done end of talk thanks for coming guys all right so we do have like I guess a couple of like custom configurations to that original square link objects where you see like cons a con square link equals new square link etc we do have a custom a couple custom configurations to that so the first of which is obviously your client ID next is the theme network so we support if you go to if you go into your square like application like that what you use to pay for food at the food trucks you can click on these the network up top and you can see a massive list of networks that we support we support maybe like 12 main block chains that you can list here they're all listed in our documentation page you know things like obviously like the etherium main net a bunch of test Nets like Cove on Rob's day and rinkeby we support like X IPO a thunder core just integrated recently they're there there's a big list it's growing every day so check that out to see if we support the network you're trying to build on and if you're trying to build on a custom network that's also totally fine all you need is your own RPC endpoint and you can pass that in as an object the squirreling constructor so basically with that I don't know if it's there you can see it in our in our documentation our readme but you literally just have to pass in an RPC URL super easy and then options we'll go over this in a second but we do have when you when you actually create a provider engine it's it comes with a couple custom features like get name get email get security settings these are all on top of like the standard web 3 provider where you can do like east get accounts ethought Sun transaction whatever else so when a user like authenticate so a square length through your DAP after at that point you can if you if you're set up to use the the user name scope you can call like square link get name it will return like the person's name get email returns their email super straightforward just some other like features you might want to build into your DAP I know a lot of people are trying to tie in like email services into their DAP so they can like onboard their users more it just like provide a nice onboarding flow where you know after they signed in for the first time they get an email with like instructions on how to use the DAP or whatever else so just some ideas on how to use these these custom features so actually this is just a side note but we do have a couple as the other custom custom API functionalities so if we go to our API reference so everything in square link it's all wrapped around a basically standard OAuth server that isn't anything you guys need to worry about but if you guys are interested in using our standalone API like our REST API you can authenticate your users with like a standard OAuth flow it's all outlines here like sign-in button obtain an access token and then you'll be able to use any of these API routes what some of the interesting ones that you guys might be interested in using for your hacks probably post wallet is the most interesting with this I mean super straightforward it just if you have an access token that's authorized to create wallets for a user you can just call this API route and it'll create a new wallet for the user you can name it like if you have like your own dad name like my cool dad you can call it like my cold app wallet or whatever so yeah any any any questions about any of this yeah go for it send email we can't send email from square-link know but like you you'll be able to have access to their their email address if you want to set up your own email server you would be able to do it that way mm-hmm awesome any other questions so I guess I'll give you guys a quick demo on like what the actual user experience looks like so this is how many of you are familiar with Poole together okay just I guess there's a an alternative demo or is anyone familiar with total toddle however you pronounce it okay so more people note pull together I'll do pull together so pull together it's a it's a pretty pretty new they just an integrated uh so like literally yesterday but to really it's really awesome like honestly like really cool defy app that's so attractive to mainstream users the the essential idea is they host like seven-day periods where they collect a pool of money and that goes into basically like basically like a compound lending account and that the the interest accrued on the total pool raised becomes basically like the prize for a lottery at the end of the pool so let's say everyone in this room puts in $100 into this pool that generates like let's say a hundred dollars total and interest at the end of the lottery every single person gets their money back and one person at the end that's the total interest collected so it's basically cano lost lottery pretty cool idea we just got integrated yesterday so this is just like an example of how it would work with square link so you can see meta Mask is supported square link is supported obviously if you know if you're gonna choose meta mask user would have to be likely on desktop have the extension installed etc with square link it's quick and easy like so obviously I don't need any extensions I can use it on any device any browser just press confirm and I'm in so now I need to this so the way this works you buy a ticket or yeah so we'll buy a ticket cool awesome so all I have to do to confirm the transaction press confirm great and now I have to wait for a cerium how's it going oh yeah awesome okay so I have a tick I guess I honestly don't understand this like you X flowed on on there and too much but it looks like I have tickets or I have something allocated and now I can buy tickets for the the pool so it's a I guess another step in the process but we're going through there wait for a cerium again I feel like the gas price just shoots up way high whenever eath global throws one of these events well yeah so you know at the end of the day this will eventually go through you'll be entered into the lottery and that's just like a basic example of adapt that's using square-link there are a couple other examples on our on our landing page if you go into the wallet that you guys all have there's an explorer page you can check out some of the defy apps that we have up top there just play around with them but at the end of the day like this is this is just gonna be this is supposed to be as simple quick and easy as possible from a dev standpoint for you guys and for a user standpoint so hopefully there are no confusions but I'd be happy to field any questions if you guys have yep good yeah so 4matic is custodial actually so they're they're actually holding all of your private keys and they're there they're signing transactions with HSMs but at the end of the day like if you hack there they're like front-end or their servers HR sevenths don't really do anything so what's square-link everything is completely non custodial so your keys are actually derived from your base base you can read about it more in our whitepaper it goes more in-depth but essentially your keys are derived from your email and password your password your password hash etc are never stored on our servers they're all they never leave our front-end so I guess the the big difference is that were were non-custodial yeah go for it yeah that was not that was I built the I actually built the lofts to coin network and the gas price is like zero so it goes through and I set the the block times to like three seconds or less something like that so it's it's optimized for quick payments but not for security I'd say go for it have at it guys yep mm-hmm like an iframe sort of modal yeah yeah so just because that I guess that's another big differentiator between like us and 4matic is just because of like our security architecture we're unable to support the transaction signing in iframes partly because of phishing risks it's obviously easy to replicate iframes so we're trying to avoid that the other thing is just iframes limit the security additions that you can add in terms of like third-party cookies for authentication things like that so in short we don't support pop-up modal's or on page modal's but we do have like just as an example you guys have signed up for a developer account yet everything can be also like implemented as sort of like an Alice flow so this is as an example is more of a redirect and again everything is like totally OAuth base so I guess yeah more of like a redirect sort of user flow rather than that that pop-up window if that's something that interests you Oh it'll be absolutely much nicer on iOS yeah yeah yeah alright otally I totally understand I mean yeah it's like absolutely a it would be a top priority I think yeah it's it's on the horizon but it's yeah it's not something that we would pass by yeah yep cool yeah go for it that was those ARS yeah yeah it's it's pretty extendable pretty pretty robust so like what it's it's like a fully like yeah it's a well you know it'll work with anything honestly any any sort of POS application not just food trucks it's it's currently I'd say more in beta right now so we're not really like pushing it as a product but if you guys if you're like interested in doing something with it I'd be happy to set you up yeah cool yeah oh yeah absolutely so I guess that's like one of the cool features that we have so if you if you notice in the so if you notice in like the the web 3 provider initialization so square link I guess this is another notable feature in the SDK so our our preferred method of initialization is like obviously square link get provider this returns a promise or callback the reason for that is because when we when the SDK is initializing it's actually pulling a list of available networks from our API and that that list can be like I can add a new network in like 10 seconds so their networks that you want to see on there that aren't available just like shoot me a message I can see what I can do if it's a quick integration but you guys can check out the available integrate available networks here it's all of these yeah so on the other end of that if you guys are for some reason unable to support that sort of promise or callback flow we do provide a hard-coded list of networks in each build of our SDK so you can you can use check out initializing square links synchronously and we have a basically I get provider sync function and it'll that'll work like the same way you'd use like you madam asked or something like that for and in terms of provider initialization

Automatic transcript — names and jargon may be misspelled.