The Breez SDK provides developers with a end-to-end solution for integrating self-custodial Lightning payments 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 peer-to-peer payments.
To provide the best experience for their end-users, developers can choose between the following implementations:
The Breez SDK is free for developers.
The Liquid implementation is a nodeless Lightning integration. It offers a self-custodial, end-to-end solution for integrating Lightning payments, utilizing the Liquid Network with on-chain interoperability and third-party fiat on-ramps.
Core Functions
- Sending payments via protocols such as: bolt11, lnurl-pay, lightning address, btc address.
- Receiving payments via protocols such as: bolt11, lnurl-withdraw, btc address.
- Interacting with a wallet e.g. balance, max allow to pay, max allow to receive, on-chain balance.
To install the package:
$ go get github.com/breez/breez-sdk-liquid-go
This package embeds the Breez SDK - Liquid runtime compiled as shared library objects, and uses cgo
to consume it. A set of precompiled shared library objects are provided. Thus this package works (and is tested) on the following platforms:
Platform | Architecture | Triple | Status |
---|---|---|---|
Android | amd64 |
x86_64-linux-android |
✅ |
aarch64 |
aarch64-linux-android |
✅ | |
Darwin | amd64 |
x86_64-apple-darwin |
✅ |
aarch64 |
aarch64-apple-darwin |
✅ | |
Linux | amd64 |
x86_64-unknown-linux-gnu |
✅ |
aarch64 |
aarch64-unknown-linux-gnu |
✅ | |
Windows | amd64 |
x86_64-pc-windows-msvc |
✅ |
Head over to the Breez SDK - Liquid documentation to start implementing Lightning in your app.
package main
import (
"github.com/breez/breez-sdk-liquid-go/breez_sdk_liquid"
)
func main() {
mnemonic := "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"
config := breez_sdk_liquid.DefaultConfig(breez_sdk_liquid.LiquidNetworkTestnet)
sdk, err := breez_sdk_liquid.Connect(breez_sdk_liquid.ConnectRequest{
Config: config,
Mnemonic: mnemonic,
})
}
For some platforms the provided binding libraries need to be copied into a location where they need to be found during runtime.
Copy the binding libraries into the jniLibs directory of your app
cp vendor/github.com/breez/breez-sdk-liquid-go/breez_sdk_liquid/lib/android-aarch64/*.so android/app/src/main/jniLibs/arm64-v8a/
cp vendor/github.com/breez/breez-sdk-liquid-go/breez_sdk_liquid/lib/android-amd64/*.so android/app/src/main/jniLibs/x86_64/
So they are in the following structure
└── android
├── app
└── src
└── main
└── jniLibs
├── arm64-v8a
├── libbreez_sdk_liquid_bindings.so
└── libc++_shared.so
└── x86_64
├── libbreez_sdk_liquid_bindings.so
└── libc++_shared.so
└── AndroidManifest.xml
└── build.gradle
└── build.gradle
Copy the binding library to the same directory as the executable file or include the library into the windows install packager.
cp vendor/github.com/breez/breez-sdk-liquid-go/breez_sdk_liquid/lib/windows-amd64/*.dll build/windows/
This repository is used to publish a Go package providing Go bindings to the Breez SDK - Liquid's underlying Rust implementation. The Go bindings are generated using UniFFi Bindgen Go.
Any changes to Breez SDK - Liquid, the Go bindings, and the configuration of this Go package must be made via the breez-sdk-liquid repository.