Update auto-generated bindings
[ldk-java] / ts / structs / Event.ts
index 110456b099268f9eefaef08ffe4b6a232eace1ab..7e6d6e31cec519e84a1d6fc03cab453440b0ad34 100644 (file)
@@ -13,9 +13,6 @@ export default class Event extends CommonBase {
                if (raw_val instanceof bindings.LDKEvent.FundingGenerationReady) {
                        return new FundingGenerationReady(this.ptr, raw_val);
                }
-               if (raw_val instanceof bindings.LDKEvent.FundingBroadcastSafe) {
-                       return new FundingBroadcastSafe(this.ptr, raw_val);
-               }
                if (raw_val instanceof bindings.LDKEvent.PaymentReceived) {
                        return new PaymentReceived(this.ptr, raw_val);
                }
@@ -48,18 +45,6 @@ export class FundingGenerationReady extends Event {
                this.user_channel_id = obj.user_channel_id;
        }
 }
-export class FundingBroadcastSafe extends Event {
-       public funding_txo: OutPoint;
-       public user_channel_id: number;
-       private constructor(ptr: number, obj: bindings.LDKEvent.FundingBroadcastSafe) {
-               super(null, ptr);
-               const funding_txo: number = obj.funding_txo;
-               const funding_txo_hu_conv: OutPoint = new OutPoint(null, funding_txo);
-                       funding_txo_hu_conv.ptrs_to.add(this);
-               this.funding_txo = funding_txo_hu_conv;
-               this.user_channel_id = obj.user_channel_id;
-       }
-}
 export class PaymentReceived extends Event {
        public payment_hash: Uint8Array;
        public payment_secret: Uint8Array;
@@ -99,13 +84,26 @@ export class SpendableOutputs extends Event {
        private constructor(ptr: number, obj: bindings.LDKEvent.SpendableOutputs) {
                super(null, ptr);
                const outputs: number[] = obj.outputs;
-               SpendableOutputDescriptor[] arr_conv_27_arr = new SpendableOutputDescriptor[outputs.length];
+               SpendableOutputDescriptor[] outputs_conv_27_arr = new SpendableOutputDescriptor[outputs.length];
                        for (int b = 0; b < outputs.length; b++) {
-                               number arr_conv_27 = outputs[b];
-                               SpendableOutputDescriptor arr_conv_27_hu_conv = SpendableOutputDescriptor.constr_from_ptr(arr_conv_27);
-                               arr_conv_27_hu_conv.ptrs_to.add(this);
-                               arr_conv_27_arr[b] = arr_conv_27_hu_conv;
+                               number outputs_conv_27 = outputs[b];
+                               SpendableOutputDescriptor outputs_conv_27_hu_conv = SpendableOutputDescriptor.constr_from_ptr(outputs_conv_27);
+                               outputs_conv_27_hu_conv.ptrs_to.add(this);
+                               outputs_conv_27_arr[b] = outputs_conv_27_hu_conv;
                        }
-               this.outputs = arr_conv_27_arr;
+               this.outputs = outputs_conv_27_arr;
        }
+}
+       public Event clone() {
+               number ret = bindings.Event_clone(this.ptr);
+               Event ret_hu_conv = Event.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public Uint8Array write() {
+               Uint8Array ret = bindings.Event_write(this.ptr);
+               return ret;
+       }
+
 }