X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=blobdiff_plain;f=ts%2Fstructs%2FTrustedCommitmentTransaction.mts;fp=ts%2Fstructs%2FTrustedCommitmentTransaction.mts;h=6cda7b97e776d30f08173e7199cba6747d897379;hp=0ce0b42566e69fd881776d81cd32576e1e5d5f78;hb=7d372e434499e36b8be0d090ef733a03650dec6e;hpb=d87886bb194886ef86d3597a5cdc142b6ccc89e9 diff --git a/ts/structs/TrustedCommitmentTransaction.mts b/ts/structs/TrustedCommitmentTransaction.mts index 0ce0b425..6cda7b97 100644 --- a/ts/structs/TrustedCommitmentTransaction.mts +++ b/ts/structs/TrustedCommitmentTransaction.mts @@ -279,7 +279,6 @@ import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScor import CommonBase from './CommonBase.mjs'; import * as bindings from '../bindings.mjs' -import * as InternalUtils from '../InternalUtils.mjs' export class TrustedCommitmentTransaction extends CommonBase { @@ -289,8 +288,9 @@ export class TrustedCommitmentTransaction extends CommonBase { } public txid(): Uint8Array { - const ret: Uint8Array = bindings.TrustedCommitmentTransaction_txid(this.ptr); - return ret; + const ret: number = bindings.TrustedCommitmentTransaction_txid(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; } public built_transaction(): BuiltCommitmentTransaction { @@ -313,7 +313,7 @@ export class TrustedCommitmentTransaction extends CommonBase { } public get_htlc_sigs(htlc_base_key: Uint8Array, channel_parameters: DirectedChannelTransactionParameters): Result_CVec_SignatureZNoneZ { - const ret: number = bindings.TrustedCommitmentTransaction_get_htlc_sigs(this.ptr, InternalUtils.check_arr_len(htlc_base_key, 32), channel_parameters == null ? 0 : CommonBase.get_ptr_of(channel_parameters) & ~1); + const ret: number = bindings.TrustedCommitmentTransaction_get_htlc_sigs(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(htlc_base_key, 32)), channel_parameters == null ? 0 : CommonBase.get_ptr_of(channel_parameters) & ~1); const ret_hu_conv: Result_CVec_SignatureZNoneZ = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret); CommonBase.add_ref_from(this, channel_parameters); return ret_hu_conv;