Breez.Sdk 0.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package Breez.Sdk --version 0.0.2                
NuGet\Install-Package Breez.Sdk -Version 0.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Breez.Sdk" Version="0.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Breez.Sdk --version 0.0.2                
#r "nuget: Breez.Sdk, 0.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Breez.Sdk as a Cake Addin
#addin nuget:?package=Breez.Sdk&version=0.0.2

// Install Breez.Sdk as a Cake Tool
#tool nuget:?package=Breez.Sdk&version=0.0.2                

Breez SDK

Overview

The Breez SDK enables mobile developers to integrate Lightning and bitcoin payments into their apps with a very shallow learning curve. The use cases are endless – from social apps that want to integrate tipping between users to content-creation apps interested in adding bitcoin monetization. Crucially, this SDK is an end-to-end, non-custodial, drop-in solution powered by Greenlight, a built-in LSP, on-chain interoperability, third-party fiat on-ramps, and other services users and operators need.

The Breez SDK provides the following services:

  • Sending payments (via various protocols such as: bolt11, keysend, lnurl-pay, lightning address, etc.)
  • Receiving payments (via various protocols such as: bolt11, lnurl-withdraw, etc.)
  • Fetching node status (e.g. balance, max allow to pay, max allow to receive, on-chain balance, etc.)
  • Connecting to a new or existing node.

Download our one pager here.

Browse the Breez SDK Rustdoc here.

Demo

https://user-images.githubusercontent.com/31890660/208511040-989ff42c-ceb8-4a34-b2cb-a17a0a8c0150.mp4

For a higher resolution video, click here.

Features

Screenshot_2023-06-27-20-18-57-35_e2d5b3f32b79de1d45acd1fad96fbb0f

Using the SDK

To get started with the Breez SDK, follow these examples.

API

API documentation is here.

Architecture

This diagram is a high-level description of the Breez SDK:

SDK Architecture

Signer

This module handles everything related to the signing of lightning messages. It is initialized with the user’s seed.

InputParser

This module parses user input that is related to sending and receiving of payments. It identifies the protocol (lightning, lnurl-pay, lightning address, lnurl-withdraw, btc address, etc.) and the related data. Apps should use this parser to interpret users input, display the details to users and then execute the specific action (pay or receive).

LightningNode

This is an interface that defines how the SDK interacts with the user’s Lightning node. The interface defines methods to create a new node, connect to an existing node, pay or create invoices. It also provides access to the node’s low-level functionality such as: listing peers, graph information, etc. Currently we only have one provider (Greenlight), but we can add more providers in the future.

BTCSwapper

This module provides the ability to send or receive on-chain payments via submarine swaps. Send to a BTC address is done by a reverse submarine swap and receive by a regular submarine swap. It includes refund functionality as well.

FiatCurrencies

This module provides fiat currencies conversion services and fiat on-ramp service (via MoonPay).

LSP

This module provides the interface of interacting with one or more LSPs.

Build & Test

The libs folder contains three sub folders and is a structured as a cargo workspace:

  • sdk-core: the core SDK rust library.
  • sdk-bindings: ffi bindings for Kotlin, Python, Swift, C# and Go.
  • sdk-flutter: a flutter plugin (includes ffi bindings for dart).
  • sdk-react-native: a react-native plugin.

The tools folder contains a simple command line interface (sdk-cli) to the SDK. See the instructions in each sub project readme on how to build, test and run.

Remark: in order to build the Breez SDK you need to have access to the Greenlight repository. Greenlight will eventually be open-sourced (with an MIT license), but is not yet public. To access Greenlight, please email us at contact@breez.technology.

TODOs

  • ‘On-the-fly’ channel creation
  • Send/receive bolt11
  • LNURL-Pay
  • LNURL-Withdraw
  • Backup/restore using mnemonics
  • Send zero-amount invoices
  • Fiat currencies
  • Send spontaneous payments
  • Send to a Lightning address
  • Send to BIP 21
  • cli inteface
  • Swift bindings
  • Kotlin bindings
  • API key
  • Receive via on-chain address
  • React Native bindings
  • LNURL-Auth
  • Send to an on-chain address
  • MoonPay fiat on-ramp
  • C# bindings
  • Python bindings
  • Spend all funds
  • Webhook for receiving payments
  • Mobile Notifications
  • Offline receive via notifications
  • Performance optimizations
  • Improve key share
  • Close channels to a predefined address
  • Make mempool.space dependency optional
  • Receive 0 amount invoice via LSP (unified QR)
  • Send/receive bolt12
  • Cloud key backup?
  • Async payments
  • LDK support
  • Splicing
  • WebAssembly support
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.6.3-rc2 115 11/18/2024
0.6.3-rc1 155 11/1/2024
0.6.2 160 10/14/2024
0.6.1 207 9/24/2024
0.6.0-rc1 260 9/17/2024
0.5.2 245 8/7/2024
0.5.1-rc6 159 7/19/2024
0.5.1-rc5 148 7/18/2024
0.5.1-rc4 73 7/17/2024
0.5.1-rc3 106 7/16/2024
0.5.1-rc1 132 7/16/2024
0.5.0 230 7/1/2024
0.4.3-rc1 171 6/24/2024
0.4.2-rc3 160 6/17/2024
0.4.2-rc2 164 6/16/2024
0.4.2-rc1 221 5/28/2024
0.4.1 198 5/15/2024
0.4.1-rc2 158 5/8/2024
0.4.0 249 5/4/2024
0.4.0-rc5 317 4/17/2024
0.4.0-rc2 220 4/15/2024
0.4.0-rc1 273 4/11/2024
0.3.9 444 3/28/2024
0.3.8 247 3/21/2024
0.3.6 293 3/17/2024
0.3.5 237 3/15/2024
0.3.4 367 3/13/2024
0.3.3 221 3/11/2024
0.3.2 310 3/5/2024
0.3.1 510 2/15/2024
0.3.0 382 2/13/2024
0.2.15 184 1/26/2024
0.2.14 158 1/23/2024
0.2.12 367 12/13/2023
0.2.11 310 12/13/2023
0.2.10 391 11/26/2023
0.2.9 331 11/10/2023
0.2.7 453 10/24/2023
0.2.5 260 10/5/2023
0.2.3 340 9/5/2023
0.2.2 310 8/31/2023
0.2.1 265 8/31/2023
0.2.0 356 8/29/2023
0.0.3 317 7/28/2023
0.0.2 336 7/28/2023