SparkBTCBot mascot
Open Source · Bitcoin L2

SparkBTCBot

Give your AI agents the power to transact on Bitcoin. Seamless integration between OpenClaw and the Spark Layer 2 network.

SparkBTCBot
🔒
🔗
💰

AI meets
Bitcoin Layer 2

SparkBTCBot bridges OpenClaw and the Spark Bitcoin L2 network, enabling AI agents to manage wallets, send payments, handle Lightning invoices, and interact with L402 paywalls — all autonomously.

Instant Transfers

Zero-fee Spark transfers and Lightning Network payments at the speed of thought.

🔒

Flexible Security

Choose direct access for simplicity or proxy-based key isolation for production deployments.

💰

Full Wallet Control

BIP39 wallet management, balance monitoring, token operations, and L1 withdrawals.

Two Ways to Spark

Whether you want simple local access or production-grade security, there's a SparkBTCBot for you.

OpenClaw Skill

SparkBTCBot Skill

Direct Spark SDK access from within OpenClaw. Install locally, start transacting immediately.

  • Wallet generation & import via BIP39 mnemonics
  • Zero-fee instant Spark network transfers
  • Lightning invoice creation & payment (BOLT11)
  • LRC20 token operations & batch transfers
  • L1 Bitcoin withdrawal with fee estimation
  • L402 paywall authentication
Best For Personal development, learning, trusted single-agent environments, and rapid prototyping.
Serverless Gateway

SparkBTCBot Proxy

A hardened HTTP gateway on Vercel. Agents get bearer tokens — never your private keys.

  • Private key isolation — mnemonic stays on server
  • Role-based access: admin, invoice, pay-only, read-only
  • Per-transaction & daily spending limits
  • Instant token revocation without moving funds
  • ~18 REST endpoints with Upstash Redis persistence
  • L402 paywall support with intelligent caching
Best For Production deployments, multi-agent architectures, and security-critical environments.

Skill vs. Proxy

A quick comparison to help you choose the right tool for your use case.

Aspect⚡ Skill⚡ Proxy
Access ModelDirect SDK — agent holds mnemonicHTTP gateway — agent holds bearer token
Key SecurityAgent has full wallet controlPrivate key never leaves server
Spending LimitsNone (full access)Per-tx and daily caps, configurable
Access ControlSingle user, full permissionsRole-based (admin / invoice / pay-only / read-only)
DeploymentLocal install (~/.claude/skills/)Vercel serverless + Upstash Redis
Setup ComplexityClone & configure .envDeploy to Vercel, provision Redis, create tokens
RevocationRotate mnemonicInstant per-token revocation
Multi-AgentSingle agentMultiple agents with separate tokens

Up and Running
in Minutes

Choose your path and follow the steps below.

1

Clone the skill

Install the skill into your OpenClaw skills directory.

git clone https://github.com/echennells/sparkbtcbot-skill.git \
~/.claude/skills/sparkbtcbot-skill
2

Configure your wallet

Create a .env file with your Spark wallet mnemonic.

cd ~/.claude/skills/sparkbtcbot-skill
cp .env.example .env
# Edit .env with your BIP39 mnemonic
3

Install dependencies & go

Install the SDK and start using Bitcoin in OpenClaw.

npm install
# Now ask OpenClaw: "Check my Spark wallet balance"
1

Clone & deploy to Vercel

Fork the repo and deploy the serverless gateway.

git clone https://github.com/echennells/sparkbtcbot-proxy.git
cd sparkbtcbot-proxy
vercel deploy
2

Configure environment

Set your mnemonic and Upstash Redis credentials as Vercel environment variables.

# In Vercel dashboard → Settings → Environment Variables:
SPARK_MNEMONIC="your twelve word mnemonic phrase here..."
UPSTASH_REDIS_REST_URL="https://your-redis.upstash.io"
UPSTASH_REDIS_REST_TOKEN="your-token"
3

Create agent tokens

Generate role-based bearer tokens with spending limits for your AI agents.

curl -X POST https://your-proxy.vercel.app/api/tokens \
-H "Authorization: Bearer $ADMIN_TOKEN" \
-d '{"role":"pay-only","dailyLimit":10000}'

Enjoy SparkBTCBot? A star helps others discover the project

Star on GitHub