X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FUpdateAddHTLC.ts;h=5622a5da3b69acaf386ed83ea56123288fc1694f;hb=f3e670e9341decac613d33fc52febf19cea32f20;hp=e4506a6b64a8f55d648596d2645217154cf97988;hpb=e30b350e325e7d517ea744578876d473839ad495;p=ldk-java diff --git a/ts/structs/UpdateAddHTLC.ts b/ts/structs/UpdateAddHTLC.ts index e4506a6b..5622a5da 100644 --- a/ts/structs/UpdateAddHTLC.ts +++ b/ts/structs/UpdateAddHTLC.ts @@ -24,7 +24,7 @@ import * as bindings from '../bindings' // TODO: figure out location } public void set_channel_id(Uint8Array val) { - bindings.UpdateAddHTLC_set_channel_id(this.ptr, val); + bindings.UpdateAddHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32)); } public number get_htlc_id() { @@ -51,7 +51,7 @@ import * as bindings from '../bindings' // TODO: figure out location } public void set_payment_hash(Uint8Array val) { - bindings.UpdateAddHTLC_set_payment_hash(this.ptr, val); + bindings.UpdateAddHTLC_set_payment_hash(this.ptr, InternalUtils.check_arr_len(val, 32)); } public number get_cltv_expiry() { @@ -63,6 +63,11 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.UpdateAddHTLC_set_cltv_expiry(this.ptr, val); } + public number clone_ptr() { + number ret = bindings.UpdateAddHTLC_clone_ptr(this.ptr); + return ret; + } + public UpdateAddHTLC clone() { number ret = bindings.UpdateAddHTLC_clone(this.ptr); const ret_hu_conv: UpdateAddHTLC = new UpdateAddHTLC(null, ret);