Skip to main content
Create a Wallet
Get up and running with Spark in minutes. This quickstart guide will walk you through creating your first Spark wallet, funding it with Bitcoin, and making your first transaction on Spark.

Setup: Run the CLI

Launch the Spark CLI with a single command. Requires Node.js 20+.
CLI
Or install it globally:
CLI

Initialize Your Wallet

Create your first wallet on Spark:
CLI
Example output:
CLI
Important: Keep your mnemonic securely stored offline. Anyone with access to it can take full control of your funds.
To recover an existing wallet:
CLI

Deposit Bitcoin

Generate a static deposit address:
CLI
You’ll get a static Bitcoin L1 deposit address linked to your wallet, it can’t be changed. Try it out in our Regtest environment using some monopoly money from the faucet.After depositing Bitcoin from the faucet, get the associated transaction hash:
CLI
Once the transaction is confirmed on-chain, you can claim it. To claim your Bitcoin on Spark, start by requesting a quote:
CLI
With the quote info ready, you can now claim your Bitcoin.
CLI
Verify that your balance has increased:
CLI

Send Bitcoin on Spark

Create a new wallet and fetch its Spark Address. The Spark Address is a static address that can be shared with payers to receive Bitcoin.
CLI
Now send from Wallet 1:
CLI
That’s it. The transfer’s complete. Run getbalance on each wallet to confirm the Bitcoin moved.

Send and Receive Bitcoin from and to Lightning

Spark is fully compatible with Lightning. Let’s test it by sending a Lightning payment between our 2 wallets.
CLI
The payer specifies the maximum fee they’re willing to pay for the invoice (in sats). The SDK then finds the route with the lowest possible fees but it will never exceed that limit.Use getbalance on each wallet to verify the payment.

Withdraw to L1

You can withdraw Bitcoin from Spark to Bitcoin by sending them to an L1 address. In this example, we’ll withdraw Bitcoin from Wallet 1 and send it to Wallet 2’s L1 address.
CLI
Check withdrawal fee:
CLI
If it’s acceptable:
CLI
Once the transaction is confirmed, use the same claim process described above to claim your Bitcoin on Spark.