Matthew Ramsden
Matthew Ramsden
Yeah, it’s there but just in a different place/way because 1.0 is structured a bit differently, so I can totally understand it being hard to find at the moment. We...
@geigerzaehler242 does that resolve your issue/question or any other thoughts or follow up?
https://docs.rs/bdk/0.29.0/bdk/blockchain/trait.GetHeight.html#tymethod.get_height Adding a link to pre-1.0 docs method
This is the method to expose I think: ``` /// Get the height of the current blockchain tip. pub fn get_height(&self) -> Result { self.get_response_str("/blocks/tip/height") .map(|s| u32::from_str(s.as_str()).map_err(Error::Parsing))? } ```
> @reez : Thanks. @thunderbiscuit, @reez : Can this also be added for electrum client? @andreasgriffin Would be happy to! Do you know exactly what method you'd want for it...
> @reez : The get_height was (before 1.0) in the electrum client: https://github.com/bitcoindevkit/bdk/blob/213c270ab475e2afbf6863271550a537cd203c15/src/blockchain/electrum.rs#L94 > > Is it possible to bring it back? Let me ask in our Discord channel right...
Per Evan: ``` You can subscribe to block header notifications. I think it's the only way unfortunately https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html#blockchain-headers-subscribe The subscribe request returns height + blockhash directly ```
_It could be that LDK node and BDK are currently incompatible due to re-exporting the same types with different UniFFI versions_
I was unable to reproduce with this setup Xcode 16.1: - [bdk-swift 1.0.0-beta-5](https://github.com/bitcoindevkit/bdk-swift/releases/tag/1.0.0-beta.5) + [ldk-node 0.4.1](https://github.com/lightningdevkit/ldk-node/releases/tag/v0.4.1) - [bdk-swift 0.31.2](https://github.com/bitcoindevkit/bdk-swift/releases/tag/0.31.2) + [ldk-node 0.4.1](https://github.com/lightningdevkit/ldk-node/releases/tag/v0.4.1) I chose that setup to test pre-1.0 and...
> Btw, likely unrelated, but we didn't release Swift bindings for LDK Node 0.4.1 only then for the newest 0.4.2. Good additional note on reproducing the issue that was reported...