Deposit Address Options

Spark uses static Bitcoin deposit addresses for most use cases. This guide focuses on the static deposit flow.
  • Reusable - Same address can receive multiple deposits
  • User-friendly - Reduces risk from one-time address restrictions
We recommend static addresses for nearly all production apps. They minimize user error and operational overhead.

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.
const staticDepositAddress = await wallet.getStaticDepositAddress();
console.log("Static Deposit Address:", staticDepositAddress);
// This address can be reused for multiple deposits
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.

Deposit Bitcoin

Mainnet Deposits

To deposit Bitcoin on the mainnet, send funds to your static deposit 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:
// You'll need to implement your own monitoring solution
const staticAddress = await wallet.getStaticDepositAddress();

// Example: Monitor for new transactions using a block explorer API
// const newTransactions = await yourBlockchainMonitor.checkAddress(staticAddress);

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:
// Step 1: Get a quote for your deposit (can be called anytime after transaction)
const quote = await wallet.getClaimStaticDepositQuote(txId);
console.log("Quote:", quote);

// Step 2: Claim the deposit using the quote details
// Note: This will only succeed after 3 confirmations on the deposit transaction
const claimResult = await wallet.claimStaticDeposit({
  transactionId: txId,
  creditAmountSats: quote.creditAmountSats,
  sspSignature: quote.signature
});
console.log("Claim successful:", claimResult);
You can call getClaimStaticDepositQuote anytime after the deposit transaction is made, but claimStaticDeposit will only succeed after the deposit transaction has 3 confirmations.

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 getClaimStaticDepositQuote
  • 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
// Refund a static deposit (minimum fee: 300 sats)
const refundTxHex = await wallet.refundStaticDeposit(
  depositTxId,
  destinationAddress,
  feeSats // Must be at least 300 sats
);

// You'll need to broadcast this transaction yourself
console.log("Refund transaction hex:", refundTxHex);

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