pub trait Node:
Send
+ Sync
+ 'static {
type StreamIncomingStream: Stream<Item = Result<IncomingPayment, Status>> + Send + 'static;
type StreamLogStream: Stream<Item = Result<LogEntry, Status>> + Send + 'static;
type StreamCustommsgStream: Stream<Item = Result<Custommsg, Status>> + Send + 'static;
type StreamHsmRequestsStream: Stream<Item = Result<HsmRequest, Status>> + Send + 'static;
// Required methods
fn stream_incoming<'life0, 'async_trait>(
&'life0 self,
request: Request<StreamIncomingFilter>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamIncomingStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stream_log<'life0, 'async_trait>(
&'life0 self,
request: Request<StreamLogRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamLogStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stream_custommsg<'life0, 'async_trait>(
&'life0 self,
request: Request<StreamCustommsgRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamCustommsgStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stream_hsm_requests<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamHsmRequestsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn respond_hsm_request<'life0, 'async_trait>(
&'life0 self,
request: Request<HsmResponse>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn configure<'life0, 'async_trait>(
&'life0 self,
request: Request<GlConfig>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn trampoline_pay<'life0, 'async_trait>(
&'life0 self,
request: Request<TrampolinePayRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TrampolinePayResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Generated trait containing gRPC methods that should be implemented for use with NodeServer.
Required Associated Types§
Sourcetype StreamIncomingStream: Stream<Item = Result<IncomingPayment, Status>> + Send + 'static
type StreamIncomingStream: Stream<Item = Result<IncomingPayment, Status>> + Send + 'static
Server streaming response type for the StreamIncoming method.
Sourcetype StreamLogStream: Stream<Item = Result<LogEntry, Status>> + Send + 'static
type StreamLogStream: Stream<Item = Result<LogEntry, Status>> + Send + 'static
Server streaming response type for the StreamLog method.
Sourcetype StreamCustommsgStream: Stream<Item = Result<Custommsg, Status>> + Send + 'static
type StreamCustommsgStream: Stream<Item = Result<Custommsg, Status>> + Send + 'static
Server streaming response type for the StreamCustommsg method.
Sourcetype StreamHsmRequestsStream: Stream<Item = Result<HsmRequest, Status>> + Send + 'static
type StreamHsmRequestsStream: Stream<Item = Result<HsmRequest, Status>> + Send + 'static
Server streaming response type for the StreamHsmRequests method.
Required Methods§
Sourcefn stream_incoming<'life0, 'async_trait>(
&'life0 self,
request: Request<StreamIncomingFilter>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamIncomingStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stream_incoming<'life0, 'async_trait>(
&'life0 self,
request: Request<StreamIncomingFilter>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamIncomingStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stream incoming payments
Currently includes off-chain payments received matching an invoice or spontaneus paymens through keysend.
Sourcefn stream_log<'life0, 'async_trait>(
&'life0 self,
request: Request<StreamLogRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamLogStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stream_log<'life0, 'async_trait>(
&'life0 self,
request: Request<StreamLogRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamLogStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stream the logs as they are produced by the node
Mainly intended for debugging clients by tailing the log as they are written on the node. The logs start streaming from the first beginning, in order to allow inspection of events after an error occurred, That also means that the logs can be rather large, and should not be streamed onto resource-constrained devices.
Sourcefn stream_custommsg<'life0, 'async_trait>(
&'life0 self,
request: Request<StreamCustommsgRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamCustommsgStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stream_custommsg<'life0, 'async_trait>(
&'life0 self,
request: Request<StreamCustommsgRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamCustommsgStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Listen for incoming custommsg
messages from peers.
The messages are forwarded as they come in, and will not be replayed if the stream is interrupted.
Sourcefn stream_hsm_requests<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamHsmRequestsStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stream_hsm_requests<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamHsmRequestsStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
////////////////////////////// HSM Messages ////////////////////////
The following messages are related to communicating HSM requests back and forth. Chances are you won’t need to interact with these at all, unless you want to embed the hsmd into your client. We recommend using a standalone hsmd such as hagrid, keeper of keys, to get started.
Stream requests from the node to any key device that can respond to them.