Fixes a RuntimeError in 'X402Gateway.execute_x402()' when called from an existing event loop by proposing the implementation of async methods for all relevant functions in the repository, improving compatibility with frameworks like LangGraph, FastAPI, and Jupyter.
X402Gateway.execute_x402() uses asyncio.run() unconditionally. asyncio.run() raises RuntimeError: This event loop is already running when called from any context that already has a running event loop — including LangGraph agents, FastAPI request handlers, and Jupyter notebooks. Since AgentWallet.x402_tool is the primary interface for LangGraph agents, this is a guaranteed crash in the most common real-world usage. Related: We need to have async methods for all our methods in the repo.