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§
- AesSuccess
Action Data Decrypted - Wrapper for the decrypted AesSuccessActionData payload
- Bitcoin
Address Data - Wrapped in a [BitcoinAddress], this is the result of parse when given a plain or BIP-21 BTC address.
- Currency
Info - Details about a supported currency in the fiat rate feed
- Fiat
Currency - Wrapper around the CurrencyInfo of a fiat currency
- LNInvoice
- Wrapper for a BOLT11 LN invoice
- LnUrl
Auth Request Data - Wrapped in a [LnUrlAuth], this is the result of [parse] when given a LNURL-auth endpoint.
- LnUrl
Error Data - Wrapped in a [LnUrlError], this represents a LNURL-endpoint error.
- LnUrl
PayError Data - LnUrl
PayRequest - Represents a LNURL-pay request.
- LnUrl
PayRequest Data - Wrapped in a [LnUrlPay], this is the result of parse when given a LNURL-pay endpoint.
- LnUrl
Withdraw Request - LnUrl
Withdraw Request Data - Wrapped in a [LnUrlWithdraw], this is the result of parse when given a LNURL-withdraw endpoint.
- LnUrl
Withdraw Success Data - Locale
Overrides - Locale-specific settings for the representation of a currency
- Localized
Name - Localized name of a currency
- Message
Success Action Data - Rate
- Denominator in an exchange rate
- Route
Hint - A route hint for a LN payment
- Route
Hint Hop - Details of a specific hop in a larger route hint
- Symbol
- Settings for the symbol representation of a currency
- UrlSuccess
Action Data - _Aes
Success Action Data Decrypted - frb_marker: #[frb(mirror(AesSuccessActionDataDecrypted))]
- _Bitcoin
Address Data - frb_marker: #[frb(mirror(BitcoinAddressData))]
- _Currency
Info - frb_marker: #[frb(mirror(CurrencyInfo))]
- _Fiat
Currency - frb_marker: #[frb(mirror(FiatCurrency))]
- _LNInvoice
- frb_marker: #[frb(mirror(LNInvoice))]
- _LnUrl
Auth Request Data - frb_marker: #[frb(mirror(LnUrlAuthRequestData))]
- _LnUrl
Error Data - frb_marker: #[frb(mirror(LnUrlErrorData))]
- _LnUrl
PayError Data - frb_marker: #[frb(mirror(LnUrlPayErrorData))]
- _LnUrl
PayRequest - frb_marker: #[frb(mirror(LnUrlPayRequest))]
- _LnUrl
PayRequest Data - frb_marker: #[frb(mirror(LnUrlPayRequestData))]
- _LnUrl
Withdraw Request - frb_marker: #[frb(mirror(LnUrlWithdrawRequest))]
- _LnUrl
Withdraw Request Data - frb_marker: #[frb(mirror(LnUrlWithdrawRequestData))]
- _LnUrl
Withdraw Success Data - frb_marker: #[frb(mirror(LnUrlWithdrawSuccessData))]
- _Locale
Overrides - frb_marker: #[frb(mirror(LocaleOverrides))]
- _Localized
Name - frb_marker: #[frb(mirror(LocalizedName))]
- _Message
Success Action Data - frb_marker: #[frb(mirror(MessageSuccessActionData))]
- _Rate
- frb_marker: #[frb(mirror(Rate))]
- _Route
Hint - frb_marker: #[frb(mirror(RouteHint))]
- _Route
Hint Hop - frb_marker: #[frb(mirror(RouteHintHop))]
- _Symbol
- frb_marker: #[frb(mirror(Symbol))]
- _Url
Success Action Data - frb_marker: #[frb(mirror(UrlSuccessActionData))]
Enums§
- AesSuccess
Action Data Result - Result of decryption of AesSuccessActionData payload
- Input
Type - Different kinds of inputs supported by parse, including any relevant details extracted from the input
- LnUrl
Callback Status - Contains the result of the entire LNURL interaction, as reported by the LNURL endpoint.
- LnUrl
Error - LnUrl
Withdraw Result - LnUrlCallbackStatus specific to LNURL-withdraw, where the success case contains the invoice.
- Network
- The different supported bitcoin networks
- Success
Action Processed - SuccessAction where contents are ready to be consumed by the caller
- _Aes
Success Action Data Result - frb_marker: #[frb(mirror(AesSuccessActionDataResult))]
- _Input
Type - frb_marker: #[frb(mirror(InputType))]
- _LnUrl
Callback Status - frb_marker: #[frb(mirror(LnUrlCallbackStatus))]
- _LnUrl
PayError - frb_marker: #[frb(mirror(LnUrlPayError))]
- _LnUrl
Withdraw Result - frb_marker: #[frb(mirror(LnUrlWithdrawResult))]
- _Network
- frb_marker: #[frb(mirror(Network))]
- _Success
Action Processed - 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