diff --git a/bdk-ffi/Cargo.lock b/bdk-ffi/Cargo.lock index 3d4b5f50..86ae78e7 100644 --- a/bdk-ffi/Cargo.lock +++ b/bdk-ffi/Cargo.lock @@ -121,6 +121,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + [[package]] name = "base64" version = "0.21.7" @@ -161,15 +167,26 @@ version = "1.0.0-alpha.11" dependencies = [ "assert_matches", "bdk", + "bdk_bitcoind_rpc", "bdk_electrum", "bdk_esplora", "bdk_file_store", "bitcoin-internals", - "serde_json", "thiserror", "uniffi", ] +[[package]] +name = "bdk_bitcoind_rpc" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54fe9410002d5c350b59145ed0b18af1bb81521e7d62515defe539a450e20551" +dependencies = [ + "bdk_chain", + "bitcoin", + "bitcoincore-rpc", +] + [[package]] name = "bdk_chain" version = "0.14.0" @@ -292,6 +309,30 @@ dependencies = [ "serde", ] +[[package]] +name = "bitcoincore-rpc" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eb70725a621848c83b3809913d5314c0d20ca84877d99dd909504b564edab00" +dependencies = [ + "bitcoincore-rpc-json", + "jsonrpc", + "log", + "serde", + "serde_json", +] + +[[package]] +name = "bitcoincore-rpc-json" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "856ffbee2e492c23bca715d72ea34aae80d58400f2bda26a82015d6bc2ec3662" +dependencies = [ + "bitcoin", + "serde", + "serde_json", +] + [[package]] name = "bumpalo" version = "3.16.0" @@ -515,6 +556,17 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "jsonrpc" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8128f36b47411cd3f044be8c1f5cc0c9e24d1d1bfdc45f0a57897b32513053f2" +dependencies = [ + "base64 0.13.1", + "serde", + "serde_json", +] + [[package]] name = "libc" version = "0.2.153" diff --git a/bdk-ffi/Cargo.toml b/bdk-ffi/Cargo.toml index 751c94cf..31c32fb0 100644 --- a/bdk-ffi/Cargo.toml +++ b/bdk-ffi/Cargo.toml @@ -22,11 +22,11 @@ bdk = { version = "1.0.0-alpha.11", features = ["all-keys", "keys-bip39"] } bdk_esplora = { version = "0.13.0", default-features = false, features = ["std", "blocking", "blocking-https-rustls"] } bdk_electrum = { version = "0.13.0" } bdk_file_store = { version = "0.11.0" } +bdk_bitcoind_rpc = { version = "0.10.0" } uniffi = { version = "=0.27.1" } bitcoin-internals = { version = "0.2.0", features = ["alloc"] } thiserror = "1.0.58" -serde_json = "1.0.116" [build-dependencies] uniffi = { version = "=0.27.1", features = ["build"] } diff --git a/bdk-ffi/src/bitcoin.rs b/bdk-ffi/src/bitcoin.rs index 247805d4..8bc9231c 100644 --- a/bdk-ffi/src/bitcoin.rs +++ b/bdk-ffi/src/bitcoin.rs @@ -16,6 +16,7 @@ use bdk::bitcoin::Psbt as BdkPsbt; use bdk::bitcoin::Transaction as BdkTransaction; use bdk::bitcoin::TxIn as BdkTxIn; use bdk::bitcoin::Txid; +use bdk_bitcoind_rpc::bitcoincore_rpc::jsonrpc::serde_json; use std::io::Cursor; use std::ops::Deref;