X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=blobdiff_plain;f=ts%2Fstructs%2FTxOut.mts;h=84bceadde81af1c1b3b3aabb9b20505273f78dd9;hp=6ef2ecba6557c470c07f20554a5fcd1587cf988a;hb=7d372e434499e36b8be0d090ef733a03650dec6e;hpb=d87886bb194886ef86d3597a5cdc142b6ccc89e9 diff --git a/ts/structs/TxOut.mts b/ts/structs/TxOut.mts index 6ef2ecba..84bceadd 100644 --- a/ts/structs/TxOut.mts +++ b/ts/structs/TxOut.mts @@ -279,21 +279,20 @@ import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScor import CommonBase from './CommonBase.mjs'; import * as bindings from '../bindings.mjs' -import * as InternalUtils from '../InternalUtils.mjs' export class TxOut extends CommonBase { /** The script_pubkey in this output */ public script_pubkey: Uint8Array; /** The value, in satoshis, of this output */ - public value: number; + public value: bigint; /* @internal */ public constructor(_dummy: object, ptr: number) { super(ptr, bindings.TxOut_free); - this.script_pubkey = bindings.TxOut_get_script_pubkey(ptr); + this.script_pubkey = bindings.decodeUint8Array(bindings.TxOut_get_script_pubkey(ptr)); this.value = bindings.TxOut_get_value(ptr); } - public constructor_new(value: number, script_pubkey: Uint8Array): TxOut { - return new TxOut(null, bindings.TxOut_new(script_pubkey, value)); + public constructor_new(value: bigint, script_pubkey: Uint8Array): TxOut { + return new TxOut(null, bindings.TxOut_new(bindings.encodeUint8Array(script_pubkey), value)); } } \ No newline at end of file