X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FUnsignedChannelUpdate.ts;h=c509f73f7778ea1794bc3f58ef1f54db29fa25e4;hb=0fee03a8095f5599f8eccd920c1b1af6b3a20260;hp=133bc91f19d878843afb9d80fd01b06a91a2a4d7;hpb=fed2245c60159f6c074c9ed5c0f3ce273ad9841b;p=ldk-java diff --git a/ts/structs/UnsignedChannelUpdate.ts b/ts/structs/UnsignedChannelUpdate.ts index 133bc91f..c509f73f 100644 --- a/ts/structs/UnsignedChannelUpdate.ts +++ b/ts/structs/UnsignedChannelUpdate.ts @@ -18,20 +18,13 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.UnsignedChannelUpdate_free(this.ptr); } } - public UnsignedChannelUpdate clone() { - number ret = bindings.UnsignedChannelUpdate_clone(this.ptr); - const ret_hu_conv: UnsignedChannelUpdate = new UnsignedChannelUpdate(null, ret); - ret_hu_conv.ptrs_to.add(this); - return ret_hu_conv; - } - public Uint8Array get_chain_hash() { Uint8Array ret = bindings.UnsignedChannelUpdate_get_chain_hash(this.ptr); return ret; } public void set_chain_hash(Uint8Array val) { - bindings.UnsignedChannelUpdate_set_chain_hash(this.ptr, val); + bindings.UnsignedChannelUpdate_set_chain_hash(this.ptr, InternalUtils.check_arr_len(val, 32)); } public number get_short_channel_id() { @@ -97,6 +90,18 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.UnsignedChannelUpdate_set_fee_proportional_millionths(this.ptr, val); } + public number clone_ptr() { + number ret = bindings.UnsignedChannelUpdate_clone_ptr(this.ptr); + return ret; + } + + public UnsignedChannelUpdate clone() { + number ret = bindings.UnsignedChannelUpdate_clone(this.ptr); + const ret_hu_conv: UnsignedChannelUpdate = new UnsignedChannelUpdate(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + public Uint8Array write() { Uint8Array ret = bindings.UnsignedChannelUpdate_write(this.ptr); return ret;