Enum breez_sdk_core::lightning::events::MessageSendEvent

pub enum MessageSendEvent {
Show 32 variants SendAcceptChannel { node_id: PublicKey, msg: AcceptChannel, }, SendAcceptChannelV2 { node_id: PublicKey, msg: AcceptChannelV2, }, SendOpenChannel { node_id: PublicKey, msg: OpenChannel, }, SendOpenChannelV2 { node_id: PublicKey, msg: OpenChannelV2, }, SendFundingCreated { node_id: PublicKey, msg: FundingCreated, }, SendFundingSigned { node_id: PublicKey, msg: FundingSigned, }, SendTxAddInput { node_id: PublicKey, msg: TxAddInput, }, SendTxAddOutput { node_id: PublicKey, msg: TxAddOutput, }, SendTxRemoveInput { node_id: PublicKey, msg: TxRemoveInput, }, SendTxRemoveOutput { node_id: PublicKey, msg: TxRemoveOutput, }, SendTxComplete { node_id: PublicKey, msg: TxComplete, }, SendTxSignatures { node_id: PublicKey, msg: TxSignatures, }, SendTxInitRbf { node_id: PublicKey, msg: TxInitRbf, }, SendTxAckRbf { node_id: PublicKey, msg: TxAckRbf, }, SendTxAbort { node_id: PublicKey, msg: TxAbort, }, SendChannelReady { node_id: PublicKey, msg: ChannelReady, }, SendAnnouncementSignatures { node_id: PublicKey, msg: AnnouncementSignatures, }, UpdateHTLCs { node_id: PublicKey, updates: CommitmentUpdate, }, SendRevokeAndACK { node_id: PublicKey, msg: RevokeAndACK, }, SendClosingSigned { node_id: PublicKey, msg: ClosingSigned, }, SendShutdown { node_id: PublicKey, msg: Shutdown, }, SendChannelReestablish { node_id: PublicKey, msg: ChannelReestablish, }, SendChannelAnnouncement { node_id: PublicKey, msg: ChannelAnnouncement, update_msg: ChannelUpdate, }, BroadcastChannelAnnouncement { msg: ChannelAnnouncement, update_msg: Option<ChannelUpdate>, }, BroadcastChannelUpdate { msg: ChannelUpdate, }, BroadcastNodeAnnouncement { msg: NodeAnnouncement, }, SendChannelUpdate { node_id: PublicKey, msg: ChannelUpdate, }, HandleError { node_id: PublicKey, action: ErrorAction, }, SendChannelRangeQuery { node_id: PublicKey, msg: QueryChannelRange, }, SendShortIdsQuery { node_id: PublicKey, msg: QueryShortChannelIds, }, SendReplyChannelRange { node_id: PublicKey, msg: ReplyChannelRange, }, SendGossipTimestampFilter { node_id: PublicKey, msg: GossipTimestampFilter, },
}
Expand description

An event generated by ChannelManager which indicates a message should be sent to a peer (or broadcast to most peers). These events are handled by PeerManager::process_events if you are using a PeerManager.

Variants§

§

SendAcceptChannel

Used to indicate that we’ve accepted a channel open and should send the accept_channel message provided to the given peer.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: AcceptChannel

The message which should be sent.

§

SendAcceptChannelV2

Used to indicate that we’ve accepted a V2 channel open and should send the accept_channel2 message provided to the given peer.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: AcceptChannelV2

The message which should be sent.

§

SendOpenChannel

Used to indicate that we’ve initiated a channel open and should send the open_channel message provided to the given peer.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: OpenChannel

The message which should be sent.

§

SendOpenChannelV2

Used to indicate that we’ve initiated a V2 channel open and should send the open_channel2 message provided to the given peer.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: OpenChannelV2

The message which should be sent.

§

SendFundingCreated

Used to indicate that a funding_created message should be sent to the peer with the given node_id.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: FundingCreated

The message which should be sent.

§

SendFundingSigned

Used to indicate that a funding_signed message should be sent to the peer with the given node_id.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: FundingSigned

The message which should be sent.

§

SendTxAddInput

Used to indicate that a tx_add_input message should be sent to the peer with the given node_id.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: TxAddInput

The message which should be sent.

§

SendTxAddOutput

Used to indicate that a tx_add_output message should be sent to the peer with the given node_id.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: TxAddOutput

The message which should be sent.

§

SendTxRemoveInput

Used to indicate that a tx_remove_input message should be sent to the peer with the given node_id.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: TxRemoveInput

The message which should be sent.

§

SendTxRemoveOutput

Used to indicate that a tx_remove_output message should be sent to the peer with the given node_id.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: TxRemoveOutput

The message which should be sent.

§

SendTxComplete

Used to indicate that a tx_complete message should be sent to the peer with the given node_id.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: TxComplete

The message which should be sent.

§

SendTxSignatures

Used to indicate that a tx_signatures message should be sent to the peer with the given node_id.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: TxSignatures

The message which should be sent.

§

SendTxInitRbf

Used to indicate that a tx_init_rbf message should be sent to the peer with the given node_id.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: TxInitRbf

The message which should be sent.

§

SendTxAckRbf

Used to indicate that a tx_ack_rbf message should be sent to the peer with the given node_id.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: TxAckRbf

The message which should be sent.

§

SendTxAbort

Used to indicate that a tx_abort message should be sent to the peer with the given node_id.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: TxAbort

The message which should be sent.

§

SendChannelReady

Used to indicate that a channel_ready message should be sent to the peer with the given node_id.

Fields

§node_id: PublicKey

The node_id of the node which should receive these message(s)

§msg: ChannelReady

The channel_ready message which should be sent.

§

SendAnnouncementSignatures

Used to indicate that an announcement_signatures message should be sent to the peer with the given node_id.

Fields

§node_id: PublicKey

The node_id of the node which should receive these message(s)

§msg: AnnouncementSignatures

The announcement_signatures message which should be sent.

§

UpdateHTLCs

Used to indicate that a series of HTLC update messages, as well as a commitment_signed message should be sent to the peer with the given node_id.

Fields

§node_id: PublicKey

The node_id of the node which should receive these message(s)

§updates: CommitmentUpdate

The update messages which should be sent. ALL messages in the struct should be sent!

§

SendRevokeAndACK

Used to indicate that a revoke_and_ack message should be sent to the peer with the given node_id.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: RevokeAndACK

The message which should be sent.

§

SendClosingSigned

Used to indicate that a closing_signed message should be sent to the peer with the given node_id.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: ClosingSigned

The message which should be sent.

§

SendShutdown

Used to indicate that a shutdown message should be sent to the peer with the given node_id.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: Shutdown

The message which should be sent.

§

SendChannelReestablish

Used to indicate that a channel_reestablish message should be sent to the peer with the given node_id.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: ChannelReestablish

The message which should be sent.

§

SendChannelAnnouncement

Used to send a channel_announcement and channel_update to a specific peer, likely on initial connection to ensure our peers know about our channels.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: ChannelAnnouncement

The channel_announcement which should be sent.

§update_msg: ChannelUpdate

The followup channel_update which should be sent.

§

BroadcastChannelAnnouncement

Used to indicate that a channel_announcement and channel_update should be broadcast to all peers (except the peer with node_id either msg.contents.node_id_1 or msg.contents.node_id_2).

Note that after doing so, you very likely (unless you did so very recently) want to broadcast a node_announcement (e.g. via PeerManager::broadcast_node_announcement). This ensures that any nodes which see our channel_announcement also have a relevant node_announcement, including relevant feature flags which may be important for routing through or to us.

Fields

§msg: ChannelAnnouncement

The channel_announcement which should be sent.

§update_msg: Option<ChannelUpdate>

The followup channel_update which should be sent.

§

BroadcastChannelUpdate

Used to indicate that a channel_update should be broadcast to all peers.

Fields

§msg: ChannelUpdate

The channel_update which should be sent.

§

BroadcastNodeAnnouncement

Used to indicate that a node_announcement should be broadcast to all peers.

Fields

§msg: NodeAnnouncement

The node_announcement which should be sent.

§

SendChannelUpdate

Used to indicate that a channel_update should be sent to a single peer. In contrast to Self::BroadcastChannelUpdate, this is used when the channel is a private channel and we shouldn’t be informing all of our peers of channel parameters.

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§msg: ChannelUpdate

The channel_update which should be sent.

§

HandleError

Broadcast an error downstream to be handled

Fields

§node_id: PublicKey

The node_id of the node which should receive this message

§action: ErrorAction

The action which should be taken.

§

SendChannelRangeQuery

Query a peer for channels with funding transaction UTXOs in a block range.

Fields

§node_id: PublicKey

The node_id of this message recipient

§msg: QueryChannelRange

The query_channel_range which should be sent.

§

SendShortIdsQuery

Request routing gossip messages from a peer for a list of channels identified by their short_channel_ids.

Fields

§node_id: PublicKey

The node_id of this message recipient

§msg: QueryShortChannelIds

The query_short_channel_ids which should be sent.

§

SendReplyChannelRange

Sends a reply to a channel range query. This may be one of several SendReplyChannelRange events emitted during processing of the query.

Fields

§node_id: PublicKey

The node_id of this message recipient

§msg: ReplyChannelRange

The reply_channel_range which should be sent.

§

SendGossipTimestampFilter

Sends a timestamp filter for inbound gossip. This should be sent on each new connection to enable receiving gossip messages from the peer.

Fields

§node_id: PublicKey

The node_id of this message recipient

§msg: GossipTimestampFilter

The gossip_timestamp_filter which should be sent.

Trait Implementations§

§

impl Clone for MessageSendEvent

§

fn clone(&self) -> MessageSendEvent

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for MessageSendEvent

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Any for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

§

fn type_name(&self) -> &'static str

§

impl<T> AnySync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

§

impl<T> AsAny for T
where T: Any,

§

fn as_any(&self) -> &(dyn Any + 'static)

§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

§

fn type_name(&self) -> &'static str

Gets the type name of self
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T> Downcast for T
where T: AsAny + ?Sized,

§

fn is<T>(&self) -> bool
where T: AsAny,

Returns true if the boxed type is the same as T. Read more
§

fn downcast_ref<T>(&self) -> Option<&T>
where T: AsAny,

Forward to the method defined on the type Any.
§

fn downcast_mut<T>(&mut self) -> Option<&mut T>
where T: AsAny,

Forward to the method defined on the type Any.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> DartSafe for T