[TS] Update auto-generated TS bindings
[ldk-java] / ts / structs / ChannelInfo.mts
index aa8c1793f1e8a403b19e5dc748a09890e119e6db..ba0764254c756d00242fa951ca507b775af81d4a 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';
@@ -137,6 +140,7 @@ import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelU
 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 ChannelInfo extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: number) {
+       public constructor(_dummy: object, ptr: bigint) {
                super(ptr, bindings.ChannelInfo_free);
        }
 
@@ -366,7 +370,7 @@ export class ChannelInfo extends CommonBase {
         * Protocol features of a channel communicated during its announcement
         */
        public get_features(): ChannelFeatures {
-               const ret: number = bindings.ChannelInfo_get_features(this.ptr);
+               const ret: bigint = bindings.ChannelInfo_get_features(this.ptr);
                const ret_hu_conv: ChannelFeatures = new ChannelFeatures(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, this);
                return ret_hu_conv;
@@ -376,14 +380,15 @@ export class ChannelInfo extends CommonBase {
         * Protocol features of a channel communicated during its announcement
         */
        public set_features(val: ChannelFeatures): void {
-               bindings.ChannelInfo_set_features(this.ptr, val == null ? 0 : CommonBase.get_ptr_of(val) & ~1);
+               bindings.ChannelInfo_set_features(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
+               CommonBase.add_ref_from(this, val);
        }
 
        /**
         * Source node of the first direction of a channel
         */
        public get_node_one(): NodeId {
-               const ret: number = bindings.ChannelInfo_get_node_one(this.ptr);
+               const ret: bigint = bindings.ChannelInfo_get_node_one(this.ptr);
                const ret_hu_conv: NodeId = new NodeId(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, this);
                return ret_hu_conv;
@@ -393,7 +398,8 @@ export class ChannelInfo extends CommonBase {
         * Source node of the first direction of a channel
         */
        public set_node_one(val: NodeId): void {
-               bindings.ChannelInfo_set_node_one(this.ptr, val == null ? 0 : CommonBase.get_ptr_of(val) & ~1);
+               bindings.ChannelInfo_set_node_one(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
+               CommonBase.add_ref_from(this, val);
        }
 
        /**
@@ -402,7 +408,7 @@ export class ChannelInfo extends CommonBase {
         * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public get_one_to_two(): ChannelUpdateInfo {
-               const ret: number = bindings.ChannelInfo_get_one_to_two(this.ptr);
+               const ret: bigint = bindings.ChannelInfo_get_one_to_two(this.ptr);
                const ret_hu_conv: ChannelUpdateInfo = new ChannelUpdateInfo(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, this);
                return ret_hu_conv;
@@ -414,14 +420,15 @@ export class ChannelInfo extends CommonBase {
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public set_one_to_two(val: ChannelUpdateInfo): void {
-               bindings.ChannelInfo_set_one_to_two(this.ptr, val == null ? 0 : CommonBase.get_ptr_of(val) & ~1);
+               bindings.ChannelInfo_set_one_to_two(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
+               CommonBase.add_ref_from(this, val);
        }
 
        /**
         * Source node of the second direction of a channel
         */
        public get_node_two(): NodeId {
-               const ret: number = bindings.ChannelInfo_get_node_two(this.ptr);
+               const ret: bigint = bindings.ChannelInfo_get_node_two(this.ptr);
                const ret_hu_conv: NodeId = new NodeId(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, this);
                return ret_hu_conv;
@@ -431,7 +438,8 @@ export class ChannelInfo extends CommonBase {
         * Source node of the second direction of a channel
         */
        public set_node_two(val: NodeId): void {
-               bindings.ChannelInfo_set_node_two(this.ptr, val == null ? 0 : CommonBase.get_ptr_of(val) & ~1);
+               bindings.ChannelInfo_set_node_two(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
+               CommonBase.add_ref_from(this, val);
        }
 
        /**
@@ -440,7 +448,7 @@ export class ChannelInfo extends CommonBase {
         * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public get_two_to_one(): ChannelUpdateInfo {
-               const ret: number = bindings.ChannelInfo_get_two_to_one(this.ptr);
+               const ret: bigint = bindings.ChannelInfo_get_two_to_one(this.ptr);
                const ret_hu_conv: ChannelUpdateInfo = new ChannelUpdateInfo(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, this);
                return ret_hu_conv;
@@ -452,14 +460,15 @@ export class ChannelInfo extends CommonBase {
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public set_two_to_one(val: ChannelUpdateInfo): void {
-               bindings.ChannelInfo_set_two_to_one(this.ptr, val == null ? 0 : CommonBase.get_ptr_of(val) & ~1);
+               bindings.ChannelInfo_set_two_to_one(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
+               CommonBase.add_ref_from(this, val);
        }
 
        /**
         * The channel capacity as seen on-chain, if chain lookup is available.
         */
        public get_capacity_sats(): Option_u64Z {
-               const ret: number = bindings.ChannelInfo_get_capacity_sats(this.ptr);
+               const ret: bigint = bindings.ChannelInfo_get_capacity_sats(this.ptr);
                const ret_hu_conv: Option_u64Z = Option_u64Z.constr_from_ptr(ret);
                CommonBase.add_ref_from(ret_hu_conv, this);
                return ret_hu_conv;
@@ -481,7 +490,7 @@ export class ChannelInfo extends CommonBase {
         * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public get_announcement_message(): ChannelAnnouncement {
-               const ret: number = bindings.ChannelInfo_get_announcement_message(this.ptr);
+               const ret: bigint = bindings.ChannelInfo_get_announcement_message(this.ptr);
                const ret_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, this);
                return ret_hu_conv;
@@ -496,11 +505,12 @@ export class ChannelInfo extends CommonBase {
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public set_announcement_message(val: ChannelAnnouncement): void {
-               bindings.ChannelInfo_set_announcement_message(this.ptr, val == null ? 0 : CommonBase.get_ptr_of(val) & ~1);
+               bindings.ChannelInfo_set_announcement_message(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
+               CommonBase.add_ref_from(this, val);
        }
 
-       public clone_ptr(): number {
-               const ret: number = bindings.ChannelInfo_clone_ptr(this.ptr);
+       public clone_ptr(): bigint {
+               const ret: bigint = bindings.ChannelInfo_clone_ptr(this.ptr);
                return ret;
        }
 
@@ -508,7 +518,7 @@ export class ChannelInfo extends CommonBase {
         * Creates a copy of the ChannelInfo
         */
        public clone(): ChannelInfo {
-               const ret: number = bindings.ChannelInfo_clone(this.ptr);
+               const ret: bigint = bindings.ChannelInfo_clone(this.ptr);
                const ret_hu_conv: ChannelInfo = new ChannelInfo(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, this);
                return ret_hu_conv;
@@ -520,7 +530,7 @@ export class ChannelInfo extends CommonBase {
         * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public get_directional_info(channel_flags: number): ChannelUpdateInfo {
-               const ret: number = bindings.ChannelInfo_get_directional_info(this.ptr, channel_flags);
+               const ret: bigint = bindings.ChannelInfo_get_directional_info(this.ptr, channel_flags);
                const ret_hu_conv: ChannelUpdateInfo = new ChannelUpdateInfo(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, this);
                return ret_hu_conv;
@@ -539,7 +549,7 @@ export class ChannelInfo extends CommonBase {
         * Read a ChannelInfo from a byte array, created by ChannelInfo_write
         */
        public static constructor_read(ser: Uint8Array): Result_ChannelInfoDecodeErrorZ {
-               const ret: number = bindings.ChannelInfo_read(bindings.encodeUint8Array(ser));
+               const ret: bigint = bindings.ChannelInfo_read(bindings.encodeUint8Array(ser));
                const ret_hu_conv: Result_ChannelInfoDecodeErrorZ = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }