Bindings updates
[ldk-java] / ts / structs / CommitmentUpdate.ts
index 0a11f39eb79b0391dc057dd78a8170cbf1be35d2..3564c6991a4a57d9a242869fc852c2c082a0542d 100644 (file)
@@ -21,6 +21,7 @@ import * as bindings from '../bindings' // TODO: figure out location
        public CommitmentUpdate clone() {
                number ret = bindings.CommitmentUpdate_clone(this.ptr);
                const ret_hu_conv: CommitmentUpdate = new CommitmentUpdate(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
@@ -47,6 +48,7 @@ import * as bindings from '../bindings' // TODO: figure out location
        public UpdateFee get_update_fee() {
                number ret = bindings.CommitmentUpdate_get_update_fee(this.ptr);
                const ret_hu_conv: UpdateFee = new UpdateFee(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
@@ -58,6 +60,7 @@ import * as bindings from '../bindings' // TODO: figure out location
        public CommitmentSigned get_commitment_signed() {
                number ret = bindings.CommitmentUpdate_get_commitment_signed(this.ptr);
                const ret_hu_conv: CommitmentSigned = new CommitmentSigned(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
@@ -69,6 +72,7 @@ import * as bindings from '../bindings' // TODO: figure out location
        public static CommitmentUpdate constructor_new(UpdateAddHTLC[] update_add_htlcs_arg, UpdateFulfillHTLC[] update_fulfill_htlcs_arg, UpdateFailHTLC[] update_fail_htlcs_arg, UpdateFailMalformedHTLC[] update_fail_malformed_htlcs_arg, UpdateFee update_fee_arg, CommitmentSigned commitment_signed_arg) {
                number ret = bindings.CommitmentUpdate_new((number[])Arrays.stream(update_add_htlcs_arg).map(arr_conv_15 -> arr_conv_15 == null ? 0 : arr_conv_15.ptr & ~1).toArray(), (number[])Arrays.stream(update_fulfill_htlcs_arg).map(arr_conv_19 -> arr_conv_19 == null ? 0 : arr_conv_19.ptr & ~1).toArray(), (number[])Arrays.stream(update_fail_htlcs_arg).map(arr_conv_16 -> arr_conv_16 == null ? 0 : arr_conv_16.ptr & ~1).toArray(), (number[])Arrays.stream(update_fail_malformed_htlcs_arg).map(arr_conv_25 -> arr_conv_25 == null ? 0 : arr_conv_25.ptr & ~1).toArray(), update_fee_arg == null ? 0 : update_fee_arg.ptr & ~1, commitment_signed_arg == null ? 0 : commitment_signed_arg.ptr & ~1);
                const ret_hu_conv: CommitmentUpdate = new CommitmentUpdate(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
                /* TODO 2 UpdateAddHTLC  */;
                /* TODO 2 UpdateFulfillHTLC  */;
                /* TODO 2 UpdateFailHTLC  */;