mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2026-02-23 06:54:20 +01:00
Merge branch 'debug-ios-crash-on-push'
* debug-ios-crash-on-push: update version to 0.7.0-rc3 Switch to pure AES implementation in ecies (#716) update version to 0.7.0-rc2 Add logging to handle_push update version to 0.7.0-rc1
This commit is contained in:
2
cli/Cargo.lock
generated
2
cli/Cargo.lock
generated
@@ -736,7 +736,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "breez-sdk-liquid"
|
||||
version = "0.4.0-rc3"
|
||||
version = "0.7.0-rc3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
|
||||
6
lib/Cargo.lock
generated
6
lib/Cargo.lock
generated
@@ -600,7 +600,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "bindings-react-native"
|
||||
version = "0.4.0-rc3"
|
||||
version = "0.7.0-rc3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"askama 0.11.1",
|
||||
@@ -815,7 +815,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "breez-sdk-liquid"
|
||||
version = "0.4.0-rc3"
|
||||
version = "0.7.0-rc3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@@ -865,7 +865,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "breez-sdk-liquid-bindings"
|
||||
version = "0.4.0-rc3"
|
||||
version = "0.7.0-rc3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"breez-sdk-liquid",
|
||||
|
||||
@@ -28,7 +28,7 @@ members = [
|
||||
resolver = "2"
|
||||
|
||||
[workspace.package]
|
||||
version = "0.4.0-rc3"
|
||||
version = "0.7.0-rc3"
|
||||
|
||||
[workspace.lints.clippy]
|
||||
empty_line_after_doc_comments = "allow"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "bindings-react-native"
|
||||
version = "0.4.0-rc3"
|
||||
version = "0.7.0-rc3"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@@ -4,6 +4,7 @@ use std::time::Duration;
|
||||
|
||||
use anyhow::{anyhow, Result};
|
||||
use futures_util::TryFutureExt;
|
||||
use log::trace;
|
||||
use tokio::sync::mpsc::Receiver;
|
||||
use tokio::sync::{watch, Mutex};
|
||||
|
||||
@@ -386,21 +387,28 @@ impl SyncService {
|
||||
|
||||
// Step 1: Get the sync state, if it exists, to compute the revision
|
||||
let maybe_sync_state = self.persister.get_sync_state_by_record_id(record_id)?;
|
||||
trace!("Got sync state: {}", maybe_sync_state.is_some());
|
||||
let record_revision = maybe_sync_state
|
||||
.as_ref()
|
||||
.map(|s| s.record_revision)
|
||||
.unwrap_or(0);
|
||||
trace!("Got revision: {}", record_revision);
|
||||
let is_local = maybe_sync_state.map(|s| s.is_local).unwrap_or(true);
|
||||
trace!("Got is local: {}", is_local);
|
||||
|
||||
// Step 2: Fetch the sync data
|
||||
let sync_data = self.load_sync_data(data_id, record_type)?;
|
||||
trace!("Got sync data: {sync_data:?}");
|
||||
|
||||
// Step 3: Create the record to push outwards
|
||||
let record = Record::new(sync_data, record_revision, self.signer.clone())?;
|
||||
trace!("Got record: {record:?}");
|
||||
|
||||
// Step 4: Push the record
|
||||
let req = SetRecordRequest::new(record, utils::now(), self.signer.clone())?;
|
||||
trace!("Got set record request: {req:?}");
|
||||
let reply = self.client.push(req).await?;
|
||||
trace!("Got reply: {reply:?}");
|
||||
|
||||
// Step 5: Check for conflict. If present, skip and retry on the next call
|
||||
if reply.status() == SetRecordStatus::Conflict {
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
use anyhow::Result;
|
||||
use lwk_wollet::hashes::hex::DisplayHex as _;
|
||||
use openssl::sha::sha256;
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::{
|
||||
prelude::{Signer, SignerError},
|
||||
utils,
|
||||
};
|
||||
use anyhow::Result;
|
||||
use log::trace;
|
||||
use lwk_wollet::hashes::hex::DisplayHex as _;
|
||||
use openssl::sha::sha256;
|
||||
use std::sync::Arc;
|
||||
|
||||
use super::{ListChangesRequest, Record, SetRecordRequest, CURRENT_SCHEMA_VERSION, MESSAGE_PREFIX};
|
||||
|
||||
fn sign_message(msg: &[u8], signer: Arc<Box<dyn Signer>>) -> Result<String, SignerError> {
|
||||
let msg = [MESSAGE_PREFIX, msg].concat();
|
||||
trace!("About to compute sha256 hash of msg: {msg:?}");
|
||||
let digest = sha256(&sha256(&msg));
|
||||
trace!("About to sign digest: {digest:?}");
|
||||
signer
|
||||
.sign_ecdsa_recoverable(digest.into())
|
||||
.map(|bytes| zbase32::encode_full_bytes(&bytes))
|
||||
@@ -44,7 +46,9 @@ impl SetRecordRequest {
|
||||
*CURRENT_SCHEMA_VERSION,
|
||||
request_time,
|
||||
);
|
||||
trace!("About to sign message: {}", msg);
|
||||
let signature = sign_message(msg.as_bytes(), signer)?;
|
||||
trace!("Got signature: {}", signature);
|
||||
Ok(Self {
|
||||
record: Some(record),
|
||||
request_time,
|
||||
|
||||
@@ -6,6 +6,7 @@ use self::data::SyncData;
|
||||
use crate::prelude::Signer;
|
||||
use anyhow::Result;
|
||||
use lazy_static::lazy_static;
|
||||
use log::trace;
|
||||
use lwk_wollet::hashes::hex::DisplayHex;
|
||||
use openssl::sha::sha256;
|
||||
use rusqlite::{
|
||||
@@ -135,9 +136,11 @@ impl Record {
|
||||
) -> Result<Self, anyhow::Error> {
|
||||
let id = Self::get_id_from_sync_data(&data);
|
||||
let data = data.to_bytes()?;
|
||||
trace!("About to encrypt sync data: {data:?}");
|
||||
let data = signer
|
||||
.ecies_encrypt(data)
|
||||
.map_err(|err| anyhow::anyhow!("Could not encrypt sync data: {err:?}"))?;
|
||||
trace!("Got encrypted sync data: {data:?}");
|
||||
let schema_version = CURRENT_SCHEMA_VERSION.to_string();
|
||||
Ok(Self {
|
||||
id,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: breez_liquid
|
||||
description: Dart bindings for the Breez Liquid SDK
|
||||
version: 0.4.0-rc3
|
||||
version: 0.7.0-rc3
|
||||
homepage: https://breez.technology
|
||||
repository: https://github.com/breez/breez-sdk-liquid-dart
|
||||
publish_to: 'none'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version '0.4.0-rc3' // generated; do not edit
|
||||
version '0.7.0-rc3' // generated; do not edit
|
||||
group 'technology.breez.flutter_breez_liquid'
|
||||
|
||||
buildscript {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version '0.4.0-rc3' // generated; do not edit
|
||||
version '0.7.0-rc3' // generated; do not edit
|
||||
group 'technology.breez.flutter_breez_liquid'
|
||||
|
||||
buildscript {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version = '0.4.0-rc3' # generated; do not edit
|
||||
version = '0.7.0-rc3' # generated; do not edit
|
||||
|
||||
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
|
||||
# Run `pod lib lint flutter_breez_liquid.podspec` to validate before publishing.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version = '0.4.0-rc3' # generated; do not edit
|
||||
version = '0.7.0-rc3' # generated; do not edit
|
||||
|
||||
# We cannot distribute the XCFramework alongside the library directly,
|
||||
# so we have to fetch the correct version here.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version = '0.4.0-rc3' # generated; do not edit
|
||||
version = '0.7.0-rc3' # generated; do not edit
|
||||
|
||||
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
|
||||
# Run `pod lib lint flutter_breez_liquid.podspec` to validate before publishing.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version = '0.4.0-rc3' # generated; do not edit
|
||||
version = '0.7.0-rc3' # generated; do not edit
|
||||
|
||||
# We cannot distribute the XCFramework alongside the library directly,
|
||||
# so we have to fetch the correct version here.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: flutter_breez_liquid
|
||||
description: Flutter wrapper around Dart bindings for the Breez Liquid SDK
|
||||
version: 0.4.0-rc3
|
||||
version: 0.7.0-rc3
|
||||
homepage: https://breez.technology
|
||||
repository: https://github.com/breez/breez-sdk-liquid-flutter
|
||||
publish_to: 'none'
|
||||
|
||||
@@ -139,7 +139,7 @@ android {
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 1
|
||||
versionName "0.4.0-rc3"
|
||||
versionName "0.7.0-rc3"
|
||||
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
||||
buildConfigField "String", "BREEZ_API_KEY", project.property('BREEZ_API_KEY')
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
PODS:
|
||||
- boost (1.76.0)
|
||||
- breez_sdk_liquid (0.4.0-rc3):
|
||||
- BreezSDKLiquid (= 0.4.0-rc3)
|
||||
- breez_sdk_liquid (0.7.0-rc1):
|
||||
- BreezSDKLiquid (= 0.7.0-rc1)
|
||||
- React-Core
|
||||
- breez_sdk_liquidFFI (0.4.0-rc3)
|
||||
- BreezSDKLiquid (0.4.0-rc3):
|
||||
- breez_sdk_liquidFFI (= 0.4.0-rc3)
|
||||
- breez_sdk_liquidFFI (0.7.0-rc1)
|
||||
- BreezSDKLiquid (0.7.0-rc1):
|
||||
- breez_sdk_liquidFFI (= 0.7.0-rc1)
|
||||
- CocoaAsyncSocket (7.6.5)
|
||||
- DoubleConversion (1.1.6)
|
||||
- FBLazyVector (0.70.15)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-breez-sdk-liquid-example",
|
||||
"version": "0.4.0-rc3",
|
||||
"version": "0.7.0-rc3",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"clean": "rm -rf /tmp/metro-* && yarn start --reset-cache",
|
||||
@@ -13,7 +13,7 @@
|
||||
"rebuild": "rm -rf node_modules && yarn && yarn pods"
|
||||
},
|
||||
"dependencies": {
|
||||
"@breeztech/react-native-breez-sdk-liquid": "0.4.0-rc3",
|
||||
"@breeztech/react-native-breez-sdk-liquid": "0.7.0-rc3",
|
||||
"@dreson4/react-native-quick-bip39": "^0.0.5",
|
||||
"react": "18.1.0",
|
||||
"react-native": "0.70.15",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@breeztech/react-native-breez-sdk-liquid",
|
||||
"version": "0.4.0-rc3",
|
||||
"version": "0.7.0-rc3",
|
||||
"description": "React Native Breez Liquid SDK",
|
||||
"repository": "https://github.com/breez/breez-sdk-liquid",
|
||||
"author": "Breez <contact@breez.technology> (https://github.com/breez)",
|
||||
|
||||
Reference in New Issue
Block a user