Skip to content

Commit df32c84

Browse files
committed
Add a function to return the version of BDK at runtime
1 parent 03e6e81 commit df32c84

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
### Misc
10+
#### Added
11+
- Added a function to get the version of BDK at runtime
12+
913
## [v0.3.0] - [v0.2.0]
1014

1115
### Descriptor

src/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -265,3 +265,8 @@ pub use wallet::address_validator;
265265
pub use wallet::signer;
266266
pub use wallet::tx_builder::TxBuilder;
267267
pub use wallet::Wallet;
268+
269+
/// Get the version of BDK at runtime
270+
pub fn version() -> &'static str {
271+
env!("CARGO_PKG_VERSION", "unknown")
272+
}

0 commit comments

Comments
 (0)