From 3af292a94d47ab6406405dba690396868d903a3c Mon Sep 17 00:00:00 2001 From: James Riehl Date: Thu, 19 Dec 2024 17:27:10 +0000 Subject: [PATCH] chore: rename endpoint to connect --- python/src/uagents/agent.py | 6 ++++-- python/src/uagents/asgi.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/python/src/uagents/agent.py b/python/src/uagents/agent.py index ee76d93d..c54b9ec5 100644 --- a/python/src/uagents/agent.py +++ b/python/src/uagents/agent.py @@ -432,8 +432,10 @@ async def _handle_get_info(_ctx: Context): async def _handle_get_messages(_ctx: Context): return self._message_cache - @self.on_rest_post("/prove", AgentverseConnectRequest, RegistrationResponse) - async def _handle_prove(_ctx: Context, request: AgentverseConnectRequest): + @self.on_rest_post( + "/connect", AgentverseConnectRequest, RegistrationResponse + ) + async def _handle_connect(_ctx: Context, request: AgentverseConnectRequest): agent_details = ( AgentUpdates( name=self.name, diff --git a/python/src/uagents/asgi.py b/python/src/uagents/asgi.py index 899f8962..3f4ceb68 100644 --- a/python/src/uagents/asgi.py +++ b/python/src/uagents/asgi.py @@ -29,7 +29,7 @@ HOST = "0.0.0.0" -RESERVED_ENDPOINTS = ["/submit", "/messages", "/agent_info", "/prove"] +RESERVED_ENDPOINTS = ["/submit", "/messages", "/agent_info", "/connect"] async def _read_asgi_body(receive):