X42 is an open standard for programmable on-chain payments that enables agents and applications to make payments without API keys, while ERC-7710 provides a delegation-based asset transfer method that allows recurring payments by granting permission contexts that can be redelegated, enabling subscription-like payment flows where users grant permissions once and the system handles subsequent payments automatically.
深掘り
前提条件
- データがありません。
次のステップ
- データがありません。
深掘り
Live-coding: Make recurring payments with x402追加:
Okay, we are live. So, welcome welcome everyone to this uh live coding session on the X42 or more. How are you Hayush today?
>> I'm doing good. We are back again after a single day of CAP.
>> Nice, nice, nice, nice. Yeah, hope hope there was some relaxing time in there.
I'm excited for this um uh live coding session. So, we're going through like some kind of like X42. We already did multiple one for def cookoff. So we kind of like will go quite fast on the intro.
Uh but I think the goal here is that if you have any question about X42, we're building from scratch also some some DAP. Uh and uh yeah, let's let's get it started. Um how is looking the dev cook off like this? We are almost like two weeks in right we're doing a lot of like live stream for like workshops trying to actually like facilitate how people can build can vibe code uh with both oneshot API um and venice AI and obviously like smart account kit uh but how is the submission look like how is the support a lot of question a lot of excitement I >> I think like it's it's going pretty good as of now uh we are standing strong on the submissions and the like the participants It's more than 100 as of now. So, pretty good to see that. I I I'm like hoping more of submissions to come like in the last 3 days of the hackathon like usual.
>> Yes, I think uh it's always happening, right? But I think you know what we did with the oneshot API uh live stream uh was really cool that in less than I think was two hours where we were a bit like off time. Let's make sure that today we're not doing a three hours live stream. But uh uh yeah building building the stack completely from scratch and uh was actually like uh we also verified was working uh was quite impressive under the two hours. But uh yeah I think the goal of those uh dev cookoffs is also that people are actually like taking their time to learn and build and ask questions and not arriving the last Sunday before the submission deadline.
>> Yeah. And it's funny that we're also doing the VIP coding uh today. So hopefully it will be done I guess before two hours not stretched till two hours so like everyone can go home and relax as well.
>> I think it's fine. Uh yeah been testing a lot like the the composible 2.5 from Corser and it's actually very yeah very strong. There is a lot of like different things I think especially for planning mode is clear up your your your mind a lot. So I'm excited also to to do some planning mode specific. Okay. So let's do a quick intro for the people uh joining now. We are actually running this um uh workshop all around Metamas Pukov and today is very focused on building something with X42 and uh yeah we're kind of like building something around the current payments. So quite excited feel free to ask any question and uh hi to everybody that is kind of like chiming in from different region and say hi to the chat uh and uh let's do it. So uh for the people that already like uh know what a metamasdev cookoff is or they already submitted or they already been in some of those workshop um yeah this is a one month online uh long uh virtual hackathon and the goal is really to include everyone that is not just at event but is anywhere in the world and is able to actually like hack on something cool. This is not just for individual developer is also like building build a team is startups companies they actually want to en enhance their functionality they want to leverageing a tech stack and it's a good way to do it because you don't only have support of all those partners of the hackathon but is also a good way to you know to build something not just for scratch to enhance the functionality and uh and yeah and kind of get inside the the ecosystem more especially because we can invite you to all the Metamas community call. There is a lot of kind of ecosystem outreach being done in the same time and uh and yeah, I'm trying to speak fast. I think we kind of like did this live stream part of this live stream couple of time and I really like want to go where where really like um people are excited on the X42 side. Uh okay. Uh I think like you you know better but I think like in this category and we reiterate couple of times. Um what is your kind of like favorite category here? Uh Aush that you're excited for for the Dev Cook of prizes.
>> I think it it's supposed to be the XRO2.
It's pretty new and experimental and we have been like working a lot on the DevX improvements released a new version today. Our docs are not up to date yet and skill files as well. But it's pretty good to see like how uh quickly like we are evolving in the X42 DevX um based on the feedbacks internally and from the outside. So would be great to see the hacks around that.
>> Yes. Yes. I'm excited. I also like obviously I'll be biased the the smart account kit kind of like track on the best agent. Uh I really like the agent to agent coordination. So I assume people will start using more the X42 uh side. Uh but obviously like you know leveraging our partner tech like oneshot API and venai I think it's it's actually quite uh quite cool and uh yeah and I think making make let's say the most out of it right like I I also recommend everyone hacking or everyone kind of like building something cool to kind of like document this uh tweet it out write some blogs write some kind of like proper readme that you can share also with your colleagues I think there is a lot of things okay sounds good um so we start talking a bit around making recurring payments with X42. So before actually like going into the build um with with Aush. Let's give some kind of like context. So I assume mostly people are um kind of like um socialized already what X42 has been has been around for for some times. we've been talking about a lot every time that this come kind of like from like you know in talks with with agents you need to have some kind of standard that actually like allow the the agent to do payments right and I think this is all about uh x42 right obviously this was inspired I think like the name is actually coming from the old HTTP uh h status right so because it was the 402 payments required but basically like x42 in a nutshell is is just an open standard right has been created and led by um like people like if I remember correctly like link uh there is a bunch of like also we have link also on on builder night New York if you're coming for for it comp but this standard is all about uh payments is fully internet native and those payments are done between kind of apps API agents or general like open source and building public AI systems right >> and I think >> yeah no Go for it.
>> Yeah, it's just like the one of the main thing that it solves is like you don't need an API key, right? Like and as we have been moving towards like agents not having the API case, >> your agents can pay per request and that's the best part of like having X2 for the agents specifically.
>> Yes, I mean I can kind of like uh like resume also painoint. I mean it's not a pain point but that's the current state of like finance, right? like uh normally you need to kind of create accounts, you need to add kind of like virtual credit cards, you need to kind of like managing different API keys, subscription uh even invoice, right? So instead all that you have basically like both machine and agents that can pay each other directly on on chain on crypto rails, right? And I think it's super exciting. So in this graph there is different kind of like type. You have the the client request API. You have the the 40 uh the the 402 payment required. The clients create a payment payload. Then the clients retry request with payment proof and then you get the payments uh both settled. First you got verified and then settled. Uh and then you have a full API response as a return. So basically the the the biggest positive things here is obviously like the the human side is not um uh involved right and this is fully programmable is obviously agent native there is a standard meaning also you building other agent on top are also allowing this standard for for cross border for payments and uh it's fully instant so I think uh we can watch a bit like uh some kind of like stats around what's the kind of the ecos system state around X42. H but there is a lot of things happening and I us like I think like you saw obviously like a lot of use case any kind of like use case that spark your mind more that you think okay this is very easy to understand.
I think like it it always goes into that direction where like my agent is able to pay for certain services like example like for example your agent is kind of into crypto thing and uh your agent wants to like do the trading right and now you as as a like agent might want to get some insights on like which trade uh trade is better to do big given on the token name or like big given on the token insights right and maybe there is a service that can provide you the all those kind insight there is already service that uses Xfro2 to give agent that kind of insights of poly market trading for the hyperlquid trading right and then agents can call this API using like whatever amount that is required to pay get the insights and actually then do the trade right so that's like this kind of things like where agent is able to do um a lot of things not having an API key not having to do a registration process just plain old money in your crypto wallet and able to use it uh per request is pretty good.
>> It's quite cool. Um and also like you know one of my best use case obviously you give like a virtual uh virtual card and then kind of like the agent can spend and pay and kind of like resell like different like um uh uh uh money payment. So I think it's very it's very cool right I mean there is a lot of different narrative right there is obviously like it's exciting to see like a full autonomous like agents paying for like different tools and API I think when I gave like um at the beginning like open claw some of this virtual card that was using x42 to pay I think was the what is that the x subscription or something like that was super interesting basically like getting getting like fully payment for that obviously you pay per request um on the API side. Um yeah, and I mean I'm excited to see more like how SAS are evolving with X42 coming in because obviously like this is fully removing the the traditional SAS uh bill uh building billing. So that's kind of like a cool part of of the game but also most important why actually are we speaking about you know X42 and how this connect with like 772 and Metam Mask itself.
Obviously because uh we are speaking about both a smart account we obviously delegating execution and meaning like what you can do you can literally delegate access to an agent to make payments and support and this support is done by X42 um and I think like you usually will get go more like further. I just want to give like some kind of like pre um preview on that. Um yeah I think automatic automatic signing is something that we discussed already. I think the gas abstraction meaning like we are um able to kind of like do this gasless transaction in terms of like agents and and actually having X42 underneath as a standard for those payments. So basically like you have less human interaction as possible is super good.
Okay. Um so just to give a quick like um um uh insight about like a preview of X42 and uh and you know where for example like I'm looking at the stats or like there are different kind of way let me share I think my one of my favorite and for the people that are joining now we're speaking about X42 whereas actually like we will build live uh in this kind of like um live coding session like something with X42 uh but before we just give some kind of like um insights about what is X42, why it matters. Um, one things I want to share is like for example kind of like the state of landscape of X42. There are two main um two main kind of sources that I always see. Obviously there is the X42 scan.
The other one is the I really like the H X42 payment analytics that we share. We can share the links also in in the chat.
Uh I mean and you can actually see overall stats. I really like both the discovery part, the facilitator uh part um and uh and and actually like going a little bit back and trying to understand okay who's running facilitator what's the current volume just to give you an idea there were around like you know four million transaction run by uh in the previous 30 days by facilitator and the cool thing is that you also see a full breakdown around ecosystem network and different kind of like stats on the top uh on the top servers and activity the one from uh Duna um I think is very also very specific and shout out to to the people actually like building it. Um he also like give a good uh volume processed uh in the in the past the past 30 days you have a breakdown of the facilitator so you see also what's the amount being uh being run and you can actually see a transaction facilitator. Maybe maybe we didn't give context but are you want to kind of like mention what is actually a facilitator and why it's kind of like important. So let's consider that you want to sell certain kind of services and you want to have like support for XRO right and you need you need someone to verify whether the payment request that is coming to you is actually valid or not right and also to settle that like for example like you got the payment request that actually needs to go on chain right so facilitator is the main part that basically verifies the payment request that is coming is it valid or not if it is valid then it also like tries to settle it when server send sends the payload. So it tries to settle and submit the transaction on chain and once that is done the server can basically send the the whatever services you were asked for as a server to the client.
>> Nice. Nice. Nice. Sounds good. Uh makes sense. Okay. Yeah, that was a kind of like a quick um uh a quick like rundown on where to check also the the further kind of like landscape around uh X42. Um so we shared both the links on uh export to scan and this is a big shout out to the guys from Merit and and Dun obviously like uh the guys from Dune and I think this dashboard is uh is built by Chris and yeah I would say let's uh let's continue here. So why uh on 7710 why is actually relevant for this hackathon itself? Um why why is so important?
Yeah. So like before that I'll like to share my screen and let's uh please a little bit more in detail to understand like uh what's the pain points as of now. So we we we saw this diagram briefly earlier right and uh if we if we go back to the older diagram right how XO2 works. So we talked about the facility data part we talked about server right we talked about client. So consider you you want certain kind of services you are the client you hit the API request to server. Now server like for a client they need to know like what amount is required for the services right. So since the payload is not applied in the get API as of now the server will send you the 402 payment required error now this client will be using this payment requirement to create a payment payload.
Right? So let's say if it is requesting 0.01 01 USD it will create a payload for that it will send the payload this time with the get API and it will send it to server. Now server will send that payload to verify to the facilitator. If the verification successful it will basically get back uh to the server. The server will basically what was what we already said right like um do the whatever fulfillment requirement to be done to service processing or something like that. It will try to settle the payment. If the settlement is settled is successful for the facilitator, it will be submitted on the chain. The transaction is confirmed, the facilator will send the settle request to the back to server. Now server once it gets that will return the response and the payment response which will have transaction links and stuff other stuff and this will also have the whatever service the client was requesting. Right? And now here we see the select the payment method. Right? What we mean by payment method is in XR2 there are different kind of schemes and uh there are different kind of payment methods and you can like go through uh those kind of payment methods here like what are the payment schemes so there is one scheme which is called ex scheme one scheme is called up to scheme and there's like different the both are have like different use cases in exact scheme you basically want to pay the exact amount and in the up to scheme you want to pay up to the up to amount so for example if you want to pay like if you want to give permission of using $10 to the facilitator you can basically use the up to scheme and if you want to do kind of one kind one of kind of payments you can use the exit exit scheme right and in exact schemes there are different uh what do you say the method as well so if you go into the exit scheme you will find there are different asset transfer methods right like EIP 30009 there is like permit to method uh then there is like 7710 method right so it's not something like that's a different standard. It's a it's a asset transfer method inside the exit scheme right and we'll be talking about that today. So one of the problem that was in the XRO2 earlier was that you are not able to do kind of subscription kind of payments right it is possible with the up to but the problem with the up to is that you need to do token approvals and we all know like the token approvals are riskier like sometimes when your token approvals are exploited you anyone can drain the funds out of your wallet and we basically don't want to do that we want to avoid that right and the way to do that is with the 7710. In 7710 what you can do is let's say like you are a metamas user or a metamas smart account user right you can create a delegation of saying that I want to give like I want to delegate 10 USD to the client now I'm giving permission to the client to use 10 USD from my account for a month for a week for a year whatever you want to decide that's up to you now what client will do is it will store that permission context or the delegation we We'll talk about what is permission context. Um but let's just let's just assume that it's storing the delegation.
Now what will server like other things that will happen same like if you see the previous diagram it's same like the whole flow is same. It gets the API get the payment requirement once it is getting payment requirement now at this point instead of like using any of the asset transfer method it will use 7710 asset transfer method and it will redelegate the permission. So, and it will like do open redlegation, right?
What I mean by that is let's say I'm giving permission to Franchesco that Franchesco can use like 10 USD on my PF, right? And now Franchesco is doing an open red delegation. That means that Franchesco is now giving permissions to everyone watching on the live stream to use 10 USDs from my account, right? And that's what like open redelegation means that you are using that permission that you you have been given and you are basically redellegating so that anyone can redeem those redeem those permissions right and that's what like the client is doing. The client obviously attaches like enforcers which basically restrict the delegation open delegation that no one can use it in a malicious way. So it will create a redellegation, prepare the payload, it will send to the server and all other things happen the same way. It will verify using the facilitator, it will get the verification, do the work to fulfill request, it will settle. Now here facilitator will basically instead of like the normal transaction or the transfer transfer from it will basically submit the written delegations on the blockchain. The transaction will get confirmed. If we settle it will send the like X XO payment response with the whatever fulfilled request was done right and now if you see if I have given $10 permission here till my $10 are like exhausted I don't need to worry about signing transactions every time the client can use those permissions and redelegate any number of times so if like the charge is 0.1 the client can basically do up to X protocols without me having to interfere in between. So it's pretty cool for when you want to give permissions to an agent from your EUA wallet and then that agent can basically use that permission from your wallet to do transactions. And today we will be like doing something kind of that. And if you see it's kind of unlocking a subscription kind of payment or recurring recurring payment schemes without like having to do a very large approval and putting assets on the risk.
So like if you have any like questions um feel free to raise it out.
Can F I see one question from John. Uh can F be in RC20 token or only native gas tokens >> in in if you're doing 7710 you can use any of the 20 tokens here.
So yeah >> and if you if you're using like permit to or like some other like asset transfer method one of the restriction there is also like for 309 the tokens need to support that particular um ERC and for permit to also like tokens support permit 21 but if you are doing like like 7710 it also back it's backward compatible so any of the 20 token uh you can use for the payment.
Nice, nice, nice. Yeah, thanks John for for asking and keep those keep those uh question coming. I think they're super useful. Uh let me check the chat. I think uh yeah, bunch of people saying hi and and nice. Uh but uh nothing much. I think uh yeah, it's quite straightforward. Um I know also lately this has been open source, right? So what does it mean for the ecosystem?
Means everybody can actually like integrate fork and building on top of it. Um but I think uh everybody's kind of like leveraging X42 in general for their eightway DAP.
Yeah. But I think that's a big move and step forward to you know build in public and open source it. Very exciting.
>> Nice. Nice. Okay. So um I think like we are good we give some context. So for the people we just uh uh we will share some links also. We just kind of like define a bit what what we're doing with the metamas cookoff. we defined what is actually X42 and now I uso like explain a little bit further uh when kind of like you know what is X42 also in a nutshell and why um X42 with 7710 uh and yeah I'm I'm excited to see what we want to build now >> so what do you want to build before we start >> we were we were debating we were debating different things before right like we kind of like said okay let's build this kind of like recurring payment and uh we kind of like wanted to go and start directly from the skill set. Um yeah like what were the option and what we choose to build?
I think like the the idea that I liked was like since like the all the tokens and markets are down maybe we should build xro API service that can roast a token given certain payment. So you can pay 0.01 01 uh USD on the main net to get a token roast. So if you want to roast Solana, if you want to roast ETH, up to you, up to your agent or up to your up to you to like choose which token you want to roast and we'll be doing that and we'll be not like going through all the codes by ourself. We'll just go through like what are the important pieces that we'll be using and then we'll be basically giving all those context to our friendly neighborhood like developer helping tools. You can use cloud code or we'll be using cursor for this. Uh but you can use cloud code cursor whatever you want. And that's it.
Let's see like how if it is able to oneshot or not.
>> Nice. And before we're going into a planning mode, that is something that we're always like advising to do it right. Uh what are the main resources that you suggest also people to check to like build these fundamentals?
Obviously, there are some of the X42 docs, right? Uh we also added bunch of like resources in the um let me check here. I I really like the resource map in the uh in the kind of aquest hackathon, right? where you can see all the X42 and 710 payments. You have both the overview and this is redirecting to the docs. I don't know if you want to kind of like share. So X42 payment here and we can share this one also in uh in the chat.
Um and uh yeah I really like also the part the the seller guide, the buyer guide and the recurring payments. Um oh you want to share your screen?
>> Oh yeah. So maybe we can then uh walk through and like start doing some some stuff. So as like we talked about like we want to build a service that basically roster token given the token name and uh it charges certain amount of money right so here we want to build both of the things right like we want to build the seller part as well because we don't have a seller that gives that kind of services so we'll build the seller part as well and we'll be also like building the buyer part right because we got the seller now we want to purchase that service from a seller right so we'll be building the buyer part as well in the demo and for that if you go to the XO2 docs that we already shared on the link you will be seeing the overview right and you'll be seeing here like again like what we talked about why 7710 is important piece of like X42 asset transfer method and you can also learn about more about delegations how they work we have already like taken like multiple live streams on how to do delegations what they are but in general like delegations are basically permissions that you can share with other accounts or smart contracts and then they can execute on behalf of behalf of you or the other account that has given permission. Right? So that's basically delegations and then you can see the guides. So you can click on here get to the set set up the seller guide one and you'll be seeing like how you can create the x2 server with 7710 and it's very simple to be honest is just this piece of code that you need to write to have a x2 server right as of now we don't have like um xro2 support of 7710 in the x2 packages from the foundation so we have created for time being like the metamas X42 package that you can use to have the X42 XE EVM uh ESC 7710 server scheme that we already talked about right 7710 is basically like scheme um that we'll be using right the exit scheme transfer method so we'll be using this and this basically here handles everything that needs to be done right it handles like the payment like sending the payment requirement part when the payload is not there it also handles like how to um basically verify um like call the facilator verification uh path and get the verification results. It also handles like the like the settlement part and then basically sending the response right and only this piece of code that you need to add and here in the in the guide like if you see we are basically sending a response which is called message hello. So every time you pay $0.1 you will be getting hello back.
Obviously, we don't want to do do that.
So, you will be changing whatever you want to send. Do some processes and send back the response whatever you want to send. But this is the guide and this is the piece of code that you need to write like write in your server to have that.
And uh it's pretty easy. If you go you can see the installation steps, you can see the configure middleware. You can read about like why we need to do this.
And it is basically the same thing. It talks about like um handling the verification and settlement part for you and uh that's it. And we also have like metamas facilitator. So make sure that you using metamas once because the other ones does not support 7710 asset asset transfer method. If the facilator does not support asset transfer method 7710 uh it it won't work. Your server server will not be able to like uh process the payments.
So this is the like guide and then you can go to the buyer guide and you will be seeing there is already a recurring payments guide right and in recurring payments what we'll be doing is we want to do a recurring payment of like um recurring payment from the Metamas wallet directly right so what we'll be doing is we'll be requesting the advanced permissions now you might be again like having like oh there are so many of like random words coming up. So basically we talked about delegations right delegation is basically giving permission to some other contract or account to execute any of kind of ongen actions. So if you want to do it via meta mask account you can request advanced permissions. These are human readable permissions that um your users can see what kind of um permission that they are giving and you can also see in the concepts how it looks like.
It looks something like this. So if you are requesting a ES20 token periodic transfer permission, your user will be able to see the time the weekly amount.
Uh they can change the duration from weekly to monthly as well. Set the expiry for that permission.
So we'll be getting that permission.
We'll be storing that, right? And then we'll be using the X427710 client to create a redelegation, right?
And now this client basically helps you to get the payment requirement once it has the payment requirements. Um it creates the redelegation. Uh the redelegation is happening from the advanced permissions context that we already got right. So I give permission to a dab that dab store the permission context somewhere. It can be either it can be either onchain they want to store they want to store in the file u filecoin or IPFS or like if they want to store it in like uh Firebase DB that's also fine anywhere it is fine is it's like unless the redeemer is a like doing the redemption if your permissions are even exposed it doesn't matter so basically we are using the same permission from the previous step if you see the granted permission we're getting permission And we are creating a redelegation. Right? We talked about like doing open redelegation. Here it is doing the same thing. It is basically redelegating permission context openly.
And it is like now what it is doing other thing is that instead of like we have given $10 permission to DAP right now DAP is not doing open delegation of $10. It is like restricting the payment to be as much as it request to be for the payment. So if payment requirement is $0.1, it will only redellegate $0.1 openly. So that is not exposing all the $10. So we talked about right like how the open red delegation can be restricted. This is one way to restrict the open red delegation. You can also restrict based on which facilitators can redeem those permissions as well.
Once you have the once you have basically the red like redellegation done you will be getting the redelegate permission context and you'll be returning this. So X42 pay X4277 time payment load require this three per like this three properties which is delegation manager. Delegation manager is responsible for basically reading redeeming those permissions on gen.
Permission context is basically the permission uh that has been used for the 7710 and the delegator right. This delegator is basically who is who is like the root delegator or who is like the per who has given this permission.
Right? So that is basically delegator and we are returning this uh back. Uh now this 7710 client right you can register it with existing se uh x42 client from the x42 package once you have done that you can basically create a new uh fetch with payment using web fetch with payment method again from xro2 it's basically a similar flow that x42 already has instead of like using their existing clients we're using the 7710 client from the like metamas x42 right once we have done that Right? You just need to make the fetch use the fetch with payment with the API endpoint and whatever the method is like method name it is like it's guest post or whatever it is and you will be getting the paid response back which will have like xro to payment response with the data as well. So that's basically the whole gist of what seller and recurring payments can be done on the like x42 and 7710. Now we'll be basically giving all this context to our friendly tools and we'll be asking it to build uh something which can roast a token um given 0.01.
So if anyone has any issues or something like that feel free to ask questions if you have any if you want. We have some uh I see some question uh what are the main security consideration developers should be aware of around the xro2.
>> So when you like for the for this one right like the 7710 one just make sure that whenever you are creating a redellegation uh open redlegation you are restricting it towards like the specific token amount in redlegation and the other thing that you can add is like redeem enforcers. So basically every facilitator has a address right that can uh basically submit transactions on behalf of servers right and those address can be um like enforced on the open delegation. So if anyone else is using the open permission apart from those facility tour it won't be uh redeemable it will throw an error on chain that okay this is not allowed to this is not allowed for you to redeem.
For example I give permission to Franchesco. Now Franchesco is creating an open delegation and saying only people who are active in Metamas community can redeem those permissions.
So anyone who is not active in Metamas community obviously they won't be able to redeem those permissions even if they got access to it. So those are the two um like thing that you can take care of when doing XR27 and payments.
>> Nice. Nice. Yeah, that's super relevant and yeah Jordy. Awesome. Yeah, we're always doing the the the the live coding session with like 001 USDC just to test it out or MUSD. Um yeah, and uh oh yeah, from John I see I don't know why I skipped it, but how does X42 prevent uh replay attacks or m use of session permission? I think you kind of already answered Aush.
>> So you can also do that. So if you if you want to restrict the permission to be used only once, right? You can also add like the limit enforcer, right? So I'm doing a open red delegation and I can say this permission can only be used once in the lifetime. So it has already used one onchain. It won't be a like it the anyone won't be able to use it again. Like it will basically again throw the error saying that okay the permission has a limit enforcer of one and it has already been redeemed once.
>> So you have also limit limit redeeming uh uh numbers you can also >> as well. So >> and if you want more information of which delegation like which enforcers you can use you can go in the docs you can uh basically go in the like if you go into the references right you will be seeing like the enforce caveat enforcers uh and we talked about the limit one right so >> yeah let me share this this is useful caviat enforcers >> so you can see there is a limited calls enforcer so here I can limited number of times delegate can perform executions, right? So if I add one, it will be only be able to redeem once. If I add two only two times. So even if the permission is like still exposed to someone else or the same person who can redeem it, they won't be able to use it.
Sounds good. Sounds good.
Just uh yeah, just sharing the cavit enforcer um uh link.
Awesome. Okay. Sounds good. Yeah, let's do it.
>> So, how do you want to do it? Let's let's start with creating a Oh, you want to basic uh maybe zoom a bit. Not sure if I'm seeing Hey, GM Harpov, it's cool to actually see you here. We should actually use a banker wallet with some uh some exclude transactions. Anyway, let's do it.
So we'll be creating um API right and let's go into that.
>> So we title this uh roast API. Yeah.
>> Yeah. So we'll be basically creating a server that can pro that can roast a token given the token name and then we'll create a front end that where a user can basically send the token names to get it roast and they only need to like give permission once and then they can use XO2 APIs any number of time till the allowance is not exceeded.
So we have open our like friendly tool cursor and instead of like agent mode we'll go to the plan mode. You want to choose like whichever model you want to choose right like it's up to you whichever you prefer uh codeexp composer we'll use like opus 4.7 for the planning mode at least um to see like what the planning has been done. So we what we want to do right like >> that's a good also tip right like planning mode is is super important and uh if you want to kind of save token always do kind of like planning mode with a top model and then you kind of like run the execution with like composable 2.5 or or something else. I think that's a good um uh strategy.
And we'll be using light LLM because I already have access to it light lm. So I'll be using light lm. But if you want to use openi um entropic APIs directly, you can use that as well. Llm is basically like um the go router like uh you can have multiple subscriptions in a single place. So I'm using that.
>> Are you also giving a context or you leaving the context first uh from the docs or you already pre-built the context space?
>> Yeah. So I'll be like writing out what you want to build using what and I'll be then throwing the context of the docs and like other stuff as well. So it it knows like where to search for particular things and not just like hallucinate on finding those things. So we want to use like LM to produce the roast.
The roast label can be whatever you the okay so you can also do something like this like you can have like roast level um medium savage or something like that and every like savage takes like instead of 0.0186 0.03 uh dollars as well. We don't want to do that like tier level but we'll be just keeping a single level right. The row should be savage by default. Um the roast should be the savage one. Um we want to give context about uh what the server should use.
We also want to say that to use since light does not have um like the TypeScript APIs they we can use OpenAI SDK with uh chart completion because so if you have not worked with like OpenAI uh like OpenAI SDK of chat completions by default like you have like the models inbuilt right and you can use that directly the connectors but if you don't have one like if you don't find your model and providers here you can use stat completion where you can provide the base URL and you can basically define the model and send the message and since like we don't have an SDK of the lightm and we want to like use it we'll be giving the base URL of lightlm giving our API key defining the model for lightlm that we want to use and then sending the message and it will basically giving you the content back right so it's pretty easy so we'll be giving this context as well to The now this like this is what we want to do for the like um for the server side right and we can say charge 0.01 01 USD on the base mainet, right? Um, use metamas facilitator because we know no other one supports it.
>> Are you also giving a context on the uh facilitator docs or you kind of like fetch it directly?
>> It it I will give it. So I'll give the context of the like get the all the details from the LLM files and it has like if if it will go into seller guide it will see the metamas information on the facilator which API to use and how to use.
>> What is your experience uh more uh deep context you give at the beginning uh before planning mode is better or you kind of like give context a bit like in the planning steps? I I think like the initial like if you give a lot of context to it, it will like able to oneshot uh quite a times. So I I spend some time to like write a good context for it. Um uh give it as much as we know that we want uh convey to the agent and not just say that okay build an X427710 uh project that does the uh roster token, right? That can be also one thing of wide coding but we don't want to do that. We want to do a proper planning mode and go through so we are able to maybe complete before 2 hours.
Nice. Yeah. Also in my experience I think also giving uh as much context at the beginning it's also like giving me giving more garals. Uh but uh but yeah it's also depend on the the scope right if you want to have a very specific scope versus kind of like doing a wider um uh planning mode that's also like a possibility. I think the most important part here is that you're using um a high planning mode um model uh to run the the planning mode like oppus uh like you just do the planning mode and then you move to kind of like a composer 2.5 or or anything. I think like there is still this debate around codex versus um oppus right that I'm hearing on on crypto twitter and more or twitter let's say that those day uh but uh but yeah it's it's a mix >> yeah so now we are giving the context for the front end and we are saying that for the front end we want user to uh user given an option to connect uh their wallet connect only metamas because only metamas supports 7715 right and delegation. So we want to specify that. So it does not use use vagi uh v3 right and it will automatically also since it is using vagme v3 I hope it will automatically use also the the metamas connect SDK uh hopefully let's see if it does or not.
Oh yes.
>> Once the con so uh like once the connection is done uh ask them to grant the advanced permissions right like like what uh and let's say let's default to $5 $5 weekly. Um right like so weekly $5 it can be like used by the tab right and once that is done um for the input have a small uh have a text input right for getting the token name from user once once the token name is given use um we want to create a redelegation right uh use the stored permission and we have not said here like where we want to store the permission so let's just say like uh store the advanced permissions locally right um so it does not like let's say like locally is basically on your browser storage.
Uh, use the given advance permissions context to redelegate redelegate and call the extra to API.
Right? like I I feel like this is the enough context that we want to give. Now we'll give the context for the we have given the context for the docs as well. So I hopefully it will be able to do it and if you want like we can give more context on the docs on how to connect uh using vagme as well if you want >> wag me or even connect right >> yeah wag me plus I think it will be figuring out its own let's see like if it is able to do it or not and >> let's see in the planning mode if we can use wagmi or even connect what he's asking >> and we can say let's keep the ux silly and playful Right?
Because it's a silly project or silly demo that we're doing. And >> I mean the the name say everything, right?
>> Yeah. So the question from Jordan is uh so we roast any token. Wonder if you say about Cardano of XRP. We will test it out.
>> Yeah. We can get the inputs on which tokens you want to get roasted. And just FYI, it is not affiliated with MetaMask anyways that whatever we are hosting is not affiliated. It's just like a fun thing that we're doing.
>> Yes, this is just a a session. We build something on specific just trying to help or at least support the people that are actually like um want to build something during this metamas dev hook.
Could be individual developers or or founders or just dabs that want to actually build something also with X42 in mind.
So let's see what are we getting.
Yeah, Wagi V3 should be able to pull.
Yes. Yes. Let's see. Excited uh Jordan that we are able to pull. I think obviously like this is supported. So let's see now in in planning mode. So you're using Oppus 4.7 for this planning, right?
>> Yeah. You can have like other ones as well if you want. By default, I go with the auto if I if I if I'm just doing the basic stuff and I think like by default it chooses the composer for the basic stuff. Uh but >> we can play around.
>> Does the agent mode also include the planning mode?
>> No. So agent mode as mode if you do the auto it will auto select the models.
>> Okay. You can get the whole thing and iterate over it as well. Yeah, that's a good point for not hitting the the token limits.
Sounds good.
Yeah. So for the people joining now, we are basically running this uh um metamas dev cookoff uh live coding session on x42. So this is part of like the uh let's say requirements vertical. It's not mandatory. Depends on the vertical that you're choosing. And uh yeah, we're doing this with different partners like Venice AI and um oneshot API. And yeah, we're basically like building it from scratch.
So good questions. If you see it is saying the Wagu V3, but the current stable version is V2, which I don't think is true. Um interesting >> because Wagmei V3 >> we can just feed the WagMe V3. Let me find the link >> the doc specific on how to migrate V2 to V3 right? Yeah, I think we can give it from the connect SDK as well, right? Like directly.
>> Yes, it's a good question. when the crawling happened last time on the docs.
I just hope like it does not has like a conflicting in the packages. And the second good question is it is asking is like advanced permission you still need a tab key right and who will be like having this tab key. So session accounts private key must persist somewhere right? Uh so maybe this is a good good one. Maybe generate a random one and store it private key machine locus. I think this is good. Uh should be doable.
Which model work should you say that?
No it should not. Yes.
Okay. I'll I'll need to stop sharing so I can see the URL of >> Yeah. I just don't want to expose some something that I want to expose.
>> Yeah. Like the the EVM uh EVM keys. Uh yeah, remember all times.
Yeah. So basically right now we we fed directly the the Wagmei V3 uh docs um in uh in planning mode.
We're kind of like try try to take it from uh from here. Let's see. We also like gave the the connect um uh the connect dock. Uh there is actually a migrate v2 to v3 uh doc 2. Let's see what uh what you will do and let me know when you want me to share again. Uh you look like I stopped sharing.
>> Yes, >> I think I can added all the context the thing.
Okay. So, it's trying to again like go into that mode.
Okay. So, it's doing that. I think it didn't ask like one more question that was like what is the pay to address, right?
which I should have asked because like you want to sell something but you want to define an address where the payments will be done for using your services and uh that was not been asked. So >> I mean yeah >> but can you actually maybe define maybe in the DAP itself will be like which which actually like interaction you want to have with each address maybe has been asked on the interface level but uh we already finished planning mode >> it's creating a plan so >> okay >> hopefully like it will have like all the things there >> yeah sometimes I'm I'm trying to be kind of like spicy on asking question uh uh after the planning mode like where I put actually the the the address where the payment will go.
So it it says like the stack is this one. Vagme v3 stack with the vagme connectors connect TVM smart accounts get package smart accounts get actions x42 to packages metamas x42 packages provides this and we can go to server side. So on server side it says like facility client exported. So server the with the this is the base uh chain ID exported to the pay exported pay to address right. So it basically will create an env and will ask us to add the pay to address there.
>> Okay. So we get the the payment address on the the env file afterwards. Okay.
>> Yeah. And >> actually I'm very very cool that it got the the connect uh Wagmei V3. H super cool.
And then we >> are Jordan that you are asking question in the chat. Sorry go for it.
>> No I was just like if you have questions we can take it otherwise like we can just walk through check it once and then just hit the build.
>> Yes let's do it. Let's do it. I think there is no other uh kind of remarks. I think the question was uh who is the payment address but if we can define that in the EMV afterwards it makes sense. Um front end side it looks quite straightforward.
Um what else are we where Oracle wise where are we getting the information on the token there is no need >> it will be just basically sending the token name to the lightm model uh for example okay and it will like basically get us the roasting it will find all the context what is need and we'll get get the roast done >> but is using some kind of coin geko API free charge or something >> just need to send the token name so if we say hiirect you or something >> the the latest Grock uh I think Grock API is is is giving actually like token prices and oracle prices through like I think chain link. Yeah, that's quite actually cool to know.
So you see this is also doing this thing like u it's restricting the redelegation towards the specific amount which we didn't say. It also is adding the redeemers which is a good thing we didn't mention. It is not mentioned in the guide as well but it's a good thing that it's adding that.
>> But do we want to specify the redeemer do?
>> It's always in the API. So in the API you always get like who are the like address and you can basically add them as the redeemers. So and then the payment payload is this and then basically hit the roast API huge uh connect metamask button.
It's a good thing. So he's using the use connector, right? Yeah, use connect.
Okay.
>> Yeah, it says like huge. So it will be a big button in front. Connect with >> we didn't mention anything about having a huge button. I think cursor also has a >> because you put kind of gamify this right. I think that would be >> I think it's this looks pretty good. And if you see it al also has example. Why it needs an infuri API key? I'm not sure.
We can ask questions, right?
>> Yeah, let's do it.
>> I mean, >> um I mean the pay to address is quite clear, right? You need to pay uh light lm API key. Yeah. Uh I mean on the RPC side, right, for deployment, I guess.
And we can check this as well. I don't know why like so.
>> Oh, this is actually nice. Yeah. browser UI >> you want to increase the size of the >> yes >> the permission store it and then redlegate when you want to call the API roast it will hit the back end of the next JS API verify and plus settle using metamas facilator it will use lid uh consensus uh one uh to do the chat completions get the response back send the response back and it will also store the session private key plus granted permissions and local storage, right?
>> Nice. This is super clean. Yeah. Yeah.
Yeah. Yeah. Let's do it.
>> Okay. The infra is gone to now an optional public noted later if you want.
>> It was written why was needed is for the RBC deployment.
>> Uh if you go I think a little bit before it's written why you're right. If you I copy pasted from connect quick start.
Okay. Okay, this is a good iteration on the quick start if you're hearing us shabas from from the devil team of MetaMask. Okay, sounds good. So, it's quite clear x42 uh also is fully supported here. Let's uh let's proceed with the the steps, I guess.
>> Let's help build.
>> Let's do it. I wish I could like multi >> Oh yeah, we didn't down uh we didn't use it like fast forward. So but if you want like you can change the model whatever you want. Uh usually if you are not time constrainted and if you don't want to do faster things and you want you can use codeex is also pretty good for doing it.
So is also pretty good because here you see like everything is already laid out even the code snippets and the links like where to find it and how to structure it. So like pretty easy to do it. So now >> yeah one question I always have is there is no preview of token right like in the in the model selection like I wish like there will be some kind of like skill they give me like hey this is the amount of token uh preview and this is the timing of um execution but right now we know like which model is kind of like fast versus more expensive but there is not like a preview of I think this is a cool feedback from K sorry if you're hearing Yeah.
>> Do you think it will short?
>> Let's see. Let's maybe let's break down the each um bullet points. So, how it does it start? So, scaffold.
>> Yeah.
>> Yeah. Okay. Makes sense.
And then it's add like once the scaffolding for next year is done it is basically will add an uh API path into the XR2 for the X42 in the next years where it will have X2 server that can uh you can hit to get the the roast done for the tokens and once that is done it will also add the light LLM which X2 server will use to actually get the roast uh responses from the light LLM.
Once that is done uh it will start doing the vagme integrations on the front end where it will be using vagme v3 connect EVM metamas adapter only because you only we say it is using metamas only uh connector because we specifically mentioned that we don't want any of the wallets to be connected only metam mask because we don't have support for 7 in front of the wallets right so that's the reason we are restricting it to metam mask uh and the app providers this is the pretty standard as well like the like how we add the prov providers.
>> Yeah.
>> Then going forward it's adding a session account. So um like you are giving permissions from like MetaMask to a DAP, right? So DAP needs to have a session account or some some kind of an EVM account where it can like where it can redlegate those permissions right as it as of now I have stored in the local storage. You should not do it. Maybe you can create a EMV uh add your private key there or maybe have a TE or like a embedded wallet server uh use that as a session account um where you are giving permissions from advanced permissions to that account and then that account is basically redelegating since we are time constraint and we don't want to like do a full production app we have kept it as a local storage where it does not have any fund or something like that but you should not do it not the production or like a hackathon advice to do and uh then it's permission store as well right >> yeah yeah yeah >> it will be >> permissions >> okay >> so you can revoke those permission with uh specifically right after if you want >> yeah you can if you want you can also revoke it from the metam mask so once it is done we'll be going through that like you will we'll be seeing the metam mask uh displaying that permission that you have given and no option to revoke that permission as well so once you revoke even if anyone has that permission they won't be able to do the transactions so it will be basically creating the uh the UI for requesting the permissions and the it will be requesting five week uh $5 per week USDC store it in the local store is pretty good in safe this is a good one because uh I I don't think it has big end but I think like should be good to catch that so basically when you want to store in the local storage you need to convert your uh permission object to the JSON and the JSON if it has like big it might not be able to convert it properly in the JSON object so that's why you always like kind of convert the big into string before like storing it so kind of good catch but I don't think we have a big in the object hopefully and then we have a new client where we'll be calling the redeem dele we'll be doing the redeem redelect get permission context 20 redeemer caveat doing a payment payload and then refeting the payment signature with the refeting payment signature header and once you have done that adding um like calling the API using like the payment signature and all the things it will be giving it will be using the metamas to verify and settle and then giving back the response that we want and then it's also having this like silly playful full UI connect grant budget row to input speech bubble result let's see how it goes I think it has done pretty good as of now as with read me as well on how to run and what installments uh or what variables environment variables to run >> what is your current experience on like what are the current blockers or how you kind of start verifying file he's executing. are you going through kind of like each um file of the folders like like I'm just trying to also like give insights to like people hearing us like what would be like some blockers or kind of small verification that you can can double check um as um as a senior engineer right like are you kind of crawling to the to all the folders checking the files >> I think the first thing you should after white coding is to see if it is working or not if it is not working maybe try to understand first like what is not working how it is structure has been done if it is working fine for you I would say like then it's also like go back to the code see what is doing because half of the time you can like improve the whole um how they have written the code a lot and if you're using cloud code you can try to use simplify um like simplify skill and it will do it will launch like three different agents for sub agents to do the review for your codebase and we'll give you proper input on how you can improve the whole name. So that's also pretty handy. Uh or you can say, "Oh, I'm a senior software architect, senior software engineer." You >> sounds good.
>> Know like the basics. I I I would say that because if you don't know what is happening, it's it would be pretty nightmare to debug sometimes.
And uh maybe we want to start to put u our payment address in the env file.
What is the MV file now? Um asking is just the payment and yeah it's asking the light LLM API key.
We definitely want to change that because this is the burn address. So whatever we paying would be going will be burning and it's not even a it's not even a volatile token. So it does not affect anything.
You're just losing the money right. We have this I'll be sh stop sharing my screen to just add the keys right. Yes, >> maybe.
>> Yeah, let me untoggle your screen.
Yeah, I still remember a time that people were sharing uh live ENV files and in few API keys everything.
Yeah, I know that's very cool. So, for people joining, we're just going through the uh uh live coding session. We're doing this for the Metamas cookoff. Um yeah, the goal is really like to going through some workshops. We we previously did one with oneshot API. Uh we did one with um uh yeah on on X42 today and there are yeah a couple of ones are also coming but the goal really is to kind of like showing also how easy is to to build something or at least thinking about it and uh yeah this is a one month long uh um hackathon and uh and they everybody's encouraged to do it not just um individual developers but actually dubs founders founders that really want to build and extend the functionality For example, if you want to build an agent on top of what you have already for your service, uh you can just uh you know leverage different providers like also X42 integration and and much more.
So yeah, more than welcome to to do it.
>> Let me know when you're ready. Should we do it?
>> I am not liking the structure it has taken for the next year's project. Not that I like maybe we could have given the context on the next year's uh project structuring.
one one time I started to giving like monor repos um and was actually working better because it was taking just the structure of the the monor repo but I guess like you know it's it's very hard when we have different text stack to to combine.
So how is uh how is um so how come you were saying it's you don't like the structure like what is kind of telling you that it's not it's not good.
>> I kind of don't uh keep it keep it this way. I want I usually have API and then pages and stuff usually and now it has like mixed app in the app and then the API which I don't usually do. uh and then I keep my server like server side file is in in not like together with the front end site files as well. So it's it's basically what I told earlier like if you keep pages and you go with the API route keep everything in the API once.
>> Yeah. Yeah.
Do you have like recommendation like doing like more CLI cursor view versus a cloud code directly?
>> I like >> Yeah. Yeah.
>> I think cloud code has like a lot of like context on like how I like my project as well. Uh since I've been using that a lot. Um so every time it even if I don't mention like it will by default uh go with the next years and the proper structure because it has already context from the previous um task. So that's that's a good thing. Or maybe if you if you are a developer, you can like if you doing hackathons frequently, you can like have like plot code in the memory that you prefer this so you don't have to mention like every time.
Okay. I'm worrying that it might work.
It might not work. Not sure. Handle nuke. What is this?
Handle nuke handle forget handle roast.
Okay, handle looks looks pretty. What is handle nuke?
>> Handle nuke if you want to kind of like down the >> nuke session plus budget. Oh okay. So it basically will kill the session and the budget that the permissions that we have given. Forget this budget will basically remove the permission I assume. Uh so we had to give the permission again. I it's doing the same thing. It's removing the permission. The new one is removing the permission as well. Plus uh what is it doing? Nuke one that is yeah clearing the session key as well. So you won't have any context about that.
Retry the next year build.
I hope like we have every environment variables in place right completed eight out of eight.
Do you think it will work?
And we even forgot to mention to use yarn and it has I think gives in the sin install. Let's hope it works.
I mean hope is all we can do in the white coding for initial run.
Oh, looks pretty good. Not bad in the UI side.
>> Interesting. Oh, this is cool. It reminds me the I don't know some kind of like old games.
>> Yeah. So, okay. So, it already it's my account is already connected on the local by default fetched it. So, it's using Metamas connect. We can also see like okay connect Metam Mask with the Fox logo. We need to change the logo to make it more in line with the so you see like oh I don't want to use this account let's use this account and this all is happening on the main net we are not doing the test net but for you can do the test net so we have connected the account now we want to grant rose spot a weekly budget right and we want to give $5 week budget >> actually is that you you are. Yeah.
>> Not configuring supported networks.
Okay. Wow. We hit the issue and I think I know what is the issue. Maybe sometimes I'm also asking to verify with all the buttons and uh verify all the flow. is actually giving me like a Yeah, it would be cool to actually have an agent that do the verification of the user flows uh including uh the depositing and connecting with uh with MetaMask. That would be actually very cool.
>> The requested method account has not been authorized. request account place for the user.
Now we need to go back and debug where it is failing. Right? Now we need to see now the funny thing is I can ask the agent to also do it. Uh go and check what is going wrong.
But for let's see if something is breaking.
Save permission.
It's requesting execution permission and it's passing chain ID as space chain ID.
Okay.
Formation required.
Required.
Okay. It's constant to session account address.
It's taking to I just want to see which account is connected to it as the data. I think we can do it as well.
Yeah, we're requesting information which file h is this like um uh sign in permission.
>> Yeah. Uh it's basically not able to get the permission and we want to figure out why it is happening. So we are just debugging the parameters that are going into the function to understand if something is not connected or not properly um being handled.
So we have the account connected and is this yeah it's the same account right so that's should be fine so it has account connected the chain we can check the chain also is the page connected so it should not be an issue right and and we can set >> there is debugger is there a debugger mode no I don't remember cursor had something around >> mode >> testing flows. Yeah.
>> So it says the requested method or account has not been authorized by the user.
Something changed here. What >> h >> you were already um logged in and everything. You already gave permissions.
>> No, that should not be an issue. Hm.
Why is giving unauthorized provider error?
It not it's not requesting. And we have wallet connected as well.
Let's ask our friend to debug.
Hopefully, it will be.
>> Let's see.
I mean the one thing I don't like about white coding is this because you don't know what has that written. It takes time to figure out.
>> Yeah, it's taking longer that actually figure out each. I mean if it's a permission should be like in the connector folder know or something like that.
Yeah, but it's easier to say, right?
It's harder to actually like spot the things should ask it to switch to Wagmi V2 and the older SDK.
I'm not sure if the connection is like creating it, >> which is a good thing.
>> V2 is is V2 more stable right now or Yu got Shabbaz in the Let's try to see what he's saying on the debugging side. If doesn't work like we can switch to V2. We have another like 20 minutes max uh to before an hour stop.
No, I don't think this is the issue.
What are you saying?
Let's mean while it tries to figure out we can also try.
>> Yeah, I'm going to try.
>> This is a classic >> classic.
Then uh connectors and permissions are another story.
>> It's it's it's doing though.
what we use we do usually adding >> but did he downgrade to V2?
>> No, but if it does not work I'll ask it to downgrade to V2 and the older one or maybe this is the issue. Hopefully it should.
Yep.
Works. So the issue was connection connector connection chain not been passed and when connecting it might have not uh fetch for the base chain ID and uh that's why might be causing the issue and it's work it's not work no it's not working it's just asking for connection again. Stop it.
>> Oh, it's just uh re asking for Can you check maybe the console? What is the error or >> No, it's it's not going there, right?
It's basically asking to connect again.
It's not going forward.
We can switch back to switch to or maybe we can give it a reference like how to request, right?
We do have examples.
Which version is I think this is also using Wii V3 only. Uh no it is using metam right I might be So hopefully I think it it might be issue because you have not tested with the latest connect SDK on the permission sharing so might not be giving permission and we're trying to request something that is not priced >> is a smart account kit and x42 compatible with the v2 version instead maybe >> yeah we support only v2 we don't support the v1 also on >> okay I just needed to hydrate a bit so we're getting there guys so if you're listening uh the UI lag yes looks Good.
Uh we are trying to see how we can actually enable the the permissions here and the functionality.
Yeah, that's always the downsides around VIP coding, right? I'm hearing more and more people actually building things from scratch. Um yeah, because debugging is is definitely like a a pain.
>> Debugging is a pain.
Let's say let's say that we were very courage courageous uh also Jordan to actually try out the V3 Metamas connect.
Um yeah even though probably there is not the compatibility but I mean if we know that we can also like now proceed with the you know downgrading to V2 that will be also an option.
>> Yeah. So we are not aware like we we didn't try it so I was not aware if it work or not but I I I think if it works with the v2 like the older SDK of the metamas like connect which was metamas SDK and the vagme v3 I think then we know um Okay, so it is switching to the Metamas SDK reinstalling and that is we got to know that we need to see what is failing.
>> Yeah. Yeah. Lesson learned. Every Litecoin session I'm always learning something new.
reinstalling. Okay, let's see if it reinstall.
It reinstalled. We can also do so it it again came back and said the grant code is otherwise identical to ours which means like what the agent has already done. It's the same on how to do it. The only difference is on the metamas it uses metamas SDK instead of metamas connect the newer SDK and uh that was the only difference that it it got. So >> the question from uh from Jordy here is advanced permission compatible with Wagmei uh V3.
>> It's not yet with V3 Wagme is compatible. We are using still the Wagmei V3 but we have just downgraded to Metamas SDK instead of Metamas connect TVM um for the connector.
>> So it's purely a connector issue here.
Yeah.
>> Yeah. So it's installing and checking in the connect DVM that uh like on how the permissions have been shared and we are trying to request an RPC method that is not allowed.
Yeah, this is very brave doing this in front of an audience.
>> That's fine, right?
>> Oh, yeah. Yeah. If you should do more this like not just for the uh dev cook off like we should definitely do it.
Let let us know also let us know probably also the topic, right? Because we're super happy also to build something with embedded wallet, something with connect. just give us also like a tech stack to to work with and uh and uh and if you're like a partner in the audience or an ecosystem player like reach out. We could we are more than happy to actually like have those uh live stream with uh with ecosystem partners.
Now let me update the page miner. Okay, let's let's see how much of updation it's doing.
Okay. So, it's adding the switch in as well. So, if we are connecting on a chain and then but I think that I think it's uh usually sensor does not require you to even connect uh with wallet it is parti to able to request the permissions without even connecting. We should have directly done that instead.
But since we're requesting web vi basically um stops at if the chain ID is not correct on what we requesting for.
So it's also handling now that case that if the chain ID is not correct for what we're requesting, it will first ask to change the chain and then like go forward.
What do you think, Franchesco?
Not one shot, but I think >> No, no. Let's uh let's see.
>> It's getting some error, I guess.
>> Yeah, if it's running in the background and debugging the background, it makes sense. But I don't understand what error is uh is giving us now.
The API reference config.
>> We can at least run on the 301 and see.
>> Yeah. Yeah.
Oh, my computer is lagging.
Yeah, longer live streams is getting also the laptop uh hot. Uh it's not just a a spicy uh coding session.
Wait, did you already uh deploy the new version?
>> So it's granting. See, now we have the request.
>> Okay, this we didn't add it before, right?
>> This was not happening before. It was giving the other the connection is not like allowed to do that. But now we are getting permission request of 5 USD and this is the expense time. Can we lower the the amount or no?
>> We can lower the amount. So even if like the best thing about sensations are you can lower the amount the in the app we have not allowed that but if you want like we can basically say if adjustment falls to true right >> and let's cancel this first.
do a refresh and you also need to change this. The connect button is showing twice.
So you see now earlier it was not allowed but now I can update it. So if I don't want to give $5 weekly, I can say zero let's say $1 daily, right? We giving now $7 a week and you can also change the start time.
Uh we don't want to change that. Cool recurring yeah >> expiry as well like till when the permission is valid. So it's like >> till 1 month the is valid >> and you can remove this or you can change the date as well if you don't want June it say >> is this timing uh is the timing uh uh implemented now or this is part of the the permission settings when you implement this >> you can by default add it but if user wants they can change it >> nice okay >> and it's if you see it's it's saying that we are giving in the USDC token uh one we say grant and then it's confirm okay the permission is given now you see session account delegation delegation manager we can either forget this budget or nuke session plus budget we don't want to do that >> no let's not let's not nuke it yeah this is great I like the actually the UI looks really fun yeah We got intern server error.
>> Yeah. Oh, we got it.
>> Yeah. No, we got internal server error.
So, we need to now debug more uh on what is >> Wait, why is that happening? Uh what you get in the output?
>> Oh, wait. Maybe since like it is already running since it's already running uh on the background um we rent again and we might have changed the server URL and the server URL on the front end might be different.
So that can be an issue.
It should be uh so this is the client one right and the fetch payload application JSON.
So, roast API path.
Let's stop this and run it on the main ch. Let's see.
fetch host API path.
Let's see if this works.
H. Okay.
Okay. From the origin has been responsive. It's not.
We might need to uh update.
>> Is it not like an art refresh? Um because we were actually debugging the meantime.
>> We need to update the call headers. It will do it. I think. Yeah, it's good enough for that.
>> Sorry. Can you can you repeat you? We need to update what the call errors.
>> Yeah. So it's basically saying no access control origin header is present in the requested resource.
>> Ah okay. Okay.
In the meantime the comment here from Jordan. You connector library going live with Metamas connect sometimes next week.
Yeah we are excited about that and shout out to the team for keeping in shipping things here. We definitely need to bring uh uh Shabbaz also like on he's leading de for um for connect like to do a live coding session on actually on on this um new new library too.
Interesting. At least now it's another problem like we are actually deeper in the in the in the flow.
Sometimes I feel like it it's Yeah, the phone. so big right now it's hard to actually write things and we're actually with oppus 4.7 I would wonder how to build this uh how would work with with a codex or something to see the difference um I find sometimes oppus for also the front end side it's is actually much more reliable but uh but codex is actually quicker but yeah I don't know if you have experience on that >> yeah I think it's because like we think using the high thinking mode, it's taking longer. If you don't use the high thinking mode, it will be uh relatively faster.
>> Makes sense. Yes.
>> And okay, we were doing pay and roast, right? And the end what happens.
Oh, it's not using X42 grind.
>> It's not using X42 for the payment part.
>> Yes, it's not. So, we need >> So, what wait how is doing the payment then?
to hit the API um uh get the payment requirements then use the payment requirements to create the payment load and uh then basically uh do the like again to hit the API once the payment payment payload is created. So we have an SDK metamas explorite and that handles basically everything uh on how how it should be how it should be done.
So not sure why I did that. So let's see if not we will give the context again to update it.
We might want we want might want to check the text for2 guidelines for the payments uh side right and give the context but we gave context right already we took actually the meta mask x42 docs um uh page >> it's no supported payment kinds load did from the facet right so let's hit the factor API to see if we are getting that First >> h you want to you want to see the response?
>> Yeah. From the >> from the facilitator side.
>> Yes. Because >> which facilitator is being run?
>> The Metamas one. But >> if it is not giving that information back, it might be doing a hard check or in hard check on that and basically >> yeah the error that okay we don't support that.
We could also like switch facilitator too, right? Worst case.
So it does not have if you see it does not has kinds and signers, right? And it is checking for that. So we just need to tell it to okay don't check.
>> Oh, you want to check it? Do you want to show it again how you checked for the the API returned? I think it's super cool for people to see. There is a path supported right?
>> Yes.
>> We basically hit the supported one. If we see the base one right the sapoleia one.
>> Yes.
>> We'll have response back and basically it is trying to check that.
So it >> get the return >> right. So asset transfer method supported right >> what is required and this is the signers which basically um we can restrict on the redras since we don't have that plus like the like like what methods are supported it is trying to check that and throwing the error if we see this is the no supported payment kinds loaded from the facilitator so it's basically failing on Nice. Yeah. Yeah, it's failing and it's giving you the Yeah, a quick uh wrong output. Okay, so that's actually cool.
>> And this is not just a debugging session is like a learning uh learning for everyone session based Sapoleia then >> or maybe not >> right now. What are we using?
>> We are using base but one is not returning uh the information back in the supported one and uh that's what is causing the issue. So we might change it from the base to >> base support. Yeah.
>> So we're going test net.
>> Yeah.
>> We want to do on the main net but >> no it's fine. It's fine. Let's just uh I think Yeah. So there is no need to change facilitator at this point.
>> We it will change. Oh wait, I need to check if I have the funds or maybe change to >> let me check. I can um let me check if I sepoleia.
>> Yeah, >> I just saw Jesse also like answering the tweet. So we can get the can get some sepoleia. Someone from our team is also like a Bipolia whale. But yeah, this is why I like those live stream because it keep us like crashing things, learning things, and building things live in front of everyone.
>> I hope we just not running out of time.
Yeah, it's worse. It's worse.
>> I think I just need to bait Sapoleia faucet just because of like upgrading it. But I have mainet funds. Why do I need on Ethereum wallet always?
Just annoying sometimes.
I'm checking her every account that I have to see if I have Okay, I have base.
Let's go.
>> Oh, let's go. Do you use the faucet right now or you add it before?
>> I had before. Uh circle faucet.
>> Those global hackathon were worth our time.
Okay, we have USDC as well. So, >> yep.
>> Once the code has been changed, we can >> you use the circle bridge. Nice.
I just didn't like that it it on the buyer side, it has not used the Metamas X2 package. I can direct it to use it but it will it will take again like time for it to change and I already little bit on the edge.
Okay. Okay.
Nice. Nice. And uh actually on this topic if you guys are coming also to um ETHCOM for ETH global New York or like New York Tech week we also having a full panel on Agent Garles and uh and X42 and we will have also like Lin Ka one of the co-founder initiator and uh yeah would be great to actually like speak about Agentic A28 payments. So yeah just come say hi. I think it will be will be a great um uh and everybody's welcome not just individual builder everywhere dubs founders and people that want to kind of like build this ecosystem further >> and for just information let's just make sure what is happening oh change the facilitator oh Is it not uh automatically changed you think?
>> I'm not sure but I'm just just added it like >> sure >> in in the folder where we see the facilitator logic uh we probably >> so it's already set in the constant to that one. So >> okay.
>> Yeah.
>> Okay. Let's let's try on the sapoleia base if it works.
We restart the restart the servers.
So it says switch to base. Yeah. Okay.
Switched.
We forget this budget. We want to grant a new budget, right? We don't want this request permission. So existing permission granted on the base of the test net. Okay. Do it.
>> So >> yeah. So we are granting the permissions >> server.
Okay. I know like where to fix this.
>> Oh, is that the redeemer um redeemer uh permission?
Yeah, it's in the here. So, it does not has facilities as extra I feel we are almost there.
Oh yeah. I mean it's been like tons of like debugging experience here.
So how do you know there is an enforcer um problem?
>> Right. we won't be able to uh add the enforcer and if we don't ending the infoser it's trying to access that value it will throw the error so and that is throwing >> oh you have a managed update on top on the right maybe you want to take out so we see the full metam mask there yes >> something is happening it's taking long >> wait something is happening do we want to check the log in the same time like I should do like a drum a drama music. I wish stream is giving us that.
This is like a an action movie.
Uh some error but what is that?
>> AP 4 to 1 in 10 milliseconds.
Yeah, it's correct, right?
>> It's uh correct.
That's why just one last change that I want to say to us to see use metamas.
It returned empty response.
install x for do what is installing now 7710 client >> yeah it's returning empty response because I I didn't wanted it to handle everything by itself so it is trying to hit the x42 API get the payment requirements then like check the payment request everything but we already have x42 package for that and it should not do it on its own I thought it would work out but I think it's it's like starting to not work out. So I just like gave it docs again and said that okay use what we have in the package and not do something of your own not >> yes.
So it is as if you see it is now rewriting to use metamas x42 plus x42 to client plus x4 to p f patch right this is the ideal way to do it where the fetch one already handles everything of payment requirements and stuff. So you don't need to worry about this things and it will it will remove a lot of code. So if you see the code have been removed 130 we don't need types as well because types already there. So >> Oh that's actually cool. Yeah we're cleaning up. Yeah, cleaning up before we even got it to work. Okay, >> it's fine.
>> It's fine. I mean, we don't get the server the server ID, right? What is the error that we're getting now?
Okay, we're waiting for the response.
It's in the flight mode.
>> It's in flight like our >> I think it it might also be that the lighter lang is not giving anything back >> is uh do we have another like uh comparables >> the payment like it it got the payment requirement back right in the header?
>> Yes. Yes, if you see it has get the payment requirement B 64. It basically uh decoded that. It created another X42 payment requirement with the payment signature using the decoded payment signature to create navigation and stuff. It send it back and right now it is in the flight mode right so the API response has not been completed. So that means that it is going to server properly but server is not able to maybe generate the response and it's returning this >> interesting >> for that we can check uh change maybe we can just say that server does not need to send uh what to say >> is recognizing uh pay like the the token itself right >> yeah it's it's doing and all the other things but I think it is failing here.
So what we can uh try to do is uh okay the roast token one we can go here and maybe add console log uh see completion and uh we will get uh to know whether whether it is like this issue or some other issue. Right? Like what is the >> something wrong and if you know that this is the issue we have debugged what is the cause of why it is not returning and we will have to restart the server again because >> yeah also fun fact like literally four minutes ago Antropic released uh 4.8 eight. I don't know if we're able to change already in the console, but no, it's still not yet there. I think we should restart a cursor, but I don't know if it's relative, but let's see.
>> But if you doing a typo in Pepe is actually like getting the the token itself. I'm just curious. So again like went to the API right now roosting pap token we have got the response back the completion uh and what is the completion.
Okay it got completion back right. So created completion roasting puppet token. What is the completion dot choices right and it has message object as well so it should not be an issue we can debug this so roast token has been done it got response Is this not sending response or what?
Now it's not sent before. Was it right?
So we can check your roasting token. Pepe getting the response.
>> H okay Pepe. We got the response as well.
Pepe is what happens when >> did I miss the response?
>> So this is working this next year response.json right. This is not working.
>> Can we take out the No, the response part. No, we need it, right? No, the concept is not working. Uh and this is being called from the X42 server which is here. And it is hand has this handler factor and every time this handler is been called it will use that one. Okay, should work now.
This one, right?
Oh, there is one other issue can also be there which we can check in the pay fetch payment bill.
Okay, this is fine. So should be.
So it says that's the facet call hanging or failing and it's checking if it is working fine or not.
I think we can give five or 10 minutes more. If not maybe I'll just debug and maybe push it on a repo and record a demo.
You are in a fully Sherlock Holmes debugging mode.
Yeah, but I mean we already got the majority of the build. Uh we had three main uh debugging parts, right? The first part, the second the grand and caveat enforcer one. Then we kind of find out the last one was the uh the server crash right on the on the token.
>> So if you see um once we got the 402 we build the payload we send it back and we are still getting 402. So that means either the verification part or settlement part is failing or like >> what is actually courser reasoning telling us like uh instead actually trying to debug directly is it trying the APS directly and see if the facilator URL is working fine or not.
>> Mhm.
So it is adding the settlement and point actually returning uh so we can have more issues uh like more information on what is the issue is uh and once we have like the response logging for the factor we will be able to figure out >> that's why okay H.
H.
Okay, let's try to run it again and uh >> are you restarting?
>> Yeah.
So, we will see what are the issues we are getting where it is failing.
It's roasting puppy token.
It got the roast response and I feel now it is trying to hit the settlement. It will get the issue if it is there and it's taking like around a lot of like time to even fail. So something might be going wrong.
So what will be like options like for for people hearing us like uh are we going in like is there like a de debugging mode for testing user flow on uh on >> flow like testing the user flow now why why the server is not able to fulfill the request and um so everything is working fine apart from like the facilator is not able to do the settlement might be might be sending something wrong. Uh some >> but wait what what if we're just changing the facilitator directly?
>> No, we cannot right. So you see it says like the factor settle failed. So settlement is failing apparently and it does not has an issue of body preview. So >> yeah.
>> So not sure like what is the issue here now because verification was passed right? So there is no issue in the verification and since verification passed it's not the delegation is doing something wrong. It's like it does not as information as well.
Hm.
I mean the settlement is this part, right? The first the first multiple parts actually worked.
>> The verification also works. So like the payment response that we're sending should be correct on what we are doing.
And I just want to do one last check while creating redelegation if you're doing something.
>> Yeah. Yeah. Yeah. Yeah.
>> Okay. Redlegation is open and we don't have any uh ready for so that's also good and we have payment requirements and everything is fine here I can ask it to change it to like base mainet but wait do you think if it's a facilitator things how this will change if the settlement is not being done what I mean I guess I will assume the settlement on volume is same right?
>> Yeah. And we need to check like why the settlement is failing and not the verification because if the payment payload we are sending is not correct the verification part would also fail not the settlement only.
So, so if you see it says like the settlement path is failing.
Now, what do you want to do? Maybe we can like stop it here or maybe can like >> Yeah, >> I can.
>> We really have an art stop but um in in turn we need to do also like a quick break after two hours of live stream. I mean what will be like the next steps uh in terms of like debugging here like either changing facilitator I don't know how base mainet will be I mean h how this will change right the settlement side >> but we can try as less >> last try test >> is it like the amount uh a possibility because the amount is too high >> we have the amount right like uh the amount should not be an issue And wait are we are sponsoring uh are we doing sponsor transactions? Yeah. Right.
>> So facilator so the transaction needs to be sp like the transaction will be redeemed by the facilator. So it needs to have money.
>> So it's facilator who will be basically redeeming the delegation. So no need to have like um like money on the front end. I just and my account is already upgraded to like 7702. So that should not be an issue as well. If it would have been issued like it would have failed on the like um what do you say >> the the delegation side >> okay maybe I know the issue now >> tell us tell us is it >> Wait why are we reverting I think I I know issue.
>> This is like rogue rogue vibe coding. Uh >> yeah, I think I figure out the issue why why it is failing.
>> Is it on on the settlement side, right?
>> Yeah, I I think I I the settlement side is failing because we might be doing something very stupid and that I got to know right now when I check the accounts properly.
So it's on uh it's on the wallet side or on the >> on the front end side I would say >> front end side this is really >> why verification verification was not an issue because verification should have failed as well but let's go let's do first thing disconnect. We do connect.
>> Oh, we didn't we didn't uh reconnect and disconnect >> with a fresh session.
>> I think like we might be on the wrong wallet when we doing it when we granted the permission, right? And uh >> so we didn't start completely from scratch. So we are on the >> as well because the delegator is also right. Oh I I don't think it should work but if it doesn't like maybe we can stop and I can go back and like debug it more. Okay.
Okay. So it returned very quickly. What?
>> Right.
>> We are in a So what is zero is n right? Settlement decoded. N >> I think we can like go back. I can like debug it more and share it from the metam handle or demo.
>> Yeah. No, we can we can share it more. I think it's good. But at least like we kind of like finalized uh like also the last part with like restarting completely from the uh from the permission side.
>> Yeah.
>> Okay. I think it's uh I think it's good.
Wait, in the meantime I will share quickly uh my uh screen.
Give me a sec.
So So what we kind of So what we see today, right? Right. So we kind of like v coded this permission uh uh requirement payments two. Uh one things to say is that is for the metamas dev cookoff specifically on the uh x42 side here are the full uh um full kind of like track right both on the x42 side and 7710 3k best agent 3k. So you can target multiples. Um I think like also try to actually like get acquainted to uh different um uh different um uh text stack like the one from one short API, the one from Venice AI and uh yeah just document everything like and I think like also like our doors are always open so make sure you just come and say say hi if you have any problems we're here to support both on the on the Telegram developer or just de the the Metamas developer handle.
Uh and uh and yeah, I think that's that's a little bit it. Uh we are two weeks in, right? So we have uh another like another two weeks at least that you can run. Please don't arrive the the last couple of like days for the next couple of hours.
>> White coding can bring you in the debugging issues mode and >> you might not.
>> It's also positive, right? We just did Sherlock Holmes debugging. I think like we were quite successful in the first and second debugging part. We also solved the redeemable um the permission uh the connector wallet uh on the Wagmei and Metamas connect side. Uh so I think was was a quite uh uh quite learning scenario. We will just follow up with the last part but but basically I mean the the UX was not just fun but also like quite quite amazing. I was not expecting that. uh in uh in less than two hours.
Yeah. And let's get some hydration happening later. Uh that was a long live stream and thanks for also everyone u for uh yeah for just you know asking question but most important asking spicy question and comments. Uh without this chat definitely like this was will be less engaging. We definitely don't want to kind of like speak speak with each other while uh while while coding this and uh yeah if you have also other topics if you want to build also with X42 with other specific like text let us know we're happy also to schedule an edoc live stream like this one and yeah thanks so much Aush uh for like uh keeping up with the pressure with your Sherlock Holmes >> I'm disappointed I we wanted it to work >> I mean we are having our next uh uh our next live stream next week, right? So, if we're actually solving, we can kind of like start startled with this showing like the the run build. So, it's it's not just a metamas dev cookoff that is one month. Maybe you can run actually like a multiple part live stream.
>> Yeah, I think that I think that's good because some maybe you can do that like a multiple live stream where you build a server and then front end then keep on building out that project on something that is good.
>> Nice. Yeah. Yeah, I like the idea. Let's do it. And thanks everybody behind the scene that make this uh live stream happening and uh yeah, everybody, we care about X42 and uh all the ecosystem partner that we're building with. So, it's it's just exciting to to be part of uh everybody's journey. Awesome. And keep building and uh yeah, keep trying, keep debugging and uh yeah and uh looking forward for the next uh live stream. Thanks everyone and thanks
関連おすすめ
Free TON in 2026? How I Tested This Reddit TON Tool
SirenHead-z9y
2K views•2026-05-28
Are our DeFi tools becoming too easy to exploit?
saidotfun
228 views•2026-05-30
Solana Unchained ($UCHN) Explained: Solana’s Next Big Utility Project?
CryptoVlogOfficial
339 views•2026-05-30
🚨 Access Network App FREE Withdrawal to MetaMask?! Only 25M Supply 🔥
Airdrop26Alpha
459 views•2026-05-28
GDOR tokenization amid oil shock hedge
sam.dmitri
720 views•2026-05-28
⚠️ALGO Has a Very Bright Future! ✅ One #Crypto Everyone Should Own!
MetaShackle
184 views•2026-05-30
BingX EventX: Trade Sports, Crypto & Global Events With One Click
AidenCryptox
311 views•2026-05-31
XRP IS GOING TO VANISH! A SUPPLY SHOCK IS INEVITABLE! (THIS IS THE PROOF!)
NCash
2K views•2026-05-31











