X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FUpdateFailMalformedHTLC.ts;h=3b894fb18f3c2a60ea125349cf392511c7d19506;hb=0fee03a8095f5599f8eccd920c1b1af6b3a20260;hp=10072c0998d68783168dc532603beab66555b5a3;hpb=22f5f4208b1f3b5542292250f1612b944f5cd7fd;p=ldk-java diff --git a/ts/structs/UpdateFailMalformedHTLC.ts b/ts/structs/UpdateFailMalformedHTLC.ts index 10072c09..3b894fb1 100644 --- a/ts/structs/UpdateFailMalformedHTLC.ts +++ b/ts/structs/UpdateFailMalformedHTLC.ts @@ -18,19 +18,13 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.UpdateFailMalformedHTLC_free(this.ptr); } } - public UpdateFailMalformedHTLC clone() { - number ret = bindings.UpdateFailMalformedHTLC_clone(this.ptr); - const ret_hu_conv: UpdateFailMalformedHTLC = new UpdateFailMalformedHTLC(null, ret); - return ret_hu_conv; - } - public Uint8Array get_channel_id() { Uint8Array ret = bindings.UpdateFailMalformedHTLC_get_channel_id(this.ptr); return ret; } public void set_channel_id(Uint8Array val) { - bindings.UpdateFailMalformedHTLC_set_channel_id(this.ptr, val); + bindings.UpdateFailMalformedHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); } public number get_htlc_id() { @@ -51,14 +45,26 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.UpdateFailMalformedHTLC_set_failure_code(this.ptr, val); } + public number clone_ptr() { + number ret = bindings.UpdateFailMalformedHTLC_clone_ptr(this.ptr); + return ret; + } + + public UpdateFailMalformedHTLC clone() { + number ret = bindings.UpdateFailMalformedHTLC_clone(this.ptr); + const ret_hu_conv: UpdateFailMalformedHTLC = new UpdateFailMalformedHTLC(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + public Uint8Array write() { Uint8Array ret = bindings.UpdateFailMalformedHTLC_write(this.ptr); return ret; } - public static UpdateFailMalformedHTLC constructor_read(Uint8Array ser) { + public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor_read(Uint8Array ser) { number ret = bindings.UpdateFailMalformedHTLC_read(ser); - const ret_hu_conv: UpdateFailMalformedHTLC = new UpdateFailMalformedHTLC(null, ret); + Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; }