Trait Wallet

Source
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§

Source

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

Source

fn allowlist_contains_payee(&self, payee: PublicKey) -> bool

Returns true if the given destination Lightning payee is in the node’s allowlist

Source

fn allowlist_contains(&self, script_pubkey: &ScriptBuf, path: &[u32]) -> bool

True if the script_pubkey is in the node’s allowlist

Source

fn network(&self) -> Network

Returns the network

Source

fn get_native_address(&self, child_path: &[u32]) -> Result<Address, Status>

Returns the native segwit address at path

Source

fn get_taproot_address(&self, child_path: &[u32]) -> Result<Address, Status>

Returns the p2tr address at path

Source

fn get_wrapped_address(&self, child_path: &[u32]) -> Result<Address, Status>

👎Deprecated since 0.9.0: Use native addresses instead

Returns the wrapped segwit address at path

Implementors§