WDK logoWDK documentation

Lightning (Spark) wallet

Create Spark wallets for Lightning payments, Spark transfers, deposits, withdrawals, and token balances.

Use the Spark wallet module for Spark network wallets, Lightning invoices, Spark invoices, token transfers, and Bitcoin layer 1 deposits or withdrawals.

Features

  • Spark Blockchain Support: Full integration with the Spark Bitcoin layer 2 network
  • Lightning Network Integration: Create and pay Lightning Network invoices directly
  • Spark Invoices: Create and pay Spark invoices for receiving sats and tokens directly on the Spark network
  • SparkScan Balance Polling: Use SparkScan-backed balance polling in getBalance() when sparkscan is configured
  • Sync and Retry: Optionally sync wallet state and retry failed sendTransaction() and payLightningInvoice() calls once
  • Spark SDK Logging: Enable Spark SDK logs with the enableLogging configuration option when debugging wallet setup or runtime behavior
  • Token Transfers: Transfer tokens to other Spark addresses
  • Bitcoin Layer 1 Bridge: Deposit and withdraw Bitcoin between layer 1 and Spark
  • Static Deposit Addresses: Reusable deposit addresses for Bitcoin layer 1 deposits
  • Deposit Refunds: Refund static deposits back to Bitcoin addresses
  • Withdrawal Fee Quotes: Get fee quotes before withdrawing funds
  • BIP-44 Derivation Paths: Support for standard BIP-44 derivation paths with Spark-specific coin type (998)
  • BIP-39 Seed Phrase Support: Generate and validate BIP-39 mnemonic seed phrases
  • Multi-Account Management: Create and manage multiple accounts from a single seed phrase
  • Single-Use Deposit Addresses: Generate unique deposit addresses for Bitcoin layer 1 deposits
  • Fee-Free Transactions: Spark transactions are fee-free on the layer 2 network
  • Transaction History: Complete transaction history with incoming/outgoing transfers
  • Message Signing: Sign and verify messages using Spark identity keys
  • Memory Safety: Secure private key management with automatic memory cleanup
  • TypeScript Support: Full TypeScript definitions included
  • Network Support: Support for Spark mainnet and regtest networks

Supported Networks

This package supports the following Spark networks:

  • Spark Mainnet: Production Spark network
  • Spark Signet: Spark testing network
  • Spark Regtest: Local Spark network for testing

Regtest Faucet

You can obtain test funds for your Regtest environment from the Lightspark Regtest Faucet.

Next Steps


Need Help?

On this page