Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions bdk-ffi/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bdk-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ path = "uniffi-bindgen.rs"
bdk_wallet = { version = "=3.0.0", features = ["all-keys", "keys-bip39", "rusqlite"] }
bdk_esplora = { version = "0.22.1", default-features = false, features = ["std", "blocking", "blocking-https-rustls"] }
bdk_electrum = { version = "0.23.2", default-features = false, features = ["use-rustls-ring"] }
bdk_kyoto = { version = "0.16.0" }
bdk_kyoto = { version = "0.17.0" }

uniffi = { version = "=0.30.0", features = ["cli"]}
thiserror = "2.0.17"
Expand Down
17 changes: 9 additions & 8 deletions bdk-ffi/src/kyoto.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use bdk_kyoto::bip157;
use bdk_kyoto::bip157::lookup_host;
use bdk_kyoto::bip157::tokio;
use bdk_kyoto::bip157::AddrV2;
Expand All @@ -6,7 +7,7 @@ use bdk_kyoto::bip157::Node;
use bdk_kyoto::bip157::ServiceFlags;
use bdk_kyoto::builder::Builder as BDKCbfBuilder;
use bdk_kyoto::builder::BuilderExt;
use bdk_kyoto::HeaderCheckpoint;
use bdk_kyoto::HashCheckpoint;
use bdk_kyoto::Receiver;
use bdk_kyoto::RejectReason;
use bdk_kyoto::Requester;
Expand Down Expand Up @@ -196,25 +197,25 @@ impl CbfBuilder {
if !matches!(network, Network::Bitcoin) {
bdk_kyoto::ScanType::Recovery {
used_script_index,
checkpoint: HeaderCheckpoint::from_genesis(network),
checkpoint: HashCheckpoint::from_genesis(network),
}
} else {
match checkpoint {
RecoveryPoint::GenesisBlock => bdk_kyoto::ScanType::Recovery {
used_script_index,
checkpoint: HeaderCheckpoint::from_genesis(wallet.network()),
checkpoint: HashCheckpoint::from_genesis(wallet.network()),
},
RecoveryPoint::SegwitActivation => bdk_kyoto::ScanType::Recovery {
used_script_index,
checkpoint: HeaderCheckpoint::segwit_activation(),
checkpoint: HashCheckpoint::segwit_activation(),
},
RecoveryPoint::TaprootActivation => bdk_kyoto::ScanType::Recovery {
used_script_index,
checkpoint: HeaderCheckpoint::taproot_activation(),
checkpoint: HashCheckpoint::taproot_activation(),
},
RecoveryPoint::Other { birthday } => bdk_kyoto::ScanType::Recovery {
used_script_index,
checkpoint: HeaderCheckpoint::new(birthday.height, birthday.hash.0),
checkpoint: HashCheckpoint::new(birthday.height, birthday.hash.0),
},
}
}
Expand Down Expand Up @@ -302,9 +303,9 @@ impl CbfClient {

/// Broadcast a transaction to the network, erroring if the node has stopped running.
pub async fn broadcast(&self, transaction: &Transaction) -> Result<Arc<Wtxid>, CbfError> {
let tx = transaction.into();
let tx: bip157::Transaction = transaction.into();
self.sender
.broadcast_tx(tx)
.submit_package(tx)
.await
.map_err(From::from)
.map(|wtxid| Arc::new(Wtxid(wtxid)))
Expand Down
Loading