]> Untitled Git - bdk/commitdiff
Add a function to return the version of BDK at runtime
authorAlekos Filini <alekos.filini@gmail.com>
Mon, 25 Jan 2021 20:13:45 +0000 (15:13 -0500)
committerAlekos Filini <alekos.filini@gmail.com>
Mon, 25 Jan 2021 20:14:54 +0000 (15:14 -0500)
CHANGELOG.md
src/lib.rs

index 1b1108de5e441d3aacca77e05ed5cae83a5c7502..be5968221d508ce8f2f0b9a695e6438b716cf1e8 100644 (file)
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ## [Unreleased]
 
+### Misc
+#### Added
+- Added a function to get the version of BDK at runtime
+
 ## [v0.3.0] - [v0.2.0]
 
 ### Descriptor
index 1712296ead65c4b22b0fcae1f4ae49775afb855b..c3ac1ac05ccd5ea8cf0a14c26fed9d176989c13d 100644 (file)
@@ -265,3 +265,8 @@ pub use wallet::address_validator;
 pub use wallet::signer;
 pub use wallet::tx_builder::TxBuilder;
 pub use wallet::Wallet;
+
+/// Get the version of BDK at runtime
+pub fn version() -> &'static str {
+    env!("CARGO_PKG_VERSION", "unknown")
+}