Package org.ldk.structs
Class Event.OpenChannelRequest
- java.lang.Object
-
- org.ldk.structs.Event
-
- org.ldk.structs.Event.OpenChannelRequest
-
- Enclosing class:
- Event
public static final class Event.OpenChannelRequest extends Event
Indicates a request to open a new channel by a peer. To accept the request, call [`ChannelManager::accept_inbound_channel`]. To reject the request, call [`ChannelManager::force_close_without_broadcasting_txn`]. The event is only triggered when a new open channel request is received and the [`UserConfig::manually_accept_inbound_channels`] config flag is set to true. [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel [`ChannelManager::force_close_without_broadcasting_txn`]: crate::ln::channelmanager::ChannelManager::force_close_without_broadcasting_txn [`UserConfig::manually_accept_inbound_channels`]: crate::util::config::UserConfig::manually_accept_inbound_channels
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ldk.structs.Event
Event.ChannelClosed, Event.ChannelPending, Event.ChannelReady, Event.DiscardFunding, Event.FundingGenerationReady, Event.HTLCHandlingFailed, Event.HTLCIntercepted, Event.OpenChannelRequest, Event.PaymentClaimable, Event.PaymentClaimed, Event.PaymentFailed, Event.PaymentForwarded, Event.PaymentPathFailed, Event.PaymentPathSuccessful, Event.PaymentSent, Event.PendingHTLCsForwardable, Event.ProbeFailed, Event.ProbeSuccessful, Event.SpendableOutputs
-
-
Field Summary
Fields Modifier and Type Field Description ChannelTypeFeatures
channel_type
The features that this channel will operate with.byte[]
counterparty_node_id
The node_id of the counterparty requesting to open the channel.long
funding_satoshis
The channel value of the requested channel.long
push_msat
Our starting balance in the channel if the request is accepted, in milli-satoshi.byte[]
temporary_channel_id
The temporary channel ID of the channel requested to be opened.
-
Method Summary
-
Methods inherited from class org.ldk.structs.Event
channel_closed, channel_pending, channel_ready, clone, discard_funding, eq, equals, finalize, funding_generation_ready, htlchandling_failed, htlcintercepted, open_channel_request, payment_claimable, payment_claimed, payment_failed, payment_forwarded, payment_path_failed, payment_path_successful, payment_sent, pending_htlcs_forwardable, probe_failed, probe_successful, spendable_outputs, write
-
-
-
-
Field Detail
-
temporary_channel_id
public final byte[] temporary_channel_id
The temporary channel ID of the channel requested to be opened. When responding to the request, the `temporary_channel_id` should be passed back to the ChannelManager through [`ChannelManager::accept_inbound_channel`] to accept, or through [`ChannelManager::force_close_without_broadcasting_txn`] to reject. [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel [`ChannelManager::force_close_without_broadcasting_txn`]: crate::ln::channelmanager::ChannelManager::force_close_without_broadcasting_txn
-
counterparty_node_id
public final byte[] counterparty_node_id
The node_id of the counterparty requesting to open the channel. When responding to the request, the `counterparty_node_id` should be passed back to the `ChannelManager` through [`ChannelManager::accept_inbound_channel`] to accept the request, or through [`ChannelManager::force_close_without_broadcasting_txn`] to reject the request. [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel [`ChannelManager::force_close_without_broadcasting_txn`]: crate::ln::channelmanager::ChannelManager::force_close_without_broadcasting_txn
-
funding_satoshis
public final long funding_satoshis
The channel value of the requested channel.
-
push_msat
public final long push_msat
Our starting balance in the channel if the request is accepted, in milli-satoshi.
-
channel_type
public final ChannelTypeFeatures channel_type
The features that this channel will operate with. If you reject the channel, a well-behaved counterparty may automatically re-attempt the channel with a new set of feature flags. Note that if [`ChannelTypeFeatures::supports_scid_privacy`] returns true on this type, the resulting [`ChannelManager`] will not be readable by versions of LDK prior to 0.0.106. Furthermore, note that if [`ChannelTypeFeatures::supports_zero_conf`] returns true on this type, the resulting [`ChannelManager`] will not be readable by versions of LDK prior to 0.0.107. Channels setting this type also need to get manually accepted via [`crate::ln::channelmanager::ChannelManager::accept_inbound_channel_from_trusted_peer_0conf`], or will be rejected otherwise. [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
-
-