Skip to content

Commit a7d868e

Browse files
committed
Add Wallet::is_mine
Checks whether a script is owned by the node wallet.
1 parent 1ab48ab commit a7d868e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/wallet.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ where
114114
res
115115
}
116116

117+
pub(crate) fn is_mine(&self, script: &ScriptBuf) -> Result<bool, Error> {
118+
Ok(self.inner.lock().unwrap().is_mine(script)?)
119+
}
120+
117121
pub(crate) fn create_funding_transaction(
118122
&self, output_script: ScriptBuf, value_sats: u64, confirmation_target: ConfirmationTarget,
119123
locktime: LockTime,

0 commit comments

Comments
 (0)