Trait snarkos_node::NodeInterface
source · pub trait NodeInterface<N: Network>: Routing<N> {
// Required method
fn shut_down<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn node_type(&self) -> NodeType { ... }
fn private_key(&self) -> &PrivateKey<N> { ... }
fn view_key(&self) -> &ViewKey<N> { ... }
fn address(&self) -> Address<N> { ... }
fn is_dev(&self) -> bool { ... }
fn handle_signals(&self) { ... }
}Required Methods§
Provided Methods§
sourcefn private_key(&self) -> &PrivateKey<N>
fn private_key(&self) -> &PrivateKey<N>
Returns the account private key of the node.
sourcefn handle_signals(&self)
fn handle_signals(&self)
Handles OS signals for the node to intercept and perform a clean shutdown. Note: Only Ctrl-C is supported; it should work on both Unix-family systems and Windows.