Deposit from Bitcoin
Learn how to deposit Bitcoin into a Spark wallet
Deposit Address Options
Spark offers two Bitcoin deposit address types, each with its own trade-offs. For a detailed comparison, read the full guide here.
Static Deposit Addresses
- Reusable - Same address can receive multiple deposits
- User-friendly - Eliminates confusion from one-time address restrictions
- Production-ready - Ideal for apps where users might accidentally reuse addresses
Single-Use Deposit Addresses
- One-time use only - Each address can only receive one deposit
- More Privacy - Each transaction uses a fresh address
- Legacy support - Available for specific use cases requiring fresh addresses (e.g. regulated custodians that mandate a new address for each deposit)
Generate Deposit Addresses
For Bitcoin deposits on L1, Spark generates P2TR addresses. These addresses start with “bc1p” for mainnet and can be used to receive Bitcoin from any wallet.
Static Deposit Address
Generate a reusable Bitcoin address that can receive multiple deposits. This is the recommended approach for most applications as it provides a smoother UX and eliminates the risk of users accidentally sending to expired addresses.
Mainnet Address Example:
bc1p5d7rjq7g6rdk2yhzks9smtbqtedr4dekq08ge8ztwac72sfr9rusxg3297
Currently, Spark supports one static deposit address per wallet. Creating a second static address will return your existing address instead of generating a new one.
Single-Use Deposit Address
Generate a fresh address for each deposit. As deposited funds are mapped to the Spark statechain, these addresses can only be used once.
Deposit Bitcoin
Mainnet Deposits
To deposit Bitcoin on the mainnet, initiate a transaction by sending your funds to one of the available deposit address types—either a static or single-use address.
Regtest Deposits
For testing purposes on the Regtest network, take advantage of our faucet. This tool allows you to easily fund your Spark wallet without using real Bitcoin.
Monitor for Deposit Transactions
After sending Bitcoin to your deposit address, you’ll need to monitor for incoming transactions yourself using a blockchain explorer or your own infrastructure.
For Static Deposits
Since static addresses can receive multiple deposits, you’ll need to actively monitor the address for new transactions using your own explorer or infrastructure:
For Single-Use Deposits
For single-use deposits, you need to monitor all your unused deposit addresses for incoming transactions:
Claiming Deposits
Static Deposit Claiming
For static deposit addresses, the claiming process involves getting a quote first, then claiming with the provided signature. This gives you full control over when and how much to claim from each deposit:
You can call claimStaticDepositQuote
anytime after the deposit transaction is made, but claimStaticDeposit
will only succeed after the deposit transaction has 3 confirmations.
Single-Use Deposit Claiming
Once confirmed, run claimDeposit(txId)
to claim the deposit from a single-use address:
Refunding Static Deposits
If you need to recover funds from a static deposit address without bringing them into Spark, you can refund the deposit back to a Bitcoin address. This is more cost-effective than claiming the deposit and then doing a cooperative exit, as it requires only one transaction fee instead of two.
Use cases for refunding:
- You don’t like the quote from
claimStaticDepositQuote
- You prefer to avoid the double-fee scenario (claim fee + cooperative exit fee)
- You want to send funds to a different address without using Spark
Confirmation Requirements
- Deposits require 3 confirmations on L1
- Funds will be available in your Spark wallet after confirmation
Best Practices
- Use static deposit addresses for production applications to prevent user confusion and potential fund loss
- Start with a small test amount for your first deposit
- Keep track of your deposit transaction IDs
- Wait for the required confirmations before considering the deposit complete
- Save static deposit addresses for easy reuse across multiple deposits
- When refunding static deposits, ensure your fee is at least 300 sats
Next Steps
Once your deposit is confirmed, you can: