Testing Guide
Learn how to test your wallet operations on Spark
1. Getting faucet and testing Spark <> L1 transfers
We’ve deployed our own internal Regtest environment to simplify local development and testing. To interact with Spark on Regtest, you can use the Spark Regtest Faucet to request funds.
-
Username:
hackathon
-
Password:
MakeBitcoinMoneyAgain
2. Paying an invoice directly from regtest
You can pay invoices using the Lightning Command Line tool in the spark repo. Below are the set up instructions:
Git clone the repo:
Go to the tools folder:
Install dependencies:
Verify rust is installed:
Run the Tool:
On first run, the tool will download a few dependencies before processing the Lightning invoice. Subsequent runs will be faster, as dependencies are already in place
1. Getting faucet and testing Spark <> L1 transfers
We’ve deployed our own internal Regtest environment to simplify local development and testing. To interact with Spark on Regtest, you can use the Spark Regtest Faucet to request funds.
-
Username:
hackathon
-
Password:
MakeBitcoinMoneyAgain
2. Paying an invoice directly from regtest
You can pay invoices using the Lightning Command Line tool in the spark repo. Below are the set up instructions:
Git clone the repo:
Go to the tools folder:
Install dependencies:
Verify rust is installed:
Run the Tool:
On first run, the tool will download a few dependencies before processing the Lightning invoice. Subsequent runs will be faster, as dependencies are already in place
1. Testing Spark <> L1 transfers
To interact with Spark on mainnet, you can use existing Bitcoin tools like the Mempool Explorer to track your transactions. As much as we’d love to hand out free BTC (maybe one day), you’ll need to fund your wallet with your own for now.
2. Testing Spark <> Lightning
You can test send/receive Lightning payments to/from any Lightning-compatible wallet or exchange. Here are some popular options:
Works both ways — try it.
3. Using our Spark CLI tool
We’ve built a CLI tool that lets you test wallet operations on Spark — no coding needed. To install the CLI tool, you can run:
Once it’s running, type help
to explore commands.
Command Reference
Command | Usage |
---|---|
initwallet | initwallet <mnemonic/seed> - creates or imports a wallet |
getbalance | View wallet + token balances |
getdepositaddress | Generate an L1 Bitcoin deposit address |
getsparkaddress | Get your Spark Address |
sendtransfer | sendtransfer <amount> <receiverSparkAddress> - send Spark funds |
createinvoice | createinvoice <amount> <memo> - generate Lightning invoice |
payinvoice | payinvoice <invoice> - pay Lightning invoice |
tokentransfer | tokentransfer <tokenPubKey> <amount> <receiverSparkAddress> - transfer tokens |
withdraw | withdraw <onchainAddress> <amount> - withdraw to Bitcoin address |
help | Show all commands |
exit | Exit the CLI |
4. Using our demo app
We built a simple React demo app to help you explore how wallet interactions work with Spark — no backend required, and no blockchain wizardry needed to get started.
Open http://localhost:3000 in your browser after starting the development server.
The app supports hot-reloading, shows real-time wallet interactions, and is a good starting point if you’re integrating Spark into your own product. The demo is available here