From: Alekos Filini Date: Mon, 25 Jan 2021 20:13:45 +0000 (-0500) Subject: Add a function to return the version of BDK at runtime X-Git-Tag: v0.4.0~21^2~3 X-Git-Url: http://internal-gitweb-vhost/%22https:/-script/enum.FileStoreError.html?a=commitdiff_plain;h=df32c849bb3f6b28aa63b18ecb93d7062fe37b12;p=bdk Add a function to return the version of BDK at runtime --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b1108de..be596822 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/lib.rs b/src/lib.rs index 1712296e..c3ac1ac0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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") +}