Setup: Run the CLI
Clone and launch the Spark CLI, powered by the Spark SDK:Step 1: Initialize Your Wallet
Create your first Spark wallet:Important: Secure your mnemonic offline. Anyone with access can control your
funds.
Step 2: Deposit Bitcoin
Spark uses single-use deposit addresses. Never reuse them. Heads up: We’re actively working on new deposit options that will eliminate the need for generating new addresses every time. Expect updates soon. Generate a deposit address:Step 3: Transfer Funds via 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 funds.getbalance
on each wallet to make sure it happened as expected.
Step 4: Send and receive a Lightning payment
Spark is fully compatible with Lightning. Let’s test it by send a lightning payment between our 2 wallets.getbalance
on each wallet to make sure it happened as expected.
Step 5: Withdraw funds into a L1 wallet
You can withdraw funds from Spark by sending them to an L1 address. For this example, we are going to “withdraw” the funds from our wallet 1 into our wallet 2.getbalance
on each wallet to make sure it happened as expected.