X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FErrorMessage.ts;h=755f7122be06a3bb54172169946078c7841ab89f;hb=f3e670e9341decac613d33fc52febf19cea32f20;hp=e85c775b8a935db4aafb6ef8fb093743b64ae87f;hpb=e30b350e325e7d517ea744578876d473839ad495;p=ldk-java diff --git a/ts/structs/ErrorMessage.ts b/ts/structs/ErrorMessage.ts index e85c775b..755f7122 100644 --- a/ts/structs/ErrorMessage.ts +++ b/ts/structs/ErrorMessage.ts @@ -24,7 +24,7 @@ import * as bindings from '../bindings' // TODO: figure out location } public void set_channel_id(Uint8Array val) { - bindings.ErrorMessage_set_channel_id(this.ptr, val); + bindings.ErrorMessage_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); } public String get_data() { @@ -37,12 +37,17 @@ import * as bindings from '../bindings' // TODO: figure out location } public static ErrorMessage constructor_new(Uint8Array channel_id_arg, String data_arg) { - number ret = bindings.ErrorMessage_new(channel_id_arg, data_arg); + number ret = bindings.ErrorMessage_new(InternalUtils.check_arr_len(channel_id_arg, 32), data_arg); const ret_hu_conv: ErrorMessage = new ErrorMessage(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; } + public number clone_ptr() { + number ret = bindings.ErrorMessage_clone_ptr(this.ptr); + return ret; + } + public ErrorMessage clone() { number ret = bindings.ErrorMessage_clone(this.ptr); const ret_hu_conv: ErrorMessage = new ErrorMessage(null, ret);