X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FTrustedCommitmentTransaction.ts;h=cb0c2bfc8f6a17e7d03e1416d87b975e8e9a86de;hb=0fee03a8095f5599f8eccd920c1b1af6b3a20260;hp=b40e528eebb45d410bf76cab890b9aa98d2f0c79;hpb=22f5f4208b1f3b5542292250f1612b944f5cd7fd;p=ldk-java diff --git a/ts/structs/TrustedCommitmentTransaction.ts b/ts/structs/TrustedCommitmentTransaction.ts index b40e528e..cb0c2bfc 100644 --- a/ts/structs/TrustedCommitmentTransaction.ts +++ b/ts/structs/TrustedCommitmentTransaction.ts @@ -26,17 +26,24 @@ import * as bindings from '../bindings' // TODO: figure out location public BuiltCommitmentTransaction built_transaction() { number ret = bindings.TrustedCommitmentTransaction_built_transaction(this.ptr); const ret_hu_conv: BuiltCommitmentTransaction = new BuiltCommitmentTransaction(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } public TxCreationKeys keys() { number ret = bindings.TrustedCommitmentTransaction_keys(this.ptr); const ret_hu_conv: TxCreationKeys = new TxCreationKeys(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } + public boolean opt_anchors() { + boolean ret = bindings.TrustedCommitmentTransaction_opt_anchors(this.ptr); + return ret; + } + public Result_CVec_SignatureZNoneZ get_htlc_sigs(Uint8Array htlc_base_key, DirectedChannelTransactionParameters channel_parameters) { - number ret = bindings.TrustedCommitmentTransaction_get_htlc_sigs(this.ptr, htlc_base_key, channel_parameters == null ? 0 : channel_parameters.ptr & ~1); + number ret = bindings.TrustedCommitmentTransaction_get_htlc_sigs(this.ptr, InternalUtils.check_arr_len(htlc_base_key, 32), channel_parameters == null ? 0 : channel_parameters.ptr & ~1); Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret); this.ptrs_to.add(channel_parameters); return ret_hu_conv;