using org.ldk.impl; using org.ldk.enums; using org.ldk.util; using System; namespace org { namespace ldk { namespace structs { /** * 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. */ public class MessageSendEvent : CommonBase { protected MessageSendEvent(object _dummy, long ptr) : base(ptr) { } ~MessageSendEvent() { if (ptr != 0) { bindings.MessageSendEvent_free(ptr); } } internal static MessageSendEvent constr_from_ptr(long ptr) { long raw_ty = bindings.LDKMessageSendEvent_ty_from_ptr(ptr); switch (raw_ty) { case 0: return new MessageSendEvent_SendAcceptChannel(ptr); case 1: return new MessageSendEvent_SendAcceptChannelV2(ptr); case 2: return new MessageSendEvent_SendOpenChannel(ptr); case 3: return new MessageSendEvent_SendOpenChannelV2(ptr); case 4: return new MessageSendEvent_SendFundingCreated(ptr); case 5: return new MessageSendEvent_SendFundingSigned(ptr); case 6: return new MessageSendEvent_SendStfu(ptr); case 7: return new MessageSendEvent_SendSplice(ptr); case 8: return new MessageSendEvent_SendSpliceAck(ptr); case 9: return new MessageSendEvent_SendSpliceLocked(ptr); case 10: return new MessageSendEvent_SendTxAddInput(ptr); case 11: return new MessageSendEvent_SendTxAddOutput(ptr); case 12: return new MessageSendEvent_SendTxRemoveInput(ptr); case 13: return new MessageSendEvent_SendTxRemoveOutput(ptr); case 14: return new MessageSendEvent_SendTxComplete(ptr); case 15: return new MessageSendEvent_SendTxSignatures(ptr); case 16: return new MessageSendEvent_SendTxInitRbf(ptr); case 17: return new MessageSendEvent_SendTxAckRbf(ptr); case 18: return new MessageSendEvent_SendTxAbort(ptr); case 19: return new MessageSendEvent_SendChannelReady(ptr); case 20: return new MessageSendEvent_SendAnnouncementSignatures(ptr); case 21: return new MessageSendEvent_UpdateHTLCs(ptr); case 22: return new MessageSendEvent_SendRevokeAndACK(ptr); case 23: return new MessageSendEvent_SendClosingSigned(ptr); case 24: return new MessageSendEvent_SendShutdown(ptr); case 25: return new MessageSendEvent_SendChannelReestablish(ptr); case 26: return new MessageSendEvent_SendChannelAnnouncement(ptr); case 27: return new MessageSendEvent_BroadcastChannelAnnouncement(ptr); case 28: return new MessageSendEvent_BroadcastChannelUpdate(ptr); case 29: return new MessageSendEvent_BroadcastNodeAnnouncement(ptr); case 30: return new MessageSendEvent_SendChannelUpdate(ptr); case 31: return new MessageSendEvent_HandleError(ptr); case 32: return new MessageSendEvent_SendChannelRangeQuery(ptr); case 33: return new MessageSendEvent_SendShortIdsQuery(ptr); case 34: return new MessageSendEvent_SendReplyChannelRange(ptr); case 35: return new MessageSendEvent_SendGossipTimestampFilter(ptr); default: throw new ArgumentException("Impossible enum variant"); } } /** A MessageSendEvent of type SendAcceptChannel */ public class MessageSendEvent_SendAcceptChannel : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public AcceptChannel msg; internal MessageSendEvent_SendAcceptChannel(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendAcceptChannel_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendAcceptChannel_get_msg(ptr); org.ldk.structs.AcceptChannel msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.AcceptChannel(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendAcceptChannelV2 */ public class MessageSendEvent_SendAcceptChannelV2 : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public AcceptChannelV2 msg; internal MessageSendEvent_SendAcceptChannelV2(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendAcceptChannelV2_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendAcceptChannelV2_get_msg(ptr); org.ldk.structs.AcceptChannelV2 msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.AcceptChannelV2(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendOpenChannel */ public class MessageSendEvent_SendOpenChannel : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public OpenChannel msg; internal MessageSendEvent_SendOpenChannel(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendOpenChannel_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendOpenChannel_get_msg(ptr); org.ldk.structs.OpenChannel msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.OpenChannel(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendOpenChannelV2 */ public class MessageSendEvent_SendOpenChannelV2 : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public OpenChannelV2 msg; internal MessageSendEvent_SendOpenChannelV2(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendOpenChannelV2_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendOpenChannelV2_get_msg(ptr); org.ldk.structs.OpenChannelV2 msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.OpenChannelV2(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendFundingCreated */ public class MessageSendEvent_SendFundingCreated : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public FundingCreated msg; internal MessageSendEvent_SendFundingCreated(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendFundingCreated_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendFundingCreated_get_msg(ptr); org.ldk.structs.FundingCreated msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.FundingCreated(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendFundingSigned */ public class MessageSendEvent_SendFundingSigned : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public FundingSigned msg; internal MessageSendEvent_SendFundingSigned(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendFundingSigned_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendFundingSigned_get_msg(ptr); org.ldk.structs.FundingSigned msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.FundingSigned(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendStfu */ public class MessageSendEvent_SendStfu : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public Stfu msg; internal MessageSendEvent_SendStfu(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendStfu_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendStfu_get_msg(ptr); org.ldk.structs.Stfu msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.Stfu(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendSplice */ public class MessageSendEvent_SendSplice : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public Splice msg; internal MessageSendEvent_SendSplice(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendSplice_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendSplice_get_msg(ptr); org.ldk.structs.Splice msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.Splice(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendSpliceAck */ public class MessageSendEvent_SendSpliceAck : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public SpliceAck msg; internal MessageSendEvent_SendSpliceAck(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendSpliceAck_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendSpliceAck_get_msg(ptr); org.ldk.structs.SpliceAck msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.SpliceAck(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendSpliceLocked */ public class MessageSendEvent_SendSpliceLocked : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public SpliceLocked msg; internal MessageSendEvent_SendSpliceLocked(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendSpliceLocked_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendSpliceLocked_get_msg(ptr); org.ldk.structs.SpliceLocked msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.SpliceLocked(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendTxAddInput */ public class MessageSendEvent_SendTxAddInput : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public TxAddInput msg; internal MessageSendEvent_SendTxAddInput(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendTxAddInput_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendTxAddInput_get_msg(ptr); org.ldk.structs.TxAddInput msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxAddInput(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendTxAddOutput */ public class MessageSendEvent_SendTxAddOutput : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public TxAddOutput msg; internal MessageSendEvent_SendTxAddOutput(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendTxAddOutput_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendTxAddOutput_get_msg(ptr); org.ldk.structs.TxAddOutput msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxAddOutput(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendTxRemoveInput */ public class MessageSendEvent_SendTxRemoveInput : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public TxRemoveInput msg; internal MessageSendEvent_SendTxRemoveInput(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendTxRemoveInput_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendTxRemoveInput_get_msg(ptr); org.ldk.structs.TxRemoveInput msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxRemoveInput(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendTxRemoveOutput */ public class MessageSendEvent_SendTxRemoveOutput : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public TxRemoveOutput msg; internal MessageSendEvent_SendTxRemoveOutput(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendTxRemoveOutput_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendTxRemoveOutput_get_msg(ptr); org.ldk.structs.TxRemoveOutput msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxRemoveOutput(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendTxComplete */ public class MessageSendEvent_SendTxComplete : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public TxComplete msg; internal MessageSendEvent_SendTxComplete(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendTxComplete_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendTxComplete_get_msg(ptr); org.ldk.structs.TxComplete msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxComplete(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendTxSignatures */ public class MessageSendEvent_SendTxSignatures : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public TxSignatures msg; internal MessageSendEvent_SendTxSignatures(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendTxSignatures_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendTxSignatures_get_msg(ptr); org.ldk.structs.TxSignatures msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxSignatures(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendTxInitRbf */ public class MessageSendEvent_SendTxInitRbf : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public TxInitRbf msg; internal MessageSendEvent_SendTxInitRbf(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendTxInitRbf_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendTxInitRbf_get_msg(ptr); org.ldk.structs.TxInitRbf msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxInitRbf(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendTxAckRbf */ public class MessageSendEvent_SendTxAckRbf : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public TxAckRbf msg; internal MessageSendEvent_SendTxAckRbf(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendTxAckRbf_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendTxAckRbf_get_msg(ptr); org.ldk.structs.TxAckRbf msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxAckRbf(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendTxAbort */ public class MessageSendEvent_SendTxAbort : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public TxAbort msg; internal MessageSendEvent_SendTxAbort(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendTxAbort_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendTxAbort_get_msg(ptr); org.ldk.structs.TxAbort msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxAbort(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendChannelReady */ public class MessageSendEvent_SendChannelReady : MessageSendEvent { /** * The node_id of the node which should receive these message(s) */ public byte[] node_id; /** * The channel_ready message which should be sent. */ public ChannelReady msg; internal MessageSendEvent_SendChannelReady(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendChannelReady_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendChannelReady_get_msg(ptr); org.ldk.structs.ChannelReady msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelReady(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendAnnouncementSignatures */ public class MessageSendEvent_SendAnnouncementSignatures : MessageSendEvent { /** * The node_id of the node which should receive these message(s) */ public byte[] node_id; /** * The announcement_signatures message which should be sent. */ public AnnouncementSignatures msg; internal MessageSendEvent_SendAnnouncementSignatures(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendAnnouncementSignatures_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendAnnouncementSignatures_get_msg(ptr); org.ldk.structs.AnnouncementSignatures msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.AnnouncementSignatures(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type UpdateHTLCs */ public class MessageSendEvent_UpdateHTLCs : MessageSendEvent { /** * The node_id of the node which should receive these message(s) */ public byte[] node_id; /** * The update messages which should be sent. ALL messages in the struct should be sent! */ public CommitmentUpdate updates; internal MessageSendEvent_UpdateHTLCs(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_UpdateHTLCs_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long updates = bindings.LDKMessageSendEvent_UpdateHTLCs_get_updates(ptr); org.ldk.structs.CommitmentUpdate updates_hu_conv = null; if (updates < 0 || updates > 4096) { updates_hu_conv = new org.ldk.structs.CommitmentUpdate(null, updates); } if (updates_hu_conv != null) { updates_hu_conv.ptrs_to.AddLast(this); }; this.updates = updates_hu_conv; } } /** A MessageSendEvent of type SendRevokeAndACK */ public class MessageSendEvent_SendRevokeAndACK : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public RevokeAndACK msg; internal MessageSendEvent_SendRevokeAndACK(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendRevokeAndACK_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendRevokeAndACK_get_msg(ptr); org.ldk.structs.RevokeAndACK msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.RevokeAndACK(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendClosingSigned */ public class MessageSendEvent_SendClosingSigned : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public ClosingSigned msg; internal MessageSendEvent_SendClosingSigned(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendClosingSigned_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendClosingSigned_get_msg(ptr); org.ldk.structs.ClosingSigned msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ClosingSigned(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendShutdown */ public class MessageSendEvent_SendShutdown : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public Shutdown msg; internal MessageSendEvent_SendShutdown(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendShutdown_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendShutdown_get_msg(ptr); org.ldk.structs.Shutdown msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.Shutdown(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendChannelReestablish */ public class MessageSendEvent_SendChannelReestablish : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The message which should be sent. */ public ChannelReestablish msg; internal MessageSendEvent_SendChannelReestablish(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendChannelReestablish_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendChannelReestablish_get_msg(ptr); org.ldk.structs.ChannelReestablish msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelReestablish(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendChannelAnnouncement */ public class MessageSendEvent_SendChannelAnnouncement : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The channel_announcement which should be sent. */ public ChannelAnnouncement msg; /** * The followup channel_update which should be sent. */ public ChannelUpdate update_msg; internal MessageSendEvent_SendChannelAnnouncement(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendChannelAnnouncement_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendChannelAnnouncement_get_msg(ptr); org.ldk.structs.ChannelAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelAnnouncement(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; long update_msg = bindings.LDKMessageSendEvent_SendChannelAnnouncement_get_update_msg(ptr); org.ldk.structs.ChannelUpdate update_msg_hu_conv = null; if (update_msg < 0 || update_msg > 4096) { update_msg_hu_conv = new org.ldk.structs.ChannelUpdate(null, update_msg); } if (update_msg_hu_conv != null) { update_msg_hu_conv.ptrs_to.AddLast(this); }; this.update_msg = update_msg_hu_conv; } } /** A MessageSendEvent of type BroadcastChannelAnnouncement */ public class MessageSendEvent_BroadcastChannelAnnouncement : MessageSendEvent { /** * The channel_announcement which should be sent. */ public ChannelAnnouncement msg; /** * The followup channel_update which should be sent. * * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None */ public ChannelUpdate update_msg; internal MessageSendEvent_BroadcastChannelAnnouncement(long ptr) : base(null, ptr) { long msg = bindings.LDKMessageSendEvent_BroadcastChannelAnnouncement_get_msg(ptr); org.ldk.structs.ChannelAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelAnnouncement(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; long update_msg = bindings.LDKMessageSendEvent_BroadcastChannelAnnouncement_get_update_msg(ptr); org.ldk.structs.ChannelUpdate update_msg_hu_conv = null; if (update_msg < 0 || update_msg > 4096) { update_msg_hu_conv = new org.ldk.structs.ChannelUpdate(null, update_msg); } if (update_msg_hu_conv != null) { update_msg_hu_conv.ptrs_to.AddLast(this); }; this.update_msg = update_msg_hu_conv; } } /** A MessageSendEvent of type BroadcastChannelUpdate */ public class MessageSendEvent_BroadcastChannelUpdate : MessageSendEvent { /** * The channel_update which should be sent. */ public ChannelUpdate msg; internal MessageSendEvent_BroadcastChannelUpdate(long ptr) : base(null, ptr) { long msg = bindings.LDKMessageSendEvent_BroadcastChannelUpdate_get_msg(ptr); org.ldk.structs.ChannelUpdate msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelUpdate(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type BroadcastNodeAnnouncement */ public class MessageSendEvent_BroadcastNodeAnnouncement : MessageSendEvent { /** * The node_announcement which should be sent. */ public NodeAnnouncement msg; internal MessageSendEvent_BroadcastNodeAnnouncement(long ptr) : base(null, ptr) { long msg = bindings.LDKMessageSendEvent_BroadcastNodeAnnouncement_get_msg(ptr); org.ldk.structs.NodeAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.NodeAnnouncement(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendChannelUpdate */ public class MessageSendEvent_SendChannelUpdate : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The channel_update which should be sent. */ public ChannelUpdate msg; internal MessageSendEvent_SendChannelUpdate(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendChannelUpdate_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendChannelUpdate_get_msg(ptr); org.ldk.structs.ChannelUpdate msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelUpdate(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type HandleError */ public class MessageSendEvent_HandleError : MessageSendEvent { /** * The node_id of the node which should receive this message */ public byte[] node_id; /** * The action which should be taken. */ public ErrorAction action; internal MessageSendEvent_HandleError(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_HandleError_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long action = bindings.LDKMessageSendEvent_HandleError_get_action(ptr); org.ldk.structs.ErrorAction action_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(action); if (action_hu_conv != null) { action_hu_conv.ptrs_to.AddLast(this); }; this.action = action_hu_conv; } } /** A MessageSendEvent of type SendChannelRangeQuery */ public class MessageSendEvent_SendChannelRangeQuery : MessageSendEvent { /** * The node_id of this message recipient */ public byte[] node_id; /** * The query_channel_range which should be sent. */ public QueryChannelRange msg; internal MessageSendEvent_SendChannelRangeQuery(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendChannelRangeQuery_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendChannelRangeQuery_get_msg(ptr); org.ldk.structs.QueryChannelRange msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.QueryChannelRange(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendShortIdsQuery */ public class MessageSendEvent_SendShortIdsQuery : MessageSendEvent { /** * The node_id of this message recipient */ public byte[] node_id; /** * The query_short_channel_ids which should be sent. */ public QueryShortChannelIds msg; internal MessageSendEvent_SendShortIdsQuery(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendShortIdsQuery_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendShortIdsQuery_get_msg(ptr); org.ldk.structs.QueryShortChannelIds msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.QueryShortChannelIds(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendReplyChannelRange */ public class MessageSendEvent_SendReplyChannelRange : MessageSendEvent { /** * The node_id of this message recipient */ public byte[] node_id; /** * The reply_channel_range which should be sent. */ public ReplyChannelRange msg; internal MessageSendEvent_SendReplyChannelRange(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendReplyChannelRange_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendReplyChannelRange_get_msg(ptr); org.ldk.structs.ReplyChannelRange msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ReplyChannelRange(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } /** A MessageSendEvent of type SendGossipTimestampFilter */ public class MessageSendEvent_SendGossipTimestampFilter : MessageSendEvent { /** * The node_id of this message recipient */ public byte[] node_id; /** * The gossip_timestamp_filter which should be sent. */ public GossipTimestampFilter msg; internal MessageSendEvent_SendGossipTimestampFilter(long ptr) : base(null, ptr) { long node_id = bindings.LDKMessageSendEvent_SendGossipTimestampFilter_get_node_id(ptr); byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id); this.node_id = node_id_conv; long msg = bindings.LDKMessageSendEvent_SendGossipTimestampFilter_get_msg(ptr); org.ldk.structs.GossipTimestampFilter msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.GossipTimestampFilter(null, msg); } if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); }; this.msg = msg_hu_conv; } } internal long clone_ptr() { long ret = bindings.MessageSendEvent_clone_ptr(this.ptr); GC.KeepAlive(this); return ret; } /** * Creates a copy of the MessageSendEvent */ public MessageSendEvent clone() { long ret = bindings.MessageSendEvent_clone(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; return ret_hu_conv; } /** * Utility method to constructs a new SendAcceptChannel-variant MessageSendEvent */ public static MessageSendEvent send_accept_channel(byte[] node_id, org.ldk.structs.AcceptChannel msg) { long ret = bindings.MessageSendEvent_send_accept_channel(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendAcceptChannelV2-variant MessageSendEvent */ public static MessageSendEvent send_accept_channel_v2(byte[] node_id, org.ldk.structs.AcceptChannelV2 msg) { long ret = bindings.MessageSendEvent_send_accept_channel_v2(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendOpenChannel-variant MessageSendEvent */ public static MessageSendEvent send_open_channel(byte[] node_id, org.ldk.structs.OpenChannel msg) { long ret = bindings.MessageSendEvent_send_open_channel(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendOpenChannelV2-variant MessageSendEvent */ public static MessageSendEvent send_open_channel_v2(byte[] node_id, org.ldk.structs.OpenChannelV2 msg) { long ret = bindings.MessageSendEvent_send_open_channel_v2(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendFundingCreated-variant MessageSendEvent */ public static MessageSendEvent send_funding_created(byte[] node_id, org.ldk.structs.FundingCreated msg) { long ret = bindings.MessageSendEvent_send_funding_created(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendFundingSigned-variant MessageSendEvent */ public static MessageSendEvent send_funding_signed(byte[] node_id, org.ldk.structs.FundingSigned msg) { long ret = bindings.MessageSendEvent_send_funding_signed(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendStfu-variant MessageSendEvent */ public static MessageSendEvent send_stfu(byte[] node_id, org.ldk.structs.Stfu msg) { long ret = bindings.MessageSendEvent_send_stfu(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendSplice-variant MessageSendEvent */ public static MessageSendEvent send_splice(byte[] node_id, org.ldk.structs.Splice msg) { long ret = bindings.MessageSendEvent_send_splice(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendSpliceAck-variant MessageSendEvent */ public static MessageSendEvent send_splice_ack(byte[] node_id, org.ldk.structs.SpliceAck msg) { long ret = bindings.MessageSendEvent_send_splice_ack(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendSpliceLocked-variant MessageSendEvent */ public static MessageSendEvent send_splice_locked(byte[] node_id, org.ldk.structs.SpliceLocked msg) { long ret = bindings.MessageSendEvent_send_splice_locked(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendTxAddInput-variant MessageSendEvent */ public static MessageSendEvent send_tx_add_input(byte[] node_id, org.ldk.structs.TxAddInput msg) { long ret = bindings.MessageSendEvent_send_tx_add_input(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendTxAddOutput-variant MessageSendEvent */ public static MessageSendEvent send_tx_add_output(byte[] node_id, org.ldk.structs.TxAddOutput msg) { long ret = bindings.MessageSendEvent_send_tx_add_output(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendTxRemoveInput-variant MessageSendEvent */ public static MessageSendEvent send_tx_remove_input(byte[] node_id, org.ldk.structs.TxRemoveInput msg) { long ret = bindings.MessageSendEvent_send_tx_remove_input(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendTxRemoveOutput-variant MessageSendEvent */ public static MessageSendEvent send_tx_remove_output(byte[] node_id, org.ldk.structs.TxRemoveOutput msg) { long ret = bindings.MessageSendEvent_send_tx_remove_output(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendTxComplete-variant MessageSendEvent */ public static MessageSendEvent send_tx_complete(byte[] node_id, org.ldk.structs.TxComplete msg) { long ret = bindings.MessageSendEvent_send_tx_complete(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendTxSignatures-variant MessageSendEvent */ public static MessageSendEvent send_tx_signatures(byte[] node_id, org.ldk.structs.TxSignatures msg) { long ret = bindings.MessageSendEvent_send_tx_signatures(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendTxInitRbf-variant MessageSendEvent */ public static MessageSendEvent send_tx_init_rbf(byte[] node_id, org.ldk.structs.TxInitRbf msg) { long ret = bindings.MessageSendEvent_send_tx_init_rbf(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendTxAckRbf-variant MessageSendEvent */ public static MessageSendEvent send_tx_ack_rbf(byte[] node_id, org.ldk.structs.TxAckRbf msg) { long ret = bindings.MessageSendEvent_send_tx_ack_rbf(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendTxAbort-variant MessageSendEvent */ public static MessageSendEvent send_tx_abort(byte[] node_id, org.ldk.structs.TxAbort msg) { long ret = bindings.MessageSendEvent_send_tx_abort(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendChannelReady-variant MessageSendEvent */ public static MessageSendEvent send_channel_ready(byte[] node_id, org.ldk.structs.ChannelReady msg) { long ret = bindings.MessageSendEvent_send_channel_ready(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendAnnouncementSignatures-variant MessageSendEvent */ public static MessageSendEvent send_announcement_signatures(byte[] node_id, org.ldk.structs.AnnouncementSignatures msg) { long ret = bindings.MessageSendEvent_send_announcement_signatures(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new UpdateHTLCs-variant MessageSendEvent */ public static MessageSendEvent update_htlcs(byte[] node_id, org.ldk.structs.CommitmentUpdate updates) { long ret = bindings.MessageSendEvent_update_htlcs(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), updates == null ? 0 : updates.ptr); GC.KeepAlive(node_id); GC.KeepAlive(updates); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(updates); }; return ret_hu_conv; } /** * Utility method to constructs a new SendRevokeAndACK-variant MessageSendEvent */ public static MessageSendEvent send_revoke_and_ack(byte[] node_id, org.ldk.structs.RevokeAndACK msg) { long ret = bindings.MessageSendEvent_send_revoke_and_ack(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendClosingSigned-variant MessageSendEvent */ public static MessageSendEvent send_closing_signed(byte[] node_id, org.ldk.structs.ClosingSigned msg) { long ret = bindings.MessageSendEvent_send_closing_signed(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendShutdown-variant MessageSendEvent */ public static MessageSendEvent send_shutdown(byte[] node_id, org.ldk.structs.Shutdown msg) { long ret = bindings.MessageSendEvent_send_shutdown(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendChannelReestablish-variant MessageSendEvent */ public static MessageSendEvent send_channel_reestablish(byte[] node_id, org.ldk.structs.ChannelReestablish msg) { long ret = bindings.MessageSendEvent_send_channel_reestablish(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendChannelAnnouncement-variant MessageSendEvent */ public static MessageSendEvent send_channel_announcement(byte[] node_id, org.ldk.structs.ChannelAnnouncement msg, org.ldk.structs.ChannelUpdate update_msg) { long ret = bindings.MessageSendEvent_send_channel_announcement(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr, update_msg == null ? 0 : update_msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); GC.KeepAlive(update_msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(update_msg); }; return ret_hu_conv; } /** * Utility method to constructs a new BroadcastChannelAnnouncement-variant MessageSendEvent */ public static MessageSendEvent broadcast_channel_announcement(org.ldk.structs.ChannelAnnouncement msg, org.ldk.structs.ChannelUpdate update_msg) { long ret = bindings.MessageSendEvent_broadcast_channel_announcement(msg == null ? 0 : msg.ptr, update_msg == null ? 0 : update_msg.ptr); GC.KeepAlive(msg); GC.KeepAlive(update_msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(update_msg); }; return ret_hu_conv; } /** * Utility method to constructs a new BroadcastChannelUpdate-variant MessageSendEvent */ public static MessageSendEvent broadcast_channel_update(org.ldk.structs.ChannelUpdate msg) { long ret = bindings.MessageSendEvent_broadcast_channel_update(msg == null ? 0 : msg.ptr); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new BroadcastNodeAnnouncement-variant MessageSendEvent */ public static MessageSendEvent broadcast_node_announcement(org.ldk.structs.NodeAnnouncement msg) { long ret = bindings.MessageSendEvent_broadcast_node_announcement(msg == null ? 0 : msg.ptr); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendChannelUpdate-variant MessageSendEvent */ public static MessageSendEvent send_channel_update(byte[] node_id, org.ldk.structs.ChannelUpdate msg) { long ret = bindings.MessageSendEvent_send_channel_update(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new HandleError-variant MessageSendEvent */ public static MessageSendEvent handle_error(byte[] node_id, org.ldk.structs.ErrorAction action) { long ret = bindings.MessageSendEvent_handle_error(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), action.ptr); GC.KeepAlive(node_id); GC.KeepAlive(action); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(action); }; return ret_hu_conv; } /** * Utility method to constructs a new SendChannelRangeQuery-variant MessageSendEvent */ public static MessageSendEvent send_channel_range_query(byte[] node_id, org.ldk.structs.QueryChannelRange msg) { long ret = bindings.MessageSendEvent_send_channel_range_query(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendShortIdsQuery-variant MessageSendEvent */ public static MessageSendEvent send_short_ids_query(byte[] node_id, org.ldk.structs.QueryShortChannelIds msg) { long ret = bindings.MessageSendEvent_send_short_ids_query(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendReplyChannelRange-variant MessageSendEvent */ public static MessageSendEvent send_reply_channel_range(byte[] node_id, org.ldk.structs.ReplyChannelRange msg) { long ret = bindings.MessageSendEvent_send_reply_channel_range(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } /** * Utility method to constructs a new SendGossipTimestampFilter-variant MessageSendEvent */ public static MessageSendEvent send_gossip_timestamp_filter(byte[] node_id, org.ldk.structs.GossipTimestampFilter msg) { long ret = bindings.MessageSendEvent_send_gossip_timestamp_filter(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr); GC.KeepAlive(node_id); GC.KeepAlive(msg); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); }; return ret_hu_conv; } } } } }