DevHub Workshop - Chain Abstraction
Nothing is loaded from YouTube until you press play, and then without tracking cookies.
About this video
YouTube Description: DevHub Live β Intro to Chain Signatures! π
π Welcome to a special bonus episode of DevHub Live! Today, weβre breaking down Chain Signatures β what they are, how they work, and how you can use them in your projects. Whether youβre new to chain abstraction or just want a refresher, this session will help you understand the power of controlling assets across multiple blockchains with just one NEAR account.
π Whatβs in this episode? β What are Chain Signatures? β A simple, high-level breakdown β How do they work? β The 3 core elements of chain signatures β Live Demo β See chain signatures in action on Ethereum & Bitcoin β Use Cases β Beyond DeFi: NFTs, automation, and more β How to Get Started β Resources, GitHub repos, and documentation
β‘ Why This Matters? β’ Control assets across multiple chains without managing private keys β’ Reduce complexity when building cross-chain applications β’ Leverage NEARβs chain abstraction stack to simplify development β’ Enable multi-chain smart contracts with just one account
π‘ What Youβll Learn: π How one NEAR account can control infinite accounts on other chains π§ How to derive an Ethereum or Bitcoin address from a NEAR account π How the MPC service securely signs transactions across chains β‘ How to send & relay transactions using chain signatures
π Resources & Links π GitHub (Live Demo Code) β github.com/near/multichain-tools π Chain Signatures Documentation β https://docs.near.org/chain-abstracti...
π€ Featured Guest: π€ Josh Ford (NEAR DevHub) β Developer & Chain Signatures Expert
π’ Upcoming Events & Workshops: π Proximity Team Deep Dive on Chain Signatures (Next Friday) β Advanced use cases & implementation π₯ Next DevHub Live (Thursday, 4 PM UTC) β Stay tuned for our latest guest!
π Got questions about Chain Signatures? Drop them in the comments!
#ChainSignatures #MultiChain #NEARProtocol #DevHubLive #CrossChain #CryptoDev #BlockchainDevelopment #Web3
Transcript
3,571 wordsCaptions as YouTube publishes them, usually machine-generated, so product and people names can be misheard.
- 0:26
what you want want you want you want me what you want what you want what you want want me what you want you you
- 1:32
n hello hello welcome back to another edition of devhub live this today we are back with a bonus episode we have a bonus Workshop as promised yesterday we're talking about chain signatures giving everyone an introduction you probably have heard this term we've had
- 2:38
guests of all different uh walks of life over the past few months talking about different things they're building maybe with chain signatures and things like that but we thought it would be good to take a step back and do kind of a high level overview of like what chain signatures are and kind of reintroduce the concept of what it is so I'm super excited today I have one of my colleagues here at Devo Josh he's going to come join us and he's
- 3:02
going to talk us through what exactly chain signatures are Josh thanks for joining us today Hey Joe how's it going great great great um yeah so I just want to level set for people so uh if you have questions or you're not sure about what chain signatures are chain abstraction what it's all kind of about uh we are going to kind of give that highlevel overview um there are tons of
- 3:25
resources on our docs um so that's scrolling down below uh you can always check that out as we go but Josh is gonna give us kind of a nice overview here and uh we'll definitely you know if people have some some questions we'll try to get to some of those but more or less we want to make sure people get a sense of what exactly chain signatures is all about cool thank thanks a lot Joe yeah what I'm going to do is just kind
- 3:49
of go through a little bit high level like kind of treat this as like a chain signature as one onone for people just getting started with it had a bunch of questions and just kind of want to like you know kind of really dive into the um concept of what chain signatures are and how you can use them in your project um so I'll go ahead and start sharing my screen um cool little infinite window
- 4:12
here do you see my slideshow currently Joe we do we do perfect perfect Okay cool so yeah near protocol we are one chain to extra abstract them all uh again my name is Josh Ford I'm with near devell and um yeah just want to again give an introduction to chain signature for people just getting started with this technology um first of all we just want to talk about the near abstraction
- 4:35
chain abstraction stack um this is kind of you know the further evolution of what it means or like kind of what we're doing over it near um what it comes to not just blockchain but kind of the AI side of things um and as you can see on this diagram here we have the near protocol blockchain that um a lot of people know know very well and love and we're introducing a new layer of um AI
- 5:01
agents that are going to be these you know pretty much part of this intent layer and solvers for us um and asking chain signatures to fulfill requests and go out um get um chain signatures will um make a transaction broadcast it out to um a chain of your choice and then using the Omni bridge to bring that data back to the near blockchain um and one part that we want to um stress is that like yeah your um chain signatures is the outbound side of this um and today
- 5:31
we're just going to dive in just to this layer right here of chain signatures and how it works and how you can utilize it in your project um so basically it it's allowing us to control accounts their assets on other blockchain platforms um and it's made possible things to these three core elements um we have these D um der derivation paths um and it's a a deterministic way to derive a foreign address from one year account um and
- 5:57
I'll show you a little bit more about what that means but basically basically it's just like you have an account say you have josh. near and then you add a string to that um you know my ethereum one account or ethereum 2 CL and then we're taking this public key mashing it up and now we're getting uh an ethereum address or um a blockchain address of the chain of your choice that um and then the other two parts of that is going to be this multi-chain smart contract this is what
- 6:26
we use to um from your original your or originating near contract you're going to send that to this um smart contract it's going to receive this request and then we have this third part which is this multi-party computation service is a network of nodes that is listening for requests sent to the smart contract once it receives this request or it sees that a request has been sent rabbit compose the transaction and uh return it to you um so those are the three core elements of it um again it's
- 7:00
one near account that can control nearly an infinite amount of accounts across chains um we're going to derive that unique address create the payload or transaction or whatever it is that you want to sign or have signed by this NPC Service uh call that MPC contract then we're going to um that MPC contract is going to receive the call and yield which actually waits for the response so
- 7:23
it sits there and waits and then um the NPC service captures the request and signs the transaction uh and then once that sign transactions returned um you can now be relayed out and for me I'm really learner of things so um here's a little helpful diagram to kind of again visualize what I just went through um with you again you have your one near account here um you have a near
- 7:47
blockchain with this is a smart contract this is the MPC contract currently right now we're on vzero signer I think we might be on V1 it's written in the documentation we can go back and look and this is the NPC service and these are independent nodes it's it's a um a bunch of different nodes that are independent of each other that never really know each one what you know um the content of each one what they're signing and they're reconstructing this
- 8:12
transaction and the key is private key is never actually revealed it is um securely created and the transaction is construction is constructed um without ever revealing any of the secrets to one another and it's creating this securely for the end user um and then we have uh whatever blockchain it is that you want to broadcast your transactions to so again you know we're GNA call it's a sign method um with that we're going to have a payload that you construct uh on your end either on your front end or you
- 8:42
know if you're doing it um on a back end um and then you have that key deriv derivation I'm having a hard time with that word today um which is the you know your account plus you know whatever string you have and we'll get we'll show you more about that in the live demo um and it's calling this smart contract on the near blockchain that near blockchain um uh smart contract has a request to it this MCC service is listening for this um request and then it grabs it it's
- 9:14
like all right we're going to start this signature process and it takes a second for it to reconstruct it once it's complete it returns it back to the contract and says all right cool you got this s complete signature the near account receives it or actually like your front end application will receive it um after you call the blockchain you know uh you you'll get that signature back and then now you're ready to actually relay it or send this transaction to its final destination um
- 9:39
and again that's kind of you know just reiterating how this process works and and hopefully you get a better understanding of uh the inner workings of of this um you know with chain signatures what's really cool is that you don't need to manage Keys across platforms you just have one account and now you have a nearly infinite amount of accounts for different platforms for different chains um and you don't need
- 10:04
to sit there and try to manage all your private Keys you just need to manage one or one account actually um you know again one near account nearly in infinite ethereum accounts uh one account nearly infinite Bitcoin accounts and the same with you know salana Doge Etc um the requests are made on chain and any account can make requests even smart contracts um cool so let's get into it let's do a live demo and this is kind of going to be a great place for
- 10:31
you like a single place um for people to to use um for their uh for getting started um you'll go to U near examples GitHub org uh and under here we have the near multi-chain and on here you'll clone this repo uh you can play around with it and you can see inside it a lot of the inner workings on on how the code actually works um and what's also helpful too is at the top here um we have a link directly to the chain signature documentation that will take
- 11:01
you through and you know again bit by bit explain what are chain signatures um how you can get started um you know again we're talking about those um paths that we created and and and also like some use cases uh defi on bitcoin some chain agnostic applications uh multi-chain account abstraction uh Etc and then the implementation of it um you know again we're uh deriving this foreign address creating the transaction requesting signature a different type of
- 11:31
um you know diagram to help you along the way um but what's really nice about these docs is that each step of the way we're breaking down that example that I just showed you and we're actually like taking that snippet of okay like how is this actually taking you know how are we creating our address here and it'll take you right to the code and if you want to dive into it more it'll take you right to um that file and and show you okay here's actually how this is being
- 11:56
implemented um and again we have ethereum Bitcoin we're going to be adding more um networks here as we go but yeah it's just a very helpful uh how to construct create the transaction uh how do are we actually requesting the signature um and how are we reconstructing it so um yeah without further Ado let's get back to our demo um oh yeah and again if you have any questions here's a little Dev support um uh link this will take you right to I just actually updated it um to not go to
- 12:28
the general um Dev support it'll actually take you to chain signatures we have a special um telegram Channel That's all about people that are just building things just like this happy to answer question any questions that you have so uh we have a live site that's ready um to go um we'll go ahead and get into this live demo site um same thing that you'll have if you clone the repo um I'll go ahead and I'll log in um I
- 12:52
like meteor wallet so I will use my meteor wallet um and again we're just connecting to it we're not um allowing it to call any methods on our behalf we're just creating a function access key and it'll take us into the application um and this is the contract ID this is hardcoded in the uh application itself uh you can update this in the code on the back end and then you can choose what chain you want
- 13:16
we have ethereum and Bitcoin as far as examples are concerned right now um and this is the the path uh in which I will give it that will help me uh derive an address and the one thing that you want to make sure that you do to make this all work is that you're going to have to fund one of these addresses like if I were to use ethereum 3 right now yeah I don't have any eth in there uh right now so this actually won't work until I go
- 13:38
and I get some test n e um and and fund my account so I've already funded my account uh I funded eth1 um but what I'll do is um we'll go ahead and fund we'll send some money here so I don't have any money here don't have any testet tokens here I'm going to copy this address I'm GNA overwrite this one otherwise I think you're just sending all your test e the GMO which he loves but so yeah if you want to keep that uh the the original address that's cool uh
- 14:08
but yeah we'll go ahead and do ethereum one this is my current address I have plenty of eth have uh gas prices down here sometimes testnet spikes uh for whatever reason so um if you have just a very small amount to e as you know test9 is a little bit difficult to come come across um just checking out the gas prices to make sure that it'll be possible um so yeah my theum one it
- 14:33
derived my um address that I can control and now I'm going to transfer 05 eth um to my ethereum 3 address that I had before and we're going to request a signature this is not pre-recorded so we are gonna pray to the demo gods that they will be smiling upon us we're going to approve this transaction and um it'll take a second again we you know we're calling this contract the contract's then going to
- 15:00
the NPC service boom now we got that transaction um ready to be relayed it is ready to to send off to ethereum Let's relay that transaction cross our fingers and hope that this um all goes through usually uh my live demos you know they just want to throw me a curveball and make me um make me nervous but um yeah it's relay transaction again it's it's calling relay oh on the first try there you go perfect successful um cool yeah so success and
- 15:33
we U put in the a link uh to testet Ether scan um so you can actually see that this transaction went through um and you can go back and yeah like I said before so we had zero balance on E3 now we go here boom we got our 0.5 eth and now I could take that eth and send it somewhere else um so yeah that's basically kind of um uh the demo in in a nutshell uh of how to actually use this
- 15:58
um uh software how to um compose the um the transaction and and create it and yeah this is a great front-end demo for you to uh clone use and um yeah you know diving into the code the the areas that you're going to want to um pay attention to are going to be in your components and services uh so in your components you have you know either ethereum or Bitcoin and you can kind of see where
- 16:23
we're where we're calling these methods um and um and in your Services you have ethereum Js and this is kind of okay how are we deriving the address how are we getting balances um these are like your helper files how are we actually creating the transactions so these two files would be kind of you know how you can dig into the code a little bit more but the easier way you know if you're
- 16:46
messing around with it you're trying to figure it out an easier way for more higher levels just to go straight to the docks um from the uh multi-chain demo uh which again are right here just go ahead and click here uh jump in go to the implementation port and start you know diving through code and um yeah that's that's kind of it's kind of um chain signatures high level 101 in a nutshell um we're GNA do another one of these
- 17:12
episodes next week give you some time to play around with it and get more uh deeper into some more advanced use cases uh but yeah but for now that's that's kind of uh chain signatures in a nutshell um Joe are there any questions or comments that we have from uh any of the audience members no no no questions I think that you know lot of people saying you know good morning things like that um GM yeah no this is something that you
- 17:43
know I I think it's important for people just to kind of play around just to see how it works a little bit um it's not just about defi you can make any kind of transaction so if you're doing nfts if you're doing anything else um anytime you want to call another chain for whatever reason you can do that um this is not this is not you know just simply for defi stuff def is the obvious one totally but um you can definitely do like yeah yeah you can definitely call
- 18:16
you know an action uh on things yeah you don't necessarily have to send um tokens you can yeah like Joe was saying nfts um calling an action on another contract um CH chaining different contracts together um yeah absolutely this is definitely not just for defi no definitely not um I would encourage people to take time if you're curious about this even just play with the front end if you don't want to actually go through the code just play with the front end see what that looks like go through the code ask some
- 18:46
questions here and there um you know you jump into either one of the telegram chats the main one or the other one that's made for chain signatures we're happy to answer any questions there and then yeah I think taking then the next step and when you when you talk about uh Building Products then off of this you can start to see where you know it really becomes about the product more
- 19:13
so than actually worrying about the technology all the other stuff is being done for you the MPC servers and everything else so uh it's a it's a great experience yeah absolutely absolutely cool well uh we definitely appreciate people coming out checking out this uh highle initial workshop for chain abstraction uh we have tons of other uh workshops that we've been we were doing for the redacted hackathon uh you can check them out on our YouTube uh and I
- 19:45
will share that right now as well uh and this will be there uh as well too so make sure you're checking out uh all the stuff that we have available because uh there is a lot of so many things happening right now on near and all the stuff we really want people to check out and take time with that uh but check out our channel uh we can see all the different things there uh for workshops
- 20:09
everything else and we have some more stuff coming very soon around again uh D we've been doing Bitcoin lately a lot here uh so you know definitely dive in check it out and let's see what you can come up with awesome thanks so much appreciate it that's yeah definitely want to just do a lot more of these um bite-size kind of introductory stuff and also just bite-size demos like this is how it
- 20:33
works here's here's a section of it um and uh yeah take it away and dive into it and and ask us any questions that you have absolutely absolutely and so we will be back normal time Thursday for our next Dev Hub live that's at 4M UTC and we'll be back with another one of these same time next Friday correct yeah I believe so yeah proximity is going to be coming on and doing a little bit more deeper diving some more advanced use
- 20:57
cases of chain signature perfect love it all right well folks until then we will see you thanks Joe happy coding byebye