X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=blobdiff_plain;f=ts%2Fstructs%2FTrustedClosingTransaction.mts;h=2a64d9d7888c07a4466db256f384f9d75ef5241f;hp=cf5ff9fc8756ede01741cc75f0d4224c379c9e34;hb=7d372e434499e36b8be0d090ef733a03650dec6e;hpb=d87886bb194886ef86d3597a5cdc142b6ccc89e9 diff --git a/ts/structs/TrustedClosingTransaction.mts b/ts/structs/TrustedClosingTransaction.mts index cf5ff9fc..2a64d9d7 100644 --- a/ts/structs/TrustedClosingTransaction.mts +++ b/ts/structs/TrustedClosingTransaction.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 TrustedClosingTransaction extends CommonBase { @@ -289,18 +288,21 @@ export class TrustedClosingTransaction extends CommonBase { } public built_transaction(): Uint8Array { - const ret: Uint8Array = bindings.TrustedClosingTransaction_built_transaction(this.ptr); - return ret; + const ret: number = bindings.TrustedClosingTransaction_built_transaction(this.ptr); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; } - public get_sighash_all(funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array { - const ret: Uint8Array = bindings.TrustedClosingTransaction_get_sighash_all(this.ptr, funding_redeemscript, channel_value_satoshis); - return ret; + public get_sighash_all(funding_redeemscript: Uint8Array, channel_value_satoshis: bigint): Uint8Array { + const ret: number = bindings.TrustedClosingTransaction_get_sighash_all(this.ptr, bindings.encodeUint8Array(funding_redeemscript), channel_value_satoshis); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; } - public sign(funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array { - const ret: Uint8Array = bindings.TrustedClosingTransaction_sign(this.ptr, InternalUtils.check_arr_len(funding_key, 32), funding_redeemscript, channel_value_satoshis); - return ret; + public sign(funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: bigint): Uint8Array { + const ret: number = bindings.TrustedClosingTransaction_sign(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(funding_key, 32)), bindings.encodeUint8Array(funding_redeemscript), channel_value_satoshis); + const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); + return ret_conv; } }