diff --git a/crates/wallet/Cargo.toml b/crates/wallet/Cargo.toml index 44314a968..b0a612a22 100644 --- a/crates/wallet/Cargo.toml +++ b/crates/wallet/Cargo.toml @@ -32,6 +32,7 @@ all-keys = ["keys-bip39"] keys-bip39 = ["bip39"] rusqlite = ["bdk_chain/rusqlite"] file_store = ["bdk_file_store"] +labels = [] [dev-dependencies] lazy_static = "1.4" diff --git a/crates/wallet/src/types.rs b/crates/wallet/src/types.rs index 6ed17b575..d7bf9e25b 100644 --- a/crates/wallet/src/types.rs +++ b/crates/wallet/src/types.rs @@ -10,6 +10,8 @@ // licenses. use alloc::boxed::Box; +#[cfg(feature = "labels")] +use alloc::string::String; use core::convert::AsRef; use bdk_chain::ConfirmationTime; @@ -63,6 +65,46 @@ pub struct LocalOutput { pub derivation_index: u32, /// The confirmation time for transaction containing this utxo pub confirmation_time: ConfirmationTime, + #[cfg(feature = "labels")] + /// The label for this UTXO according to + /// [BIP 329](https://github.com/bitcoin/bips/blob/master/bip-0329.mediawiki) + /// format + pub label: Option