[TS] Update auto-generated TS bindings
[ldk-java] / ts / structs / DelayedPaymentOutputDescriptor.mts
index 7be78b7f6ee28c54f81c4ceb2d16c294146e0225..e20500f699acaaf59e2daa814d4f41b91904d253 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';
@@ -103,7 +106,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';
@@ -137,6 +140,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';
@@ -358,7 +362,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class DelayedPaymentOutputDescriptor extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: number) {
+       public constructor(_dummy: object, ptr: bigint) {
                super(ptr, bindings.DelayedPaymentOutputDescriptor_free);
        }
 
@@ -366,7 +370,7 @@ export class DelayedPaymentOutputDescriptor extends CommonBase {
         * The outpoint which is spendable
         */
        public get_outpoint(): OutPoint {
-               const ret: number = bindings.DelayedPaymentOutputDescriptor_get_outpoint(this.ptr);
+               const ret: bigint = bindings.DelayedPaymentOutputDescriptor_get_outpoint(this.ptr);
                const ret_hu_conv: OutPoint = new OutPoint(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, this);
                return ret_hu_conv;
@@ -376,7 +380,8 @@ export class DelayedPaymentOutputDescriptor extends CommonBase {
         * The outpoint which is spendable
         */
        public set_outpoint(val: OutPoint): void {
-               bindings.DelayedPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0 : CommonBase.get_ptr_of(val) & ~1);
+               bindings.DelayedPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
+               CommonBase.add_ref_from(this, val);
        }
 
        /**
@@ -412,6 +417,17 @@ export class DelayedPaymentOutputDescriptor extends CommonBase {
                bindings.DelayedPaymentOutputDescriptor_set_to_self_delay(this.ptr, val);
        }
 
+       /**
+        * The output which is referenced by the given outpoint
+        * 
+        * Returns a copy of the field.
+        */
+       public get_output(): TxOut {
+               const ret: bigint = bindings.DelayedPaymentOutputDescriptor_get_output(this.ptr);
+               const ret_conv: TxOut = new TxOut(null, ret);
+               return ret_conv;
+       }
+
        /**
         * The output which is referenced by the given outpoint
         */
@@ -476,14 +492,15 @@ export class DelayedPaymentOutputDescriptor extends CommonBase {
         * Constructs a new DelayedPaymentOutputDescriptor given each field
         */
        public static constructor_new(outpoint_arg: OutPoint, per_commitment_point_arg: Uint8Array, to_self_delay_arg: number, output_arg: TxOut, revocation_pubkey_arg: Uint8Array, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: bigint): DelayedPaymentOutputDescriptor {
-               const ret: number = bindings.DelayedPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : CommonBase.get_ptr_of(outpoint_arg) & ~1, bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point_arg, 33)), to_self_delay_arg, CommonBase.get_ptr_of(output_arg), bindings.encodeUint8Array(bindings.check_arr_len(revocation_pubkey_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(channel_keys_id_arg, 32)), channel_value_satoshis_arg);
+               const ret: bigint = bindings.DelayedPaymentOutputDescriptor_new(outpoint_arg == null ? 0n : CommonBase.get_ptr_of(outpoint_arg), bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point_arg, 33)), to_self_delay_arg, CommonBase.get_ptr_of(output_arg), bindings.encodeUint8Array(bindings.check_arr_len(revocation_pubkey_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(channel_keys_id_arg, 32)), channel_value_satoshis_arg);
                const ret_hu_conv: DelayedPaymentOutputDescriptor = new DelayedPaymentOutputDescriptor(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+               CommonBase.add_ref_from(ret_hu_conv, outpoint_arg);
                return ret_hu_conv;
        }
 
-       public clone_ptr(): number {
-               const ret: number = bindings.DelayedPaymentOutputDescriptor_clone_ptr(this.ptr);
+       public clone_ptr(): bigint {
+               const ret: bigint = bindings.DelayedPaymentOutputDescriptor_clone_ptr(this.ptr);
                return ret;
        }
 
@@ -491,7 +508,7 @@ export class DelayedPaymentOutputDescriptor extends CommonBase {
         * Creates a copy of the DelayedPaymentOutputDescriptor
         */
        public clone(): DelayedPaymentOutputDescriptor {
-               const ret: number = bindings.DelayedPaymentOutputDescriptor_clone(this.ptr);
+               const ret: bigint = bindings.DelayedPaymentOutputDescriptor_clone(this.ptr);
                const ret_hu_conv: DelayedPaymentOutputDescriptor = new DelayedPaymentOutputDescriptor(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, this);
                return ret_hu_conv;
@@ -510,7 +527,7 @@ export class DelayedPaymentOutputDescriptor extends CommonBase {
         * Read a DelayedPaymentOutputDescriptor from a byte array, created by DelayedPaymentOutputDescriptor_write
         */
        public static constructor_read(ser: Uint8Array): Result_DelayedPaymentOutputDescriptorDecodeErrorZ {
-               const ret: number = bindings.DelayedPaymentOutputDescriptor_read(bindings.encodeUint8Array(ser));
+               const ret: bigint = bindings.DelayedPaymentOutputDescriptor_read(bindings.encodeUint8Array(ser));
                const ret_hu_conv: Result_DelayedPaymentOutputDescriptorDecodeErrorZ = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }