Enum lightning::util::events::Event [−][src]
pub enum Event { FundingGenerationReady { temporary_channel_id: Uint256, channel_value_satoshis: u64, output_script: Script, user_channel_id: u64, }, FundingBroadcastSafe { funding_txo: OutPoint, user_channel_id: u64, }, PaymentReceived { payment_hash: [u8; 32], amt: u64, }, PaymentSent { payment_preimage: [u8; 32], }, PaymentFailed { payment_hash: [u8; 32], }, PendingHTLCsForwardable { time_forwardable: Instant, }, SendOpenChannel { node_id: PublicKey, msg: OpenChannel, }, SendFundingCreated { node_id: PublicKey, msg: FundingCreated, }, SendFundingLocked { node_id: PublicKey, msg: FundingLocked, announcement_sigs: Option<AnnouncementSignatures>, }, SendHTLCs { node_id: PublicKey, msgs: Vec<UpdateAddHTLC>, commitment_msg: CommitmentSigned, }, SendFulfillHTLC { node_id: PublicKey, msg: UpdateFulfillHTLC, commitment_msg: CommitmentSigned, }, SendFailHTLC { node_id: PublicKey, msg: UpdateFailHTLC, commitment_msg: CommitmentSigned, }, BroadcastChannelAnnouncement { msg: ChannelAnnouncement, update_msg: ChannelUpdate, }, BroadcastChannelUpdate { msg: ChannelUpdate, }, }
Variants
FundingGenerationReady
Used to indicate that the client should generate a funding transaction with the given parameters and then call ChannelManager::funding_transaction_generated. Generated in ChannelManager message handling.
Fields of FundingGenerationReady
temporary_channel_id: Uint256 | |
channel_value_satoshis: u64 | |
output_script: Script | |
user_channel_id: u64 | The value passed in to ChannelManager::create_channel |
FundingBroadcastSafe
Used to indicate that the client may now broadcast the funding transaction it created for a channel. Broadcasting such a transaction prior to this event may lead to our counterparty trivially stealing all funds in the funding transaction!
Fields of FundingBroadcastSafe
funding_txo: OutPoint | |
user_channel_id: u64 | The value passed in to ChannelManager::create_channel |
PaymentReceived
Indicates we've received money! Just gotta dig out that payment preimage and feed it to ChannelManager::claim_funds to get it.... Note that if the preimage is not known, you must call ChannelManager::fail_htlc_backwards to free up resources for this HTLC.
Fields of PaymentReceived
payment_hash: [u8; 32] | |
amt: u64 |
PaymentSent
Indicates an outbound payment we made succeeded (ie it made it all the way to its target and we got back the payment preimage for it). payment_preimage serves as a payment receipt, if you wish to have such a thing, you must store it somehow!
Fields of PaymentSent
payment_preimage: [u8; 32] |
PaymentFailed
Indicates an outbound payment we made failed. Probably some intermediary node dropped something. You may wish to retry with a different route.
Fields of PaymentFailed
payment_hash: [u8; 32] |
PendingHTLCsForwardable
Used to indicate that ChannelManager::process_pending_htlc_forwards should be called at a time in the future.
Fields of PendingHTLCsForwardable
time_forwardable: Instant |
SendOpenChannel
Used to indicate that we've initialted a channel open and should send the open_channel message provided to the given peer
Fields of SendOpenChannel
node_id: PublicKey | |
msg: OpenChannel |
SendFundingCreated
Used to indicate that a funding_created message should be sent to the peer with the given node_id.
Fields of SendFundingCreated
node_id: PublicKey | |
msg: FundingCreated |
SendFundingLocked
Used to indicate that a funding_locked message should be sent to the peer with the given node_id.
Fields of SendFundingLocked
node_id: PublicKey | |
msg: FundingLocked | |
announcement_sigs: Option<AnnouncementSignatures> |
SendHTLCs
Used to indicate that a series of update_add_htlc messages, as well as a commitment_signed message should be sent to the peer with the given node_id.
Fields of SendHTLCs
node_id: PublicKey | |
msgs: Vec<UpdateAddHTLC> | |
commitment_msg: CommitmentSigned |
SendFulfillHTLC
Used to indicate that we're ready to fulfill an htlc from the peer with the given node_id.
Fields of SendFulfillHTLC
node_id: PublicKey | |
msg: UpdateFulfillHTLC | |
commitment_msg: CommitmentSigned |
SendFailHTLC
Used to indicate that we need to fail an htlc from the peer with the given node_id.
Fields of SendFailHTLC
node_id: PublicKey | |
msg: UpdateFailHTLC | |
commitment_msg: CommitmentSigned |
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).
Fields of BroadcastChannelAnnouncement
msg: ChannelAnnouncement | |
update_msg: ChannelUpdate |
BroadcastChannelUpdate
Used to indicate that a channel_update should be broadcast to all peers.
Fields of BroadcastChannelUpdate
msg: ChannelUpdate |