Skip to content

breez/breez-sdk-liquid-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Breez SDK - Liquid

Overview

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.

What Is the Liquid Implementation?

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.

Installation

To install the package:

$ go get github.com/breez/breez-sdk-liquid-go

Supported platforms

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
aarch armv7-linux-androideabi
386 i686-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

Usage

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,
    })
}

Bundling

For some platforms the provided binding libraries need to be copied into a location where they need to be found during runtime.

Android

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-386/*.so android/app/src/main/jniLibs/x86/
cp vendor/github.com/breez/breez-sdk-liquid-go/breez_sdk_liquid/lib/android-aarch/*.so android/app/src/main/jniLibs/armeabi-v7a/
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
                    ├── armeabi-v7a
                        ├── libbreez_sdk_liquid_bindings.so
                        └── libc++_shared.so
                    ├── x86
                        ├── libbreez_sdk_liquid_bindings.so
                        └── libc++_shared.so
                    └── x86_64
                        ├── libbreez_sdk_liquid_bindings.so
                        └── libc++_shared.so
                └── AndroidManifest.xml
        └── build.gradle
    └── build.gradle

Windows

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/

Information for Maintainers and Contributors

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published