Module breez_sdk_core::binding
source · Expand description
Bindings for the Dart integration
§Error handling
Since the integration requires the methods to return anyhow::Result
, but the SDK service methods
are being converted to return SdkResult
, we have two ways to handle errors:
- by using
Into::into
, which converts theSdkError
enum to a genericanyhow::Error
- by wrapping the
SdkError
in ananyhow::Error
The first option loses the SdkError
type. The second option keeps the type, which we can retrieve
with anyhow::Error::downcast_ref
(or equivalent Dart method). We therefore use the second approach.
Structs§
- Wrapper for the decrypted AesSuccessActionData payload
- Wrapped in a [BitcoinAddress], this is the result of parse when given a plain or BIP-21 BTC address.
- Details about a supported currency in the fiat rate feed
- Wrapper around the CurrencyInfo of a fiat currency
- Wrapper for a BOLT11 LN invoice
- Wrapped in a [LnUrlAuth], this is the result of [parse] when given a LNURL-auth endpoint.
- Wrapped in a [LnUrlError], this represents a LNURL-endpoint error.
- Represents a LNURL-pay request.
- Wrapped in a [LnUrlPay], this is the result of parse when given a LNURL-pay endpoint.
- Wrapped in a [LnUrlWithdraw], this is the result of parse when given a LNURL-withdraw endpoint.
- Locale-specific settings for the representation of a currency
- Localized name of a currency
- Denominator in an exchange rate
- A route hint for a LN payment
- Details of a specific hop in a larger route hint
- Settings for the symbol representation of a currency
- frb_marker: #[frb(mirror(AesSuccessActionDataDecrypted))]
- frb_marker: #[frb(mirror(BitcoinAddressData))]
- frb_marker: #[frb(mirror(CurrencyInfo))]
- frb_marker: #[frb(mirror(FiatCurrency))]
- frb_marker: #[frb(mirror(LNInvoice))]
- frb_marker: #[frb(mirror(LnUrlAuthRequestData))]
- frb_marker: #[frb(mirror(LnUrlErrorData))]
- frb_marker: #[frb(mirror(LnUrlPayErrorData))]
- frb_marker: #[frb(mirror(LnUrlPayRequest))]
- frb_marker: #[frb(mirror(LnUrlPayRequestData))]
- frb_marker: #[frb(mirror(LnUrlWithdrawRequest))]
- frb_marker: #[frb(mirror(LnUrlWithdrawRequestData))]
- frb_marker: #[frb(mirror(LnUrlWithdrawSuccessData))]
- frb_marker: #[frb(mirror(LocaleOverrides))]
- frb_marker: #[frb(mirror(LocalizedName))]
- frb_marker: #[frb(mirror(MessageSuccessActionData))]
- frb_marker: #[frb(mirror(Rate))]
- frb_marker: #[frb(mirror(RouteHint))]
- frb_marker: #[frb(mirror(RouteHintHop))]
- frb_marker: #[frb(mirror(Symbol))]
- frb_marker: #[frb(mirror(UrlSuccessActionData))]
Enums§
- Result of decryption of AesSuccessActionData payload
- Different kinds of inputs supported by parse, including any relevant details extracted from the input
- Contains the result of the entire LNURL interaction, as reported by the LNURL endpoint.
- LnUrlCallbackStatus specific to LNURL-withdraw, where the success case contains the invoice.
- The different supported bitcoin networks
- SuccessAction where contents are ready to be consumed by the caller
- frb_marker: #[frb(mirror(AesSuccessActionDataResult))]
- frb_marker: #[frb(mirror(InputType))]
- frb_marker: #[frb(mirror(LnUrlCallbackStatus))]
- frb_marker: #[frb(mirror(LnUrlPayError))]
- frb_marker: #[frb(mirror(LnUrlWithdrawResult))]
- frb_marker: #[frb(mirror(Network))]
- frb_marker: #[frb(mirror(SuccessActionProcessed))]
Functions§
- If used, this must be called before
connect
. It can only be called once. - If used, this must be called before
connect
. It can only be called once. - Wrapper around BreezServices::connect which also initializes SDK logging
- Cleanup node resources and stop the signer.
- Check whether node service is initialized or not
- Parses generic user input, typically pasted from clipboard or scanned from a QR.