Skip to content
breezPublic

About

An SDK for integrating instant bitcoin and stablecoins into apps and services.

Topics

Resources

Contributing

Security policy

Stars

62 stars

Watchers

3 watching

Forks

Repository files navigation

Breez SDK - Spark

Overview

The Breez SDK provides developers with an end-to-end solution for integrating instant, non-custodial bitcoin and stablecoins into their apps and services. It eliminates the need for third parties, simplifies the complexities of Bitcoin and Lightning, and enables seamless onboarding for billions of users to the future of value transfer.

The Breez SDK is free for developers.

What is the Breez SDK - Spark?

It’s a nodeless integration that offers a non-custodial, end-to-end solution for integrating bitcoin and stablecoins, utilizing the Bitcoin-native Layer 2 Lightning & Spark, with on-chain interoperability. Using the Breez SDK, you’ll be able to:

  • Send and receive bitcoin via Lightning addresses, Bolt11 invoices, LNURL-Pay, bitcoin addresses, and Spark addresses
  • Send and receive USDC or USDT on Ethereum, Base, Arbitrum, Solana, Tron, and other networks, to and from a bitcoin or USD balance
  • Issue, send, and receive Spark tokens (BTKN)

Key Features

Fully-featured Lightning
Lightning addresses, invoices, LNURL-Pay, -Withdraw, -Auth, and -Verify.
Languages & Frameworks
Kotlin, Swift, JS, React Native, Flutter, Go, Python, C#, and WASM.
Passkey Login
Seedless onboarding and restore, no recovery phrase needed.
USDT & USDC
Users can send/receive stablecoins from their BTC or stable balance.
Cash App to USDC/USDT
Users pay from Cash App and the recipient gets USDC or USDT on their chain.
Stable Balance
Users can hold their balance in USD to avoid BTC price volatility.
Instant Deposits
Claim on-chain deposits in seconds, no confirmations needed.
Automatic Claims
On-chain deposits are claimed automatically within the fee limits you set.
Multi-device/app Sync
Users can access their balance from multiple devices and apps.
Contacts API
Save and reuse Lightning addresses, synced across devices.
Caching & Persistence
Out-of-the-box caching and persistence for a smooth UX.
Spark Tokens
Issue, send, receive, and convert Spark tokens (BTKN).
External Signer
Bring your own key management.
Turnkey Signer
A built-in signer for server-side, non-custodial embedded wallets.
Integrated On-ramps
Let users buy bitcoin directly via Cash App and MoonPay.
Fiat Currencies
Real-time exchange rates to display value in fiat currencies.
Multi-user Server Mode
Run multiple user balances from a single backend server.
Unilateral Exit
Users can always withdraw to the Bitcoin blockchain without the Spark operators.
Open-source
Free and open-source, available to any developer at any scale.
Partner Portal
Track your volume and activity in one dashboard.

Getting Started

Head over to the Breez SDK documentation to start integrating instant bitcoin and stablecoins into your app or service.

You'll need an API key to use the Breez SDK. It's free: complete this simple form to request one.

API

API documentation is here.

Command Line

The Breez SDK - Spark cli is a command line client that allows you to interact with and test the functionality of the SDK.

Demo

Looking for a quick way to try the Breez SDK in the browser or as PWA? Check out our demo app Glow:

Note: The demo is for demonstration purposes only and not intended for production use.

Example Apps

The repository includes full working CLI example apps for every supported language, demonstrating end-to-end SDK usage.

Language CLI Example App
Rust crates/breez-sdk/cli
JavaScript/TypeScript cli/langs/wasm, glow-web
Swift cli/langs/swift
Kotlin cli/langs/kotlin-multiplatform
Flutter/Dart cli/langs/flutter
Python cli/langs/python
Go cli/langs/golang
React Native cli/langs/react-native
C# cli/langs/csharp

Support

Have a question for the team? Join our Telegram channel or email us at contact@breez.technology

How does the Breez SDK - Spark work?

The Breez SDK uses Spark, a Bitcoin-native Layer 2 built on a shared signing protocol, to enable real-time, low-fee, self-custodial payments.

When sending a payment, Spark delegates the transfer of on-chain bitcoin to the recipient through a multi-signature process. Spark Operators help facilitate the transfer, but they cannot move funds without the user. This allows the payment to settle almost instantly, without requiring a blockchain confirmation.

When receiving a payment, the same process works in reverse: the network updates ownership of the bitcoin to the user through the shared signing system, recording the change off-chain while always keeping the funds secure.

Unlike blockchains, rollups, or smart contracts, Spark doesn’t create a new ledger or require trust in external consensus. On Bitcoin’s main chain, Spark transactions appear as a series of multi-sig wallets. Off-chain, Spark keeps a lightweight record of balances and history.

Funds are non-custodial: you can exit Spark at any time and reclaim your bitcoin directly on the Bitcoin main chain.

Build & Test

  • crates: Contains the root Rust cargo workspace.
    • breez-sdk: Collection of Breez SDK crates.
      • bindings: The FFI bindings for Go, Kotlin, Python, React Native, and Swift.
      • cli: Contains the Rust command line interface client for the SDK.
      • common: The common Breez SDK Rust library.
      • core: The core Breez SDK Rust library.
      • wasm: The Wasm interface bindings.
    • spark: The Spark crate.
  • packages: Contains the packages for Flutter, React Native and Wasm.

Contributing

Contributions are always welcome. Please read our contribution guide to get started.

SDK Development Roadmap

  • Send/Receive Lightning payments
  • Send/Receive Spark payments
  • Send/Receive via on-chain addresses
  • CLI Interface
  • Go, C#, React Native, Python, JS, Flutter, Kotlin & Swift languages bindings
  • WebAssembly support
  • Send via LNURL-Pay
  • Send to a Lightning address
  • Payments persistency including restore support
  • Automatic on-chain claims
  • Receive via LNURL-Pay w/ offline & Lightning address support
  • Full support (issue, send & receive) for Spark tokens (BTKN)
  • LNURL-Withdraw
  • Sign and verify arbitrary messages
  • Real-time sync
  • External input parsers
  • External signer
  • LNURL-Auth
  • Fiat on-ramp
  • BTC <> USDB swaps
  • Hodl invoice support
  • Passkey login for seedless experience
  • Contacts management
  • Stable balance
  • Multi-user server mode
  • USDT send support
  • USDC send support
  • Partner portal analytics
  • Unilateral exit
  • Cash App to USDC/USDT
  • USDT receive support
  • USDC receive support
  • Detect pending mempool deposits
  • Instant claim of on-chain deposits
  • Add additional fees via the partner portal
  • Token allowance
  • Delegated spend
  • NWC
  • Bolt12

About

An SDK for integrating instant bitcoin and stablecoins into apps and services.

Topics

Resources

Contributing

Security policy

Stars

62 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages