+/** A Event of type ChannelReady */
+export class Event_ChannelReady extends Event {
+ /**
+ * The channel_id of the channel that is ready.
+ */
+ public channel_id: Uint8Array;
+ /**
+ * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound
+ * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if
+ * [`UserConfig::manually_accept_inbound_channels`] config flag is set to true. Otherwise
+ * `user_channel_id` will be randomized for an inbound channel.
+ *
+ * [`ChannelManager::create_channel`]: crate::ln::channelmanager::ChannelManager::create_channel
+ * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
+ * [`UserConfig::manually_accept_inbound_channels`]: crate::util::config::UserConfig::manually_accept_inbound_channels
+ */
+ public user_channel_id: bigint;
+ /**
+ * The node_id of the channel counterparty.
+ */
+ public counterparty_node_id: Uint8Array;
+ /**
+ * The features that this channel will operate with.
+ */
+ public channel_type: ChannelTypeFeatures;
+ /* @internal */
+ public constructor(ptr: bigint) {
+ super(null, ptr);
+ const channel_id: number = bindings.LDKEvent_ChannelReady_get_channel_id(ptr);
+ const channel_id_conv: Uint8Array = bindings.decodeUint8Array(channel_id);
+ this.channel_id = channel_id_conv;
+ const user_channel_id: number = bindings.LDKEvent_ChannelReady_get_user_channel_id(ptr);
+ const user_channel_id_conv: bigint = bindings.decodeUint128(user_channel_id);
+ this.user_channel_id = user_channel_id_conv;
+ const counterparty_node_id: number = bindings.LDKEvent_ChannelReady_get_counterparty_node_id(ptr);
+ const counterparty_node_id_conv: Uint8Array = bindings.decodeUint8Array(counterparty_node_id);
+ this.counterparty_node_id = counterparty_node_id_conv;
+ const channel_type: bigint = bindings.LDKEvent_ChannelReady_get_channel_type(ptr);
+ const channel_type_hu_conv: ChannelTypeFeatures = new ChannelTypeFeatures(null, channel_type);
+ CommonBase.add_ref_from(channel_type_hu_conv, this);
+ this.channel_type = channel_type_hu_conv;
+ }
+}