Files
breez-sdk-liquid/cli
Erdem Yerebasmaz f6fa503cb9 Flutter uniFFI (#510)
* Flutter uniffi

* Set on-demand resources

* Do not build non-uniffi libraries

* Change iosLibName

* Add BreezSDKLiquid as on demand resources

* Use downloaded framework

* Add Sources to published flutter package

* Set OTHER_LDFLAGS

* Add logging

* Refactor library initialization logic and throw an error if initialization fails

* Do not statically link framework on production

* Use uniFFI headers to generate FlutterBreezLiquidBindings

* Re add frb header

* Correct the library name

* Remove static_framework

* Move source header files

* Copy iOS podspecs to macOS folder

* Update version of macOS podspecs

* Remove Windows & Linux support

* Remove CMake scripts

* Remove breez_sdk_liquid.podspec from version script

* Cleanup older build scripts used by melos & just recipes

* Remove softlink & copy recipes

Add recipe descriptions

* Rename link-uniffi recipe to link-headers

Make sure headers are linked after uniffi is built
  - Remove just gen recipe
Add recipe descriptions

* Set package versions on production files as well when publishing

* Include bindings project on melos script hooks

* Flutter uniffi

* Set on-demand resources

* Do not build non-uniffi libraries

* Change iosLibName

* Add BreezSDKLiquid as on demand resources

* Use downloaded framework

* Add Sources to published flutter package

* Set OTHER_LDFLAGS

* Add logging

* Refactor library initialization logic and throw an error if initialization fails

* Do not statically link framework on production

* Use uniFFI headers to generate FlutterBreezLiquidBindings

* Re add frb header

* Correct the library name

* Remove static_framework

* Move source header files

* Copy iOS podspecs to macOS folder

* Update version of macOS podspecs

* Remove Windows & Linux support

* Remove CMake scripts

* Remove breez_sdk_liquid.podspec from version script

* Cleanup older build scripts used by melos & just recipes

* Remove softlink & copy recipes

Add recipe descriptions

* Rename link-uniffi recipe to link-headers

Make sure headers are linked after uniffi is built
  - Remove just gen recipe
Add recipe descriptions

* Set package versions on production files as well when publishing

* Include bindings project on melos script hooks

* chore: just version

* fix: remove unused files on "Set package version" step

* copy FFI header files

* [WIP] Add macOS support

* remove example app on Flutter plugin

* Link headers before running ffigen on CI workflow

* macOS: add macos/Sources folder to .gitignore

.

* macOS: Copy iOS sources to macOS sources after downloading bindings

* macOS: copy sources & framework file to macos folder on build-uniffi-swift script

* import breez_sdk_liquidFFI header on plugin file

Update flutter_breez_liquid.c

* cleanup header file artifacts

---------

Co-authored-by: Ross Savage <hello@satimoto.com>
2024-10-01 10:59:11 +03:00
..
2024-09-25 10:51:17 +02:00
2024-05-25 06:20:14 +02:00
2024-10-01 10:59:11 +03:00
2024-09-25 09:31:55 +03:00
2024-09-03 10:51:28 +02:00

Breez SDK - Liquid CLI

A simple cli tool that sends commands to the sdk. It is intended to demonstrate the usage and investigate issues that are hard to debug on mobile platforms.

Run

Start the CLI with

cargo run

To set a specific network, use one of

cargo run -- --network mainnet
cargo run -- --network testnet

To specify a custom data directory, use

cargo run -- --data-dir temp-dir

Using testnet

You'll need a Testnet LN node to test the sending and receiving operations. A simple solution is using Alby's testnet nodes. Read more about Alby's test setup here.

Commands

To get a full list of commands run -h or <command> -h to get more information about a command.

  • send-payment - Send lbtc and receive btc lightning through a swap
  • fetch-lightning-limits - Fetch the current limits for Send and Receive payments
  • fetch-onchain-limits - Fetch the current limits for Onchain Send and Receive payments
  • send-onchain-payment - Send lbtc and receive btc onchain through a swap
  • receive-payment - Receive lbtc and send btc through a swap
  • buy-bitcoin - Generates an URL to buy bitcoin from a 3rd party provider
  • list-payments - List incoming and outgoing payments
  • list-refundables - List refundable chain swaps
  • prepare-refund - Prepare a refund transaction for an incomplete swap
  • refund - Broadcast a refund transaction for an incomplete swap
  • rescan-onchain-swaps - Rescan onchain swaps
  • get-info - Get the balance and general info of the current instance
  • sign-message - Sign a message using the wallet private key
  • check-message - Verify a message with a public key
  • sync - Sync local data with mempool and onchain data
  • recommended-fees - Get the recommended BTC fees based on the configured mempool.space instance
  • empty-cache - Empties the encrypted transaction cache
  • backup - Backs up the current pending swaps
  • restore - Retrieve a list of backups
  • disconnect - Shuts down all background threads of this SDK instance
  • parse - Parse a generic string to get its type and relevant metadata
  • lnurl-pay - Pay using LNURL
  • lnurl-withdraw - Withdraw using LNURL
  • lnurl-auth - Auth using LNURL
  • register-webhook - Register a webhook URL
  • unregister-webhook - Unregister the webhook URL
  • list-fiat - List fiat currencies
  • fetch-fiat-rates - Fetch available fiat rates