lightning_signer/
wallet.rs1use bitcoin::secp256k1::PublicKey;
2use bitcoin::{Address, Network, ScriptBuf};
3
4use crate::util::status::Status;
5
6pub trait Wallet {
8 fn can_spend(&self, child_path: &[u32], script_pubkey: &ScriptBuf) -> Result<bool, Status>;
10
11 fn allowlist_contains_payee(&self, payee: PublicKey) -> bool;
13
14 fn allowlist_contains(&self, script_pubkey: &ScriptBuf, path: &[u32]) -> bool;
16
17 fn network(&self) -> Network;
19
20 fn get_native_address(&self, child_path: &[u32]) -> Result<Address, Status>;
22
23 fn get_taproot_address(&self, child_path: &[u32]) -> Result<Address, Status>;
25
26 #[deprecated(since = "0.9.0", note = "Use native addresses instead")]
28 fn get_wrapped_address(&self, child_path: &[u32]) -> Result<Address, Status>;
29}