6 namespace org { namespace ldk { namespace structs {
9 * An event generated by ChannelManager which indicates a message should be sent to a peer (or
10 * broadcast to most peers).
11 * These events are handled by PeerManager::process_events if you are using a PeerManager.
13 public class MessageSendEvent : CommonBase {
14 protected MessageSendEvent(object _dummy, long ptr) : base(ptr) { }
16 if (ptr != 0) { bindings.MessageSendEvent_free(ptr); }
19 internal static MessageSendEvent constr_from_ptr(long ptr) {
20 long raw_ty = bindings.LDKMessageSendEvent_ty_from_ptr(ptr);
22 case 0: return new MessageSendEvent_SendAcceptChannel(ptr);
23 case 1: return new MessageSendEvent_SendAcceptChannelV2(ptr);
24 case 2: return new MessageSendEvent_SendOpenChannel(ptr);
25 case 3: return new MessageSendEvent_SendOpenChannelV2(ptr);
26 case 4: return new MessageSendEvent_SendFundingCreated(ptr);
27 case 5: return new MessageSendEvent_SendFundingSigned(ptr);
28 case 6: return new MessageSendEvent_SendTxAddInput(ptr);
29 case 7: return new MessageSendEvent_SendTxAddOutput(ptr);
30 case 8: return new MessageSendEvent_SendTxRemoveInput(ptr);
31 case 9: return new MessageSendEvent_SendTxRemoveOutput(ptr);
32 case 10: return new MessageSendEvent_SendTxComplete(ptr);
33 case 11: return new MessageSendEvent_SendTxSignatures(ptr);
34 case 12: return new MessageSendEvent_SendTxInitRbf(ptr);
35 case 13: return new MessageSendEvent_SendTxAckRbf(ptr);
36 case 14: return new MessageSendEvent_SendTxAbort(ptr);
37 case 15: return new MessageSendEvent_SendChannelReady(ptr);
38 case 16: return new MessageSendEvent_SendAnnouncementSignatures(ptr);
39 case 17: return new MessageSendEvent_UpdateHTLCs(ptr);
40 case 18: return new MessageSendEvent_SendRevokeAndACK(ptr);
41 case 19: return new MessageSendEvent_SendClosingSigned(ptr);
42 case 20: return new MessageSendEvent_SendShutdown(ptr);
43 case 21: return new MessageSendEvent_SendChannelReestablish(ptr);
44 case 22: return new MessageSendEvent_SendChannelAnnouncement(ptr);
45 case 23: return new MessageSendEvent_BroadcastChannelAnnouncement(ptr);
46 case 24: return new MessageSendEvent_BroadcastChannelUpdate(ptr);
47 case 25: return new MessageSendEvent_BroadcastNodeAnnouncement(ptr);
48 case 26: return new MessageSendEvent_SendChannelUpdate(ptr);
49 case 27: return new MessageSendEvent_HandleError(ptr);
50 case 28: return new MessageSendEvent_SendChannelRangeQuery(ptr);
51 case 29: return new MessageSendEvent_SendShortIdsQuery(ptr);
52 case 30: return new MessageSendEvent_SendReplyChannelRange(ptr);
53 case 31: return new MessageSendEvent_SendGossipTimestampFilter(ptr);
55 throw new ArgumentException("Impossible enum variant");
59 /** A MessageSendEvent of type SendAcceptChannel */
60 public class MessageSendEvent_SendAcceptChannel : MessageSendEvent {
62 * The node_id of the node which should receive this message
64 public byte[] node_id;
66 * The message which should be sent.
68 public AcceptChannel msg;
69 internal MessageSendEvent_SendAcceptChannel(long ptr) : base(null, ptr) {
70 long node_id = bindings.LDKMessageSendEvent_SendAcceptChannel_get_node_id(ptr);
71 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
72 this.node_id = node_id_conv;
73 long msg = bindings.LDKMessageSendEvent_SendAcceptChannel_get_msg(ptr);
74 org.ldk.structs.AcceptChannel msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.AcceptChannel(null, msg); }
75 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
76 this.msg = msg_hu_conv;
79 /** A MessageSendEvent of type SendAcceptChannelV2 */
80 public class MessageSendEvent_SendAcceptChannelV2 : MessageSendEvent {
82 * The node_id of the node which should receive this message
84 public byte[] node_id;
86 * The message which should be sent.
88 public AcceptChannelV2 msg;
89 internal MessageSendEvent_SendAcceptChannelV2(long ptr) : base(null, ptr) {
90 long node_id = bindings.LDKMessageSendEvent_SendAcceptChannelV2_get_node_id(ptr);
91 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
92 this.node_id = node_id_conv;
93 long msg = bindings.LDKMessageSendEvent_SendAcceptChannelV2_get_msg(ptr);
94 org.ldk.structs.AcceptChannelV2 msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.AcceptChannelV2(null, msg); }
95 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
96 this.msg = msg_hu_conv;
99 /** A MessageSendEvent of type SendOpenChannel */
100 public class MessageSendEvent_SendOpenChannel : MessageSendEvent {
102 * The node_id of the node which should receive this message
104 public byte[] node_id;
106 * The message which should be sent.
108 public OpenChannel msg;
109 internal MessageSendEvent_SendOpenChannel(long ptr) : base(null, ptr) {
110 long node_id = bindings.LDKMessageSendEvent_SendOpenChannel_get_node_id(ptr);
111 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
112 this.node_id = node_id_conv;
113 long msg = bindings.LDKMessageSendEvent_SendOpenChannel_get_msg(ptr);
114 org.ldk.structs.OpenChannel msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.OpenChannel(null, msg); }
115 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
116 this.msg = msg_hu_conv;
119 /** A MessageSendEvent of type SendOpenChannelV2 */
120 public class MessageSendEvent_SendOpenChannelV2 : MessageSendEvent {
122 * The node_id of the node which should receive this message
124 public byte[] node_id;
126 * The message which should be sent.
128 public OpenChannelV2 msg;
129 internal MessageSendEvent_SendOpenChannelV2(long ptr) : base(null, ptr) {
130 long node_id = bindings.LDKMessageSendEvent_SendOpenChannelV2_get_node_id(ptr);
131 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
132 this.node_id = node_id_conv;
133 long msg = bindings.LDKMessageSendEvent_SendOpenChannelV2_get_msg(ptr);
134 org.ldk.structs.OpenChannelV2 msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.OpenChannelV2(null, msg); }
135 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
136 this.msg = msg_hu_conv;
139 /** A MessageSendEvent of type SendFundingCreated */
140 public class MessageSendEvent_SendFundingCreated : MessageSendEvent {
142 * The node_id of the node which should receive this message
144 public byte[] node_id;
146 * The message which should be sent.
148 public FundingCreated msg;
149 internal MessageSendEvent_SendFundingCreated(long ptr) : base(null, ptr) {
150 long node_id = bindings.LDKMessageSendEvent_SendFundingCreated_get_node_id(ptr);
151 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
152 this.node_id = node_id_conv;
153 long msg = bindings.LDKMessageSendEvent_SendFundingCreated_get_msg(ptr);
154 org.ldk.structs.FundingCreated msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.FundingCreated(null, msg); }
155 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
156 this.msg = msg_hu_conv;
159 /** A MessageSendEvent of type SendFundingSigned */
160 public class MessageSendEvent_SendFundingSigned : MessageSendEvent {
162 * The node_id of the node which should receive this message
164 public byte[] node_id;
166 * The message which should be sent.
168 public FundingSigned msg;
169 internal MessageSendEvent_SendFundingSigned(long ptr) : base(null, ptr) {
170 long node_id = bindings.LDKMessageSendEvent_SendFundingSigned_get_node_id(ptr);
171 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
172 this.node_id = node_id_conv;
173 long msg = bindings.LDKMessageSendEvent_SendFundingSigned_get_msg(ptr);
174 org.ldk.structs.FundingSigned msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.FundingSigned(null, msg); }
175 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
176 this.msg = msg_hu_conv;
179 /** A MessageSendEvent of type SendTxAddInput */
180 public class MessageSendEvent_SendTxAddInput : MessageSendEvent {
182 * The node_id of the node which should receive this message
184 public byte[] node_id;
186 * The message which should be sent.
188 public TxAddInput msg;
189 internal MessageSendEvent_SendTxAddInput(long ptr) : base(null, ptr) {
190 long node_id = bindings.LDKMessageSendEvent_SendTxAddInput_get_node_id(ptr);
191 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
192 this.node_id = node_id_conv;
193 long msg = bindings.LDKMessageSendEvent_SendTxAddInput_get_msg(ptr);
194 org.ldk.structs.TxAddInput msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxAddInput(null, msg); }
195 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
196 this.msg = msg_hu_conv;
199 /** A MessageSendEvent of type SendTxAddOutput */
200 public class MessageSendEvent_SendTxAddOutput : MessageSendEvent {
202 * The node_id of the node which should receive this message
204 public byte[] node_id;
206 * The message which should be sent.
208 public TxAddOutput msg;
209 internal MessageSendEvent_SendTxAddOutput(long ptr) : base(null, ptr) {
210 long node_id = bindings.LDKMessageSendEvent_SendTxAddOutput_get_node_id(ptr);
211 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
212 this.node_id = node_id_conv;
213 long msg = bindings.LDKMessageSendEvent_SendTxAddOutput_get_msg(ptr);
214 org.ldk.structs.TxAddOutput msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxAddOutput(null, msg); }
215 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
216 this.msg = msg_hu_conv;
219 /** A MessageSendEvent of type SendTxRemoveInput */
220 public class MessageSendEvent_SendTxRemoveInput : MessageSendEvent {
222 * The node_id of the node which should receive this message
224 public byte[] node_id;
226 * The message which should be sent.
228 public TxRemoveInput msg;
229 internal MessageSendEvent_SendTxRemoveInput(long ptr) : base(null, ptr) {
230 long node_id = bindings.LDKMessageSendEvent_SendTxRemoveInput_get_node_id(ptr);
231 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
232 this.node_id = node_id_conv;
233 long msg = bindings.LDKMessageSendEvent_SendTxRemoveInput_get_msg(ptr);
234 org.ldk.structs.TxRemoveInput msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxRemoveInput(null, msg); }
235 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
236 this.msg = msg_hu_conv;
239 /** A MessageSendEvent of type SendTxRemoveOutput */
240 public class MessageSendEvent_SendTxRemoveOutput : MessageSendEvent {
242 * The node_id of the node which should receive this message
244 public byte[] node_id;
246 * The message which should be sent.
248 public TxRemoveOutput msg;
249 internal MessageSendEvent_SendTxRemoveOutput(long ptr) : base(null, ptr) {
250 long node_id = bindings.LDKMessageSendEvent_SendTxRemoveOutput_get_node_id(ptr);
251 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
252 this.node_id = node_id_conv;
253 long msg = bindings.LDKMessageSendEvent_SendTxRemoveOutput_get_msg(ptr);
254 org.ldk.structs.TxRemoveOutput msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxRemoveOutput(null, msg); }
255 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
256 this.msg = msg_hu_conv;
259 /** A MessageSendEvent of type SendTxComplete */
260 public class MessageSendEvent_SendTxComplete : MessageSendEvent {
262 * The node_id of the node which should receive this message
264 public byte[] node_id;
266 * The message which should be sent.
268 public TxComplete msg;
269 internal MessageSendEvent_SendTxComplete(long ptr) : base(null, ptr) {
270 long node_id = bindings.LDKMessageSendEvent_SendTxComplete_get_node_id(ptr);
271 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
272 this.node_id = node_id_conv;
273 long msg = bindings.LDKMessageSendEvent_SendTxComplete_get_msg(ptr);
274 org.ldk.structs.TxComplete msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxComplete(null, msg); }
275 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
276 this.msg = msg_hu_conv;
279 /** A MessageSendEvent of type SendTxSignatures */
280 public class MessageSendEvent_SendTxSignatures : MessageSendEvent {
282 * The node_id of the node which should receive this message
284 public byte[] node_id;
286 * The message which should be sent.
288 public TxSignatures msg;
289 internal MessageSendEvent_SendTxSignatures(long ptr) : base(null, ptr) {
290 long node_id = bindings.LDKMessageSendEvent_SendTxSignatures_get_node_id(ptr);
291 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
292 this.node_id = node_id_conv;
293 long msg = bindings.LDKMessageSendEvent_SendTxSignatures_get_msg(ptr);
294 org.ldk.structs.TxSignatures msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxSignatures(null, msg); }
295 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
296 this.msg = msg_hu_conv;
299 /** A MessageSendEvent of type SendTxInitRbf */
300 public class MessageSendEvent_SendTxInitRbf : MessageSendEvent {
302 * The node_id of the node which should receive this message
304 public byte[] node_id;
306 * The message which should be sent.
308 public TxInitRbf msg;
309 internal MessageSendEvent_SendTxInitRbf(long ptr) : base(null, ptr) {
310 long node_id = bindings.LDKMessageSendEvent_SendTxInitRbf_get_node_id(ptr);
311 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
312 this.node_id = node_id_conv;
313 long msg = bindings.LDKMessageSendEvent_SendTxInitRbf_get_msg(ptr);
314 org.ldk.structs.TxInitRbf msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxInitRbf(null, msg); }
315 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
316 this.msg = msg_hu_conv;
319 /** A MessageSendEvent of type SendTxAckRbf */
320 public class MessageSendEvent_SendTxAckRbf : MessageSendEvent {
322 * The node_id of the node which should receive this message
324 public byte[] node_id;
326 * The message which should be sent.
329 internal MessageSendEvent_SendTxAckRbf(long ptr) : base(null, ptr) {
330 long node_id = bindings.LDKMessageSendEvent_SendTxAckRbf_get_node_id(ptr);
331 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
332 this.node_id = node_id_conv;
333 long msg = bindings.LDKMessageSendEvent_SendTxAckRbf_get_msg(ptr);
334 org.ldk.structs.TxAckRbf msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxAckRbf(null, msg); }
335 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
336 this.msg = msg_hu_conv;
339 /** A MessageSendEvent of type SendTxAbort */
340 public class MessageSendEvent_SendTxAbort : MessageSendEvent {
342 * The node_id of the node which should receive this message
344 public byte[] node_id;
346 * The message which should be sent.
349 internal MessageSendEvent_SendTxAbort(long ptr) : base(null, ptr) {
350 long node_id = bindings.LDKMessageSendEvent_SendTxAbort_get_node_id(ptr);
351 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
352 this.node_id = node_id_conv;
353 long msg = bindings.LDKMessageSendEvent_SendTxAbort_get_msg(ptr);
354 org.ldk.structs.TxAbort msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxAbort(null, msg); }
355 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
356 this.msg = msg_hu_conv;
359 /** A MessageSendEvent of type SendChannelReady */
360 public class MessageSendEvent_SendChannelReady : MessageSendEvent {
362 * The node_id of the node which should receive these message(s)
364 public byte[] node_id;
366 * The channel_ready message which should be sent.
368 public ChannelReady msg;
369 internal MessageSendEvent_SendChannelReady(long ptr) : base(null, ptr) {
370 long node_id = bindings.LDKMessageSendEvent_SendChannelReady_get_node_id(ptr);
371 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
372 this.node_id = node_id_conv;
373 long msg = bindings.LDKMessageSendEvent_SendChannelReady_get_msg(ptr);
374 org.ldk.structs.ChannelReady msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelReady(null, msg); }
375 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
376 this.msg = msg_hu_conv;
379 /** A MessageSendEvent of type SendAnnouncementSignatures */
380 public class MessageSendEvent_SendAnnouncementSignatures : MessageSendEvent {
382 * The node_id of the node which should receive these message(s)
384 public byte[] node_id;
386 * The announcement_signatures message which should be sent.
388 public AnnouncementSignatures msg;
389 internal MessageSendEvent_SendAnnouncementSignatures(long ptr) : base(null, ptr) {
390 long node_id = bindings.LDKMessageSendEvent_SendAnnouncementSignatures_get_node_id(ptr);
391 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
392 this.node_id = node_id_conv;
393 long msg = bindings.LDKMessageSendEvent_SendAnnouncementSignatures_get_msg(ptr);
394 org.ldk.structs.AnnouncementSignatures msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.AnnouncementSignatures(null, msg); }
395 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
396 this.msg = msg_hu_conv;
399 /** A MessageSendEvent of type UpdateHTLCs */
400 public class MessageSendEvent_UpdateHTLCs : MessageSendEvent {
402 * The node_id of the node which should receive these message(s)
404 public byte[] node_id;
406 * The update messages which should be sent. ALL messages in the struct should be sent!
408 public CommitmentUpdate updates;
409 internal MessageSendEvent_UpdateHTLCs(long ptr) : base(null, ptr) {
410 long node_id = bindings.LDKMessageSendEvent_UpdateHTLCs_get_node_id(ptr);
411 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
412 this.node_id = node_id_conv;
413 long updates = bindings.LDKMessageSendEvent_UpdateHTLCs_get_updates(ptr);
414 org.ldk.structs.CommitmentUpdate updates_hu_conv = null; if (updates < 0 || updates > 4096) { updates_hu_conv = new org.ldk.structs.CommitmentUpdate(null, updates); }
415 if (updates_hu_conv != null) { updates_hu_conv.ptrs_to.AddLast(this); };
416 this.updates = updates_hu_conv;
419 /** A MessageSendEvent of type SendRevokeAndACK */
420 public class MessageSendEvent_SendRevokeAndACK : MessageSendEvent {
422 * The node_id of the node which should receive this message
424 public byte[] node_id;
426 * The message which should be sent.
428 public RevokeAndACK msg;
429 internal MessageSendEvent_SendRevokeAndACK(long ptr) : base(null, ptr) {
430 long node_id = bindings.LDKMessageSendEvent_SendRevokeAndACK_get_node_id(ptr);
431 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
432 this.node_id = node_id_conv;
433 long msg = bindings.LDKMessageSendEvent_SendRevokeAndACK_get_msg(ptr);
434 org.ldk.structs.RevokeAndACK msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.RevokeAndACK(null, msg); }
435 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
436 this.msg = msg_hu_conv;
439 /** A MessageSendEvent of type SendClosingSigned */
440 public class MessageSendEvent_SendClosingSigned : MessageSendEvent {
442 * The node_id of the node which should receive this message
444 public byte[] node_id;
446 * The message which should be sent.
448 public ClosingSigned msg;
449 internal MessageSendEvent_SendClosingSigned(long ptr) : base(null, ptr) {
450 long node_id = bindings.LDKMessageSendEvent_SendClosingSigned_get_node_id(ptr);
451 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
452 this.node_id = node_id_conv;
453 long msg = bindings.LDKMessageSendEvent_SendClosingSigned_get_msg(ptr);
454 org.ldk.structs.ClosingSigned msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ClosingSigned(null, msg); }
455 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
456 this.msg = msg_hu_conv;
459 /** A MessageSendEvent of type SendShutdown */
460 public class MessageSendEvent_SendShutdown : MessageSendEvent {
462 * The node_id of the node which should receive this message
464 public byte[] node_id;
466 * The message which should be sent.
469 internal MessageSendEvent_SendShutdown(long ptr) : base(null, ptr) {
470 long node_id = bindings.LDKMessageSendEvent_SendShutdown_get_node_id(ptr);
471 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
472 this.node_id = node_id_conv;
473 long msg = bindings.LDKMessageSendEvent_SendShutdown_get_msg(ptr);
474 org.ldk.structs.Shutdown msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.Shutdown(null, msg); }
475 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
476 this.msg = msg_hu_conv;
479 /** A MessageSendEvent of type SendChannelReestablish */
480 public class MessageSendEvent_SendChannelReestablish : MessageSendEvent {
482 * The node_id of the node which should receive this message
484 public byte[] node_id;
486 * The message which should be sent.
488 public ChannelReestablish msg;
489 internal MessageSendEvent_SendChannelReestablish(long ptr) : base(null, ptr) {
490 long node_id = bindings.LDKMessageSendEvent_SendChannelReestablish_get_node_id(ptr);
491 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
492 this.node_id = node_id_conv;
493 long msg = bindings.LDKMessageSendEvent_SendChannelReestablish_get_msg(ptr);
494 org.ldk.structs.ChannelReestablish msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelReestablish(null, msg); }
495 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
496 this.msg = msg_hu_conv;
499 /** A MessageSendEvent of type SendChannelAnnouncement */
500 public class MessageSendEvent_SendChannelAnnouncement : MessageSendEvent {
502 * The node_id of the node which should receive this message
504 public byte[] node_id;
506 * The channel_announcement which should be sent.
508 public ChannelAnnouncement msg;
510 * The followup channel_update which should be sent.
512 public ChannelUpdate update_msg;
513 internal MessageSendEvent_SendChannelAnnouncement(long ptr) : base(null, ptr) {
514 long node_id = bindings.LDKMessageSendEvent_SendChannelAnnouncement_get_node_id(ptr);
515 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
516 this.node_id = node_id_conv;
517 long msg = bindings.LDKMessageSendEvent_SendChannelAnnouncement_get_msg(ptr);
518 org.ldk.structs.ChannelAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelAnnouncement(null, msg); }
519 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
520 this.msg = msg_hu_conv;
521 long update_msg = bindings.LDKMessageSendEvent_SendChannelAnnouncement_get_update_msg(ptr);
522 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); }
523 if (update_msg_hu_conv != null) { update_msg_hu_conv.ptrs_to.AddLast(this); };
524 this.update_msg = update_msg_hu_conv;
527 /** A MessageSendEvent of type BroadcastChannelAnnouncement */
528 public class MessageSendEvent_BroadcastChannelAnnouncement : MessageSendEvent {
530 * The channel_announcement which should be sent.
532 public ChannelAnnouncement msg;
534 * The followup channel_update which should be sent.
536 * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
538 public ChannelUpdate update_msg;
539 internal MessageSendEvent_BroadcastChannelAnnouncement(long ptr) : base(null, ptr) {
540 long msg = bindings.LDKMessageSendEvent_BroadcastChannelAnnouncement_get_msg(ptr);
541 org.ldk.structs.ChannelAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelAnnouncement(null, msg); }
542 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
543 this.msg = msg_hu_conv;
544 long update_msg = bindings.LDKMessageSendEvent_BroadcastChannelAnnouncement_get_update_msg(ptr);
545 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); }
546 if (update_msg_hu_conv != null) { update_msg_hu_conv.ptrs_to.AddLast(this); };
547 this.update_msg = update_msg_hu_conv;
550 /** A MessageSendEvent of type BroadcastChannelUpdate */
551 public class MessageSendEvent_BroadcastChannelUpdate : MessageSendEvent {
553 * The channel_update which should be sent.
555 public ChannelUpdate msg;
556 internal MessageSendEvent_BroadcastChannelUpdate(long ptr) : base(null, ptr) {
557 long msg = bindings.LDKMessageSendEvent_BroadcastChannelUpdate_get_msg(ptr);
558 org.ldk.structs.ChannelUpdate msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelUpdate(null, msg); }
559 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
560 this.msg = msg_hu_conv;
563 /** A MessageSendEvent of type BroadcastNodeAnnouncement */
564 public class MessageSendEvent_BroadcastNodeAnnouncement : MessageSendEvent {
566 * The node_announcement which should be sent.
568 public NodeAnnouncement msg;
569 internal MessageSendEvent_BroadcastNodeAnnouncement(long ptr) : base(null, ptr) {
570 long msg = bindings.LDKMessageSendEvent_BroadcastNodeAnnouncement_get_msg(ptr);
571 org.ldk.structs.NodeAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.NodeAnnouncement(null, msg); }
572 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
573 this.msg = msg_hu_conv;
576 /** A MessageSendEvent of type SendChannelUpdate */
577 public class MessageSendEvent_SendChannelUpdate : MessageSendEvent {
579 * The node_id of the node which should receive this message
581 public byte[] node_id;
583 * The channel_update which should be sent.
585 public ChannelUpdate msg;
586 internal MessageSendEvent_SendChannelUpdate(long ptr) : base(null, ptr) {
587 long node_id = bindings.LDKMessageSendEvent_SendChannelUpdate_get_node_id(ptr);
588 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
589 this.node_id = node_id_conv;
590 long msg = bindings.LDKMessageSendEvent_SendChannelUpdate_get_msg(ptr);
591 org.ldk.structs.ChannelUpdate msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelUpdate(null, msg); }
592 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
593 this.msg = msg_hu_conv;
596 /** A MessageSendEvent of type HandleError */
597 public class MessageSendEvent_HandleError : MessageSendEvent {
599 * The node_id of the node which should receive this message
601 public byte[] node_id;
603 * The action which should be taken.
605 public ErrorAction action;
606 internal MessageSendEvent_HandleError(long ptr) : base(null, ptr) {
607 long node_id = bindings.LDKMessageSendEvent_HandleError_get_node_id(ptr);
608 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
609 this.node_id = node_id_conv;
610 long action = bindings.LDKMessageSendEvent_HandleError_get_action(ptr);
611 org.ldk.structs.ErrorAction action_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(action);
612 if (action_hu_conv != null) { action_hu_conv.ptrs_to.AddLast(this); };
613 this.action = action_hu_conv;
616 /** A MessageSendEvent of type SendChannelRangeQuery */
617 public class MessageSendEvent_SendChannelRangeQuery : MessageSendEvent {
619 * The node_id of this message recipient
621 public byte[] node_id;
623 * The query_channel_range which should be sent.
625 public QueryChannelRange msg;
626 internal MessageSendEvent_SendChannelRangeQuery(long ptr) : base(null, ptr) {
627 long node_id = bindings.LDKMessageSendEvent_SendChannelRangeQuery_get_node_id(ptr);
628 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
629 this.node_id = node_id_conv;
630 long msg = bindings.LDKMessageSendEvent_SendChannelRangeQuery_get_msg(ptr);
631 org.ldk.structs.QueryChannelRange msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.QueryChannelRange(null, msg); }
632 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
633 this.msg = msg_hu_conv;
636 /** A MessageSendEvent of type SendShortIdsQuery */
637 public class MessageSendEvent_SendShortIdsQuery : MessageSendEvent {
639 * The node_id of this message recipient
641 public byte[] node_id;
643 * The query_short_channel_ids which should be sent.
645 public QueryShortChannelIds msg;
646 internal MessageSendEvent_SendShortIdsQuery(long ptr) : base(null, ptr) {
647 long node_id = bindings.LDKMessageSendEvent_SendShortIdsQuery_get_node_id(ptr);
648 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
649 this.node_id = node_id_conv;
650 long msg = bindings.LDKMessageSendEvent_SendShortIdsQuery_get_msg(ptr);
651 org.ldk.structs.QueryShortChannelIds msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.QueryShortChannelIds(null, msg); }
652 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
653 this.msg = msg_hu_conv;
656 /** A MessageSendEvent of type SendReplyChannelRange */
657 public class MessageSendEvent_SendReplyChannelRange : MessageSendEvent {
659 * The node_id of this message recipient
661 public byte[] node_id;
663 * The reply_channel_range which should be sent.
665 public ReplyChannelRange msg;
666 internal MessageSendEvent_SendReplyChannelRange(long ptr) : base(null, ptr) {
667 long node_id = bindings.LDKMessageSendEvent_SendReplyChannelRange_get_node_id(ptr);
668 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
669 this.node_id = node_id_conv;
670 long msg = bindings.LDKMessageSendEvent_SendReplyChannelRange_get_msg(ptr);
671 org.ldk.structs.ReplyChannelRange msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ReplyChannelRange(null, msg); }
672 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
673 this.msg = msg_hu_conv;
676 /** A MessageSendEvent of type SendGossipTimestampFilter */
677 public class MessageSendEvent_SendGossipTimestampFilter : MessageSendEvent {
679 * The node_id of this message recipient
681 public byte[] node_id;
683 * The gossip_timestamp_filter which should be sent.
685 public GossipTimestampFilter msg;
686 internal MessageSendEvent_SendGossipTimestampFilter(long ptr) : base(null, ptr) {
687 long node_id = bindings.LDKMessageSendEvent_SendGossipTimestampFilter_get_node_id(ptr);
688 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
689 this.node_id = node_id_conv;
690 long msg = bindings.LDKMessageSendEvent_SendGossipTimestampFilter_get_msg(ptr);
691 org.ldk.structs.GossipTimestampFilter msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.GossipTimestampFilter(null, msg); }
692 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
693 this.msg = msg_hu_conv;
696 internal long clone_ptr() {
697 long ret = bindings.MessageSendEvent_clone_ptr(this.ptr);
703 * Creates a copy of the MessageSendEvent
705 public MessageSendEvent clone() {
706 long ret = bindings.MessageSendEvent_clone(this.ptr);
708 if (ret >= 0 && ret <= 4096) { return null; }
709 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
710 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
715 * Utility method to constructs a new SendAcceptChannel-variant MessageSendEvent
717 public static MessageSendEvent send_accept_channel(byte[] node_id, org.ldk.structs.AcceptChannel msg) {
718 long ret = bindings.MessageSendEvent_send_accept_channel(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
719 GC.KeepAlive(node_id);
721 if (ret >= 0 && ret <= 4096) { return null; }
722 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
723 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
724 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
729 * Utility method to constructs a new SendAcceptChannelV2-variant MessageSendEvent
731 public static MessageSendEvent send_accept_channel_v2(byte[] node_id, org.ldk.structs.AcceptChannelV2 msg) {
732 long ret = bindings.MessageSendEvent_send_accept_channel_v2(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
733 GC.KeepAlive(node_id);
735 if (ret >= 0 && ret <= 4096) { return null; }
736 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
737 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
738 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
743 * Utility method to constructs a new SendOpenChannel-variant MessageSendEvent
745 public static MessageSendEvent send_open_channel(byte[] node_id, org.ldk.structs.OpenChannel msg) {
746 long ret = bindings.MessageSendEvent_send_open_channel(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
747 GC.KeepAlive(node_id);
749 if (ret >= 0 && ret <= 4096) { return null; }
750 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
751 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
752 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
757 * Utility method to constructs a new SendOpenChannelV2-variant MessageSendEvent
759 public static MessageSendEvent send_open_channel_v2(byte[] node_id, org.ldk.structs.OpenChannelV2 msg) {
760 long ret = bindings.MessageSendEvent_send_open_channel_v2(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
761 GC.KeepAlive(node_id);
763 if (ret >= 0 && ret <= 4096) { return null; }
764 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
765 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
766 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
771 * Utility method to constructs a new SendFundingCreated-variant MessageSendEvent
773 public static MessageSendEvent send_funding_created(byte[] node_id, org.ldk.structs.FundingCreated msg) {
774 long ret = bindings.MessageSendEvent_send_funding_created(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
775 GC.KeepAlive(node_id);
777 if (ret >= 0 && ret <= 4096) { return null; }
778 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
779 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
780 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
785 * Utility method to constructs a new SendFundingSigned-variant MessageSendEvent
787 public static MessageSendEvent send_funding_signed(byte[] node_id, org.ldk.structs.FundingSigned msg) {
788 long ret = bindings.MessageSendEvent_send_funding_signed(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
789 GC.KeepAlive(node_id);
791 if (ret >= 0 && ret <= 4096) { return null; }
792 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
793 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
794 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
799 * Utility method to constructs a new SendTxAddInput-variant MessageSendEvent
801 public static MessageSendEvent send_tx_add_input(byte[] node_id, org.ldk.structs.TxAddInput msg) {
802 long ret = bindings.MessageSendEvent_send_tx_add_input(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
803 GC.KeepAlive(node_id);
805 if (ret >= 0 && ret <= 4096) { return null; }
806 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
807 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
808 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
813 * Utility method to constructs a new SendTxAddOutput-variant MessageSendEvent
815 public static MessageSendEvent send_tx_add_output(byte[] node_id, org.ldk.structs.TxAddOutput msg) {
816 long ret = bindings.MessageSendEvent_send_tx_add_output(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
817 GC.KeepAlive(node_id);
819 if (ret >= 0 && ret <= 4096) { return null; }
820 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
821 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
822 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
827 * Utility method to constructs a new SendTxRemoveInput-variant MessageSendEvent
829 public static MessageSendEvent send_tx_remove_input(byte[] node_id, org.ldk.structs.TxRemoveInput msg) {
830 long ret = bindings.MessageSendEvent_send_tx_remove_input(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
831 GC.KeepAlive(node_id);
833 if (ret >= 0 && ret <= 4096) { return null; }
834 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
835 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
836 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
841 * Utility method to constructs a new SendTxRemoveOutput-variant MessageSendEvent
843 public static MessageSendEvent send_tx_remove_output(byte[] node_id, org.ldk.structs.TxRemoveOutput msg) {
844 long ret = bindings.MessageSendEvent_send_tx_remove_output(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
845 GC.KeepAlive(node_id);
847 if (ret >= 0 && ret <= 4096) { return null; }
848 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
849 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
850 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
855 * Utility method to constructs a new SendTxComplete-variant MessageSendEvent
857 public static MessageSendEvent send_tx_complete(byte[] node_id, org.ldk.structs.TxComplete msg) {
858 long ret = bindings.MessageSendEvent_send_tx_complete(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
859 GC.KeepAlive(node_id);
861 if (ret >= 0 && ret <= 4096) { return null; }
862 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
863 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
864 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
869 * Utility method to constructs a new SendTxSignatures-variant MessageSendEvent
871 public static MessageSendEvent send_tx_signatures(byte[] node_id, org.ldk.structs.TxSignatures msg) {
872 long ret = bindings.MessageSendEvent_send_tx_signatures(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
873 GC.KeepAlive(node_id);
875 if (ret >= 0 && ret <= 4096) { return null; }
876 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
877 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
878 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
883 * Utility method to constructs a new SendTxInitRbf-variant MessageSendEvent
885 public static MessageSendEvent send_tx_init_rbf(byte[] node_id, org.ldk.structs.TxInitRbf msg) {
886 long ret = bindings.MessageSendEvent_send_tx_init_rbf(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
887 GC.KeepAlive(node_id);
889 if (ret >= 0 && ret <= 4096) { return null; }
890 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
891 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
892 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
897 * Utility method to constructs a new SendTxAckRbf-variant MessageSendEvent
899 public static MessageSendEvent send_tx_ack_rbf(byte[] node_id, org.ldk.structs.TxAckRbf msg) {
900 long ret = bindings.MessageSendEvent_send_tx_ack_rbf(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
901 GC.KeepAlive(node_id);
903 if (ret >= 0 && ret <= 4096) { return null; }
904 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
905 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
906 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
911 * Utility method to constructs a new SendTxAbort-variant MessageSendEvent
913 public static MessageSendEvent send_tx_abort(byte[] node_id, org.ldk.structs.TxAbort msg) {
914 long ret = bindings.MessageSendEvent_send_tx_abort(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
915 GC.KeepAlive(node_id);
917 if (ret >= 0 && ret <= 4096) { return null; }
918 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
919 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
920 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
925 * Utility method to constructs a new SendChannelReady-variant MessageSendEvent
927 public static MessageSendEvent send_channel_ready(byte[] node_id, org.ldk.structs.ChannelReady msg) {
928 long ret = bindings.MessageSendEvent_send_channel_ready(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
929 GC.KeepAlive(node_id);
931 if (ret >= 0 && ret <= 4096) { return null; }
932 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
933 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
934 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
939 * Utility method to constructs a new SendAnnouncementSignatures-variant MessageSendEvent
941 public static MessageSendEvent send_announcement_signatures(byte[] node_id, org.ldk.structs.AnnouncementSignatures msg) {
942 long ret = bindings.MessageSendEvent_send_announcement_signatures(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
943 GC.KeepAlive(node_id);
945 if (ret >= 0 && ret <= 4096) { return null; }
946 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
947 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
948 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
953 * Utility method to constructs a new UpdateHTLCs-variant MessageSendEvent
955 public static MessageSendEvent update_htlcs(byte[] node_id, org.ldk.structs.CommitmentUpdate updates) {
956 long ret = bindings.MessageSendEvent_update_htlcs(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), updates == null ? 0 : updates.ptr);
957 GC.KeepAlive(node_id);
958 GC.KeepAlive(updates);
959 if (ret >= 0 && ret <= 4096) { return null; }
960 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
961 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
962 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(updates); };
967 * Utility method to constructs a new SendRevokeAndACK-variant MessageSendEvent
969 public static MessageSendEvent send_revoke_and_ack(byte[] node_id, org.ldk.structs.RevokeAndACK msg) {
970 long ret = bindings.MessageSendEvent_send_revoke_and_ack(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
971 GC.KeepAlive(node_id);
973 if (ret >= 0 && ret <= 4096) { return null; }
974 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
975 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
976 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
981 * Utility method to constructs a new SendClosingSigned-variant MessageSendEvent
983 public static MessageSendEvent send_closing_signed(byte[] node_id, org.ldk.structs.ClosingSigned msg) {
984 long ret = bindings.MessageSendEvent_send_closing_signed(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
985 GC.KeepAlive(node_id);
987 if (ret >= 0 && ret <= 4096) { return null; }
988 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
989 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
990 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
995 * Utility method to constructs a new SendShutdown-variant MessageSendEvent
997 public static MessageSendEvent send_shutdown(byte[] node_id, org.ldk.structs.Shutdown msg) {
998 long ret = bindings.MessageSendEvent_send_shutdown(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
999 GC.KeepAlive(node_id);
1001 if (ret >= 0 && ret <= 4096) { return null; }
1002 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1003 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1004 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1009 * Utility method to constructs a new SendChannelReestablish-variant MessageSendEvent
1011 public static MessageSendEvent send_channel_reestablish(byte[] node_id, org.ldk.structs.ChannelReestablish msg) {
1012 long ret = bindings.MessageSendEvent_send_channel_reestablish(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
1013 GC.KeepAlive(node_id);
1015 if (ret >= 0 && ret <= 4096) { return null; }
1016 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1017 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1018 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1023 * Utility method to constructs a new SendChannelAnnouncement-variant MessageSendEvent
1025 public static MessageSendEvent send_channel_announcement(byte[] node_id, org.ldk.structs.ChannelAnnouncement msg, org.ldk.structs.ChannelUpdate update_msg) {
1026 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);
1027 GC.KeepAlive(node_id);
1029 GC.KeepAlive(update_msg);
1030 if (ret >= 0 && ret <= 4096) { return null; }
1031 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1032 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1033 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1034 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(update_msg); };
1039 * Utility method to constructs a new BroadcastChannelAnnouncement-variant MessageSendEvent
1041 public static MessageSendEvent broadcast_channel_announcement(org.ldk.structs.ChannelAnnouncement msg, org.ldk.structs.ChannelUpdate update_msg) {
1042 long ret = bindings.MessageSendEvent_broadcast_channel_announcement(msg == null ? 0 : msg.ptr, update_msg == null ? 0 : update_msg.ptr);
1044 GC.KeepAlive(update_msg);
1045 if (ret >= 0 && ret <= 4096) { return null; }
1046 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1047 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1048 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1049 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(update_msg); };
1054 * Utility method to constructs a new BroadcastChannelUpdate-variant MessageSendEvent
1056 public static MessageSendEvent broadcast_channel_update(org.ldk.structs.ChannelUpdate msg) {
1057 long ret = bindings.MessageSendEvent_broadcast_channel_update(msg == null ? 0 : msg.ptr);
1059 if (ret >= 0 && ret <= 4096) { return null; }
1060 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1061 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1062 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1067 * Utility method to constructs a new BroadcastNodeAnnouncement-variant MessageSendEvent
1069 public static MessageSendEvent broadcast_node_announcement(org.ldk.structs.NodeAnnouncement msg) {
1070 long ret = bindings.MessageSendEvent_broadcast_node_announcement(msg == null ? 0 : msg.ptr);
1072 if (ret >= 0 && ret <= 4096) { return null; }
1073 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1074 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1075 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1080 * Utility method to constructs a new SendChannelUpdate-variant MessageSendEvent
1082 public static MessageSendEvent send_channel_update(byte[] node_id, org.ldk.structs.ChannelUpdate msg) {
1083 long ret = bindings.MessageSendEvent_send_channel_update(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
1084 GC.KeepAlive(node_id);
1086 if (ret >= 0 && ret <= 4096) { return null; }
1087 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1088 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1089 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1094 * Utility method to constructs a new HandleError-variant MessageSendEvent
1096 public static MessageSendEvent handle_error(byte[] node_id, org.ldk.structs.ErrorAction action) {
1097 long ret = bindings.MessageSendEvent_handle_error(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), action.ptr);
1098 GC.KeepAlive(node_id);
1099 GC.KeepAlive(action);
1100 if (ret >= 0 && ret <= 4096) { return null; }
1101 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1102 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1103 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(action); };
1108 * Utility method to constructs a new SendChannelRangeQuery-variant MessageSendEvent
1110 public static MessageSendEvent send_channel_range_query(byte[] node_id, org.ldk.structs.QueryChannelRange msg) {
1111 long ret = bindings.MessageSendEvent_send_channel_range_query(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
1112 GC.KeepAlive(node_id);
1114 if (ret >= 0 && ret <= 4096) { return null; }
1115 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1116 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1117 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1122 * Utility method to constructs a new SendShortIdsQuery-variant MessageSendEvent
1124 public static MessageSendEvent send_short_ids_query(byte[] node_id, org.ldk.structs.QueryShortChannelIds msg) {
1125 long ret = bindings.MessageSendEvent_send_short_ids_query(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
1126 GC.KeepAlive(node_id);
1128 if (ret >= 0 && ret <= 4096) { return null; }
1129 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1130 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1131 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1136 * Utility method to constructs a new SendReplyChannelRange-variant MessageSendEvent
1138 public static MessageSendEvent send_reply_channel_range(byte[] node_id, org.ldk.structs.ReplyChannelRange msg) {
1139 long ret = bindings.MessageSendEvent_send_reply_channel_range(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
1140 GC.KeepAlive(node_id);
1142 if (ret >= 0 && ret <= 4096) { return null; }
1143 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1144 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1145 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1150 * Utility method to constructs a new SendGossipTimestampFilter-variant MessageSendEvent
1152 public static MessageSendEvent send_gossip_timestamp_filter(byte[] node_id, org.ldk.structs.GossipTimestampFilter msg) {
1153 long ret = bindings.MessageSendEvent_send_gossip_timestamp_filter(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg == null ? 0 : msg.ptr);
1154 GC.KeepAlive(node_id);
1156 if (ret >= 0 && ret <= 4096) { return null; }
1157 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1158 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1159 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };