pub struct HandlerBuilder { /* private fields */ }
Expand description
Builder for RootHandler
WARNING: if you don’t specify a seed, and you persist to LSS, you must get the seed from the builder and persist it yourself. LSS does not persist the seed. If you don’t persist, you will lose your keys.
Implementations§
Source§impl HandlerBuilder
impl HandlerBuilder
Sourcepub fn new(
network: Network,
id: u64,
services: NodeServices,
seed: [u8; 32],
) -> HandlerBuilder
pub fn new( network: Network, id: u64, services: NodeServices, seed: [u8; 32], ) -> HandlerBuilder
Create a InitHandlerBuilder
Sourcepub fn allowlist(self, allowlist: Vec<String>) -> Self
pub fn allowlist(self, allowlist: Vec<String>) -> Self
Set the initial allowlist (only used if node is new)
Sourcepub fn max_protocol_version(self, max_version: u32) -> Self
pub fn max_protocol_version(self, max_version: u32) -> Self
Set the hsmd max protocol version, may still be negotiated down by node
Sourcepub fn build_keys_manager(&self) -> (MyKeysManager, PublicKey)
pub fn build_keys_manager(&self) -> (MyKeysManager, PublicKey)
Create a keys manager - useful for bootstrapping a node from persistence, so the persistence key can be derived.
Sourcepub fn build(self) -> Result<InitHandler>
pub fn build(self) -> Result<InitHandler>
Build the root handler.
Returns the handler and any mutations that need to be stored.
You must call Handler::commit
after you persist the mutations in the
cloud.
Auto Trait Implementations§
impl Freeze for HandlerBuilder
impl !RefUnwindSafe for HandlerBuilder
impl Send for HandlerBuilder
impl Sync for HandlerBuilder
impl Unpin for HandlerBuilder
impl !UnwindSafe for HandlerBuilder
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> Downcast for T
impl<T> Downcast for T
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