X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FChannelUpdate.ts;h=c59b6116b45d0fc9fbb8d4bebb3e73105fca1199;hb=f3e670e9341decac613d33fc52febf19cea32f20;hp=a7a09748fdfe2abde4f46c74b107ccb63be94833;hpb=e30b350e325e7d517ea744578876d473839ad495;p=ldk-java diff --git a/ts/structs/ChannelUpdate.ts b/ts/structs/ChannelUpdate.ts index a7a09748..c59b6116 100644 --- a/ts/structs/ChannelUpdate.ts +++ b/ts/structs/ChannelUpdate.ts @@ -24,7 +24,7 @@ import * as bindings from '../bindings' // TODO: figure out location } public void set_signature(Uint8Array val) { - bindings.ChannelUpdate_set_signature(this.ptr, val); + bindings.ChannelUpdate_set_signature(this.ptr, InternalUtils.check_arr_len(val, 64)); } public UnsignedChannelUpdate get_contents() { @@ -39,12 +39,17 @@ import * as bindings from '../bindings' // TODO: figure out location } public static ChannelUpdate constructor_new(Uint8Array signature_arg, UnsignedChannelUpdate contents_arg) { - number ret = bindings.ChannelUpdate_new(signature_arg, contents_arg == null ? 0 : contents_arg.ptr & ~1); + number ret = bindings.ChannelUpdate_new(InternalUtils.check_arr_len(signature_arg, 64), contents_arg == null ? 0 : contents_arg.ptr & ~1); const ret_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; } + public number clone_ptr() { + number ret = bindings.ChannelUpdate_clone_ptr(this.ptr); + return ret; + } + public ChannelUpdate clone() { number ret = bindings.ChannelUpdate_clone(this.ptr); const ret_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret);