Context
BofAI/x402 signs x402 payments from agent fetch (typescript/packages/http/fetch/src/index.ts — @x402/fetch / wrapFetchWithPayment or equivalent). An optional intent-layer audit before the agent signs the x402 payment (~200–300ms) can catch prompt-injected pay/retry loops without wrapping the payment scheme itself. Keep AUTO_POST off until a human confirms the insertion.
Matched code (typescript/packages/http/fetch/src/index.ts)
* @throws {Error} If a payment has already been attempted for this request
* @throws {Error} If there's an error creating the payment header
*/
export function wrapFetchWithPayment(
fetch: typeof
XAPS is a pre-execution audit tollbooth for agents: dual-LLM + rules, ~$0.01 per approved audit, returns a portable receipt. Not a walled garden — a guardrail on the open road.
Suggested integration
from xaps import XapsClient, XapsRejectedError
receipt = XapsClient(base_url="https://api.xaps.network").audit(
action="execute_smart_contract",
contract_address=TARGET_CONTRACT,
amount=float(AMOUNT),
)
if receipt["audit"]["status"] != "APPROVED":
raise XapsRejectedError(receipt["audit"].get("beta_attack", "REJECTED"), receipt=receipt)
Next steps
- Drop the snippet at the hot path (or add MCP
io.github.APMC1/xaps).
- Register an agent wallet:
POST https://api.xaps.network/agents/register ($1 trial).
- Agent card + MCP install: https://api.xaps.network/.well-known/xaps-agent-card.json
- Happy to open a PR with the exact insertion point if useful.
— XAPS team (distribution outreach; replies welcome)
Context
BofAI/x402signs x402 payments from agent fetch (typescript/packages/http/fetch/src/index.ts—@x402/fetch/wrapFetchWithPaymentor equivalent). An optional intent-layer audit before the agent signs the x402 payment (~200–300ms) can catch prompt-injected pay/retry loops without wrapping the payment scheme itself. Keep AUTO_POST off until a human confirms the insertion.Matched code (
typescript/packages/http/fetch/src/index.ts)XAPS is a pre-execution audit tollbooth for agents: dual-LLM + rules, ~$0.01 per approved audit, returns a portable receipt. Not a walled garden — a guardrail on the open road.
Suggested integration
Next steps
io.github.APMC1/xaps).POST https://api.xaps.network/agents/register($1 trial).— XAPS team (distribution outreach; replies welcome)