Struct lightning_signer::signer::multi_signer::MultiSigner
source · pub struct MultiSigner { /* private fields */ }
Expand description
A signer for multiple nodes.
If you need just one node, use Node directly.
Implementations§
source§impl MultiSigner
impl MultiSigner
sourcepub fn new_with_test_mode(
test_mode: bool,
initial_allowlist: Vec<String>,
services: NodeServices
) -> MultiSigner
pub fn new_with_test_mode( test_mode: bool, initial_allowlist: Vec<String>, services: NodeServices ) -> MultiSigner
Construct
sourcepub fn restore_with_test_mode(
test_mode: bool,
initial_allowlist: Vec<String>,
services: NodeServices,
seed_persister: Arc<dyn SeedPersist>
) -> Result<MultiSigner, Status>
pub fn restore_with_test_mode( test_mode: bool, initial_allowlist: Vec<String>, services: NodeServices, seed_persister: Arc<dyn SeedPersist> ) -> Result<MultiSigner, Status>
Construct and restore nodes from the persister.
sourcepub fn new(services: NodeServices) -> MultiSigner
pub fn new(services: NodeServices) -> MultiSigner
Construct
Will panic if there are nodes already persisted.
sourcepub fn restore(
services: NodeServices,
seed_persister: Arc<dyn SeedPersist>
) -> Result<MultiSigner, Status>
pub fn restore( services: NodeServices, seed_persister: Arc<dyn SeedPersist> ) -> Result<MultiSigner, Status>
Construct and restore nodes from the persister.
sourcepub fn new_node(
&self,
node_config: NodeConfig,
seed_persister: Arc<dyn SeedPersist>
) -> Result<(PublicKey, [u8; 32]), Status>
pub fn new_node( &self, node_config: NodeConfig, seed_persister: Arc<dyn SeedPersist> ) -> Result<(PublicKey, [u8; 32]), Status>
Create a node with a random seed
sourcepub fn new_node_with_seed(
&self,
node_config: NodeConfig,
seed: &[u8],
seed_persister: Arc<dyn SeedPersist>
) -> Result<PublicKey, Status>
pub fn new_node_with_seed( &self, node_config: NodeConfig, seed: &[u8], seed_persister: Arc<dyn SeedPersist> ) -> Result<PublicKey, Status>
New node with externally supplied cryptographic seed
sourcepub fn get_node_ids(&self) -> Vec<PublicKey>
pub fn get_node_ids(&self) -> Vec<PublicKey>
Get all node IDs
sourcepub fn warmstart_with_seed(
&self,
node_config: NodeConfig,
seed: &[u8]
) -> Result<PublicKey, Status>
pub fn warmstart_with_seed( &self, node_config: NodeConfig, seed: &[u8] ) -> Result<PublicKey, Status>
Ensure that a node exists given its seed
sourcepub fn additional_setup(
&self,
node_id: &PublicKey,
channel_id: &ChannelId,
outpoint: OutPoint
) -> Result<(), Status>
pub fn additional_setup( &self, node_id: &PublicKey, channel_id: &ChannelId, outpoint: OutPoint ) -> Result<(), Status>
Temporary, until phase 2 is fully implemented
sourcepub fn with_channel_base<F, T>(
&self,
node_id: &PublicKey,
channel_id: &ChannelId,
f: F
) -> Result<T, Status>where
F: Fn(&mut dyn ChannelBase) -> Result<T, Status> + Sized,
pub fn with_channel_base<F, T>( &self, node_id: &PublicKey, channel_id: &ChannelId, f: F ) -> Result<T, Status>where F: Fn(&mut dyn ChannelBase) -> Result<T, Status> + Sized,
sourcepub fn with_ready_channel<F, T>(
&self,
node_id: &PublicKey,
channel_id: &ChannelId,
f: F
) -> Result<T, Status>where
F: Fn(&mut Channel) -> Result<T, Status> + Sized,
pub fn with_ready_channel<F, T>( &self, node_id: &PublicKey, channel_id: &ChannelId, f: F ) -> Result<T, Status>where F: Fn(&mut Channel) -> Result<T, Status> + Sized,
sourcepub fn node_services(&self) -> NodeServices
pub fn node_services(&self) -> NodeServices
Get the node services
Auto Trait Implementations§
impl !RefUnwindSafe for MultiSigner
impl Send for MultiSigner
impl Sync for MultiSigner
impl Unpin for MultiSigner
impl !UnwindSafe for MultiSigner
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more