pub trait Wallet {
// Required methods
fn can_spend(
&self,
child_path: &[u32],
script_pubkey: &ScriptBuf,
) -> Result<bool, Status>;
fn allowlist_contains_payee(&self, payee: PublicKey) -> bool;
fn allowlist_contains(
&self,
script_pubkey: &ScriptBuf,
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: &ScriptBuf,
) -> Result<bool, Status>
fn can_spend( &self, child_path: &[u32], script_pubkey: &ScriptBuf, ) -> 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: &ScriptBuf, path: &[u32]) -> bool
fn allowlist_contains(&self, script_pubkey: &ScriptBuf, 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