@clawpump/claw-agent 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12188,17 +12188,19 @@ def post_wallet_transfer(body: WalletTransferBody):
|
|
|
12188
12188
|
|
|
12189
12189
|
|
|
12190
12190
|
@app.get("/api/x402/search")
|
|
12191
|
-
def x402_search(q: str = ""):
|
|
12191
|
+
def x402_search(q: str = "", network: str = "solana"):
|
|
12192
12192
|
"""Search the x402 marketplace via the ClawPump MCP (``dexter_search``).
|
|
12193
12193
|
|
|
12194
|
-
|
|
12195
|
-
|
|
12194
|
+
Discovery (Dexter + PayAI aggregation) and ``network`` filtering live in the
|
|
12195
|
+
MCP tool — the dashboard just forwards ``query`` + ``network`` and renders.
|
|
12196
|
+
The ClawPump wallet settles x402 in USDC on Solana, so the default is
|
|
12197
|
+
``solana``; pass ``network=all`` to see every chain. Sync def — MCP blocks.
|
|
12196
12198
|
"""
|
|
12197
12199
|
from hermes_cli.mcp_config import _call_single_tool
|
|
12198
12200
|
|
|
12199
12201
|
query = (q or "").strip()
|
|
12200
12202
|
if not query:
|
|
12201
|
-
return {"ok": True, "query": "", "results": []}
|
|
12203
|
+
return {"ok": True, "query": "", "network": network, "results": []}
|
|
12202
12204
|
|
|
12203
12205
|
srv_name, srv_cfg = _clawpump_mcp()
|
|
12204
12206
|
if not srv_name:
|
|
@@ -12209,7 +12211,9 @@ def x402_search(q: str = ""):
|
|
|
12209
12211
|
}
|
|
12210
12212
|
|
|
12211
12213
|
try:
|
|
12212
|
-
text = _call_single_tool(
|
|
12214
|
+
text = _call_single_tool(
|
|
12215
|
+
srv_name, srv_cfg, "dexter_search", {"query": query, "network": network}
|
|
12216
|
+
)
|
|
12213
12217
|
except Exception as exc: # surface any connection / tool error to the UI
|
|
12214
12218
|
return {"ok": False, "error": str(exc), "results": []}
|
|
12215
12219
|
|
|
@@ -12223,7 +12227,7 @@ def x402_search(q: str = ""):
|
|
|
12223
12227
|
results = data
|
|
12224
12228
|
else:
|
|
12225
12229
|
results = []
|
|
12226
|
-
return {"ok": True, "query": query, "results": results}
|
|
12230
|
+
return {"ok": True, "query": query, "network": network, "results": results}
|
|
12227
12231
|
|
|
12228
12232
|
|
|
12229
12233
|
_FONT_DEFAULT_ID = "space-grotesk"
|
|
@@ -144,6 +144,7 @@ Common patterns:
|
|
|
144
144
|
- **Paid x402 API call (agent wallet pays):** `pay_sh_search` → `pay_sh_provider_details` (price) → `pay_sh_prepare_call` → (confirm price with user) → `pay_sh_execute_approved`. The agent needs the `x402` skill (`update_agent` with `enabled_skills`).
|
|
145
145
|
- **Discover x402 APIs on Dexter:** `dexter_search` (free, by capability — e.g. "ETH price", "image generation") returns matching resources with their payable `resourceUrl`, HTTP method, per-call USDC price, and input schema. No separate Dexter wallet.
|
|
146
146
|
- **Pay ANY x402 URL (open, not just a catalog):** `x402_pay_check` (free — fetch the URL's 402 challenge → price + input schema) → quote the price to the user → `x402_pay` (pays from the agent's ClawPump wallet, `confirm_payment: true`, `max_amount_usd` = the cap the user approved). Works on any x402 endpoint, including a `resourceUrl` from `dexter_search`. The wallet signs server-side; spend is hard-capped. Needs the `x402` skill (`update_agent` with `enabled_skills`).
|
|
147
|
+
- **Payment funds:** check with `get_wallet_summaries` (`usdc_balance`).
|
|
147
148
|
- **Pay your Hermes inference from the ClawPump wallet (UsePod):** if the user runs Hermes on their own UsePod pod (`USEPOD_API_KEY` in `~/.hermes/.env`), they can top that pod up straight from their ClawPump wallet instead of funding it manually at usepod.ai. Flow: `get_balance` (confirm the agent wallet holds enough USDC) → ask for the amount + their 16-hex `deposit_code` (from UsePod `/v1/register`) → quote both back → (confirm) `usepod_deposit` with `confirm_deposit: true`. The full amount goes on-chain into that pod (no fee); UsePod then draws inference cost from it. This is **separate** from ClawPump's own hosted chat/credits — it just pays the user's own pod from their wallet.
|
|
148
149
|
|
|
149
150
|
## Setting up Pod (UsePod) — auto flow
|