diff --git a/bdk-ffi/Cargo.lock b/bdk-ffi/Cargo.lock index dd83d55d..a5e801e4 100644 --- a/bdk-ffi/Cargo.lock +++ b/bdk-ffi/Cargo.lock @@ -681,6 +681,8 @@ checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" dependencies = [ "equivalent", "hashbrown 0.16.0", + "serde", + "serde_core", ] [[package]] @@ -1118,6 +1120,15 @@ dependencies = [ "serde_core", ] +[[package]] +name = "serde_spanned" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e24345aa0fe688594e73770a5f6d1b216508b4f93484c0026d521acd30134392" +dependencies = [ + "serde_core", +] + [[package]] name = "shlex" version = "1.3.0" @@ -1275,13 +1286,43 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.11" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8" dependencies = [ - "serde", + "indexmap", + "serde_core", + "serde_spanned", + "toml_datetime", + "toml_parser", + "toml_writer", + "winnow", +] + +[[package]] +name = "toml_datetime" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" +dependencies = [ + "serde_core", ] +[[package]] +name = "toml_parser" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" +dependencies = [ + "winnow", +] + +[[package]] +name = "toml_writer" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2" + [[package]] name = "unicode-ident" version = "1.0.19" @@ -1299,9 +1340,9 @@ dependencies = [ [[package]] name = "uniffi" -version = "0.29.4" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6d968cb62160c11f2573e6be724ef8b1b18a277aededd17033f8a912d73e2b4" +checksum = "c866f627c3f04c3df068b68bb2d725492caaa539dd313e2a9d26bb85b1a32f4e" dependencies = [ "anyhow", "camino", @@ -1316,9 +1357,9 @@ dependencies = [ [[package]] name = "uniffi_bindgen" -version = "0.29.4" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6b39ef1acbe1467d5d210f274fae344cb6f8766339330cb4c9688752899bf6b" +checksum = "7c8ca600167641ebe7c8ba9254af40492dda3397c528cc3b2f511bd23e8541a5" dependencies = [ "anyhow", "askama", @@ -1343,9 +1384,9 @@ dependencies = [ [[package]] name = "uniffi_build" -version = "0.29.4" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6683e6b665423cddeacd89a3f97312cf400b2fb245a26f197adaf65c45d505b2" +checksum = "3e55c05228f4858bb258f651d21d743fcc1fe5a2ec20d3c0f9daefddb105ee4d" dependencies = [ "anyhow", "camino", @@ -1354,9 +1395,9 @@ dependencies = [ [[package]] name = "uniffi_core" -version = "0.29.4" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2d990b553d6b9a7ee9c3ae71134674739913d52350b56152b0e613595bb5a6f" +checksum = "7e7a5a038ebffe8f4cf91416b154ef3c2468b18e828b7009e01b1b99938089f9" dependencies = [ "anyhow", "bytes", @@ -1366,9 +1407,9 @@ dependencies = [ [[package]] name = "uniffi_internal_macros" -version = "0.29.4" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f4f224becf14885c10e6e400b95cc4d1985738140cb194ccc2044563f8a56b" +checksum = "e3c2a6f93e7b73726e2015696ece25ca0ac5a5f1cf8d6a7ab5214dd0a01d2edf" dependencies = [ "anyhow", "indexmap", @@ -1379,9 +1420,9 @@ dependencies = [ [[package]] name = "uniffi_macros" -version = "0.29.4" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b481d385af334871d70904e6a5f129be7cd38c18fcf8dd8fd1f646b426a56d58" +checksum = "64c6309fc36c7992afc03bc0c5b059c656bccbef3f2a4bc362980017f8936141" dependencies = [ "camino", "fs-err", @@ -1396,9 +1437,9 @@ dependencies = [ [[package]] name = "uniffi_meta" -version = "0.29.4" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f817868a3b171bb7bf259e882138d104deafde65684689b4694c846d322491" +checksum = "0a138823392dba19b0aa494872689f97d0ee157de5852e2bec157ce6de9cdc22" dependencies = [ "anyhow", "siphasher", @@ -1408,9 +1449,9 @@ dependencies = [ [[package]] name = "uniffi_pipeline" -version = "0.29.4" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b147e133ad7824e32426b90bc41fda584363563f2ba747f590eca1fd6fd14e6" +checksum = "8c27c4b515d25f8e53cc918e238c39a79c3144a40eaf2e51c4a7958973422c29" dependencies = [ "anyhow", "heck", @@ -1421,9 +1462,9 @@ dependencies = [ [[package]] name = "uniffi_testing" -version = "0.29.4" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5e9befada8a7069066191beb8865cdb8287f66e9041fb0bbffc8dfc5bea6b7" +checksum = "a4adb08eb5589849231dc0626ba0f9a1297925fd751f0740fc630ae934dd9c5e" dependencies = [ "anyhow", "camino", @@ -1434,9 +1475,9 @@ dependencies = [ [[package]] name = "uniffi_udl" -version = "0.29.4" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caed654fb73da5abbc7a7e9c741532284532ba4762d6fe5071372df22a41730a" +checksum = "d0adacdd848aeed7af4f5af7d2f621d5e82531325d405e29463482becfdeafca" dependencies = [ "anyhow", "textwrap", diff --git a/bdk-ffi/Cargo.toml b/bdk-ffi/Cargo.toml index 390c6df0..e6417f0d 100644 --- a/bdk-ffi/Cargo.toml +++ b/bdk-ffi/Cargo.toml @@ -20,14 +20,14 @@ bdk_esplora = { version = "0.22.1", default-features = false, features = ["std", bdk_electrum = { version = "0.23.2", default-features = false, features = ["use-rustls-ring"] } bdk_kyoto = { version = "0.15.0" } -uniffi = { version = "=0.29.4", features = ["cli"]} +uniffi = { version = "=0.30.0", features = ["cli"]} thiserror = "2.0.17" [build-dependencies] -uniffi = { version = "=0.29.4", features = ["build"] } +uniffi = { version = "=0.30.0", features = ["build"] } [dev-dependencies] -uniffi = { version = "=0.29.4", features = ["bindgen-tests"] } +uniffi = { version = "=0.30.0", features = ["bindgen-tests"] } assert_matches = "1.5.0" [profile.release-smaller] diff --git a/bdk-ffi/src/bitcoin.rs b/bdk-ffi/src/bitcoin.rs index f17a8383..3ed319c0 100644 --- a/bdk-ffi/src/bitcoin.rs +++ b/bdk-ffi/src/bitcoin.rs @@ -710,37 +710,37 @@ impl From for BdkTxOut { } /// A bitcoin Block hash -#[derive(Debug, Clone, Copy, PartialEq, Eq, std::hash::Hash, uniffi::Object)] -#[uniffi::export(Display, Eq, Hash)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, std::hash::Hash, uniffi::Object)] +#[uniffi::export(Display, Eq, Hash, Ord)] pub struct BlockHash(pub(crate) BitcoinBlockHash); impl_hash_like!(BlockHash, BitcoinBlockHash); /// A bitcoin transaction identifier -#[derive(Debug, Clone, Copy, PartialEq, Eq, std::hash::Hash, uniffi::Object)] -#[uniffi::export(Display, Eq, Hash)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, std::hash::Hash, uniffi::Object)] +#[uniffi::export(Display, Eq, Hash, Ord)] pub struct Txid(pub(crate) BitcoinTxid); impl_hash_like!(Txid, BitcoinTxid); /// A bitcoin transaction identifier, including witness data. /// For transactions with no SegWit inputs, the `txid` will be equivalent to `wtxid`. -#[derive(Debug, Clone, Copy, PartialEq, Eq, std::hash::Hash, uniffi::Object)] -#[uniffi::export(Display, Eq, Hash)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, std::hash::Hash, uniffi::Object)] +#[uniffi::export(Display, Eq, Hash, Ord)] pub struct Wtxid(pub(crate) BitcoinWtxid); impl_hash_like!(Wtxid, BitcoinWtxid); /// A collision-proof unique identifier for a descriptor. -#[derive(Debug, Clone, Copy, PartialEq, Eq, std::hash::Hash, uniffi::Object)] -#[uniffi::export(Display, Eq, Hash)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, std::hash::Hash, uniffi::Object)] +#[uniffi::export(Display, Eq, Hash, Ord)] pub struct DescriptorId(pub(crate) BitcoinSha256Hash); impl_hash_like!(DescriptorId, BitcoinSha256Hash); /// The merkle root of the merkle tree corresponding to a block's transactions. -#[derive(Debug, Clone, Copy, PartialEq, Eq, std::hash::Hash, uniffi::Object)] -#[uniffi::export(Display, Eq, Hash)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, std::hash::Hash, uniffi::Object)] +#[uniffi::export(Display, Eq, Hash, Ord)] pub struct TxMerkleNode(pub(crate) BitcoinDoubleSha256Hash); impl_hash_like!(TxMerkleNode, BitcoinDoubleSha256Hash);