X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FCommitmentUpdate.ts;h=0c7e3dbc1382c576a4c6b842ff8c43429efbe303;hb=f3e670e9341decac613d33fc52febf19cea32f20;hp=2c1f0e658a487b4d2048e0c6e70366cba48454e3;hpb=7d6be8a5ef72a4ebfe07660cce55f43f6cc30b80;p=ldk-java diff --git a/ts/structs/CommitmentUpdate.ts b/ts/structs/CommitmentUpdate.ts index 2c1f0e65..0c7e3dbc 100644 --- a/ts/structs/CommitmentUpdate.ts +++ b/ts/structs/CommitmentUpdate.ts @@ -32,7 +32,6 @@ import * as bindings from '../bindings' // TODO: figure out location public void set_update_add_htlcs(UpdateAddHTLC[] val) { bindings.CommitmentUpdate_set_update_add_htlcs(this.ptr, val != null ? Arrays.stream(val).map(val_conv_15 -> val_conv_15 == null ? 0 : val_conv_15.ptr & ~1).toArray(number[]::new) : null); - for (UpdateAddHTLC val_conv_15: val) { this.ptrs_to.add(val_conv_15); }; } public UpdateFulfillHTLC[] get_update_fulfill_htlcs() { @@ -49,7 +48,6 @@ import * as bindings from '../bindings' // TODO: figure out location public void set_update_fulfill_htlcs(UpdateFulfillHTLC[] val) { bindings.CommitmentUpdate_set_update_fulfill_htlcs(this.ptr, val != null ? Arrays.stream(val).map(val_conv_19 -> val_conv_19 == null ? 0 : val_conv_19.ptr & ~1).toArray(number[]::new) : null); - for (UpdateFulfillHTLC val_conv_19: val) { this.ptrs_to.add(val_conv_19); }; } public UpdateFailHTLC[] get_update_fail_htlcs() { @@ -66,7 +64,6 @@ import * as bindings from '../bindings' // TODO: figure out location public void set_update_fail_htlcs(UpdateFailHTLC[] val) { bindings.CommitmentUpdate_set_update_fail_htlcs(this.ptr, val != null ? Arrays.stream(val).map(val_conv_16 -> val_conv_16 == null ? 0 : val_conv_16.ptr & ~1).toArray(number[]::new) : null); - for (UpdateFailHTLC val_conv_16: val) { this.ptrs_to.add(val_conv_16); }; } public UpdateFailMalformedHTLC[] get_update_fail_malformed_htlcs() { @@ -83,7 +80,6 @@ import * as bindings from '../bindings' // TODO: figure out location public void set_update_fail_malformed_htlcs(UpdateFailMalformedHTLC[] val) { bindings.CommitmentUpdate_set_update_fail_malformed_htlcs(this.ptr, val != null ? Arrays.stream(val).map(val_conv_25 -> val_conv_25 == null ? 0 : val_conv_25.ptr & ~1).toArray(number[]::new) : null); - for (UpdateFailMalformedHTLC val_conv_25: val) { this.ptrs_to.add(val_conv_25); }; } public UpdateFee get_update_fee() { @@ -95,7 +91,6 @@ import * as bindings from '../bindings' // TODO: figure out location public void set_update_fee(UpdateFee val) { bindings.CommitmentUpdate_set_update_fee(this.ptr, val == null ? 0 : val.ptr & ~1); - this.ptrs_to.add(val); } public CommitmentSigned get_commitment_signed() { @@ -107,22 +102,20 @@ import * as bindings from '../bindings' // TODO: figure out location public void set_commitment_signed(CommitmentSigned val) { bindings.CommitmentUpdate_set_commitment_signed(this.ptr, val == null ? 0 : val.ptr & ~1); - this.ptrs_to.add(val); } 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(update_add_htlcs_arg != null ? Arrays.stream(update_add_htlcs_arg).map(update_add_htlcs_arg_conv_15 -> update_add_htlcs_arg_conv_15 == null ? 0 : update_add_htlcs_arg_conv_15.ptr & ~1).toArray(number[]::new) : null, update_fulfill_htlcs_arg != null ? Arrays.stream(update_fulfill_htlcs_arg).map(update_fulfill_htlcs_arg_conv_19 -> update_fulfill_htlcs_arg_conv_19 == null ? 0 : update_fulfill_htlcs_arg_conv_19.ptr & ~1).toArray(number[]::new) : null, update_fail_htlcs_arg != null ? Arrays.stream(update_fail_htlcs_arg).map(update_fail_htlcs_arg_conv_16 -> update_fail_htlcs_arg_conv_16 == null ? 0 : update_fail_htlcs_arg_conv_16.ptr & ~1).toArray(number[]::new) : null, update_fail_malformed_htlcs_arg != null ? Arrays.stream(update_fail_malformed_htlcs_arg).map(update_fail_malformed_htlcs_arg_conv_25 -> update_fail_malformed_htlcs_arg_conv_25 == null ? 0 : update_fail_malformed_htlcs_arg_conv_25.ptr & ~1).toArray(number[]::new) : null, 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); - for (UpdateAddHTLC update_add_htlcs_arg_conv_15: update_add_htlcs_arg) { ret_hu_conv.ptrs_to.add(update_add_htlcs_arg_conv_15); }; - for (UpdateFulfillHTLC update_fulfill_htlcs_arg_conv_19: update_fulfill_htlcs_arg) { ret_hu_conv.ptrs_to.add(update_fulfill_htlcs_arg_conv_19); }; - for (UpdateFailHTLC update_fail_htlcs_arg_conv_16: update_fail_htlcs_arg) { ret_hu_conv.ptrs_to.add(update_fail_htlcs_arg_conv_16); }; - for (UpdateFailMalformedHTLC update_fail_malformed_htlcs_arg_conv_25: update_fail_malformed_htlcs_arg) { ret_hu_conv.ptrs_to.add(update_fail_malformed_htlcs_arg_conv_25); }; - ret_hu_conv.ptrs_to.add(update_fee_arg); - ret_hu_conv.ptrs_to.add(commitment_signed_arg); return ret_hu_conv; } + public number clone_ptr() { + number ret = bindings.CommitmentUpdate_clone_ptr(this.ptr); + return ret; + } + public CommitmentUpdate clone() { number ret = bindings.CommitmentUpdate_clone(this.ptr); const ret_hu_conv: CommitmentUpdate = new CommitmentUpdate(null, ret);