[TS] Update auto-generated TS bindings
[ldk-java] / ts / structs / CommitmentSigned.mts
index 9ac4168b1facc7294fb0d9865e7aa78d0b7f7dc2..bef79688a4663c80dc2777c75304c2ca761d790f 100644 (file)
@@ -67,6 +67,9 @@ import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurp
 import { ClosureReason } from '../structs/ClosureReason.mjs';
 import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs';
 import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs';
+import { HTLCDestination } from '../structs/HTLCDestination.mjs';
+import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs';
+import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs';
 import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
 import { NetworkUpdate } from '../structs/NetworkUpdate.mjs';
 import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs';
@@ -104,7 +107,7 @@ import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransaction
 import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
-import { TwoTuple_OutPointCVec_MonitorEventZZ } from '../structs/TwoTuple_OutPointCVec_MonitorEventZZ.mjs';
+import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
 import { Option_C2Tuple_usizeTransactionZZ } from '../structs/Option_C2Tuple_usizeTransactionZZ.mjs';
 import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
 import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
@@ -138,6 +141,7 @@ import { ChannelInfo } from '../structs/ChannelInfo.mjs';
 import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs';
 import { RoutingFees } from '../structs/RoutingFees.mjs';
 import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs';
+import { Hostname } from '../structs/Hostname.mjs';
 import { NetAddress } from '../structs/NetAddress.mjs';
 import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
 import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
@@ -357,7 +361,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class CommitmentSigned extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: number) {
+       public constructor(_dummy: object, ptr: bigint) {
                super(ptr, bindings.CommitmentSigned_free);
        }
 
@@ -393,6 +397,24 @@ export class CommitmentSigned extends CommonBase {
                bindings.CommitmentSigned_set_signature(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 64)));
        }
 
+       /**
+        * Signatures on the HTLC transactions
+        * 
+        * Returns a copy of the field.
+        */
+       public get_htlc_signatures(): Uint8Array[] {
+               const ret: number = bindings.CommitmentSigned_get_htlc_signatures(this.ptr);
+               const ret_conv_12_len: number = bindings.getArrayLength(ret);
+               const ret_conv_12_arr: Uint8Array[] = new Array(ret_conv_12_len).fill(null);
+               for (var m = 0; m < ret_conv_12_len; m++) {
+                       const ret_conv_12: number = bindings.getU32ArrayElem(ret, m);
+                       const ret_conv_12_conv: Uint8Array = bindings.decodeUint8Array(ret_conv_12);
+                       ret_conv_12_arr[m] = ret_conv_12_conv;
+               }
+               bindings.freeWasmMemory(ret)
+               return ret_conv_12_arr;
+       }
+
        /**
         * Signatures on the HTLC transactions
         */
@@ -404,14 +426,14 @@ export class CommitmentSigned extends CommonBase {
         * Constructs a new CommitmentSigned given each field
         */
        public static constructor_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): CommitmentSigned {
-               const ret: number = bindings.CommitmentSigned_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), bindings.encodeUint8Array(bindings.check_arr_len(signature_arg, 64)), bindings.encodeUint32Array(htlc_signatures_arg != null ? htlc_signatures_arg.map(htlc_signatures_arg_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(htlc_signatures_arg_conv_12, 64))) : null));
+               const ret: bigint = bindings.CommitmentSigned_new(bindings.encodeUint8Array(bindings.check_arr_len(channel_id_arg, 32)), bindings.encodeUint8Array(bindings.check_arr_len(signature_arg, 64)), bindings.encodeUint32Array(htlc_signatures_arg != null ? htlc_signatures_arg.map(htlc_signatures_arg_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(htlc_signatures_arg_conv_12, 64))) : null));
                const ret_hu_conv: CommitmentSigned = new CommitmentSigned(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
                return ret_hu_conv;
        }
 
-       public clone_ptr(): number {
-               const ret: number = bindings.CommitmentSigned_clone_ptr(this.ptr);
+       public clone_ptr(): bigint {
+               const ret: bigint = bindings.CommitmentSigned_clone_ptr(this.ptr);
                return ret;
        }
 
@@ -419,7 +441,7 @@ export class CommitmentSigned extends CommonBase {
         * Creates a copy of the CommitmentSigned
         */
        public clone(): CommitmentSigned {
-               const ret: number = bindings.CommitmentSigned_clone(this.ptr);
+               const ret: bigint = bindings.CommitmentSigned_clone(this.ptr);
                const ret_hu_conv: CommitmentSigned = new CommitmentSigned(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, this);
                return ret_hu_conv;
@@ -438,7 +460,7 @@ export class CommitmentSigned extends CommonBase {
         * Read a CommitmentSigned from a byte array, created by CommitmentSigned_write
         */
        public static constructor_read(ser: Uint8Array): Result_CommitmentSignedDecodeErrorZ {
-               const ret: number = bindings.CommitmentSigned_read(bindings.encodeUint8Array(ser));
+               const ret: bigint = bindings.CommitmentSigned_read(bindings.encodeUint8Array(ser));
                const ret_hu_conv: Result_CommitmentSignedDecodeErrorZ = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }