Skip to main content

Crate breez_sdk_spark

Crate breez_sdk_spark 

Source

Re-exports§

pub use crate::token_conversion::AmountAdjustmentReason;
pub use crate::token_conversion::ConversionEstimate;
pub use crate::token_conversion::ConversionInfo;
pub use crate::token_conversion::ConversionOptions;
pub use crate::token_conversion::ConversionPurpose;
pub use crate::token_conversion::ConversionStatus;
pub use crate::token_conversion::ConversionType;
pub use crate::token_conversion::FetchConversionLimitsRequest;
pub use crate::token_conversion::FetchConversionLimitsResponse;

Modules§

payment_observer
signer
sync_storage
token_conversion

Structs§

AddContactRequest
Request to add a new contact.
AesSuccessActionData
Payload of the AES success action, as received from the LNURL endpoint
AesSuccessActionDataDecrypted
Wrapper for the decrypted AesSuccessActionData payload
AuthorizeTransferRequest
Request for [BreezSdk::authorize_lightning_address_transfer]. Called by the current owner to authorize handing their registered username over to transferee_pubkey.
Bip21Details
Bip21Extra
BitcoinAddressDetails
Bolt11Invoice
Bolt11InvoiceDetails
Bolt11RouteHint
Bolt11RouteHintHop
Bolt12Invoice
Bolt12InvoiceDetails
Bolt12InvoiceRequestDetails
Bolt12Offer
Bolt12OfferBlindedPath
Bolt12OfferDetails
BreezSdk
BreezSDK is a wrapper around SparkSDK that provides a more structured API with request/response objects and comprehensive error handling.
BuildUnsignedLnurlPayPackageRequest
BuildUnsignedTransferPackageRequest
BurnIssuerTokenRequest
BuyBitcoinResponse
Response containing a URL to complete the Bitcoin purchase
CheckLightningAddressRequest
CheckMessageRequest
CheckMessageResponse
ClaimDepositRequest
ClaimDepositResponse
ClaimHtlcPaymentRequest
ClaimHtlcPaymentResponse
ClaimTransferRequest
Request for [BreezSdk::claim_lightning_address_transfer]. Called by the new owner to complete the takeover using the authorization produced by the current owner.
CombinedHeaderProvider
Composes multiple HeaderProviders by fanning out their headers() calls in parallel and merging the results. On key collisions, later providers win.
Config
ConnectRequest
ConnectWithSignerRequest
Request object for connecting to the Spark network using an external signer.
ConnectWithSigningOnlySignerRequest
Request object for connecting to the Spark network using a signing-only external signer.
Contact
A contact entry containing a name and payment identifier.
Conversion
A single conversion in a payment’s conversion chain.
ConversionAsset
The asset on a ConversionSide — groups the ticker, stable identifier, and decimals that always travel together.
ConversionDetails
Outlines the steps involved in one or more conversions on a payment.
ConversionSide
One side (source or destination) of a conversion.
CreateIssuerTokenRequest
Credentials
CrossChainAddressDetails
CrossChainConfig
Configuration for cross-chain sends.
CrossChainRoutePair
A single route available for cross-chain transfers, tagged with the provider that offers it. Returned by get_cross_chain_routes().
CurrencyInfo
Details about a supported currency in the fiat rate feed
DepositInfo
EventEmitter
Event publisher that manages event listeners and middleware.
ExternalInputParser
Configuration for an external input parser
ExternalSigners
The two default external signers created from one mnemonic by default_external_signers.
FiatCurrency
Wrapper around the CurrencyInfo of a fiat currency
FreezeIssuerTokenRequest
FreezeIssuerTokenResponse
GetInfoRequest
Request to get the balance of the wallet
GetInfoResponse
Response containing the balance of the wallet
GetPaymentRequest
GetPaymentResponse
GetTokensMetadataRequest
GetTokensMetadataResponse
LeafOptimizationConfig
Configuration for leaf optimization.
LightningAddressDetails
LightningAddressInfo
ListContactsRequest
Request to list contacts with optional pagination.
ListFiatCurrenciesResponse
Response from listing fiat currencies
ListFiatRatesResponse
Response from listing fiat rates
ListPaymentsRequest
Request to list payments with optional filters and pagination
ListPaymentsResponse
Response from listing payments
ListUnclaimedDepositsRequest
ListUnclaimedDepositsResponse
LnurlAuthRequestDetails
Wrapped in a InputType::LnurlAuth, this is the result of parse when given a LNURL-auth endpoint.
LnurlErrorDetails
LNURL error details
LnurlInfo
LnurlPayContext
LnurlPayInfo
Represents the payment LNURL info
LnurlPayRequest
LnurlPayRequestDetails
LnurlPayResponse
LnurlReceiveMetadata
LnurlWithdrawInfo
Represents the withdraw LNURL info
LnurlWithdrawRequest
LnurlWithdrawRequestDetails
LnurlWithdrawResponse
LocaleOverrides
Locale-specific settings for the representation of a currency
LocalizedName
Localized name of a currency
LogEntry
MessageSuccessActionData
MintIssuerTokenRequest
OptimizeLeavesRequest
Request for [BreezSdk::optimize_leaves]. Defaults to OptimizationMode::Full.
OptimizeLeavesResponse
Response from a [BreezSdk::optimize_leaves] call.
Payment
Represents a payment (sent or received)
PaymentIdUpdate
PaymentMetadata
Metadata associated with a payment that cannot be extracted from the Spark operator.
PaymentRequestSource
PrebuiltBackend
A StorageBackend over caller-supplied store implementations.
PrepareLnurlPayRequest
PrepareLnurlPayResponse
PrepareSendPaymentRequest
PrepareSendPaymentResponse
ProvisionalPayment
PublicKey
Public key - used to verify ECDSA signatures and to do Taproot tweaks.
PublishSignedLnurlPayPackageRequest
PublishSignedTransferPackageRequest
Rate
Denominator in an exchange rate
ReceivePaymentRequest
ReceivePaymentResponse
RecommendedFees
RefundDepositRequest
RefundDepositResponse
RegisterLightningAddressRequest
RegisterWebhookRequest
Request to register a new webhook.
RegisterWebhookResponse
Response from registering a webhook.
ResolvedStores
The four per-tenant stores produced by a StorageBackend.
RestClientChainService
REST-backed BitcoinChainService.
RestResponse
SdkBuilder
Builder for creating BreezSdk instances with customizable components.
SdkContext
Process-shared resources that can back many BreezSdk instances.
SdkContextConfig
Settings for new_shared_sdk_context. All fields are optional; the defaults match the single-SDK happy path.
SendOnchainFeeQuote
SendOnchainSpeedFeeQuote
SendPaymentRequest
SendPaymentResponse
Session
Cached authentication session for a single backend service identity.
SessionStoreAdapter
Adapts an SDK-facing SessionStore to the [spark_wallet] session-store trait (which has its own identical-shape trait).
SetLnurlMetadataItem
SignMessageRequest
SignMessageResponse
SignedTransferPackage
SigningOnlyExternalSigners
A signing-only external signer paired with the Spark signer, for wallets that connect via [connect_with_signing_only_signer]. The Breez half performs signing only, without the SDK’s local ECIES/HMAC operations.
SilentPaymentAddressDetails
SparkAddressDetails
SparkConfig
Configuration for a custom Spark environment.
SparkHtlcDetails
SparkHtlcOptions
SparkInvoiceDetails
SparkInvoicePaymentDetails
SparkSigningOperator
A Spark signing operator.
SparkSspConfig
Configuration for the Spark Service Provider (SSP).
SparkStatus
The status of the Spark network services relevant to the SDK.
StableBalanceConfig
Configuration for automatic conversion of Bitcoin to stable tokens.
StableBalanceToken
A stable token that can be used for automatic balance conversion.
StorageListPaymentsRequest
Storage-internal variant of ListPaymentsRequest that uses StoragePaymentDetailsFilter instead of the public PaymentDetailsFilter.
StoredCrossChainSwap
A cross-chain swap row as persisted and synced. Shared across providers (Boltz, Orchestra, future) so each provider’s adapter writes opaque JSON into data and (optionally) opaque ciphertext into secrets.
Symbol
Settings for the symbol representation of a currency
SyncWalletRequest
Request to sync the wallet with the Spark network
SyncWalletResponse
Response from synchronizing the wallet
TokenBalance
TokenIssuer
TokenMetadata
TokenOptimizationConfig
Configuration for token-output optimization.
TransferAuthorization
Authorization from the current owner granting a specific new owner the right to take over a username. Produced by [BreezSdk::authorize_lightning_address_transfer] and handed to the new owner, who passes it to [BreezSdk::claim_lightning_address_transfer]. It fully describes the transfer, so the new owner needs nothing else to claim.
TxStatus
UnfreezeIssuerTokenRequest
UnfreezeIssuerTokenResponse
UnregisterWebhookRequest
Request to unregister an existing webhook.
UpdateContactRequest
Request to update an existing contact.
UpdateUserSettingsRequest
UrlSuccessActionData
UserSettings
Utxo
Webhook
A registered webhook entry.

Enums§

AesSuccessActionDataResult
Result of decryption of AesSuccessActionData payload
Amount
AssetFilter
A field of ListPaymentsRequest when listing payments filtered by asset
AutoOptimizationEvent
Bip21Error
BitcoinNetwork
BuildTransferPackageOptions
BuyBitcoinRequest
The available providers for buying Bitcoin Request to buy Bitcoin using an external provider.
ChainApiType
ChainServiceError
ConversionChain
The chain or network that a ConversionSide lives on.
ConversionFilter
Selects payments by conversion type + status for background tasks.
ConversionProvider
The provider that performed a conversion.
CrossChainAddressFamily
CrossChainFeeMode
How the caller wants fees handled against the request amount.
CrossChainProvider
CrossChainProviderContext
Provider-internal state produced by prepare and consumed by send. Typed per provider so the send stage can resume without re-quoting and without a serde round-trip. Callers should round-trip this value as-is.
CrossChainRouteFilter
Filter for [CrossChainService::get_routes] and the public get_cross_chain_routes() API.
DepositClaimError
Fee
FeePolicy
Specifies how fees are handled in a payment.
HeaderProviderError
InputType
LnurlCallbackStatus
The response from a LNURL-auth callback, indicating success or failure.
LnurlError
MaxFee
Network
OnchainConfirmationSpeed
OptimizationMode
Mode of a manually-triggered optimization run.
OptimizationOutcome
Outcome of a [BreezSdk::optimize_leaves] call.
ParseError
PaymentDetails
PaymentDetailsFilter
PaymentMethod
PaymentObserverError
PaymentRequest
The payment destination. Either a raw string (bolt11, spark address, BIP-21, cross-chain URI, etc.) that is parsed internally, or a structured cross-chain destination with explicit chain + asset selection.
PaymentStatus
The status of a payment
PaymentType
The type of payment
ProvisionalPaymentDetails
PublishSignedLnurlPayResponse
PublishSignedTransferPackageResponse
ReceivePaymentMethod
SdkError
Error type for the BreezSdk
SdkEvent
Events emitted by the SDK
Seed
Represents the seed for wallet generation, either as a mnemonic phrase with an optional passphrase or as raw entropy bytes.
SendPaymentMethod
SendPaymentOptions
ServiceConnectivityError
ServiceStatus
The operational status of a Spark service.
SessionStoreError
SignerError
Error type for signer operations
SourceAsset
The source asset a cross-chain route accepts as input on the Spark side.
SparkHtlcStatus
StableBalanceActiveLabel
Specifies how to update the active stable balance token.
StorageError
Errors that can occur during storage operations
StoragePaymentDetailsFilter
Storage-internal variant of PaymentDetailsFilter.
SuccessAction
Supported success action types
SuccessActionProcessed
SuccessAction where contents are ready to be consumed by the caller
TokenTransactionType
TransferSignature
TransferTarget
UnsignedTransferPackage
UpdateDepositPayload
WebhookEventType
The type of event that triggers a webhook notification.

Constants§

DEFAULT_EXTERNAL_INPUT_PARSERS
A list of external input parsers that are used by default. To opt-out, set use_default_external_input_parsers in Config to false.
DEFAULT_FILTER
Default tracing filter: info globally, debug for first-party crates, and noisy third-party crates silenced below warn. Shared with the WASM bindings so both default to the same behaviour.

Traits§

BitcoinChainService
EventListener
Trait for event listeners
FiatService
Trait covering fiat-related functionality
HeaderProvider
Logger
PaymentObserver
This interface is used to observe outgoing Lightning, Spark, onchain Bitcoin and token payments.
RestClient
REST client trait for making HTTP requests.
SessionStore
Persistent storage for authentication sessions, keyed by the service’s identity public key. Implementations should be thread-safe and may be backed by an in-memory map (default) or a shared database for cross-pod auth sharing.
Storage
Trait for persistent storage
StorageBackend
A factory for a tenant’s storage.

Functions§

account_master_key
The Spark account master (base): m/8797555'/{account}'. Every wallet key derives from it (identity at 0', leaf signing under 1', static deposit under 3'). account_no falls back to a per-network default when unset.
custom_storage
Wraps a caller-supplied Storage implementation as a StorageBackend. The tree, token-output and session stores use the in-memory defaults.
default_config
default_external_signers
Creates the default external signers from a mnemonic.
default_server_config
Builds a Config suitable for multi-tenant server-mode deployments.
default_session_store
The session store backend provides for identity on network (its own persistence: PostgreSQL/MySQL when the backend is DB-backed, else an in-memory store).
default_storage_path
get_spark_status
Fetches the current status of Spark network services relevant to the SDK.
identity_master_key
The wallet identity master (base/0'): the BreezSigner derivation root and the Spark identity / ECIES key.
identity_public_key
The wallet identity public key (base/0'). Lets storage be scoped per wallet before any signer is built.
init_logging
new_rest_chain_service
Constructs a shareable REST-based BitcoinChainService.
new_shared_sdk_context
Constructs an SdkContext from a SdkContextConfig.
parse_input