sparkbtcbot-proxy-deploy_skill

This skill helps you deploy and manage a serverless Spark Bitcoin proxy on Vercel with auth, spending limits, and Redis logging.
  • Python

2.6k

GitHub Stars

2

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openclaw/skills --skill sparkbtcbot-proxy-deploy

  • _meta.json309 B
  • SKILL.md11.0 KB

Overview

This skill deploys a serverless Spark Bitcoin L2 proxy to Vercel that exposes authenticated REST endpoints for scoped wallet access. It provides role-based tokens, per-transaction and daily spending caps, Redis-backed logging and token storage, and L402 Lightning paywall handling. Use it to give AI agents limited wallet capabilities without exposing the mnemonic.

How this skill works

The proxy initializes the Spark SDK per request and proxies wallet operations behind token-based auth. It stores tokens, spend counters, activity logs, and pending invoice records in Upstash Redis accessed via REST. Admin and invoice roles control permissions; a hardcoded API_ADMIN token acts as a bootstrap fallback. L402 paywall handling fetches protected content, pays invoices, and retries requests while caching tokens per-domain.

When to use it

  • You need to give AI agents controlled access to a Spark wallet without revealing the mnemonic.
  • You want a serverless, low-cost proxy deployed on Vercel for Bitcoin L2 operations.
  • You need token management (create/list/revoke) and role-based permissions for agent-level access.
  • You must enforce per-transaction and daily spend limits for automated agents.
  • You want automatic handling of Lightning L402 paywalls with pending-payment tracking.

Best practices

  • Use the Vercel dashboard or Vercel REST API to set env vars—avoid heredoc input to prevent newline corruption in the mnemonic.
  • Generate a strong API_AUTH_TOKEN and rotate it periodically via Vercel env update and redeploy.
  • Store Upstash credentials securely and reuse existing UPSTASH_REDIS_REST_URL/TOKEN if available to avoid unnecessary DB creation.
  • Set conservative MAX_TRANSACTION_SATS and DAILY_BUDGET_SATS values during testing, then increment as needed.
  • Implement polling in your agents for L402 pending responses—failure to poll can lose funds without content delivery.

Example use cases

  • Provision a merchant bot that can create Lightning invoices but cannot spend funds (invoice role).
  • Run a content-fetching agent that automatically pays L402 paywalls and retries until content is returned.
  • Operate an admin dashboard that views balance, transactions, and manages scoped tokens via the admin token.
  • Integrate with automation that issues limited Spark transfers from a centralized admin-controlled wallet.
  • Log activity and pending payments centrally in Upstash Redis for auditing and reconciliation.

FAQ

You must set SPARK_MNEMONIC, SPARK_NETWORK, API_AUTH_TOKEN, UPSTASH_REDIS_REST_URL, UPSTASH_REDIS_REST_TOKEN, MAX_TRANSACTION_SATS, and DAILY_BUDGET_SATS.

How should agents handle L402 pending payments?

If POST /api/l402 returns status 'pending', poll GET /api/l402/status?id=<pendingId> until completion (retry loop up to ~30 seconds) because the payment was sent and content may arrive asynchronously.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational