[TS] Update auto-generated TypeScript Bindings
[ldk-java] / ts / structs / MessageSendEvent.mts
index 52d8c05e6a96f1f72d822184e0cc2bf84e491a35..26ff2f63a1cd098a981e09b628a547973dd872ea 100644 (file)
@@ -280,6 +280,11 @@ import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScor
 import CommonBase from './CommonBase.mjs';
 import * as bindings from '../bindings.mjs'
 
+/**
+ * An event generated by ChannelManager which indicates a message should be sent to a peer (or
+ * broadcast to most peers).
+ * These events are handled by PeerManager::process_events if you are using a PeerManager.
+ */
 export class MessageSendEvent extends CommonBase {
        protected constructor(_dummy: object, ptr: number) { super(ptr, bindings.MessageSendEvent_free); }
        /* @internal */
@@ -315,6 +320,9 @@ export class MessageSendEvent extends CommonBase {
                return ret;
        }
 
+       /**
+        * Creates a copy of the MessageSendEvent
+        */
        public clone(): MessageSendEvent {
                const ret: number = bindings.MessageSendEvent_clone(this.ptr);
                const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret);
@@ -322,6 +330,9 @@ export class MessageSendEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new SendAcceptChannel-variant MessageSendEvent
+        */
        public static constructor_send_accept_channel(node_id: Uint8Array, msg: AcceptChannel): MessageSendEvent {
                const ret: number = bindings.MessageSendEvent_send_accept_channel(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0 : CommonBase.get_ptr_of(msg) & ~1);
                const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret);
@@ -329,6 +340,9 @@ export class MessageSendEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new SendOpenChannel-variant MessageSendEvent
+        */
        public static constructor_send_open_channel(node_id: Uint8Array, msg: OpenChannel): MessageSendEvent {
                const ret: number = bindings.MessageSendEvent_send_open_channel(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0 : CommonBase.get_ptr_of(msg) & ~1);
                const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret);
@@ -336,6 +350,9 @@ export class MessageSendEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new SendFundingCreated-variant MessageSendEvent
+        */
        public static constructor_send_funding_created(node_id: Uint8Array, msg: FundingCreated): MessageSendEvent {
                const ret: number = bindings.MessageSendEvent_send_funding_created(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0 : CommonBase.get_ptr_of(msg) & ~1);
                const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret);
@@ -343,6 +360,9 @@ export class MessageSendEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new SendFundingSigned-variant MessageSendEvent
+        */
        public static constructor_send_funding_signed(node_id: Uint8Array, msg: FundingSigned): MessageSendEvent {
                const ret: number = bindings.MessageSendEvent_send_funding_signed(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0 : CommonBase.get_ptr_of(msg) & ~1);
                const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret);
@@ -350,6 +370,9 @@ export class MessageSendEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new SendFundingLocked-variant MessageSendEvent
+        */
        public static constructor_send_funding_locked(node_id: Uint8Array, msg: FundingLocked): MessageSendEvent {
                const ret: number = bindings.MessageSendEvent_send_funding_locked(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0 : CommonBase.get_ptr_of(msg) & ~1);
                const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret);
@@ -357,6 +380,9 @@ export class MessageSendEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new SendAnnouncementSignatures-variant MessageSendEvent
+        */
        public static constructor_send_announcement_signatures(node_id: Uint8Array, msg: AnnouncementSignatures): MessageSendEvent {
                const ret: number = bindings.MessageSendEvent_send_announcement_signatures(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0 : CommonBase.get_ptr_of(msg) & ~1);
                const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret);
@@ -364,6 +390,9 @@ export class MessageSendEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new UpdateHTLCs-variant MessageSendEvent
+        */
        public static constructor_update_htlcs(node_id: Uint8Array, updates: CommitmentUpdate): MessageSendEvent {
                const ret: number = bindings.MessageSendEvent_update_htlcs(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), updates == null ? 0 : CommonBase.get_ptr_of(updates) & ~1);
                const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret);
@@ -371,6 +400,9 @@ export class MessageSendEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new SendRevokeAndACK-variant MessageSendEvent
+        */
        public static constructor_send_revoke_and_ack(node_id: Uint8Array, msg: RevokeAndACK): MessageSendEvent {
                const ret: number = bindings.MessageSendEvent_send_revoke_and_ack(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0 : CommonBase.get_ptr_of(msg) & ~1);
                const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret);
@@ -378,6 +410,9 @@ export class MessageSendEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new SendClosingSigned-variant MessageSendEvent
+        */
        public static constructor_send_closing_signed(node_id: Uint8Array, msg: ClosingSigned): MessageSendEvent {
                const ret: number = bindings.MessageSendEvent_send_closing_signed(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0 : CommonBase.get_ptr_of(msg) & ~1);
                const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret);
@@ -385,6 +420,9 @@ export class MessageSendEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new SendShutdown-variant MessageSendEvent
+        */
        public static constructor_send_shutdown(node_id: Uint8Array, msg: Shutdown): MessageSendEvent {
                const ret: number = bindings.MessageSendEvent_send_shutdown(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0 : CommonBase.get_ptr_of(msg) & ~1);
                const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret);
@@ -392,6 +430,9 @@ export class MessageSendEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new SendChannelReestablish-variant MessageSendEvent
+        */
        public static constructor_send_channel_reestablish(node_id: Uint8Array, msg: ChannelReestablish): MessageSendEvent {
                const ret: number = bindings.MessageSendEvent_send_channel_reestablish(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0 : CommonBase.get_ptr_of(msg) & ~1);
                const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret);
@@ -399,6 +440,9 @@ export class MessageSendEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new BroadcastChannelAnnouncement-variant MessageSendEvent
+        */
        public static constructor_broadcast_channel_announcement(msg: ChannelAnnouncement, update_msg: ChannelUpdate): MessageSendEvent {
                const ret: number = bindings.MessageSendEvent_broadcast_channel_announcement(msg == null ? 0 : CommonBase.get_ptr_of(msg) & ~1, update_msg == null ? 0 : CommonBase.get_ptr_of(update_msg) & ~1);
                const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret);
@@ -406,6 +450,9 @@ export class MessageSendEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new BroadcastNodeAnnouncement-variant MessageSendEvent
+        */
        public static constructor_broadcast_node_announcement(msg: NodeAnnouncement): MessageSendEvent {
                const ret: number = bindings.MessageSendEvent_broadcast_node_announcement(msg == null ? 0 : CommonBase.get_ptr_of(msg) & ~1);
                const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret);
@@ -413,6 +460,9 @@ export class MessageSendEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new BroadcastChannelUpdate-variant MessageSendEvent
+        */
        public static constructor_broadcast_channel_update(msg: ChannelUpdate): MessageSendEvent {
                const ret: number = bindings.MessageSendEvent_broadcast_channel_update(msg == null ? 0 : CommonBase.get_ptr_of(msg) & ~1);
                const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret);
@@ -420,6 +470,9 @@ export class MessageSendEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new SendChannelUpdate-variant MessageSendEvent
+        */
        public static constructor_send_channel_update(node_id: Uint8Array, msg: ChannelUpdate): MessageSendEvent {
                const ret: number = bindings.MessageSendEvent_send_channel_update(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0 : CommonBase.get_ptr_of(msg) & ~1);
                const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret);
@@ -427,6 +480,9 @@ export class MessageSendEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new HandleError-variant MessageSendEvent
+        */
        public static constructor_handle_error(node_id: Uint8Array, action: ErrorAction): MessageSendEvent {
                const ret: number = bindings.MessageSendEvent_handle_error(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), CommonBase.get_ptr_of(action));
                const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret);
@@ -434,6 +490,9 @@ export class MessageSendEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new SendChannelRangeQuery-variant MessageSendEvent
+        */
        public static constructor_send_channel_range_query(node_id: Uint8Array, msg: QueryChannelRange): MessageSendEvent {
                const ret: number = bindings.MessageSendEvent_send_channel_range_query(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0 : CommonBase.get_ptr_of(msg) & ~1);
                const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret);
@@ -441,6 +500,9 @@ export class MessageSendEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new SendShortIdsQuery-variant MessageSendEvent
+        */
        public static constructor_send_short_ids_query(node_id: Uint8Array, msg: QueryShortChannelIds): MessageSendEvent {
                const ret: number = bindings.MessageSendEvent_send_short_ids_query(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0 : CommonBase.get_ptr_of(msg) & ~1);
                const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret);
@@ -448,6 +510,9 @@ export class MessageSendEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new SendReplyChannelRange-variant MessageSendEvent
+        */
        public static constructor_send_reply_channel_range(node_id: Uint8Array, msg: ReplyChannelRange): MessageSendEvent {
                const ret: number = bindings.MessageSendEvent_send_reply_channel_range(bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)), msg == null ? 0 : CommonBase.get_ptr_of(msg) & ~1);
                const ret_hu_conv: MessageSendEvent = MessageSendEvent.constr_from_ptr(ret);
@@ -456,8 +521,15 @@ export class MessageSendEvent extends CommonBase {
        }
 
 }
+/** A MessageSendEvent of type SendAcceptChannel */
 export class MessageSendEvent_SendAcceptChannel extends MessageSendEvent {
+       /**
+        * The node_id of the node which should receive this message
+        */
        public node_id: Uint8Array;
+       /**
+        * The message which should be sent.
+        */
        public msg: AcceptChannel;
        /* @internal */
        public constructor(ptr: number) {
@@ -471,8 +543,15 @@ export class MessageSendEvent_SendAcceptChannel extends MessageSendEvent {
                this.msg = msg_hu_conv;
        }
 }
+/** A MessageSendEvent of type SendOpenChannel */
 export class MessageSendEvent_SendOpenChannel extends MessageSendEvent {
+       /**
+        * The node_id of the node which should receive this message
+        */
        public node_id: Uint8Array;
+       /**
+        * The message which should be sent.
+        */
        public msg: OpenChannel;
        /* @internal */
        public constructor(ptr: number) {
@@ -486,8 +565,15 @@ export class MessageSendEvent_SendOpenChannel extends MessageSendEvent {
                this.msg = msg_hu_conv;
        }
 }
+/** A MessageSendEvent of type SendFundingCreated */
 export class MessageSendEvent_SendFundingCreated extends MessageSendEvent {
+       /**
+        * The node_id of the node which should receive this message
+        */
        public node_id: Uint8Array;
+       /**
+        * The message which should be sent.
+        */
        public msg: FundingCreated;
        /* @internal */
        public constructor(ptr: number) {
@@ -501,8 +587,15 @@ export class MessageSendEvent_SendFundingCreated extends MessageSendEvent {
                this.msg = msg_hu_conv;
        }
 }
+/** A MessageSendEvent of type SendFundingSigned */
 export class MessageSendEvent_SendFundingSigned extends MessageSendEvent {
+       /**
+        * The node_id of the node which should receive this message
+        */
        public node_id: Uint8Array;
+       /**
+        * The message which should be sent.
+        */
        public msg: FundingSigned;
        /* @internal */
        public constructor(ptr: number) {
@@ -516,8 +609,15 @@ export class MessageSendEvent_SendFundingSigned extends MessageSendEvent {
                this.msg = msg_hu_conv;
        }
 }
+/** A MessageSendEvent of type SendFundingLocked */
 export class MessageSendEvent_SendFundingLocked extends MessageSendEvent {
+       /**
+        * The node_id of the node which should receive these message(s)
+        */
        public node_id: Uint8Array;
+       /**
+        * The funding_locked message which should be sent.
+        */
        public msg: FundingLocked;
        /* @internal */
        public constructor(ptr: number) {
@@ -531,8 +631,15 @@ export class MessageSendEvent_SendFundingLocked extends MessageSendEvent {
                this.msg = msg_hu_conv;
        }
 }
+/** A MessageSendEvent of type SendAnnouncementSignatures */
 export class MessageSendEvent_SendAnnouncementSignatures extends MessageSendEvent {
+       /**
+        * The node_id of the node which should receive these message(s)
+        */
        public node_id: Uint8Array;
+       /**
+        * The announcement_signatures message which should be sent.
+        */
        public msg: AnnouncementSignatures;
        /* @internal */
        public constructor(ptr: number) {
@@ -546,8 +653,15 @@ export class MessageSendEvent_SendAnnouncementSignatures extends MessageSendEven
                this.msg = msg_hu_conv;
        }
 }
+/** A MessageSendEvent of type UpdateHTLCs */
 export class MessageSendEvent_UpdateHTLCs extends MessageSendEvent {
+       /**
+        * The node_id of the node which should receive these message(s)
+        */
        public node_id: Uint8Array;
+       /**
+        * The update messages which should be sent. ALL messages in the struct should be sent!
+        */
        public updates: CommitmentUpdate;
        /* @internal */
        public constructor(ptr: number) {
@@ -561,8 +675,15 @@ export class MessageSendEvent_UpdateHTLCs extends MessageSendEvent {
                this.updates = updates_hu_conv;
        }
 }
+/** A MessageSendEvent of type SendRevokeAndACK */
 export class MessageSendEvent_SendRevokeAndACK extends MessageSendEvent {
+       /**
+        * The node_id of the node which should receive this message
+        */
        public node_id: Uint8Array;
+       /**
+        * The message which should be sent.
+        */
        public msg: RevokeAndACK;
        /* @internal */
        public constructor(ptr: number) {
@@ -576,8 +697,15 @@ export class MessageSendEvent_SendRevokeAndACK extends MessageSendEvent {
                this.msg = msg_hu_conv;
        }
 }
+/** A MessageSendEvent of type SendClosingSigned */
 export class MessageSendEvent_SendClosingSigned extends MessageSendEvent {
+       /**
+        * The node_id of the node which should receive this message
+        */
        public node_id: Uint8Array;
+       /**
+        * The message which should be sent.
+        */
        public msg: ClosingSigned;
        /* @internal */
        public constructor(ptr: number) {
@@ -591,8 +719,15 @@ export class MessageSendEvent_SendClosingSigned extends MessageSendEvent {
                this.msg = msg_hu_conv;
        }
 }
+/** A MessageSendEvent of type SendShutdown */
 export class MessageSendEvent_SendShutdown extends MessageSendEvent {
+       /**
+        * The node_id of the node which should receive this message
+        */
        public node_id: Uint8Array;
+       /**
+        * The message which should be sent.
+        */
        public msg: Shutdown;
        /* @internal */
        public constructor(ptr: number) {
@@ -606,8 +741,15 @@ export class MessageSendEvent_SendShutdown extends MessageSendEvent {
                this.msg = msg_hu_conv;
        }
 }
+/** A MessageSendEvent of type SendChannelReestablish */
 export class MessageSendEvent_SendChannelReestablish extends MessageSendEvent {
+       /**
+        * The node_id of the node which should receive this message
+        */
        public node_id: Uint8Array;
+       /**
+        * The message which should be sent.
+        */
        public msg: ChannelReestablish;
        /* @internal */
        public constructor(ptr: number) {
@@ -621,8 +763,15 @@ export class MessageSendEvent_SendChannelReestablish extends MessageSendEvent {
                this.msg = msg_hu_conv;
        }
 }
+/** A MessageSendEvent of type BroadcastChannelAnnouncement */
 export class MessageSendEvent_BroadcastChannelAnnouncement extends MessageSendEvent {
+       /**
+        * The channel_announcement which should be sent.
+        */
        public msg: ChannelAnnouncement;
+       /**
+        * The followup channel_update which should be sent.
+        */
        public update_msg: ChannelUpdate;
        /* @internal */
        public constructor(ptr: number) {
@@ -637,7 +786,11 @@ export class MessageSendEvent_BroadcastChannelAnnouncement extends MessageSendEv
                this.update_msg = update_msg_hu_conv;
        }
 }
+/** A MessageSendEvent of type BroadcastNodeAnnouncement */
 export class MessageSendEvent_BroadcastNodeAnnouncement extends MessageSendEvent {
+       /**
+        * The node_announcement which should be sent.
+        */
        public msg: NodeAnnouncement;
        /* @internal */
        public constructor(ptr: number) {
@@ -648,7 +801,11 @@ export class MessageSendEvent_BroadcastNodeAnnouncement extends MessageSendEvent
                this.msg = msg_hu_conv;
        }
 }
+/** A MessageSendEvent of type BroadcastChannelUpdate */
 export class MessageSendEvent_BroadcastChannelUpdate extends MessageSendEvent {
+       /**
+        * The channel_update which should be sent.
+        */
        public msg: ChannelUpdate;
        /* @internal */
        public constructor(ptr: number) {
@@ -659,8 +816,15 @@ export class MessageSendEvent_BroadcastChannelUpdate extends MessageSendEvent {
                this.msg = msg_hu_conv;
        }
 }
+/** A MessageSendEvent of type SendChannelUpdate */
 export class MessageSendEvent_SendChannelUpdate extends MessageSendEvent {
+       /**
+        * The node_id of the node which should receive this message
+        */
        public node_id: Uint8Array;
+       /**
+        * The channel_update which should be sent.
+        */
        public msg: ChannelUpdate;
        /* @internal */
        public constructor(ptr: number) {
@@ -674,8 +838,15 @@ export class MessageSendEvent_SendChannelUpdate extends MessageSendEvent {
                this.msg = msg_hu_conv;
        }
 }
+/** A MessageSendEvent of type HandleError */
 export class MessageSendEvent_HandleError extends MessageSendEvent {
+       /**
+        * The node_id of the node which should receive this message
+        */
        public node_id: Uint8Array;
+       /**
+        * The action which should be taken.
+        */
        public action: ErrorAction;
        /* @internal */
        public constructor(ptr: number) {
@@ -689,8 +860,15 @@ export class MessageSendEvent_HandleError extends MessageSendEvent {
                this.action = action_hu_conv;
        }
 }
+/** A MessageSendEvent of type SendChannelRangeQuery */
 export class MessageSendEvent_SendChannelRangeQuery extends MessageSendEvent {
+       /**
+        * The node_id of this message recipient
+        */
        public node_id: Uint8Array;
+       /**
+        * The query_channel_range which should be sent.
+        */
        public msg: QueryChannelRange;
        /* @internal */
        public constructor(ptr: number) {
@@ -704,8 +882,15 @@ export class MessageSendEvent_SendChannelRangeQuery extends MessageSendEvent {
                this.msg = msg_hu_conv;
        }
 }
+/** A MessageSendEvent of type SendShortIdsQuery */
 export class MessageSendEvent_SendShortIdsQuery extends MessageSendEvent {
+       /**
+        * The node_id of this message recipient
+        */
        public node_id: Uint8Array;
+       /**
+        * The query_short_channel_ids which should be sent.
+        */
        public msg: QueryShortChannelIds;
        /* @internal */
        public constructor(ptr: number) {
@@ -719,8 +904,15 @@ export class MessageSendEvent_SendShortIdsQuery extends MessageSendEvent {
                this.msg = msg_hu_conv;
        }
 }
+/** A MessageSendEvent of type SendReplyChannelRange */
 export class MessageSendEvent_SendReplyChannelRange extends MessageSendEvent {
+       /**
+        * The node_id of this message recipient
+        */
        public node_id: Uint8Array;
+       /**
+        * The reply_channel_range which should be sent.
+        */
        public msg: ReplyChannelRange;
        /* @internal */
        public constructor(ptr: number) {