+ const outbound_amount_forwarded_msat: bigint = bindings.LDKEvent_PaymentForwarded_get_outbound_amount_forwarded_msat(ptr);
+ const outbound_amount_forwarded_msat_hu_conv: Option_u64Z = Option_u64Z.constr_from_ptr(outbound_amount_forwarded_msat);
+ CommonBase.add_ref_from(outbound_amount_forwarded_msat_hu_conv, this);
+ this.outbound_amount_forwarded_msat = outbound_amount_forwarded_msat_hu_conv;
+ }
+}
+/** A Event of type ChannelPending */
+export class Event_ChannelPending extends Event {
+ /**
+ * The `channel_id` of the channel that is pending confirmation.
+ */
+ 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 `temporary_channel_id` this channel used to be known by during channel establishment.
+ *
+ * Will be `None` for channels created prior to LDK version 0.0.115.
+ *
+ * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public former_temporary_channel_id: Uint8Array;
+ /**
+ * The `node_id` of the channel counterparty.
+ */
+ public counterparty_node_id: Uint8Array;
+ /**
+ * The outpoint of the channel's funding transaction.
+ */
+ public funding_txo: OutPoint;
+ /* @internal */
+ public constructor(ptr: bigint) {
+ super(null, ptr);
+ const channel_id: number = bindings.LDKEvent_ChannelPending_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_ChannelPending_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 former_temporary_channel_id: number = bindings.LDKEvent_ChannelPending_get_former_temporary_channel_id(ptr);
+ const former_temporary_channel_id_conv: Uint8Array = bindings.decodeUint8Array(former_temporary_channel_id);
+ this.former_temporary_channel_id = former_temporary_channel_id_conv;
+ const counterparty_node_id: number = bindings.LDKEvent_ChannelPending_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 funding_txo: bigint = bindings.LDKEvent_ChannelPending_get_funding_txo(ptr);
+ const funding_txo_hu_conv: OutPoint = new OutPoint(null, funding_txo);
+ CommonBase.add_ref_from(funding_txo_hu_conv, this);
+ this.funding_txo = funding_txo_hu_conv;