AGENT SKILL

valiron-payment-interceptor

Intercept and authorize outgoing machine-to-machine payments (x402 or similar) using @valiron/sdk trust decisions on the counterparty agent before payment execution. Use when implementing payment middleware, wallet spend guards, policy engines, trust-based allow/deny/throttle decisions, fail-open/fail-closed behavior, and auditable transaction risk controls.

License 许可
MIT
最近更新
2026-06-07
Stars
★ 0
Forks
1

01 前言 Front Matter

name
valiron-payment-interceptor
metadata
{ "openclaw": { "skillKey": "valiron-payment-interceptor", "primaryEnv": "VALIRON_API_KEY" } }
description
Intercept and authorize outgoing machine-to-machine payments (x402 or similar) using @valiron/sdk trust decisions on the counterparty agent before payment execution. Use when implementing payment middleware, wallet spend guards, policy engines, trust-based allow/deny/throttle decisions, fail-open/fail-closed behavior, and auditable transaction risk controls.

03 SKILL.md 正文

Valiron Payment Interceptor

Add a trust gate in front of outgoing agent payments.

Runtime requirements

Declare and validate runtime prerequisites before enabling the interceptor:

  • Node.js runtime compatible with your app and @valiron/sdk.
  • Installed dependencies:
    • @valiron/sdk
    • Your payment rail package(s) (x402 or equivalent) used by the host app.
  • Configuration/credentials (via secret manager or env vars):
    • VALIRON_API_KEY (optional today; reserved for authenticated deployments)
    • VALIRON_BASE_URL (if using non-default endpoint)
    • VALIRON_TIMEOUT_MS (optional, with safe default)
  • Policy/config inputs:
    • Decision policy JSON (route-to-action matrix)
    • Spend limit defaults and per-route overrides

Fail startup (or fail closed for payment endpoints) when required policy/config inputs are missing. If your deployment enforces SDK auth, treat VALIRON_API_KEY as required.

Workflow

  1. Extract counterparty identity from the payment request.
    • Prefer counterpartyAgentId.
    • Support wallet fallback with getWalletProfile(wallet).
  2. Evaluate trust with Valiron.
    • Fast path: checkAgent(agentId).
    • Full path: getAgentProfile(agentId) when you need reasons/signals, pricing, or audit details.
  3. Apply deterministic decision policy from references/decision-policy.md.
  4. Enforce spend controls from references/spend-controls.md.
  5. If allowed, continue to payment initiation (x402 challenge creation or equivalent flow).
  6. If blocked/restricted, return explicit denial/degrade reason.
  7. Log outcome using references/audit-events.md.

Decision model

Map route decisions to payment actions:

  • prod: allow payment under normal limits.
  • prod_throttled: allow with reduced caps/rate limits.
  • sandbox: allow only test/sandbox payment rail (or deny prod transfer).
  • sandbox_only: deny outgoing payment.

Never authorize payment using free-form model output alone.

x402-specific sequencing

For x402-protected purchases or settlement-like flows:

  1. Trust-check counterparty identity.
  2. Evaluate route + spend policy.
  3. If denied, abort before creating payment commitment.
  4. If allowed, generate/send x402 payment payload.
  5. Record authorization decision + amount + result.

Outage and fallback

Use endpoint-class fallback from references/fallback-modes.md:

  • High-risk payment actions: fail-closed.
  • Low-risk/test actions: optional fail-open-guarded with strict caps.

Keep fallback mode explicit and versioned.

Use bundled resources

  • Runtime + credential checklist: references/runtime-requirements.md
  • Decision matrix: references/decision-policy.md
  • Spend/risk controls: references/spend-controls.md
  • Fallback guidance: references/fallback-modes.md
  • Audit schema: references/audit-events.md
  • Error handling: references/error-handling.md
  • Interceptor template: assets/payment-interceptor.ts
  • Policy validator: scripts/validate-payment-policy.mjs

04 同仓库更多 Skills

javimosch
javimosch/open-claw-skills

crowd-prompting

A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.

★ 0
javimosch
javimosch/open-claw-skills

ceaser

Interact with the Ceaser privacy protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- shield, unshield, note management, and protocol queries. All ceaser tool calls use CLI subcommands (npx -y ceaser-mcp <subcommand>). Ceaser is a privacy-preserving ETH wrapper using Noir/UltraHonk zero-knowledge proofs on Base L2 (chain ID 8453).

★ 0
javimosch
javimosch/open-claw-skills

ceaser-send

Fully automated private ETH transfer via Ceaser Protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- all ceaser tool calls use CLI subcommands (npx -y ceaser-mcp <subcommand>). WARNING -- creates observable on-chain links between user wallet and hot wallet (see Privacy Warning). Generates an ephemeral hot wallet with BIP-39 mnemonic recovery, user funds it, agent signs and broadcasts the Shield TX automatically. Exactly one manual step required (funding the hot wallet with ETH). Uses Noir/UltraHonk zero-knowledge proofs.

★ 0
javimosch
javimosch/open-claw-skills

dilemm-ai

Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).

★ 0
javimosch
javimosch/open-claw-skills

moldium

Post and manage content on the Moldium blog platform. Triggered by "post to Moldium", "write a blog post", "publish an article", etc.

★ 0
javimosch
javimosch/open-claw-skills

arxiv-paper-reviews

Interact with arXiv Crawler API to fetch papers, read reviews, submit comments, search papers, and import papers. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, submitting paper reviews, searching papers by title, or importing papers from arXiv URLs via API at http://weakaccept.top:8000/.

★ 0