pub trait Wallet {
// Required methods
fn can_spend(
&self,
child_path: &DerivationPath,
script_pubkey: &ScriptBuf,
) -> Result<bool, Status>;
fn allowlist_contains_payee(&self, payee: PublicKey) -> bool;
fn allowlist_contains(
&self,
script_pubkey: &ScriptBuf,
path: &DerivationPath,
) -> bool;
fn network(&self) -> Network;
fn get_native_address(
&self,
child_path: &DerivationPath,
) -> Result<Address, Status>;
fn get_taproot_address(
&self,
child_path: &DerivationPath,
) -> Result<Address, Status>;
fn get_wrapped_address(
&self,
child_path: &DerivationPath,
) -> Result<Address, Status>;
}
Expand description
A layer-1 wallet used by Validator
Required Methods§
Sourcefn can_spend(
&self,
child_path: &DerivationPath,
script_pubkey: &ScriptBuf,
) -> Result<bool, Status>
fn can_spend( &self, child_path: &DerivationPath, 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: &DerivationPath,
) -> bool
fn allowlist_contains( &self, script_pubkey: &ScriptBuf, path: &DerivationPath, ) -> bool
True if the script_pubkey is in the node’s allowlist
Sourcefn get_native_address(
&self,
child_path: &DerivationPath,
) -> Result<Address, Status>
fn get_native_address( &self, child_path: &DerivationPath, ) -> Result<Address, Status>
Returns the native segwit address at path
Sourcefn get_taproot_address(
&self,
child_path: &DerivationPath,
) -> Result<Address, Status>
fn get_taproot_address( &self, child_path: &DerivationPath, ) -> Result<Address, Status>
Returns the p2tr address at path
Sourcefn get_wrapped_address(
&self,
child_path: &DerivationPath,
) -> Result<Address, Status>
👎Deprecated since 0.9.0: Use native addresses instead
fn get_wrapped_address( &self, child_path: &DerivationPath, ) -> Result<Address, Status>
Returns the wrapped segwit address at path