Sign Workshop - ETHGlobal San Francisco 2024
ETHGlobal·Thu, Oct 9, 2025, 12:00 AM
Join us for a Sign Protocol workshop with Jack Xu and Jordan Bettencourt of Sign Protocol. Join us for an introduction to Sign Protocol's SDK and a quick rundown of all that Sign Protocol's schema hooks can offer your project. This workshop took place at ETHGlobal San Francisco, a 3-day hackathon held from October 18 to 20, 2024, which brought together web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem! ----------------- Follow us: https://x.com/ethglobal Check us out: https://ethglobal.com/ Email us at: hello@ethglobal.com
Transcript
[Music] uh hello everyone uh both in person and online thank you for coming uh to our sign Workshop um I am Jack I am the CTO of s protocol also known as a overwork developer and I have my colleague Jordan here I'll let him introduce himself yeah hi my name is Jordan bort I am the Prototype development lead at s protocol so for me I play with a bunch of new technologies and just see how those things will integrate well with ours so I'll talk more a little bit later but I'm going to pass it back to Jack yeah and um the reason why we're here today is because obviously we're giving away money uh at the hackathon and you like to get that money uh and maybe uh learn more about who we are so um so for us you know we are sign um if you have been in this space for a while you might noce as e sign we did like a minor rebranding because now we've expanded past uh just like the evm network so we decided to call ourselves sign um and our mission is to build a decentralized proving protocol that brings offchain identity ownership and consent onchain uh to accelerate tokenization okay so basically um another way to think about it is that we are a um we are a uh we're trying to build a an onchain open data repository um that allows uh anyone to uh post information in an open manner on chain uh in an open open structured and indexable manner we provide an indexing service to our developers so basically you know just uh onchain database is one way a good way to think about it um so um and and also if you know us you all know that you all know that we we had an old product called East sign it's still here um it's basically onchain doys sign we have another product called token table which is um onchain token uh vesting for investors or air drop and airdrop distribution but for this haathon we're focusing on sign sign protocol which is what I just described the onchain database okay so the way that sign protocol really works um and we don't have too much time so I'll be brief with this and you know you can find us at our booth and I can explain go over all this in in much more depth but basically the idea is that um in order to post some data on sign protocol uh first you have to create a schema so a schema basically defines um um well let me put it this way so the data that you actually post onto uh onto our protocol are called attestations so you can think of them as database entries but before you uh before you uh add entries in your database you have to first uh Define a database schema so that's also what you have to do uh first here you have to first Define your schema which includes which basically has a lot of metadata metadata that about the ad decisions that you're going to make for example if they are revocable um for example uh do they have like a set expiration date um things like that or you know their data format right and uh in like Json format so it's human readable um and once you do that right uh you you you then are able to um create a stations under that schema uh in order to basically actually start writing data uh onto the blockchain um and not not only the the blockchain like evm chains but we also provide a more cost effective solution which is posting data on R weave um you're able to index everything just as well we provide an inding servers called sign scan and uh basically um you know it's it's it's 100 times cheaper right so you can actually post um pretty heavy data up there so this is a uh this is a diagram and this is available on our GitHub I'm so sorry everyone um this is available on our GitHub examples okay I will actually quit this and I'll find a place where I can actually zoom in oh I'm sorry for the light mode that's Jordan's fault not my fault actually um also he he Scrolls in the wrong direction on his laptop oh I'm sorry oh almost show something sketchy there um okay so we have three different uh identities kind of uh in sign protocol you've got the schema Creator you've got the data consumer I keep scrolling in the wrong direction cuz uh and the a tester right so uh in the beginning before any data can be posted you first have to create the schema right so these are the steps first you have to create um so there are two ways way onchain schema just means it's saved on like a chain like evm or Stark net and offchain it just means like R weave right I'm just using those terms to like not confuse people right and uh when you create an ating schema uh basically you have like this this block here I'll zoom out a little bit okay so we have the sign protol registry and then we have the Sign Pro Smart contract you have different schemas and as you can see from this graphic right uh the individual adti stations actually belong inside the schema right and here's this interesting thing that I didn't really talk about there's something called a hook external hook contract so when you're creating a scream out you're able to define a hook contract which is basically an external smart contract that every time when someone tries to make an atation uh their atation data uh will go through the hook contract uh and that hook contract will have access to all the context like the schema ID ad decision ID ad decision content so they can do dat they can do like data validation they can do checking they can call like other things you know so it's just anything that you want you just have to conform to an interface but uh it does have to be defined when you first create a schema and um the schema once created cannot be modified because like if you modify if you create a schema and people make like 100 at stations on it and then you change it should I like should we invalidate the first 100 ass station right it doesn't make too much sense okay so so once we once we're done creating the schema um and also like the rwe version because it's not based on Smart contracts uh unfortunately there is no schema hook functionality so next right the attester okay um so what the attester does is that um it will go through either go through the sign protocol smart contract or design protocal API so the API is more for the RV stuff right if it's uh if the schema is not an rwe then most likely your at to station won't be an R weave um so you go through our smart contract and then you you basically just call the ATT test function uh with an attestation object which contains a schema ID among other things right and um and if there is a hook defined then your data will actually pass through the hook okay and then as a data consumer well you just like query right through the smart contract or through our API or through S SC scan which is our um aggregated uh singular API it covers all the chains that we support so it's like pretty we make it pretty easy for our developers okay so let me let me give you like a oh I'm so sorry quick walk through of um so first let me what a schema looks like so this so this is one of our uh one of our um users of S pro called called hym so they are a a ZK based uh kyc uh provider on optimism I believe so they've been using us as you can see pretty regularly and they've they've racked up quite a lot of AD stations and on and this is the schema okay so and this website is is our sign scan so it's like a it's like ether scan before sign right um so you have the schema name schema ID the full schema ID which uh contain chains like the uh some more information about like which chain it's on all that kind of stuff um and uh you have a description uh you have the creation date you have maximum valid time frame now English is my second language so I wasn't sure how to properly phrase this I don't know if I can phrase it better but that's basically like if this is set to one hour then it means all atti stations created that are created while expire after 1 hour of his creation maximum so so you can impose some kind of limit on on that one created by Caleb thank you Caleb um so Network the data location now uh the data location can actually be separate so uh I'll show you later what that means um transaction ID you can go to the block Explorer if they're uh revocable okay and also the schem of details this is interesting so this defines the data format that's in the atti stations now you don't have to follow these rules you can like feel free to misuse this one but the only downside is that one you'll be confusing people like uh how how the hell can I decrypt uh decode your data because the point of having a schema is to explain to people how they can interpret your data right instead of them having to go through like some kind of tool or your documentation they can just see it here it's very very easy right um and the second downside is that if if your uh schema data uh doesn't describe your atation data correctly then we won't be able to decode it for you on on the website right so that's another downside so now we just clicked into an add to station and um you can see also like uh IDs and created at expired at everything so this one actually expires in a year so that's quite interesting right um who's the attester what the schema is um reference attestation so you can actually link attestations together um and revoked no now I don't know why that's all caps I have to fix that book or should be false um so so this is like an overview of science scan you can go to the front page and check out like some of the other ones it's loading um some of the different schemas that we have um and a lot of these come from like our own our own events and our other products um so so there's that but in terms of code I'm so sorry everyone for blinding you um but this is an example of a schema hook so a schema hook really is just um it's a smart contract right and it just has to conform to this interface because in the uh I'm sorry it's tiny I let me try okay here we go um so in the sign protocal smart contract uh we actually call the hook we detect if it's if the address is not zero then we call the hook and we call these we call these different functions uh based on the scenario right so these two are receiving attestations now you can even like uh charge a fee as the as the I call it resolver here but it's really the hook and also uh if the if in the schema it says the ATT the attestations are able to be revoked then um you'll receive like a hook call when the the the r app happens right and this is an example of a of a hook uh that we wrote right so it's like a whit list manager basically it's the point of this contract is is so that it's to maintain a white list where only the only the wh listed addresses can attest but there are many more things that you can access right so if you look at the uh the parameters here you've got a tester schema id atation id and then you know the sender will always be a signed protocol uh so you can call you can call the sign protocol cont contct based on your schema ID and then you can um you can like pull the entire atation object as well right so and we have like all of our interfaces public and nicely documented look at that right um I'm proud because I usually don't document things um yeah but that's like a really quick overview um it's a little bit rushed but because we don't have enough time but again we'll be at the booths so we're just here to kind of get you started and I'll hand it over to Jordan to uh talk about our front end SD case yeah so this is also I think pretty simple to get started uh you just need to import at e signp SDK like you would see here into yarn into npm whatever you may use for uh your package manager from there you you get you have access to all of our other uh functions that should make a lot of this super easy for for you to create whether it's a schema a uh attestation or even to retrieve all every all of the data from our uh indexing service so for example here I'm just showing you how to create an index service and in this case we are creating one for test net I fully expect that all of you will use test Nets throughout the hackathon and uh it's important that you use this test net because we do separate our test net uh index service from the main net index service so if you create the wrong one and you try to query those specific IDs you will not receive the data You're Expecting with that said our client when you go to create these different um like schemas or access stations you'll need to specify the mode so in this case onchain this will give you access to all the different evm chains so in this case we're using Bas tooa but this could also be offchain and in that case you'd be looking at using R weave within each of those different classes you have a bunch of different functions so to start off I think I'll just go ahead and discuss the indexing surface because it's a bit shorter you have access to query the SCH schas uh the schema list one here will give you the option to supply an object you can put in any information that you deem necessary so this could be the tester this could be like your uh potentially even like a schema ID if you already know that and there are other different things you can also query these based on so definitely look at our documentation there for uh for that access um and similarly when you do queries for attestations it's the same idea so with this list function here is basically you supplying the information that you know and expecting to receive a list back on these at attestations with the one that does not say list so for query schema query attestation that takes in an ID so pass in the ID that you you would know ahead of time and that will respond back with all the uh all the relative or relevant information so if you are retrieving an attestation it will also send back the relevant schema information as well so that can help you with decoding uh which we also Supply a helper function for uh which is decode onchain data within that you'll Supply the like the the schema's data field which basically defines the different types that you'll have in your attestation and you'll also Supply the hex value that we store for uh just for spa saving space on our uh different contracts within the actual sign protocol client itself you will be able to create schemas get schemas delegate so when you potentially want to delegate schema or attestation creation on behalf of a user you can also do that too so potentially you might consider you know as a backend you want to create something on someone's behalf and still technically have them be the attester they would need to sign to essentially approve these this information and then you could potentially pay gas fees for them or something along those lines so in that case you would need to sign it you would pass in that signature along with all the attestation data that you'd have in the create schema or potentially create attestation functions and the idea there is we don't want somebody to create an attestation on your behalf without you knowing about it you need to approve that somebody has access to to make an attestation for you because otherwise it's a major security risk and as I move down here you can get the attestations and then lastly revoke so same as uh when you create schemas or create at the stations you can also do a delegate re revocation as well You' also just pass in that signature into the function and you're good to go uh do note that revoke May revert if the schema does not support it so in that time the smart contract will check and make sure that you are able to revoke each of your attestations before actually proceeding with that action with that said uh please join us on Discord on telegram whatever is easiest for you uh these are just a couple of links we have feel free to also stop by our uh Booth we can give you more links you guys can get in contact with us directly if you if you'd wish and um I believe that's that's it we made it on so with that said we can go ahead and turn this over to questions that you guys may have for us um if there's anything else yes uh just for the recording the r weave test net you're asking repeat the question yes so he's asking um when you're using R weave it was Bas you're asking if it's based on an R weave test net or if it's if it's on R weave yeah for the hackathon yeah so for using offchain on the hackathon it is actually on R weave's main net we pay the fees there is no fee for you it'll be free for you to access R weave is cheap enough that we just sponsor the fees for you so if you really want like the ultimate cost saving uh obviously test net you can probably find through eth Global you can find the different faucets but um for R weave it's it's paid for there's correct that is the trade-off with r weave with r weave you will not be able to set up a schema hook that all all the schema hooks are specifically referencing smart contracts on chain and there is no way for us to call that from our back end to get that information processed you explain how the scha hook works yeah you bet yeah so the way that the schema hook works and let me go back to the to the picture that no one can see um so basically a schema Hook is an external smart contract that's attached to a schema uh by attached I mean that the schema references when you first create the schema so there will be a field that if you if you use if you use our UI it will tell it will ask you uh what's your like schema hook contract address so it's a contract that you write yourself right and it has to conform to okay how do I un unclose ah technology um so the the hook that you have to write has to conform to this interface right so so the contract that you write has to conform to this interface because these are the functions that uh the the uh the sign protocol smart contract will be be calling right and uh we have an example here um well this one didn't so we have like three different schema hook examples actually um actually two two sorry um so this is like a more uh complicated one um but but uh basically every time you make an attestation okay uh every time an attestation is made uh with uh on the schema with a schema hook uh the data will first go through the hook run through the hook logic now the logic could be you can check for who the attester is you can decode the ATT attestation data to see like if some value is sufficient or whatever you know whatever your conditions are or maybe you simply want to call another another function in a different smart contract to notify them of something that's all fine right but the point is like you have the power to like reject to revert the the attestation the attest call uh in your in your hook contract so it's a way for you to like you can use it as a way for you to like gatekeep your at your your schema or something you know like maybe only people authorized can attest because it's like it's whiteless it's like a whit less system or something yeah I didn't hear what you said just said take payments yeah I mean the last thing I was just trying to say there is you know you can also just take payments I know we briefly mentioned that earlier but if you wanted you know potentially your your use case here for these attestations maybe you want to charge something to the users making these attestations if they don't pay enough you could revert so some different you know criteria there but it really comes down to whatever you feel the need to do when somebody's trying to either make an attestation so create one or potentially revoke it those two times are when You' be receiving calls to the schema hook and do whatever you want with that information you can revert if you just felt like it you know flip a coin but um it just comes down to whatever logic you want to build all right thanks guys that's our time uh please feel free to stop by our booth ask us any questions you may have we'll be here throughout the weekend we're happy to help thanks [Music]
Automatic transcript — names and jargon may be misspelled.