[Music] I assume if you're here, you're going to be building on top of the polygon tracks and you want to know the quick start or might be a 101 of what we want you guys to make today. So, I'll be just going over the material that we have, uh, the resources, the links. I'll also be running a small demo to just show you what we expect and what to build upon. Uh so basically first uh to get things give you guys all clarity. Uh for this hackathon we just have a payments track.
Uh there's going to be one track and you have to make a solution for agentic payments or any kind of payments and use a protocol for called X42. X42 is basically a payments protocol which makes it easy to do payments through APIs. Uh which the good thing about this protocol it hides away the blockchain complexity to something called a facilitator. The facilitator is the one which is handling the blockchain side payments and RPCs and calls and any agent which is on the internet can do payments through XRO. Um if you can see this link over here uh basically this is the main link that you have guys need to follow uh already shared on the TG already shared on the resources page already shared on the ETH global site you have to follow this let's go through one by one what X42 is so X42 is an HTTP native microp payrains protocol which allows us to monetize APIs and digital content on chain it uh allows us to enable programmat automatic payments.
It supports both human and agent payments. So, uh basically we have created a guide for you here for you to run X42. So, if you want to just start make a small demo on your side, test how to do the X42, you need to clone this repository over here. You have to set it up basic uh express and ts everything's in the TypeScript language. You have to create an env file.
Put your private key. The facilitator URL is the same. This is the URL that you're going to be using. Every project that is building on the polygon track should be using this URL to do payments on. And then this is the payment address.
The address that you'll be paying to. Uh these are some of the basic details that I went through. Now I'll just explain through a flowchart what X4 X42 is and how the payment actually happens on the protocol side. Uh let's just say there are two entities here. There's a buyer and a seller.
There's a transaction between the buyer and the seller. So what the seller is doing, it's advertising something called the weather data. It is monetizing its weather APIs and saying that if anyone wants to access this proprietary weather data, you need to pay for it. The buyer is an entity which wants to pay for the weather data and get the weather data. So buyer basically puts a get request on the weather endpoint and he gets here the so here the buyer and seller are basically AI agents or any entities that we want to do a transaction.
We essentially for this track want to focus more on agentic commerce and how the X42 protocol will blend in with AI agents. The seller sends back 402 payment required and the requirements in this requirements basically the seller sends which address to be paid on what amount should be paid. So for example the weather endpoint it wants to monetize it for let's just say $1. So in the requirements field the seller will put the address to which the buyer should pay the $1 and amount $1 as well. And then the buyer makes the payment request and then the facilitator is a third entity here which basically settles and verifies these transactions.
So the payment is verified and what happens is the buyer again puts a get request to weather with the payment information that it did. After doing that, the facilitator once again verifies the payment and then after everything's done verified, the weather data along with the receipt is given back to the buyer and then the facilitator later settles the transaction on chain. So this is the whole flow of X42 which is an open-source protocol for AI agent payments. Uh I have a quick demo here which I'm going to run for you guys. I hope that you can see this.
So as I've said here I'm just I've just cloned this repository over here. There are two important files here the buyer and the seller which are going to these are two entities between which the transactions about to happen. So what I'm going to do is first if you can see in the uh terminal here I'm going to start the seller. So it's saying that the server is listening at the local host 4021. This is the paid endpoint.
local host 4021 is a paid endpoint here and the seller's advertising it and telling that uh this is a paid endpoint. Anyone who wants to uh get the access to this data at this endpoint should first pay. The second entity comes over here which is the buyer. What I'm going to do is going to first actually curl this endpoint to see what are the requirements that it presents. So I curl this endpoint.
What I got is error X payment header is required. So as I said before that in the first step when the buyer puts a call request it puts that payment is required. So without doing the payment the buyer cannot basically access that endpoint. Okay. So we get this error uh and we get all the data.
So we need to pay to this address we need to pay this much amount. All of the data is given over here and it is sent to the buyer. Okay. Then what I do next is I put node buyer. I'm going to run this again and using this wallet address the buyer is going to be paying the seller.
So I did this and it going to take some time and then what is going to happen is this step where the buyer actually signs the request and sends it to the facilitator and the payment is made. So if you check over here the success uh the request was successful uh the data is sent this is just a basic data set that I'm showing you just for an example. So the weather is sunny the temperature 70 is just a basic data set we had to pay to this address this is a transaction you can check this on the ammoy as well and the network is polygonoy which is a test net of polygon. So this is the whole flow. Uh this is just a basic example.
We just wanted to show how two entities basically act here and we can do a payment to X42. Let's come to the main important part here is how you are going to be using X42 for all your projects. Okay, you might have got some ideas here. Let me give another idea. So this is cursor.
Okay. Uh many of you use it. Most people use it for making their workflow fast, for debugging, for writing code. So what happens in cursor is there's a feature you can integrate MCP servers into it. Okay.
So what is one of the ideas that I'm just throwing out ideas here just so that I can guide you towards what we're looking for is that this uh MCP tool that cursor agent wants to use can be made paid. So here basically what we did is make the endpoint paid. So if I can show here this is a seller script. We made the weather endpoint paid and the local host uh to 4021 the local host paid. So instead of making an endpoint paid what you can do is make a MCP tool paid on a server and every time the agent wants to access that MCP tool.
MCP tool can be access to data can be accessed to some uh specific tool uh anything else. So whenever the agent wants to access it they need to make a payment to access it. So this opens up uh a whole new avenue for agentic commerce. any two uh agents that want to transact between each other. Any agent which wants to do a transaction for a service, for example, let's just say there's a digital content service going on and the agent wants to buy the digital content.
This uh transaction can happen through X42. Uh so you might all be having a question that why are we using X42? Why can't we do it with crypto? There are so many other protocols. U X42 is a standard that is getting widely accepted in the industry.
uh polygon along with bass sol are some of the supporters here. Google as well as cloudflare as well as versel has also announced support. This is going to be a start of a age where uh there's um fundamental protocol people use a fundamental protocol like x402 and standardized payments between agents. So instead of maybe using thousands of libraries, thousands of uh protocols, what you can do is use a standard protocol that is getting accepted everywhere by Google, by versel, by cloudflare. And what you can do is you build on top of it.
The two packages that you need here are also listed here. So we uh have given this demo in Typescript. So the export to express package and explor fetch package are the two packages that are necessary here. uh we have currently support for polygon on the typescript implementation of things. So we also expect that you build on typescript.
You can maybe use some ways to maybe make the agent in python and then do this integration in typescript through express. But currently uh polygon is only supported on the typescript implementation and you need to use the express and fetch packages to do this. And another important link or point over here is this URL. This is our internal URL which we're going to be using in the hackathon which is a facilitator URL. Uh to go in depth about the facilitator, it basically verifies transactions and also settles transactions.
So if the buyer wants to make a payment to the seller, the buyer does not need to pay gas fees. The gas fees is handled by the facilitator. It's basically a pay master and that settles a transaction for you. So that's another thing. We have funded the uh facilitator with a lot of polls so that uh we you can do a number of transactions on it for testing and basically by cloning this repository and trying this out once you guys are going to understand the flow how things work out and you can do and implement it in your projects.
Uh let me throw out some more ideas over here. Uh an agentic marketplace where agents make payments with each other. Uh I told MCP tools already. So uh find novel creative use cases where agents necessary to make payments. This is not only for agents.
Uh you can also find might be use cases where microp payments are there, subscriptions are there or there's an API which you want to make paid. Anything that involves APIs, payments etc. X4 is useful there and we basically accept uh expect that uh the hackers that are building on polygon track find novel use cases. Uh let me give another example. Cloudfire recently released this example yesterday.
So what they're doing is whenever you visit an AI agent, a crawler visits a website. Uh what happens is it wants to scrape the website. But uh what Cloudflare does is before the AI agent is authorized to scrape the website, it puts a it makes that uh basically URL monetizable or paid let's just say then before the AI agent is able to scrap scrape the website, it has to make a payment to Cloudflare through X42. Cloudflare has also integrated this and if it makes the payment after the payment it needs to show that the payment has been made and then cloudflare will basically allow that AI agent to crawl the website. This is another use case.
It's called paper crawl. Uh you can also check this out. So uh the possibilities are limitless. Uh your imagination uh you use your imagination think of places where this is the most useful and uh so this is basically more of an AI agent project if I get it right. And the at the end of the day you just need to use X402 use polygon for settling these transactions.
I hope I have been clear and if like people have understood you can just give a thumbs up so that I know that you guys are understood. Uh for anything Q&A you can come reach out to us at the polygon booth. We are ready to support you. Uh another good thing is that you don't build uh in the isolation yourself. You come reach out to us tell us your idea.
We might guide you to the right place. Uh also the thing is Polygon is going to be supporting X42 very uh uh rapidly and uh is going to double down X42. So making a project in this early stage is very good for you and might lead to later opportunities as well. Might be in the form of grants etc. if the project is pretty good but uh this hackathon is a start.
Start with this build a great project try to win the track prize and then uh we're going to be offering more support for builders on X4. Uh uh that's all for my talk and uh you can reach out to us at the Polygon booth at any time. Yeah. Thanks. [Music]
Automatic transcript — names and jargon may be misspelled.