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

Loading player…

Lit Protocol 🛠️ Progammatic Signing

ETHGlobalMon, Oct 9, 2023, 12:00 AM

Join us for a workshop on Progammatic signing and core features of Lit with Lit Protocol's Debbie Ly. Hack with some of the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem, ETHGlobal New York 2023. ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

foreign [Music] developerrelations at lit today I'm going to go over programmatic signing and how you can utilize lit's core features ideally you'll get an overview of what protocol as well as some ideas of what to build so what is lit so let protocol lets you create and manage distributed crypto cryptographic key pairs for a condition-based encryption and probiotic signing lid is a decentralized key management Network solid can be used in a place of centralized key custodians and other Key Management Solutions how does lit work lit decentralizes public key cryptography through threshold threshold cryptography is used to generate shares of a public-private key pair in a process called distributed key generation through uh Discovery Key generation or dkg private keys of this key pair never exist in its entirety ever so the lit notes hold a private key share and these key shares can be used to both sign and decrypt data just like any old private key two core products with lit are encryption and signing encryption is being able to encrypt increment information so that it can only be accessed by authorized parties and you can encrypt and decrypt using on-chain conditions and credentials such as someone as a member of a Dao such as developer Dao or someone holds an nft in the Doodles collection or nouns collection someone hold um a certain amount of eth so you could say they have they have minimum 0.1 amount of Ethan they can unlock viewing something um someone holds a specific wallet dress and we support most evm chains the cosmos ecosystem and Solana on the signing side it's programmatically being able to write data to blockchains databases storage networks and other state machines through digital signatures so some examples on the programmatic signing side might be so there are D5 use cases where you can build conditional transaction execution reoccurring payments liquid staking Solutions and then on the infraside cross chain Bridges we actually had a grant project create a bridge to swap tokens um and one thing is they also built a way to do Bitcoin transactions so being able to swap to bitcoin using programming key Pairs and let actions and then there are oracles for off-chain data privacy preserving transactions as well as AA wallet signers so we're going to dive into the AAA wallet signers a little bit um later in this talk so how is the signing possible with lit it's possible through two concepts uh one which is the permeable key pairs or pkps they are private public key pairs generated by the lit Network um they're minted in the form of the ERC 721 nft and the owner of the nft becomes the sole the not the soul but the a controller and delegator of who can sign with the pkb so initially admin they are the sole controller and then they can delegate who else can sign with it so in order to get a programmable key pair you'll need to use let's Network Chronicle and you can go get some tested tokens from the faucet and then be able to Mint pay pkp and then for lit actions lit actions are immutable JavaScript functions stored on ipfs there are smart contracts with superpowers they have network access and the ability to make arbitrary HTTP requests think of it like a cloud function that is able to be run across the lit nodes and you can you'll write them in JavaScript so when these components work together lit actions and pkps they have the power to facilitate complex condition-based automation what if you could tell your wallet to execute a certain trade when your token fell below a specified price or to automatically list your nft when the collection hits a certain floor price or let's say you want to use an off chain or cross-chain data as a triggered execute functionality within your decentralized application with lit these use cases become possible a common question we get asked is do I need a pkp to run a lit action no but without it lit actions lose their magic capabilities of signing and decryption an action without a pkp is essentially just a serverless function that can't sign or decrypt arbitrary data before we go deeper in um about lit I want y'all to know how do you find more information about lit as well as how do you build with us well you can go to our developer docs which are at developer.lit protocol.com and the most recent version is rv2 we still have V3 in the work so stay tuned but on V2 you can check out more of an overview of how to build with lit as well as how to load in the SDK so we have a JavaScript SDK that you'll utilize in order to talk to the lit nodes and we have a lot more information around the different concepts around lit actions pkps and access control from there you can find many different examples as well and then be able to yeah find out what you want to build so in this next part I'm going to go over Austin's and session six because that's a core component of how to work with a lit Network and so a little bit of vocabulary and off Sig is a wallet signature obtained from a user so wall signatures are required to communicate with the lit nodes and authorize requests so op6 are there's a signature that proves you own a particular public key so evm based apps rely on cryptographic signatures to prove ownership of address through the ecdsa curve so or algorithm so elliptic curve digital signature algorithm which allows external parties to verify signatures without knowing the private key and so we'll take a look at offsync format and then go into session signatures so take a quick peek take it in this is the format of an opt Sig and then we're going to go into session signatures which the first step to producing a session signature is to obtain an offsig through an authentication method like Google oauth which you can do through lit we have different ways to try different authentication methods like SMS Google oauth through a wallet address by specifying the sessions key pair public key the signature payload of the otseg which is the URI field of um a like c-way format or sign in with ethereum users can choose which specific actions to delegate to session key pairs for operating certain resources so session key pairs are used to sign requests the lit nodes and the user's offsig is set along with the requests attached as a capability to the session signature so each node in lit's network receives a unique signature for each request and can verify that the user owns The Wall address that signed the capability so that might mean you might be able to specify only keep my data on the browser for x amount of time or clear my data like for this session let's say we're on lens or we're on a different platform and you're like I want to sign all transactions just in this session before my browser is closed so I don't want to keep re-signing every time and then once your browser is closed they would that's kind of the stopping point and then when you reopen and you go back to lens you'd have to re-sign in to keep signing for posting or for other other um ways of utilizing sign it moving on we're gonna go to how to use account abstraction and lay so our kind of abstraction refers to the eip4337 where AAA shifts the wallet validation of transactions from the ethereum protocol to the spark contract level so unbundling signing with transactions so here you can use lit with account obstruction by setting conditional gas payments so a pkp wallet pays for gas fees when certain conditions are met user onboarding creating a smart contract account for someone new to web3 the signer can start as an MPC key authorized through a web 2 account and then AA wallet authorization for pkp so smart contract accounts with signing capabilities through pkps or you can do non-ecdsa account obstruction wallets with the PJP which allowing the freedom of signature verification straight schemes and then lastly adding a pkps assigner to an AA wallet where the pkp is the spending account and the a wallet is a treasury for a dow a example you can see in action is the Pimlico um tutorial here so going through it you'll be able to integrate Pimlico with lit protocol for OTP or one-time password authentication where this guide will walk you through the steps to integrate Blitz OTP sign in with email SMS and WhatsApp with a smart account whose user operations are relayed and sponsored by Pimlico so this is one way where you can use account abstraction with lit so make sure to follow along in this guide closing out um I want to go over the prizes for youth Global New York so first prize is best use of programmatic signing where we're going to give out 3 500 usdc um for the best project using pkps and lit actions so that might be onboarding with late social onboarding verified credential systems using pkp's Elite actions a kind of abstraction music using lit as a signer or as a pay Master we'd like to see people be really creative and ideally some bonus points around people being able to use this or extend this so having a library or SDK and then our next prize is a wild card where we really like to see more creative use uses of lit protocol um that might be onboarding and educating people that might be a campaign that might be tooling no idea is too small as long as it has impact on developers and creates clear use cases for lit um so we want to be able to see people just push forward the ecosystem and community so please please use lit have fun using lit and we're excited to see what you build you can check out lit on Twitter at lit protocol you could also check out the lit SDK and if you have any questions about implanting please go to our Discord we're pretty available there and feel free to DM me on Twitter um I would love to answer your questions happy building foreign

Automatic transcript — names and jargon may be misspelled.