Skip to content

Commit 53869e2

Browse files
committed
deps: bump bdk to beta-1
1 parent 3454331 commit 53869e2

File tree

10 files changed

+113
-236
lines changed

10 files changed

+113
-236
lines changed

bdk-ffi/Cargo.lock

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

bdk-ffi/Cargo.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@ path = "uniffi-bindgen.rs"
1818
default = ["uniffi/cli"]
1919

2020
[dependencies]
21-
bdk_wallet = { version = "1.0.0-alpha.13", features = ["all-keys", "keys-bip39"] }
22-
bdk_esplora = { version = "0.15.0", default-features = false, features = ["std", "blocking", "blocking-https-rustls"] }
21+
bdk_wallet = { version = "1.0.0-beta.1", features = ["all-keys", "keys-bip39", "rusqlite"] }
22+
bdk_esplora = { version = "0.16.0", default-features = false, features = ["std", "blocking", "blocking-https-rustls"] }
2323
# NOTE: This is a temporary workaround to use the electrum-client with the use-rustls-ring feature. It points to a fork
2424
# of bdk in which the bdk_electrum library uses the electrum-client with the use-rustls-ring feature.
25-
bdk_electrum = { git = "https://github.com/thunderbiscuit/bdk/", package = "bdk_electrum", branch = "feature/electrum-client-ring-ffi-alpha13", default-features = false, features = ["use-rustls-ring"] }
25+
bdk_electrum = { git = "https://github.com/thunderbiscuit/bdk/", package = "bdk_electrum", branch = "feature/electrum-client-ring", default-features = false, features = ["use-rustls-ring"] }
2626
# bdk_electrum = { version = "0.15.0" }
27-
bdk_sqlite = { version = "0.2.0" }
28-
bdk_bitcoind_rpc = { version = "0.12.0" }
27+
bdk_bitcoind_rpc = { version = "0.13.0" }
2928
bitcoin-internals = { version = "0.2.0", features = ["alloc"] }
3029

3130
uniffi = { version = "=0.28.0" }

bdk-ffi/src/bdk.udl

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -360,10 +360,10 @@ enum ChangeSpendPolicy {
360360

361361
interface Wallet {
362362
[Throws=WalletCreationError]
363-
constructor(Descriptor descriptor, Descriptor change_descriptor, Network network);
363+
constructor(Descriptor descriptor, Descriptor change_descriptor, Network network, Connection connection);
364364

365-
[Name=new_or_load, Throws=WalletCreationError]
366-
constructor(Descriptor descriptor, Descriptor change_descriptor, ChangeSet? change_set, Network network);
365+
[Name=load, Throws=WalletCreationError]
366+
constructor(Descriptor descriptor, Descriptor change_descriptor, Network network, Connection connection);
367367

368368
AddressInfo reveal_next_address(KeychainKind keychain);
369369

@@ -400,7 +400,8 @@ interface Wallet {
400400

401401
SyncRequest start_sync_with_revealed_spks();
402402

403-
ChangeSet? take_staged();
403+
[Throws=PersistenceError]
404+
void persist(Connection connection);
404405
};
405406

406407
interface Update {};
@@ -457,15 +458,9 @@ interface BumpFeeTxBuilder {
457458
// bdk_sqlite crate
458459
// ------------------------------------------------------------------------
459460

460-
interface SqliteStore {
461+
interface Connection {
461462
[Throws=SqliteError]
462463
constructor(string path);
463-
464-
[Throws=SqliteError]
465-
void write([ByRef] ChangeSet change_set);
466-
467-
[Throws=SqliteError]
468-
ChangeSet? read();
469464
};
470465

471466
// ------------------------------------------------------------------------

bdk-ffi/src/electrum.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ use crate::error::ElectrumError;
33
use crate::types::{FullScanRequest, SyncRequest};
44
use crate::wallet::Update;
55

6+
use bdk_electrum::bdk_chain::spk_client::{FullScanResult, SyncResult};
67
use bdk_electrum::BdkElectrumClient as BdkBdkElectrumClient;
7-
use bdk_electrum::{ElectrumFullScanResult, ElectrumSyncResult};
88
use bdk_wallet::bitcoin::Transaction as BdkTransaction;
99
use bdk_wallet::chain::spk_client::FullScanRequest as BdkFullScanRequest;
1010
use bdk_wallet::chain::spk_client::FullScanResult as BdkFullScanResult;
1111
use bdk_wallet::chain::spk_client::SyncRequest as BdkSyncRequest;
1212
use bdk_wallet::chain::spk_client::SyncResult as BdkSyncResult;
13-
use bdk_wallet::wallet::Update as BdkUpdate;
13+
use bdk_wallet::Update as BdkUpdate;
1414
use bdk_wallet::KeychainKind;
1515

1616
use std::collections::BTreeMap;
@@ -44,7 +44,7 @@ impl ElectrumClient {
4444
.take()
4545
.ok_or(ElectrumError::RequestAlreadyConsumed)?;
4646

47-
let electrum_result: ElectrumFullScanResult<KeychainKind> = self.0.full_scan(
47+
let electrum_result: FullScanResult<KeychainKind> = self.0.full_scan(
4848
request,
4949
stop_gap as usize,
5050
batch_size as usize,
@@ -76,7 +76,7 @@ impl ElectrumClient {
7676
.take()
7777
.ok_or(ElectrumError::RequestAlreadyConsumed)?;
7878

79-
let electrum_result: ElectrumSyncResult =
79+
let electrum_result: SyncResult =
8080
self.0
8181
.sync(request, batch_size as usize, fetch_prev_txouts)?;
8282
let sync_result: BdkSyncResult =

0 commit comments

Comments
 (0)