Trait lightning_signer::wallet::Wallet
source · pub trait Wallet {
// Required methods
fn can_spend(
&self,
child_path: &[u32],
script_pubkey: &Script
) -> Result<bool, Status>;
fn allowlist_contains_payee(&self, payee: PublicKey) -> bool;
fn allowlist_contains(&self, script_pubkey: &Script, path: &[u32]) -> bool;
fn network(&self) -> Network;
fn get_native_address(&self, child_path: &[u32]) -> Result<Address, Status>;
fn get_taproot_address(&self, child_path: &[u32]) -> Result<Address, Status>;
fn get_wrapped_address(&self, child_path: &[u32]) -> Result<Address, Status>;
}
Expand description
A layer-1 wallet used by Validator
Required Methods§
sourcefn can_spend(
&self,
child_path: &[u32],
script_pubkey: &Script
) -> Result<bool, Status>
fn can_spend( &self, child_path: &[u32], script_pubkey: &Script ) -> Result<bool, Status>
True if the wallet can spend the given output with a derived key
sourcefn allowlist_contains_payee(&self, payee: PublicKey) -> bool
fn allowlist_contains_payee(&self, payee: PublicKey) -> bool
Returns true if the given destination Lightning payee is in the node’s allowlist
sourcefn allowlist_contains(&self, script_pubkey: &Script, path: &[u32]) -> bool
fn allowlist_contains(&self, script_pubkey: &Script, path: &[u32]) -> bool
True if the script_pubkey is in the node’s allowlist
sourcefn get_native_address(&self, child_path: &[u32]) -> Result<Address, Status>
fn get_native_address(&self, child_path: &[u32]) -> Result<Address, Status>
Returns the native segwit address at path