[TS] Update auto-generated TS bindings
[ldk-java] / ts / structs / UserConfig.mts
index f34ffc41ab50323c7bafea39094c70bc10359ddc..219fea8fba85c5d6f148331c3d4ac7841034e96d 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';
@@ -360,7 +364,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class UserConfig extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: number) {
+       public constructor(_dummy: object, ptr: bigint) {
                super(ptr, bindings.UserConfig_free);
        }
 
@@ -368,7 +372,7 @@ export class UserConfig extends CommonBase {
         * Channel handshake config that we propose to our counterparty.
         */
        public get_channel_handshake_config(): ChannelHandshakeConfig {
-               const ret: number = bindings.UserConfig_get_channel_handshake_config(this.ptr);
+               const ret: bigint = bindings.UserConfig_get_channel_handshake_config(this.ptr);
                const ret_hu_conv: ChannelHandshakeConfig = new ChannelHandshakeConfig(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, this);
                return ret_hu_conv;
@@ -378,14 +382,15 @@ export class UserConfig extends CommonBase {
         * Channel handshake config that we propose to our counterparty.
         */
        public set_channel_handshake_config(val: ChannelHandshakeConfig): void {
-               bindings.UserConfig_set_channel_handshake_config(this.ptr, val == null ? 0 : CommonBase.get_ptr_of(val) & ~1);
+               bindings.UserConfig_set_channel_handshake_config(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
+               CommonBase.add_ref_from(this, val);
        }
 
        /**
         * Limits applied to our counterparty's proposed channel handshake config settings.
         */
        public get_channel_handshake_limits(): ChannelHandshakeLimits {
-               const ret: number = bindings.UserConfig_get_channel_handshake_limits(this.ptr);
+               const ret: bigint = bindings.UserConfig_get_channel_handshake_limits(this.ptr);
                const ret_hu_conv: ChannelHandshakeLimits = new ChannelHandshakeLimits(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, this);
                return ret_hu_conv;
@@ -395,14 +400,15 @@ export class UserConfig extends CommonBase {
         * Limits applied to our counterparty's proposed channel handshake config settings.
         */
        public set_channel_handshake_limits(val: ChannelHandshakeLimits): void {
-               bindings.UserConfig_set_channel_handshake_limits(this.ptr, val == null ? 0 : CommonBase.get_ptr_of(val) & ~1);
+               bindings.UserConfig_set_channel_handshake_limits(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
+               CommonBase.add_ref_from(this, val);
        }
 
        /**
         * Channel config which affects behavior during channel lifetime.
         */
        public get_channel_config(): ChannelConfig {
-               const ret: number = bindings.UserConfig_get_channel_config(this.ptr);
+               const ret: bigint = bindings.UserConfig_get_channel_config(this.ptr);
                const ret_hu_conv: ChannelConfig = new ChannelConfig(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, this);
                return ret_hu_conv;
@@ -412,7 +418,8 @@ export class UserConfig extends CommonBase {
         * Channel config which affects behavior during channel lifetime.
         */
        public set_channel_config(val: ChannelConfig): void {
-               bindings.UserConfig_set_channel_config(this.ptr, val == null ? 0 : CommonBase.get_ptr_of(val) & ~1);
+               bindings.UserConfig_set_channel_config(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
+               CommonBase.add_ref_from(this, val);
        }
 
        /**
@@ -520,14 +527,17 @@ export class UserConfig extends CommonBase {
         * Constructs a new UserConfig given each field
         */
        public static constructor_new(channel_handshake_config_arg: ChannelHandshakeConfig, channel_handshake_limits_arg: ChannelHandshakeLimits, channel_config_arg: ChannelConfig, accept_forwards_to_priv_channels_arg: boolean, accept_inbound_channels_arg: boolean, manually_accept_inbound_channels_arg: boolean): UserConfig {
-               const ret: number = bindings.UserConfig_new(channel_handshake_config_arg == null ? 0 : CommonBase.get_ptr_of(channel_handshake_config_arg) & ~1, channel_handshake_limits_arg == null ? 0 : CommonBase.get_ptr_of(channel_handshake_limits_arg) & ~1, channel_config_arg == null ? 0 : CommonBase.get_ptr_of(channel_config_arg) & ~1, accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg, manually_accept_inbound_channels_arg);
+               const ret: bigint = bindings.UserConfig_new(channel_handshake_config_arg == null ? 0n : CommonBase.get_ptr_of(channel_handshake_config_arg), channel_handshake_limits_arg == null ? 0n : CommonBase.get_ptr_of(channel_handshake_limits_arg), channel_config_arg == null ? 0n : CommonBase.get_ptr_of(channel_config_arg), accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg, manually_accept_inbound_channels_arg);
                const ret_hu_conv: UserConfig = new UserConfig(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+               CommonBase.add_ref_from(ret_hu_conv, channel_handshake_config_arg);
+               CommonBase.add_ref_from(ret_hu_conv, channel_handshake_limits_arg);
+               CommonBase.add_ref_from(ret_hu_conv, channel_config_arg);
                return ret_hu_conv;
        }
 
-       public clone_ptr(): number {
-               const ret: number = bindings.UserConfig_clone_ptr(this.ptr);
+       public clone_ptr(): bigint {
+               const ret: bigint = bindings.UserConfig_clone_ptr(this.ptr);
                return ret;
        }
 
@@ -535,7 +545,7 @@ export class UserConfig extends CommonBase {
         * Creates a copy of the UserConfig
         */
        public clone(): UserConfig {
-               const ret: number = bindings.UserConfig_clone(this.ptr);
+               const ret: bigint = bindings.UserConfig_clone(this.ptr);
                const ret_hu_conv: UserConfig = new UserConfig(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, this);
                return ret_hu_conv;
@@ -545,7 +555,7 @@ export class UserConfig extends CommonBase {
         * Creates a "default" UserConfig. See struct and individual field documentaiton for details on which values are used.
         */
        public static constructor_default(): UserConfig {
-               const ret: number = bindings.UserConfig_default();
+               const ret: bigint = bindings.UserConfig_default();
                const ret_hu_conv: UserConfig = new UserConfig(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
                return ret_hu_conv;