Module 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 the SdkError enum to a generic anyhow::Error
  • by wrapping the SdkError in an anyhow::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§

AesSuccessActionDataDecrypted
Wrapper for the decrypted AesSuccessActionData payload
BitcoinAddressData
Wrapped in a [BitcoinAddress], this is the result of parse when given a plain or BIP-21 BTC address.
CurrencyInfo
Details about a supported currency in the fiat rate feed
FiatCurrency
Wrapper around the CurrencyInfo of a fiat currency
LNInvoice
Wrapper for a BOLT11 LN invoice
LnUrlAuthRequestData
Wrapped in a [LnUrlAuth], this is the result of [parse] when given a LNURL-auth endpoint.
LnUrlErrorData
Wrapped in a [LnUrlError], this represents a LNURL-endpoint error.
LnUrlPayErrorData
LnUrlPayRequest
Represents a LNURL-pay request.
LnUrlPayRequestData
Wrapped in a [LnUrlPay], this is the result of parse when given a LNURL-pay endpoint.
LnUrlWithdrawRequest
LnUrlWithdrawRequestData
Wrapped in a [LnUrlWithdraw], this is the result of parse when given a LNURL-withdraw endpoint.
LnUrlWithdrawSuccessData
LocaleOverrides
Locale-specific settings for the representation of a currency
LocalizedName
Localized name of a currency
MessageSuccessActionData
Rate
Denominator in an exchange rate
RouteHint
A route hint for a LN payment
RouteHintHop
Details of a specific hop in a larger route hint
Symbol
Settings for the symbol representation of a currency
UrlSuccessActionData
_AesSuccessActionDataDecrypted
frb_marker: #[frb(mirror(AesSuccessActionDataDecrypted))]
_BitcoinAddressData
frb_marker: #[frb(mirror(BitcoinAddressData))]
_CurrencyInfo
frb_marker: #[frb(mirror(CurrencyInfo))]
_FiatCurrency
frb_marker: #[frb(mirror(FiatCurrency))]
_LNInvoice
frb_marker: #[frb(mirror(LNInvoice))]
_LnUrlAuthRequestData
frb_marker: #[frb(mirror(LnUrlAuthRequestData))]
_LnUrlErrorData
frb_marker: #[frb(mirror(LnUrlErrorData))]
_LnUrlPayErrorData
frb_marker: #[frb(mirror(LnUrlPayErrorData))]
_LnUrlPayRequest
frb_marker: #[frb(mirror(LnUrlPayRequest))]
_LnUrlPayRequestData
frb_marker: #[frb(mirror(LnUrlPayRequestData))]
_LnUrlWithdrawRequest
frb_marker: #[frb(mirror(LnUrlWithdrawRequest))]
_LnUrlWithdrawRequestData
frb_marker: #[frb(mirror(LnUrlWithdrawRequestData))]
_LnUrlWithdrawSuccessData
frb_marker: #[frb(mirror(LnUrlWithdrawSuccessData))]
_LocaleOverrides
frb_marker: #[frb(mirror(LocaleOverrides))]
_LocalizedName
frb_marker: #[frb(mirror(LocalizedName))]
_MessageSuccessActionData
frb_marker: #[frb(mirror(MessageSuccessActionData))]
_Rate
frb_marker: #[frb(mirror(Rate))]
_RouteHint
frb_marker: #[frb(mirror(RouteHint))]
_RouteHintHop
frb_marker: #[frb(mirror(RouteHintHop))]
_Symbol
frb_marker: #[frb(mirror(Symbol))]
_UrlSuccessActionData
frb_marker: #[frb(mirror(UrlSuccessActionData))]

Enums§

AesSuccessActionDataResult
Result of decryption of AesSuccessActionData payload
InputType
Different kinds of inputs supported by parse, including any relevant details extracted from the input
LnUrlCallbackStatus
Contains the result of the entire LNURL interaction, as reported by the LNURL endpoint.
LnUrlError
LnUrlWithdrawResult
LnUrlCallbackStatus specific to LNURL-withdraw, where the success case contains the invoice.
Network
The different supported bitcoin networks
SuccessActionProcessed
SuccessAction where contents are ready to be consumed by the caller
_AesSuccessActionDataResult
frb_marker: #[frb(mirror(AesSuccessActionDataResult))]
_InputType
frb_marker: #[frb(mirror(InputType))]
_LnUrlCallbackStatus
frb_marker: #[frb(mirror(LnUrlCallbackStatus))]
_LnUrlPayError
frb_marker: #[frb(mirror(LnUrlPayError))]
_LnUrlWithdrawResult
frb_marker: #[frb(mirror(LnUrlWithdrawResult))]
_Network
frb_marker: #[frb(mirror(Network))]
_SuccessActionProcessed
frb_marker: #[frb(mirror(SuccessActionProcessed))]

Functions§

backup
See BreezServices::backup
backup_status
See BreezServices::backup_status
breez_events_stream
If used, this must be called before connect. It can only be called once.
breez_log_stream
If used, this must be called before connect. It can only be called once.
buy_bitcoin
See BreezServices::buy_bitcoin
check_message
See BreezServices::check_message
claim_reverse_swap
See BreezServices::claim_reverse_swap
close_lsp_channels
See BreezServices::close_lsp_channels
configure_node
See BreezServices::configure_node
connect
Wrapper around BreezServices::connect which also initializes SDK logging
connect_lsp
See BreezServices::connect_lsp
default_config
See BreezServices::default_config
disconnect
Cleanup node resources and stop the signer.
execute_command
See BreezServices::execute_dev_command
fetch_fiat_rates
See BreezServices::fetch_fiat_rates
fetch_lsp_info
See BreezServices::fetch_lsp_info
fetch_reverse_swap_fees
See BreezServices::fetch_reverse_swap_fees
generate_diagnostic_data
See BreezServices::generate_diagnostic_data
in_progress_onchain_payments
See BreezServices::in_progress_onchain_payments
in_progress_swap
See BreezServices::in_progress_swap
is_initialized
Check whether node service is initialized or not
list_fiat_currencies
See BreezServices::list_fiat_currencies
list_lsps
See BreezServices::list_lsps
list_payments
See BreezServices::list_payments
list_refundables
See BreezServices::list_refundables
list_swaps
See BreezServices::list_swaps
lnurl_auth
See BreezServices::lnurl_auth
lnurl_pay
See BreezServices::lnurl_pay
lnurl_withdraw
See BreezServices::lnurl_withdraw
lsp_id
See BreezServices::lsp_id
lsp_info
See BreezServices::lsp_info
mnemonic_to_seed
See breez_services::mnemonic_to_seed
node_credentials
See BreezServices::node_credentials
node_info
See BreezServices::node_info
onchain_payment_limits
See BreezServices::onchain_payment_limits
open_channel_fee
See BreezServices::open_channel_fee
parse
Parses generic user input, typically pasted from clipboard or scanned from a QR.
parse_input
parse_invoice
pay_onchain
See BreezServices::pay_onchain
payment_by_hash
See BreezServices::list_payments
prepare_onchain_payment
See BreezServices::prepare_onchain_payment
prepare_redeem_onchain_funds
See BreezServices::prepare_redeem_onchain_funds
prepare_refund
See BreezServices::prepare_refund
receive_onchain
See BreezServices::receive_onchain
receive_payment
See BreezServices::receive_payment
recommended_fees
See BreezServices::recommended_fees
redeem_onchain_funds
See BreezServices::redeem_onchain_funds
redeem_swap
See BreezServices::redeem_swap
refund
See BreezServices::refund
register_webhook
report_issue
See BreezServices::report_issue
rescan_swaps
See BreezServices::rescan_swaps
send_payment
See BreezServices::send_payment
send_spontaneous_payment
See BreezServices::send_spontaneous_payment
service_health_check
See BreezServices::service_health_check
set_payment_metadata
See BreezServices::set_payment_metadata
sign_message
See BreezServices::sign_message
static_backup
See BreezServices::static_backup
sync
See BreezServices::sync
unregister_webhook