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>
pub fn with_channel_base<F, T>( &self, node_id: &PublicKey, channel_id: &ChannelId, f: F, ) -> Result<T, Status>
Sourcepub fn with_channel<F, T>(
&self,
node_id: &PublicKey,
channel_id: &ChannelId,
f: F,
) -> Result<T, Status>
pub fn with_channel<F, T>( &self, node_id: &PublicKey, channel_id: &ChannelId, f: F, ) -> Result<T, Status>
Sourcepub fn node_services(&self) -> NodeServices
pub fn node_services(&self) -> NodeServices
Get the node services
Auto Trait Implementations§
impl !Freeze for MultiSigner
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more