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_SendStfu(ptr);
29 case 7: return new MessageSendEvent_SendSplice(ptr);
30 case 8: return new MessageSendEvent_SendSpliceAck(ptr);
31 case 9: return new MessageSendEvent_SendSpliceLocked(ptr);
32 case 10: return new MessageSendEvent_SendTxAddInput(ptr);
33 case 11: return new MessageSendEvent_SendTxAddOutput(ptr);
34 case 12: return new MessageSendEvent_SendTxRemoveInput(ptr);
35 case 13: return new MessageSendEvent_SendTxRemoveOutput(ptr);
36 case 14: return new MessageSendEvent_SendTxComplete(ptr);
37 case 15: return new MessageSendEvent_SendTxSignatures(ptr);
38 case 16: return new MessageSendEvent_SendTxInitRbf(ptr);
39 case 17: return new MessageSendEvent_SendTxAckRbf(ptr);
40 case 18: return new MessageSendEvent_SendTxAbort(ptr);
41 case 19: return new MessageSendEvent_SendChannelReady(ptr);
42 case 20: return new MessageSendEvent_SendAnnouncementSignatures(ptr);
43 case 21: return new MessageSendEvent_UpdateHTLCs(ptr);
44 case 22: return new MessageSendEvent_SendRevokeAndACK(ptr);
45 case 23: return new MessageSendEvent_SendClosingSigned(ptr);
46 case 24: return new MessageSendEvent_SendShutdown(ptr);
47 case 25: return new MessageSendEvent_SendChannelReestablish(ptr);
48 case 26: return new MessageSendEvent_SendChannelAnnouncement(ptr);
49 case 27: return new MessageSendEvent_BroadcastChannelAnnouncement(ptr);
50 case 28: return new MessageSendEvent_BroadcastChannelUpdate(ptr);
51 case 29: return new MessageSendEvent_BroadcastNodeAnnouncement(ptr);
52 case 30: return new MessageSendEvent_SendChannelUpdate(ptr);
53 case 31: return new MessageSendEvent_HandleError(ptr);
54 case 32: return new MessageSendEvent_SendChannelRangeQuery(ptr);
55 case 33: return new MessageSendEvent_SendShortIdsQuery(ptr);
56 case 34: return new MessageSendEvent_SendReplyChannelRange(ptr);
57 case 35: return new MessageSendEvent_SendGossipTimestampFilter(ptr);
59 throw new ArgumentException("Impossible enum variant");
63 /** A MessageSendEvent of type SendAcceptChannel */
64 public class MessageSendEvent_SendAcceptChannel : MessageSendEvent {
66 * The node_id of the node which should receive this message
68 public byte[] node_id;
70 * The message which should be sent.
72 public AcceptChannel msg;
73 internal MessageSendEvent_SendAcceptChannel(long ptr) : base(null, ptr) {
74 long node_id = bindings.LDKMessageSendEvent_SendAcceptChannel_get_node_id(ptr);
75 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
76 this.node_id = node_id_conv;
77 long msg = bindings.LDKMessageSendEvent_SendAcceptChannel_get_msg(ptr);
78 org.ldk.structs.AcceptChannel msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.AcceptChannel(null, msg); }
79 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
80 this.msg = msg_hu_conv;
83 /** A MessageSendEvent of type SendAcceptChannelV2 */
84 public class MessageSendEvent_SendAcceptChannelV2 : MessageSendEvent {
86 * The node_id of the node which should receive this message
88 public byte[] node_id;
90 * The message which should be sent.
92 public AcceptChannelV2 msg;
93 internal MessageSendEvent_SendAcceptChannelV2(long ptr) : base(null, ptr) {
94 long node_id = bindings.LDKMessageSendEvent_SendAcceptChannelV2_get_node_id(ptr);
95 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
96 this.node_id = node_id_conv;
97 long msg = bindings.LDKMessageSendEvent_SendAcceptChannelV2_get_msg(ptr);
98 org.ldk.structs.AcceptChannelV2 msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.AcceptChannelV2(null, msg); }
99 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
100 this.msg = msg_hu_conv;
103 /** A MessageSendEvent of type SendOpenChannel */
104 public class MessageSendEvent_SendOpenChannel : MessageSendEvent {
106 * The node_id of the node which should receive this message
108 public byte[] node_id;
110 * The message which should be sent.
112 public OpenChannel msg;
113 internal MessageSendEvent_SendOpenChannel(long ptr) : base(null, ptr) {
114 long node_id = bindings.LDKMessageSendEvent_SendOpenChannel_get_node_id(ptr);
115 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
116 this.node_id = node_id_conv;
117 long msg = bindings.LDKMessageSendEvent_SendOpenChannel_get_msg(ptr);
118 org.ldk.structs.OpenChannel msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.OpenChannel(null, msg); }
119 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
120 this.msg = msg_hu_conv;
123 /** A MessageSendEvent of type SendOpenChannelV2 */
124 public class MessageSendEvent_SendOpenChannelV2 : MessageSendEvent {
126 * The node_id of the node which should receive this message
128 public byte[] node_id;
130 * The message which should be sent.
132 public OpenChannelV2 msg;
133 internal MessageSendEvent_SendOpenChannelV2(long ptr) : base(null, ptr) {
134 long node_id = bindings.LDKMessageSendEvent_SendOpenChannelV2_get_node_id(ptr);
135 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
136 this.node_id = node_id_conv;
137 long msg = bindings.LDKMessageSendEvent_SendOpenChannelV2_get_msg(ptr);
138 org.ldk.structs.OpenChannelV2 msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.OpenChannelV2(null, msg); }
139 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
140 this.msg = msg_hu_conv;
143 /** A MessageSendEvent of type SendFundingCreated */
144 public class MessageSendEvent_SendFundingCreated : MessageSendEvent {
146 * The node_id of the node which should receive this message
148 public byte[] node_id;
150 * The message which should be sent.
152 public FundingCreated msg;
153 internal MessageSendEvent_SendFundingCreated(long ptr) : base(null, ptr) {
154 long node_id = bindings.LDKMessageSendEvent_SendFundingCreated_get_node_id(ptr);
155 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
156 this.node_id = node_id_conv;
157 long msg = bindings.LDKMessageSendEvent_SendFundingCreated_get_msg(ptr);
158 org.ldk.structs.FundingCreated msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.FundingCreated(null, msg); }
159 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
160 this.msg = msg_hu_conv;
163 /** A MessageSendEvent of type SendFundingSigned */
164 public class MessageSendEvent_SendFundingSigned : MessageSendEvent {
166 * The node_id of the node which should receive this message
168 public byte[] node_id;
170 * The message which should be sent.
172 public FundingSigned msg;
173 internal MessageSendEvent_SendFundingSigned(long ptr) : base(null, ptr) {
174 long node_id = bindings.LDKMessageSendEvent_SendFundingSigned_get_node_id(ptr);
175 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
176 this.node_id = node_id_conv;
177 long msg = bindings.LDKMessageSendEvent_SendFundingSigned_get_msg(ptr);
178 org.ldk.structs.FundingSigned msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.FundingSigned(null, msg); }
179 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
180 this.msg = msg_hu_conv;
183 /** A MessageSendEvent of type SendStfu */
184 public class MessageSendEvent_SendStfu : MessageSendEvent {
186 * The node_id of the node which should receive this message
188 public byte[] node_id;
190 * The message which should be sent.
193 internal MessageSendEvent_SendStfu(long ptr) : base(null, ptr) {
194 long node_id = bindings.LDKMessageSendEvent_SendStfu_get_node_id(ptr);
195 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
196 this.node_id = node_id_conv;
197 long msg = bindings.LDKMessageSendEvent_SendStfu_get_msg(ptr);
198 org.ldk.structs.Stfu msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.Stfu(null, msg); }
199 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
200 this.msg = msg_hu_conv;
203 /** A MessageSendEvent of type SendSplice */
204 public class MessageSendEvent_SendSplice : MessageSendEvent {
206 * The node_id of the node which should receive this message
208 public byte[] node_id;
210 * The message which should be sent.
213 internal MessageSendEvent_SendSplice(long ptr) : base(null, ptr) {
214 long node_id = bindings.LDKMessageSendEvent_SendSplice_get_node_id(ptr);
215 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
216 this.node_id = node_id_conv;
217 long msg = bindings.LDKMessageSendEvent_SendSplice_get_msg(ptr);
218 org.ldk.structs.Splice msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.Splice(null, msg); }
219 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
220 this.msg = msg_hu_conv;
223 /** A MessageSendEvent of type SendSpliceAck */
224 public class MessageSendEvent_SendSpliceAck : MessageSendEvent {
226 * The node_id of the node which should receive this message
228 public byte[] node_id;
230 * The message which should be sent.
232 public SpliceAck msg;
233 internal MessageSendEvent_SendSpliceAck(long ptr) : base(null, ptr) {
234 long node_id = bindings.LDKMessageSendEvent_SendSpliceAck_get_node_id(ptr);
235 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
236 this.node_id = node_id_conv;
237 long msg = bindings.LDKMessageSendEvent_SendSpliceAck_get_msg(ptr);
238 org.ldk.structs.SpliceAck msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.SpliceAck(null, msg); }
239 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
240 this.msg = msg_hu_conv;
243 /** A MessageSendEvent of type SendSpliceLocked */
244 public class MessageSendEvent_SendSpliceLocked : MessageSendEvent {
246 * The node_id of the node which should receive this message
248 public byte[] node_id;
250 * The message which should be sent.
252 public SpliceLocked msg;
253 internal MessageSendEvent_SendSpliceLocked(long ptr) : base(null, ptr) {
254 long node_id = bindings.LDKMessageSendEvent_SendSpliceLocked_get_node_id(ptr);
255 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
256 this.node_id = node_id_conv;
257 long msg = bindings.LDKMessageSendEvent_SendSpliceLocked_get_msg(ptr);
258 org.ldk.structs.SpliceLocked msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.SpliceLocked(null, msg); }
259 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
260 this.msg = msg_hu_conv;
263 /** A MessageSendEvent of type SendTxAddInput */
264 public class MessageSendEvent_SendTxAddInput : MessageSendEvent {
266 * The node_id of the node which should receive this message
268 public byte[] node_id;
270 * The message which should be sent.
272 public TxAddInput msg;
273 internal MessageSendEvent_SendTxAddInput(long ptr) : base(null, ptr) {
274 long node_id = bindings.LDKMessageSendEvent_SendTxAddInput_get_node_id(ptr);
275 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
276 this.node_id = node_id_conv;
277 long msg = bindings.LDKMessageSendEvent_SendTxAddInput_get_msg(ptr);
278 org.ldk.structs.TxAddInput msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxAddInput(null, msg); }
279 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
280 this.msg = msg_hu_conv;
283 /** A MessageSendEvent of type SendTxAddOutput */
284 public class MessageSendEvent_SendTxAddOutput : MessageSendEvent {
286 * The node_id of the node which should receive this message
288 public byte[] node_id;
290 * The message which should be sent.
292 public TxAddOutput msg;
293 internal MessageSendEvent_SendTxAddOutput(long ptr) : base(null, ptr) {
294 long node_id = bindings.LDKMessageSendEvent_SendTxAddOutput_get_node_id(ptr);
295 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
296 this.node_id = node_id_conv;
297 long msg = bindings.LDKMessageSendEvent_SendTxAddOutput_get_msg(ptr);
298 org.ldk.structs.TxAddOutput msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxAddOutput(null, msg); }
299 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
300 this.msg = msg_hu_conv;
303 /** A MessageSendEvent of type SendTxRemoveInput */
304 public class MessageSendEvent_SendTxRemoveInput : MessageSendEvent {
306 * The node_id of the node which should receive this message
308 public byte[] node_id;
310 * The message which should be sent.
312 public TxRemoveInput msg;
313 internal MessageSendEvent_SendTxRemoveInput(long ptr) : base(null, ptr) {
314 long node_id = bindings.LDKMessageSendEvent_SendTxRemoveInput_get_node_id(ptr);
315 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
316 this.node_id = node_id_conv;
317 long msg = bindings.LDKMessageSendEvent_SendTxRemoveInput_get_msg(ptr);
318 org.ldk.structs.TxRemoveInput msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxRemoveInput(null, msg); }
319 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
320 this.msg = msg_hu_conv;
323 /** A MessageSendEvent of type SendTxRemoveOutput */
324 public class MessageSendEvent_SendTxRemoveOutput : MessageSendEvent {
326 * The node_id of the node which should receive this message
328 public byte[] node_id;
330 * The message which should be sent.
332 public TxRemoveOutput msg;
333 internal MessageSendEvent_SendTxRemoveOutput(long ptr) : base(null, ptr) {
334 long node_id = bindings.LDKMessageSendEvent_SendTxRemoveOutput_get_node_id(ptr);
335 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
336 this.node_id = node_id_conv;
337 long msg = bindings.LDKMessageSendEvent_SendTxRemoveOutput_get_msg(ptr);
338 org.ldk.structs.TxRemoveOutput msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxRemoveOutput(null, msg); }
339 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
340 this.msg = msg_hu_conv;
343 /** A MessageSendEvent of type SendTxComplete */
344 public class MessageSendEvent_SendTxComplete : MessageSendEvent {
346 * The node_id of the node which should receive this message
348 public byte[] node_id;
350 * The message which should be sent.
352 public TxComplete msg;
353 internal MessageSendEvent_SendTxComplete(long ptr) : base(null, ptr) {
354 long node_id = bindings.LDKMessageSendEvent_SendTxComplete_get_node_id(ptr);
355 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
356 this.node_id = node_id_conv;
357 long msg = bindings.LDKMessageSendEvent_SendTxComplete_get_msg(ptr);
358 org.ldk.structs.TxComplete msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxComplete(null, msg); }
359 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
360 this.msg = msg_hu_conv;
363 /** A MessageSendEvent of type SendTxSignatures */
364 public class MessageSendEvent_SendTxSignatures : MessageSendEvent {
366 * The node_id of the node which should receive this message
368 public byte[] node_id;
370 * The message which should be sent.
372 public TxSignatures msg;
373 internal MessageSendEvent_SendTxSignatures(long ptr) : base(null, ptr) {
374 long node_id = bindings.LDKMessageSendEvent_SendTxSignatures_get_node_id(ptr);
375 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
376 this.node_id = node_id_conv;
377 long msg = bindings.LDKMessageSendEvent_SendTxSignatures_get_msg(ptr);
378 org.ldk.structs.TxSignatures msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxSignatures(null, msg); }
379 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
380 this.msg = msg_hu_conv;
383 /** A MessageSendEvent of type SendTxInitRbf */
384 public class MessageSendEvent_SendTxInitRbf : MessageSendEvent {
386 * The node_id of the node which should receive this message
388 public byte[] node_id;
390 * The message which should be sent.
392 public TxInitRbf msg;
393 internal MessageSendEvent_SendTxInitRbf(long ptr) : base(null, ptr) {
394 long node_id = bindings.LDKMessageSendEvent_SendTxInitRbf_get_node_id(ptr);
395 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
396 this.node_id = node_id_conv;
397 long msg = bindings.LDKMessageSendEvent_SendTxInitRbf_get_msg(ptr);
398 org.ldk.structs.TxInitRbf msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxInitRbf(null, msg); }
399 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
400 this.msg = msg_hu_conv;
403 /** A MessageSendEvent of type SendTxAckRbf */
404 public class MessageSendEvent_SendTxAckRbf : MessageSendEvent {
406 * The node_id of the node which should receive this message
408 public byte[] node_id;
410 * The message which should be sent.
413 internal MessageSendEvent_SendTxAckRbf(long ptr) : base(null, ptr) {
414 long node_id = bindings.LDKMessageSendEvent_SendTxAckRbf_get_node_id(ptr);
415 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
416 this.node_id = node_id_conv;
417 long msg = bindings.LDKMessageSendEvent_SendTxAckRbf_get_msg(ptr);
418 org.ldk.structs.TxAckRbf msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxAckRbf(null, msg); }
419 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
420 this.msg = msg_hu_conv;
423 /** A MessageSendEvent of type SendTxAbort */
424 public class MessageSendEvent_SendTxAbort : MessageSendEvent {
426 * The node_id of the node which should receive this message
428 public byte[] node_id;
430 * The message which should be sent.
433 internal MessageSendEvent_SendTxAbort(long ptr) : base(null, ptr) {
434 long node_id = bindings.LDKMessageSendEvent_SendTxAbort_get_node_id(ptr);
435 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
436 this.node_id = node_id_conv;
437 long msg = bindings.LDKMessageSendEvent_SendTxAbort_get_msg(ptr);
438 org.ldk.structs.TxAbort msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxAbort(null, msg); }
439 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
440 this.msg = msg_hu_conv;
443 /** A MessageSendEvent of type SendChannelReady */
444 public class MessageSendEvent_SendChannelReady : MessageSendEvent {
446 * The node_id of the node which should receive these message(s)
448 public byte[] node_id;
450 * The channel_ready message which should be sent.
452 public ChannelReady msg;
453 internal MessageSendEvent_SendChannelReady(long ptr) : base(null, ptr) {
454 long node_id = bindings.LDKMessageSendEvent_SendChannelReady_get_node_id(ptr);
455 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
456 this.node_id = node_id_conv;
457 long msg = bindings.LDKMessageSendEvent_SendChannelReady_get_msg(ptr);
458 org.ldk.structs.ChannelReady msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelReady(null, msg); }
459 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
460 this.msg = msg_hu_conv;
463 /** A MessageSendEvent of type SendAnnouncementSignatures */
464 public class MessageSendEvent_SendAnnouncementSignatures : MessageSendEvent {
466 * The node_id of the node which should receive these message(s)
468 public byte[] node_id;
470 * The announcement_signatures message which should be sent.
472 public AnnouncementSignatures msg;
473 internal MessageSendEvent_SendAnnouncementSignatures(long ptr) : base(null, ptr) {
474 long node_id = bindings.LDKMessageSendEvent_SendAnnouncementSignatures_get_node_id(ptr);
475 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
476 this.node_id = node_id_conv;
477 long msg = bindings.LDKMessageSendEvent_SendAnnouncementSignatures_get_msg(ptr);
478 org.ldk.structs.AnnouncementSignatures msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.AnnouncementSignatures(null, msg); }
479 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
480 this.msg = msg_hu_conv;
483 /** A MessageSendEvent of type UpdateHTLCs */
484 public class MessageSendEvent_UpdateHTLCs : MessageSendEvent {
486 * The node_id of the node which should receive these message(s)
488 public byte[] node_id;
490 * The update messages which should be sent. ALL messages in the struct should be sent!
492 public CommitmentUpdate updates;
493 internal MessageSendEvent_UpdateHTLCs(long ptr) : base(null, ptr) {
494 long node_id = bindings.LDKMessageSendEvent_UpdateHTLCs_get_node_id(ptr);
495 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
496 this.node_id = node_id_conv;
497 long updates = bindings.LDKMessageSendEvent_UpdateHTLCs_get_updates(ptr);
498 org.ldk.structs.CommitmentUpdate updates_hu_conv = null; if (updates < 0 || updates > 4096) { updates_hu_conv = new org.ldk.structs.CommitmentUpdate(null, updates); }
499 if (updates_hu_conv != null) { updates_hu_conv.ptrs_to.AddLast(this); };
500 this.updates = updates_hu_conv;
503 /** A MessageSendEvent of type SendRevokeAndACK */
504 public class MessageSendEvent_SendRevokeAndACK : MessageSendEvent {
506 * The node_id of the node which should receive this message
508 public byte[] node_id;
510 * The message which should be sent.
512 public RevokeAndACK msg;
513 internal MessageSendEvent_SendRevokeAndACK(long ptr) : base(null, ptr) {
514 long node_id = bindings.LDKMessageSendEvent_SendRevokeAndACK_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_SendRevokeAndACK_get_msg(ptr);
518 org.ldk.structs.RevokeAndACK msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.RevokeAndACK(null, msg); }
519 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
520 this.msg = msg_hu_conv;
523 /** A MessageSendEvent of type SendClosingSigned */
524 public class MessageSendEvent_SendClosingSigned : MessageSendEvent {
526 * The node_id of the node which should receive this message
528 public byte[] node_id;
530 * The message which should be sent.
532 public ClosingSigned msg;
533 internal MessageSendEvent_SendClosingSigned(long ptr) : base(null, ptr) {
534 long node_id = bindings.LDKMessageSendEvent_SendClosingSigned_get_node_id(ptr);
535 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
536 this.node_id = node_id_conv;
537 long msg = bindings.LDKMessageSendEvent_SendClosingSigned_get_msg(ptr);
538 org.ldk.structs.ClosingSigned msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ClosingSigned(null, msg); }
539 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
540 this.msg = msg_hu_conv;
543 /** A MessageSendEvent of type SendShutdown */
544 public class MessageSendEvent_SendShutdown : MessageSendEvent {
546 * The node_id of the node which should receive this message
548 public byte[] node_id;
550 * The message which should be sent.
553 internal MessageSendEvent_SendShutdown(long ptr) : base(null, ptr) {
554 long node_id = bindings.LDKMessageSendEvent_SendShutdown_get_node_id(ptr);
555 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
556 this.node_id = node_id_conv;
557 long msg = bindings.LDKMessageSendEvent_SendShutdown_get_msg(ptr);
558 org.ldk.structs.Shutdown msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.Shutdown(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 SendChannelReestablish */
564 public class MessageSendEvent_SendChannelReestablish : MessageSendEvent {
566 * The node_id of the node which should receive this message
568 public byte[] node_id;
570 * The message which should be sent.
572 public ChannelReestablish msg;
573 internal MessageSendEvent_SendChannelReestablish(long ptr) : base(null, ptr) {
574 long node_id = bindings.LDKMessageSendEvent_SendChannelReestablish_get_node_id(ptr);
575 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
576 this.node_id = node_id_conv;
577 long msg = bindings.LDKMessageSendEvent_SendChannelReestablish_get_msg(ptr);
578 org.ldk.structs.ChannelReestablish msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelReestablish(null, msg); }
579 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
580 this.msg = msg_hu_conv;
583 /** A MessageSendEvent of type SendChannelAnnouncement */
584 public class MessageSendEvent_SendChannelAnnouncement : MessageSendEvent {
586 * The node_id of the node which should receive this message
588 public byte[] node_id;
590 * The channel_announcement which should be sent.
592 public ChannelAnnouncement msg;
594 * The followup channel_update which should be sent.
596 public ChannelUpdate update_msg;
597 internal MessageSendEvent_SendChannelAnnouncement(long ptr) : base(null, ptr) {
598 long node_id = bindings.LDKMessageSendEvent_SendChannelAnnouncement_get_node_id(ptr);
599 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
600 this.node_id = node_id_conv;
601 long msg = bindings.LDKMessageSendEvent_SendChannelAnnouncement_get_msg(ptr);
602 org.ldk.structs.ChannelAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelAnnouncement(null, msg); }
603 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
604 this.msg = msg_hu_conv;
605 long update_msg = bindings.LDKMessageSendEvent_SendChannelAnnouncement_get_update_msg(ptr);
606 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); }
607 if (update_msg_hu_conv != null) { update_msg_hu_conv.ptrs_to.AddLast(this); };
608 this.update_msg = update_msg_hu_conv;
611 /** A MessageSendEvent of type BroadcastChannelAnnouncement */
612 public class MessageSendEvent_BroadcastChannelAnnouncement : MessageSendEvent {
614 * The channel_announcement which should be sent.
616 public ChannelAnnouncement msg;
618 * The followup channel_update which should be sent.
620 * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
622 public ChannelUpdate update_msg;
623 internal MessageSendEvent_BroadcastChannelAnnouncement(long ptr) : base(null, ptr) {
624 long msg = bindings.LDKMessageSendEvent_BroadcastChannelAnnouncement_get_msg(ptr);
625 org.ldk.structs.ChannelAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelAnnouncement(null, msg); }
626 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
627 this.msg = msg_hu_conv;
628 long update_msg = bindings.LDKMessageSendEvent_BroadcastChannelAnnouncement_get_update_msg(ptr);
629 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); }
630 if (update_msg_hu_conv != null) { update_msg_hu_conv.ptrs_to.AddLast(this); };
631 this.update_msg = update_msg_hu_conv;
634 /** A MessageSendEvent of type BroadcastChannelUpdate */
635 public class MessageSendEvent_BroadcastChannelUpdate : MessageSendEvent {
637 * The channel_update which should be sent.
639 public ChannelUpdate msg;
640 internal MessageSendEvent_BroadcastChannelUpdate(long ptr) : base(null, ptr) {
641 long msg = bindings.LDKMessageSendEvent_BroadcastChannelUpdate_get_msg(ptr);
642 org.ldk.structs.ChannelUpdate msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelUpdate(null, msg); }
643 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
644 this.msg = msg_hu_conv;
647 /** A MessageSendEvent of type BroadcastNodeAnnouncement */
648 public class MessageSendEvent_BroadcastNodeAnnouncement : MessageSendEvent {
650 * The node_announcement which should be sent.
652 public NodeAnnouncement msg;
653 internal MessageSendEvent_BroadcastNodeAnnouncement(long ptr) : base(null, ptr) {
654 long msg = bindings.LDKMessageSendEvent_BroadcastNodeAnnouncement_get_msg(ptr);
655 org.ldk.structs.NodeAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.NodeAnnouncement(null, msg); }
656 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
657 this.msg = msg_hu_conv;
660 /** A MessageSendEvent of type SendChannelUpdate */
661 public class MessageSendEvent_SendChannelUpdate : MessageSendEvent {
663 * The node_id of the node which should receive this message
665 public byte[] node_id;
667 * The channel_update which should be sent.
669 public ChannelUpdate msg;
670 internal MessageSendEvent_SendChannelUpdate(long ptr) : base(null, ptr) {
671 long node_id = bindings.LDKMessageSendEvent_SendChannelUpdate_get_node_id(ptr);
672 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
673 this.node_id = node_id_conv;
674 long msg = bindings.LDKMessageSendEvent_SendChannelUpdate_get_msg(ptr);
675 org.ldk.structs.ChannelUpdate msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelUpdate(null, msg); }
676 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
677 this.msg = msg_hu_conv;
680 /** A MessageSendEvent of type HandleError */
681 public class MessageSendEvent_HandleError : MessageSendEvent {
683 * The node_id of the node which should receive this message
685 public byte[] node_id;
687 * The action which should be taken.
689 public ErrorAction action;
690 internal MessageSendEvent_HandleError(long ptr) : base(null, ptr) {
691 long node_id = bindings.LDKMessageSendEvent_HandleError_get_node_id(ptr);
692 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
693 this.node_id = node_id_conv;
694 long action = bindings.LDKMessageSendEvent_HandleError_get_action(ptr);
695 org.ldk.structs.ErrorAction action_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(action);
696 if (action_hu_conv != null) { action_hu_conv.ptrs_to.AddLast(this); };
697 this.action = action_hu_conv;
700 /** A MessageSendEvent of type SendChannelRangeQuery */
701 public class MessageSendEvent_SendChannelRangeQuery : MessageSendEvent {
703 * The node_id of this message recipient
705 public byte[] node_id;
707 * The query_channel_range which should be sent.
709 public QueryChannelRange msg;
710 internal MessageSendEvent_SendChannelRangeQuery(long ptr) : base(null, ptr) {
711 long node_id = bindings.LDKMessageSendEvent_SendChannelRangeQuery_get_node_id(ptr);
712 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
713 this.node_id = node_id_conv;
714 long msg = bindings.LDKMessageSendEvent_SendChannelRangeQuery_get_msg(ptr);
715 org.ldk.structs.QueryChannelRange msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.QueryChannelRange(null, msg); }
716 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
717 this.msg = msg_hu_conv;
720 /** A MessageSendEvent of type SendShortIdsQuery */
721 public class MessageSendEvent_SendShortIdsQuery : MessageSendEvent {
723 * The node_id of this message recipient
725 public byte[] node_id;
727 * The query_short_channel_ids which should be sent.
729 public QueryShortChannelIds msg;
730 internal MessageSendEvent_SendShortIdsQuery(long ptr) : base(null, ptr) {
731 long node_id = bindings.LDKMessageSendEvent_SendShortIdsQuery_get_node_id(ptr);
732 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
733 this.node_id = node_id_conv;
734 long msg = bindings.LDKMessageSendEvent_SendShortIdsQuery_get_msg(ptr);
735 org.ldk.structs.QueryShortChannelIds msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.QueryShortChannelIds(null, msg); }
736 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
737 this.msg = msg_hu_conv;
740 /** A MessageSendEvent of type SendReplyChannelRange */
741 public class MessageSendEvent_SendReplyChannelRange : MessageSendEvent {
743 * The node_id of this message recipient
745 public byte[] node_id;
747 * The reply_channel_range which should be sent.
749 public ReplyChannelRange msg;
750 internal MessageSendEvent_SendReplyChannelRange(long ptr) : base(null, ptr) {
751 long node_id = bindings.LDKMessageSendEvent_SendReplyChannelRange_get_node_id(ptr);
752 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
753 this.node_id = node_id_conv;
754 long msg = bindings.LDKMessageSendEvent_SendReplyChannelRange_get_msg(ptr);
755 org.ldk.structs.ReplyChannelRange msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ReplyChannelRange(null, msg); }
756 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
757 this.msg = msg_hu_conv;
760 /** A MessageSendEvent of type SendGossipTimestampFilter */
761 public class MessageSendEvent_SendGossipTimestampFilter : MessageSendEvent {
763 * The node_id of this message recipient
765 public byte[] node_id;
767 * The gossip_timestamp_filter which should be sent.
769 public GossipTimestampFilter msg;
770 internal MessageSendEvent_SendGossipTimestampFilter(long ptr) : base(null, ptr) {
771 long node_id = bindings.LDKMessageSendEvent_SendGossipTimestampFilter_get_node_id(ptr);
772 byte[] node_id_conv = InternalUtils.decodeUint8Array(node_id);
773 this.node_id = node_id_conv;
774 long msg = bindings.LDKMessageSendEvent_SendGossipTimestampFilter_get_msg(ptr);
775 org.ldk.structs.GossipTimestampFilter msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.GossipTimestampFilter(null, msg); }
776 if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.AddLast(this); };
777 this.msg = msg_hu_conv;
780 internal long clone_ptr() {
781 long ret = bindings.MessageSendEvent_clone_ptr(this.ptr);
787 * Creates a copy of the MessageSendEvent
789 public MessageSendEvent clone() {
790 long ret = bindings.MessageSendEvent_clone(this.ptr);
792 if (ret >= 0 && ret <= 4096) { return null; }
793 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
794 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
799 * Utility method to constructs a new SendAcceptChannel-variant MessageSendEvent
801 public static MessageSendEvent send_accept_channel(byte[] node_id, org.ldk.structs.AcceptChannel msg) {
802 long ret = bindings.MessageSendEvent_send_accept_channel(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), 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 SendAcceptChannelV2-variant MessageSendEvent
815 public static MessageSendEvent send_accept_channel_v2(byte[] node_id, org.ldk.structs.AcceptChannelV2 msg) {
816 long ret = bindings.MessageSendEvent_send_accept_channel_v2(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), 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 SendOpenChannel-variant MessageSendEvent
829 public static MessageSendEvent send_open_channel(byte[] node_id, org.ldk.structs.OpenChannel msg) {
830 long ret = bindings.MessageSendEvent_send_open_channel(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), 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 SendOpenChannelV2-variant MessageSendEvent
843 public static MessageSendEvent send_open_channel_v2(byte[] node_id, org.ldk.structs.OpenChannelV2 msg) {
844 long ret = bindings.MessageSendEvent_send_open_channel_v2(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), 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 SendFundingCreated-variant MessageSendEvent
857 public static MessageSendEvent send_funding_created(byte[] node_id, org.ldk.structs.FundingCreated msg) {
858 long ret = bindings.MessageSendEvent_send_funding_created(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), 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 SendFundingSigned-variant MessageSendEvent
871 public static MessageSendEvent send_funding_signed(byte[] node_id, org.ldk.structs.FundingSigned msg) {
872 long ret = bindings.MessageSendEvent_send_funding_signed(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), 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 SendStfu-variant MessageSendEvent
885 public static MessageSendEvent send_stfu(byte[] node_id, org.ldk.structs.Stfu msg) {
886 long ret = bindings.MessageSendEvent_send_stfu(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), 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 SendSplice-variant MessageSendEvent
899 public static MessageSendEvent send_splice(byte[] node_id, org.ldk.structs.Splice msg) {
900 long ret = bindings.MessageSendEvent_send_splice(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), 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 SendSpliceAck-variant MessageSendEvent
913 public static MessageSendEvent send_splice_ack(byte[] node_id, org.ldk.structs.SpliceAck msg) {
914 long ret = bindings.MessageSendEvent_send_splice_ack(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), 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 SendSpliceLocked-variant MessageSendEvent
927 public static MessageSendEvent send_splice_locked(byte[] node_id, org.ldk.structs.SpliceLocked msg) {
928 long ret = bindings.MessageSendEvent_send_splice_locked(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), 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 SendTxAddInput-variant MessageSendEvent
941 public static MessageSendEvent send_tx_add_input(byte[] node_id, org.ldk.structs.TxAddInput msg) {
942 long ret = bindings.MessageSendEvent_send_tx_add_input(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), 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 SendTxAddOutput-variant MessageSendEvent
955 public static MessageSendEvent send_tx_add_output(byte[] node_id, org.ldk.structs.TxAddOutput msg) {
956 long ret = bindings.MessageSendEvent_send_tx_add_output(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr);
957 GC.KeepAlive(node_id);
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(msg); };
967 * Utility method to constructs a new SendTxRemoveInput-variant MessageSendEvent
969 public static MessageSendEvent send_tx_remove_input(byte[] node_id, org.ldk.structs.TxRemoveInput msg) {
970 long ret = bindings.MessageSendEvent_send_tx_remove_input(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), 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 SendTxRemoveOutput-variant MessageSendEvent
983 public static MessageSendEvent send_tx_remove_output(byte[] node_id, org.ldk.structs.TxRemoveOutput msg) {
984 long ret = bindings.MessageSendEvent_send_tx_remove_output(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), 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 SendTxComplete-variant MessageSendEvent
997 public static MessageSendEvent send_tx_complete(byte[] node_id, org.ldk.structs.TxComplete msg) {
998 long ret = bindings.MessageSendEvent_send_tx_complete(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), 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 SendTxSignatures-variant MessageSendEvent
1011 public static MessageSendEvent send_tx_signatures(byte[] node_id, org.ldk.structs.TxSignatures msg) {
1012 long ret = bindings.MessageSendEvent_send_tx_signatures(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), 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 SendTxInitRbf-variant MessageSendEvent
1025 public static MessageSendEvent send_tx_init_rbf(byte[] node_id, org.ldk.structs.TxInitRbf msg) {
1026 long ret = bindings.MessageSendEvent_send_tx_init_rbf(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr);
1027 GC.KeepAlive(node_id);
1029 if (ret >= 0 && ret <= 4096) { return null; }
1030 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1031 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1032 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1037 * Utility method to constructs a new SendTxAckRbf-variant MessageSendEvent
1039 public static MessageSendEvent send_tx_ack_rbf(byte[] node_id, org.ldk.structs.TxAckRbf msg) {
1040 long ret = bindings.MessageSendEvent_send_tx_ack_rbf(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr);
1041 GC.KeepAlive(node_id);
1043 if (ret >= 0 && ret <= 4096) { return null; }
1044 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1045 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1046 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1051 * Utility method to constructs a new SendTxAbort-variant MessageSendEvent
1053 public static MessageSendEvent send_tx_abort(byte[] node_id, org.ldk.structs.TxAbort msg) {
1054 long ret = bindings.MessageSendEvent_send_tx_abort(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr);
1055 GC.KeepAlive(node_id);
1057 if (ret >= 0 && ret <= 4096) { return null; }
1058 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1059 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1060 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1065 * Utility method to constructs a new SendChannelReady-variant MessageSendEvent
1067 public static MessageSendEvent send_channel_ready(byte[] node_id, org.ldk.structs.ChannelReady msg) {
1068 long ret = bindings.MessageSendEvent_send_channel_ready(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr);
1069 GC.KeepAlive(node_id);
1071 if (ret >= 0 && ret <= 4096) { return null; }
1072 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1073 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1074 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1079 * Utility method to constructs a new SendAnnouncementSignatures-variant MessageSendEvent
1081 public static MessageSendEvent send_announcement_signatures(byte[] node_id, org.ldk.structs.AnnouncementSignatures msg) {
1082 long ret = bindings.MessageSendEvent_send_announcement_signatures(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr);
1083 GC.KeepAlive(node_id);
1085 if (ret >= 0 && ret <= 4096) { return null; }
1086 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1087 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1088 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1093 * Utility method to constructs a new UpdateHTLCs-variant MessageSendEvent
1095 public static MessageSendEvent update_htlcs(byte[] node_id, org.ldk.structs.CommitmentUpdate updates) {
1096 long ret = bindings.MessageSendEvent_update_htlcs(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), updates.ptr);
1097 GC.KeepAlive(node_id);
1098 GC.KeepAlive(updates);
1099 if (ret >= 0 && ret <= 4096) { return null; }
1100 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1101 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1102 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(updates); };
1107 * Utility method to constructs a new SendRevokeAndACK-variant MessageSendEvent
1109 public static MessageSendEvent send_revoke_and_ack(byte[] node_id, org.ldk.structs.RevokeAndACK msg) {
1110 long ret = bindings.MessageSendEvent_send_revoke_and_ack(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr);
1111 GC.KeepAlive(node_id);
1113 if (ret >= 0 && ret <= 4096) { return null; }
1114 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1115 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1116 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1121 * Utility method to constructs a new SendClosingSigned-variant MessageSendEvent
1123 public static MessageSendEvent send_closing_signed(byte[] node_id, org.ldk.structs.ClosingSigned msg) {
1124 long ret = bindings.MessageSendEvent_send_closing_signed(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr);
1125 GC.KeepAlive(node_id);
1127 if (ret >= 0 && ret <= 4096) { return null; }
1128 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1129 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1130 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1135 * Utility method to constructs a new SendShutdown-variant MessageSendEvent
1137 public static MessageSendEvent send_shutdown(byte[] node_id, org.ldk.structs.Shutdown msg) {
1138 long ret = bindings.MessageSendEvent_send_shutdown(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr);
1139 GC.KeepAlive(node_id);
1141 if (ret >= 0 && ret <= 4096) { return null; }
1142 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1143 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1144 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1149 * Utility method to constructs a new SendChannelReestablish-variant MessageSendEvent
1151 public static MessageSendEvent send_channel_reestablish(byte[] node_id, org.ldk.structs.ChannelReestablish msg) {
1152 long ret = bindings.MessageSendEvent_send_channel_reestablish(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr);
1153 GC.KeepAlive(node_id);
1155 if (ret >= 0 && ret <= 4096) { return null; }
1156 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1157 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1158 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1163 * Utility method to constructs a new SendChannelAnnouncement-variant MessageSendEvent
1165 public static MessageSendEvent send_channel_announcement(byte[] node_id, org.ldk.structs.ChannelAnnouncement msg, org.ldk.structs.ChannelUpdate update_msg) {
1166 long ret = bindings.MessageSendEvent_send_channel_announcement(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr, update_msg.ptr);
1167 GC.KeepAlive(node_id);
1169 GC.KeepAlive(update_msg);
1170 if (ret >= 0 && ret <= 4096) { return null; }
1171 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1172 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1173 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1174 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(update_msg); };
1179 * Utility method to constructs a new BroadcastChannelAnnouncement-variant MessageSendEvent
1181 public static MessageSendEvent broadcast_channel_announcement(org.ldk.structs.ChannelAnnouncement msg, org.ldk.structs.ChannelUpdate update_msg) {
1182 long ret = bindings.MessageSendEvent_broadcast_channel_announcement(msg.ptr, update_msg.ptr);
1184 GC.KeepAlive(update_msg);
1185 if (ret >= 0 && ret <= 4096) { return null; }
1186 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1187 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1188 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1189 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(update_msg); };
1194 * Utility method to constructs a new BroadcastChannelUpdate-variant MessageSendEvent
1196 public static MessageSendEvent broadcast_channel_update(org.ldk.structs.ChannelUpdate msg) {
1197 long ret = bindings.MessageSendEvent_broadcast_channel_update(msg.ptr);
1199 if (ret >= 0 && ret <= 4096) { return null; }
1200 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1201 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1202 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1207 * Utility method to constructs a new BroadcastNodeAnnouncement-variant MessageSendEvent
1209 public static MessageSendEvent broadcast_node_announcement(org.ldk.structs.NodeAnnouncement msg) {
1210 long ret = bindings.MessageSendEvent_broadcast_node_announcement(msg.ptr);
1212 if (ret >= 0 && ret <= 4096) { return null; }
1213 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1214 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1215 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1220 * Utility method to constructs a new SendChannelUpdate-variant MessageSendEvent
1222 public static MessageSendEvent send_channel_update(byte[] node_id, org.ldk.structs.ChannelUpdate msg) {
1223 long ret = bindings.MessageSendEvent_send_channel_update(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr);
1224 GC.KeepAlive(node_id);
1226 if (ret >= 0 && ret <= 4096) { return null; }
1227 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1228 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1229 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1234 * Utility method to constructs a new HandleError-variant MessageSendEvent
1236 public static MessageSendEvent handle_error(byte[] node_id, org.ldk.structs.ErrorAction action) {
1237 long ret = bindings.MessageSendEvent_handle_error(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), action.ptr);
1238 GC.KeepAlive(node_id);
1239 GC.KeepAlive(action);
1240 if (ret >= 0 && ret <= 4096) { return null; }
1241 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1242 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1243 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(action); };
1248 * Utility method to constructs a new SendChannelRangeQuery-variant MessageSendEvent
1250 public static MessageSendEvent send_channel_range_query(byte[] node_id, org.ldk.structs.QueryChannelRange msg) {
1251 long ret = bindings.MessageSendEvent_send_channel_range_query(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr);
1252 GC.KeepAlive(node_id);
1254 if (ret >= 0 && ret <= 4096) { return null; }
1255 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1256 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1257 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1262 * Utility method to constructs a new SendShortIdsQuery-variant MessageSendEvent
1264 public static MessageSendEvent send_short_ids_query(byte[] node_id, org.ldk.structs.QueryShortChannelIds msg) {
1265 long ret = bindings.MessageSendEvent_send_short_ids_query(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr);
1266 GC.KeepAlive(node_id);
1268 if (ret >= 0 && ret <= 4096) { return null; }
1269 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1270 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1271 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1276 * Utility method to constructs a new SendReplyChannelRange-variant MessageSendEvent
1278 public static MessageSendEvent send_reply_channel_range(byte[] node_id, org.ldk.structs.ReplyChannelRange msg) {
1279 long ret = bindings.MessageSendEvent_send_reply_channel_range(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr);
1280 GC.KeepAlive(node_id);
1282 if (ret >= 0 && ret <= 4096) { return null; }
1283 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1284 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1285 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };
1290 * Utility method to constructs a new SendGossipTimestampFilter-variant MessageSendEvent
1292 public static MessageSendEvent send_gossip_timestamp_filter(byte[] node_id, org.ldk.structs.GossipTimestampFilter msg) {
1293 long ret = bindings.MessageSendEvent_send_gossip_timestamp_filter(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), msg.ptr);
1294 GC.KeepAlive(node_id);
1296 if (ret >= 0 && ret <= 4096) { return null; }
1297 org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
1298 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
1299 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(msg); };