Skip to content

Commit f91aa69

Browse files
committed
Sync using sparkscan
1 parent f721f83 commit f91aa69

File tree

21 files changed

+1369
-690
lines changed

21 files changed

+1369
-690
lines changed

Cargo.lock

Lines changed: 212 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/breez-sdk/core/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ uuid.workspace = true
5353
uniffi = { workspace = true, optional = true }
5454
web-time.workspace = true
5555
x509-parser = { version = "0.16.0" }
56+
sparkscan = { version = "0.3.7" }
5657

5758
# Non-Wasm dependencies
5859
[target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dependencies]

crates/breez-sdk/core/src/error.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ pub enum SdkError {
4949
#[error("Lnurl error: {0}")]
5050
LnurlError(String),
5151

52+
#[error("SparkScan error: {0}")]
53+
SparkScanApiError(String),
54+
5255
#[error("Error: {0}")]
5356
Generic(String),
5457
}
@@ -131,6 +134,12 @@ impl From<uuid::Error> for SdkError {
131134
}
132135
}
133136

137+
impl From<sparkscan::Error<sparkscan::types::HttpValidationError>> for SdkError {
138+
fn from(e: sparkscan::Error<sparkscan::types::HttpValidationError>) -> Self {
139+
SdkError::SparkScanApiError(format!("{e:?}"))
140+
}
141+
}
142+
134143
#[derive(Debug, Clone, Serialize, Deserialize, Error, PartialEq)]
135144
#[cfg_attr(feature = "uniffi", derive(uniffi::Enum))]
136145
pub enum DepositClaimError {
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mod spark_sdk;
2+
pub(crate) mod sparkscan;

0 commit comments

Comments
 (0)