Merge pull request #29 from TheBlueMatt/main
[ldk-java] / ts / structs / MessageSendEvent.ts
index 7c8ebdfaf782cf8f2fb0cf53156389586c35cac0..b5b708c1ee0f94597b610a6a1f746ccee69815f1 100644 (file)
@@ -52,6 +52,9 @@ export default class MessageSendEvent extends CommonBase {
                if (raw_val instanceof bindings.LDKMessageSendEvent.BroadcastChannelUpdate) {
                        return new BroadcastChannelUpdate(this.ptr, raw_val);
                }
+               if (raw_val instanceof bindings.LDKMessageSendEvent.SendChannelUpdate) {
+                       return new SendChannelUpdate(this.ptr, raw_val);
+               }
                if (raw_val instanceof bindings.LDKMessageSendEvent.HandleError) {
                        return new HandleError(this.ptr, raw_val);
                }
@@ -64,6 +67,9 @@ export default class MessageSendEvent extends CommonBase {
                if (raw_val instanceof bindings.LDKMessageSendEvent.SendShortIdsQuery) {
                        return new SendShortIdsQuery(this.ptr, raw_val);
                }
+               if (raw_val instanceof bindings.LDKMessageSendEvent.SendReplyChannelRange) {
+                       return new SendReplyChannelRange(this.ptr, raw_val);
+               }
                throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
        }
 
@@ -235,6 +241,18 @@ export class BroadcastChannelUpdate extends MessageSendEvent {
                this.msg = msg_hu_conv;
        }
 }
+export class SendChannelUpdate extends MessageSendEvent {
+       public node_id: Uint8Array;
+       public msg: ChannelUpdate;
+       private constructor(ptr: number, obj: bindings.LDKMessageSendEvent.SendChannelUpdate) {
+               super(null, ptr);
+               this.node_id = obj.node_id;
+               const msg: number = obj.msg;
+               const msg_hu_conv: ChannelUpdate = new ChannelUpdate(null, msg);
+                       msg_hu_conv.ptrs_to.add(this);
+               this.msg = msg_hu_conv;
+       }
+}
 export class HandleError extends MessageSendEvent {
        public node_id: Uint8Array;
        public action: ErrorAction;
@@ -281,3 +299,23 @@ export class SendShortIdsQuery extends MessageSendEvent {
                this.msg = msg_hu_conv;
        }
 }
+export class SendReplyChannelRange extends MessageSendEvent {
+       public node_id: Uint8Array;
+       public msg: ReplyChannelRange;
+       private constructor(ptr: number, obj: bindings.LDKMessageSendEvent.SendReplyChannelRange) {
+               super(null, ptr);
+               this.node_id = obj.node_id;
+               const msg: number = obj.msg;
+               const msg_hu_conv: ReplyChannelRange = new ReplyChannelRange(null, msg);
+                       msg_hu_conv.ptrs_to.add(this);
+               this.msg = msg_hu_conv;
+       }
+}
+       public MessageSendEvent clone() {
+               number ret = bindings.MessageSendEvent_clone(this.ptr);
+               MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+}