sparkbtcbot

Automate Spark Bitcoin L2 wallet setup and operations via the Spark SDK.

4|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/echennells/sparkbtcbot-skill --skill sparkbtcbot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sparkbtcbot
Source: https://github.com/echennells/sparkbtcbot-skill/tree/main/skills/sparkbtcbot
Command: npx skills add https://github.com/echennells/sparkbtcbot-skill --skill sparkbtcbot

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

AI agents require programmable, borderless, self-custodial access to a Bitcoin L2 wallet to perform autonomous transactions. This skill provides a ready-made Spark Bitcoin L2 wallet integration using the Spark SDK, enabling mnemonic-based wallet provisioning, BTC and token management, Lightning interop, and cooperative exits without relying on centralized services.

Core Features & Use Cases

  • Wallet provisioning from a BIP39 mnemonic and management of Spark addresses
  • Check BTC balance, tokens, deposits, and perform Spark-to-Spark transfers
  • Create and pay Lightning invoices and Spark native invoices for payments
  • Token operations (BTKN/LRC20), batch transfers, and token invoices
  • Withdrawals to L1 via cooperative exit with fee estimation
  • Message signing and identity verification for agents
  • Complete SparkAgent class for easy integration into AI agents and workflows

Quick Start

Install dependencies in the skill directory with npm install Create or load a wallet using the provided example scripts, e.g. node examples/wallet-setup.js Configure environment variables (SPARK_MNEMONIC, SPARK_NETWORK) in .env and run balance and payment examples (node examples/balance-and-deposits.js, node examples/payment-flow.js)

Frequently Asked Questions about sparkbtcbot

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a self-custodial Bitcoin L2 wallet for an AI agent using a mnemonic?

To set up a self-custodial Bitcoin L2 wallet for an AI agent, you use the Spark SDK to provision a wallet directly from a BIP39 mnemonic. This enables mnemonic-based identity and autonomous balance management without centralized custodians.

Can AI agents create and pay Lightning invoices on the Bitcoin L2 network?

Yes, AI agents can create and pay Lightning invoices on the Bitcoin L2 network using the Spark SDK. The integration supports both standard Lightning invoices and Spark native invoices for automated payment flows.

How do I withdraw Bitcoin from an L2 Spark wallet to the L1 network?

To withdraw Bitcoin from an L2 Spark wallet to the L1 network, you perform a cooperative exit. This process includes fee estimation to ensure accurate transaction costs before transferring funds to the base layer.

Does the Spark wallet integration support token transfers and batch operations?

Yes, the Spark wallet integration supports token transfers and batch operations. It handles BTKN and LRC20 token operations, allowing AI agents to execute batch transfers and process token invoices programmatically.

What environment variables do I need to configure for a Spark Bitcoin wallet?

Configuring a Spark Bitcoin wallet requires the SPARK_MNEMONIC and SPARK_NETWORK environment variables in your .env file. You must also define whether the agent operates across MAINNET or REGTEST networks.