[TS] Update auto-generated TS bindings
[ldk-java] / ts / structs / Persist.mts
index a518ccd14c53212e80af7b3a1b55ee3bf130ec05..812d3370a95147e8340bdef177a0f35d979227fc 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,10 +107,13 @@ 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';
+import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs';
+import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs';
+import { NodeId } from '../structs/NodeId.mjs';
 import { Record } from '../structs/Record.mjs';
 import { Logger, LoggerInterface } from '../structs/Logger.mjs';
 import { NetworkGraph } from '../structs/NetworkGraph.mjs';
@@ -122,7 +128,6 @@ import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesD
 import { InvoiceFeatures } from '../structs/InvoiceFeatures.mjs';
 import { Result_InvoiceFeaturesDecodeErrorZ } from '../structs/Result_InvoiceFeaturesDecodeErrorZ.mjs';
 import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs';
-import { NodeId } from '../structs/NodeId.mjs';
 import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs';
 import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs';
 import { Access, AccessInterface } from '../structs/Access.mjs';
@@ -136,9 +141,12 @@ 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';
+import { NodeAlias } from '../structs/NodeAlias.mjs';
+import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs';
 import { NodeInfo } from '../structs/NodeInfo.mjs';
 import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs';
 import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs';
@@ -438,7 +446,7 @@ export class Persist extends CommonBase {
        public bindings_instance?: bindings.LDKPersist;
 
        /* @internal */
-       constructor(_dummy: object, ptr: number) {
+       constructor(_dummy: object, ptr: bigint) {
                super(ptr, bindings.Persist_free);
                this.bindings_instance = null;
        }
@@ -447,17 +455,17 @@ export class Persist extends CommonBase {
        public static new_impl(arg: PersistInterface): Persist {
                const impl_holder: LDKPersistHolder = new LDKPersistHolder();
                let structImplementation = {
-                       persist_new_channel (channel_id: number, data: number, update_id: number): number {
+                       persist_new_channel (channel_id: bigint, data: bigint, update_id: bigint): bigint {
                                const channel_id_hu_conv: OutPoint = new OutPoint(null, channel_id);
                                CommonBase.add_ref_from(channel_id_hu_conv, this);
                                const data_hu_conv: ChannelMonitor = new ChannelMonitor(null, data);
                                const update_id_hu_conv: MonitorUpdateId = new MonitorUpdateId(null, update_id);
                                CommonBase.add_ref_from(update_id_hu_conv, this);
                                const ret: Result_NoneChannelMonitorUpdateErrZ = arg.persist_new_channel(channel_id_hu_conv, data_hu_conv, update_id_hu_conv);
-                               const result: number = ret == null ? 0 : ret.clone_ptr();
+                               const result: bigint = ret == null ? 0n : ret.clone_ptr();
                                return result;
                        },
-                       update_persisted_channel (channel_id: number, update: number, data: number, update_id: number): number {
+                       update_persisted_channel (channel_id: bigint, update: bigint, data: bigint, update_id: bigint): bigint {
                                const channel_id_hu_conv: OutPoint = new OutPoint(null, channel_id);
                                CommonBase.add_ref_from(channel_id_hu_conv, this);
                                const update_hu_conv: ChannelMonitorUpdate = new ChannelMonitorUpdate(null, update);
@@ -465,11 +473,11 @@ export class Persist extends CommonBase {
                                const update_id_hu_conv: MonitorUpdateId = new MonitorUpdateId(null, update_id);
                                CommonBase.add_ref_from(update_id_hu_conv, this);
                                const ret: Result_NoneChannelMonitorUpdateErrZ = arg.update_persisted_channel(channel_id_hu_conv, update_hu_conv, data_hu_conv, update_id_hu_conv);
-                               const result: number = ret == null ? 0 : ret.clone_ptr();
+                               const result: bigint = ret == null ? 0n : ret.clone_ptr();
                                return result;
                        },
                } as bindings.LDKPersist;
-               const ptr: number = bindings.LDKPersist_new(structImplementation);
+               const ptr: bigint = bindings.LDKPersist_new(structImplementation);
 
                impl_holder.held = new Persist(null, ptr);
                impl_holder.held.bindings_instance = structImplementation;
@@ -494,9 +502,11 @@ export class Persist extends CommonBase {
         * [`Writeable::write`]: crate::util::ser::Writeable::write
         */
        public persist_new_channel(channel_id: OutPoint, data: ChannelMonitor, update_id: MonitorUpdateId): Result_NoneChannelMonitorUpdateErrZ {
-               const ret: number = bindings.Persist_persist_new_channel(this.ptr, channel_id == null ? 0 : CommonBase.get_ptr_of(channel_id) & ~1, data == null ? 0 : CommonBase.get_ptr_of(data) & ~1, update_id == null ? 0 : CommonBase.get_ptr_of(update_id) & ~1);
+               const ret: bigint = bindings.Persist_persist_new_channel(this.ptr, channel_id == null ? 0n : CommonBase.get_ptr_of(channel_id), data == null ? 0n : CommonBase.get_ptr_of(data), update_id == null ? 0n : CommonBase.get_ptr_of(update_id));
                const ret_hu_conv: Result_NoneChannelMonitorUpdateErrZ = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
+               CommonBase.add_ref_from(this, channel_id);
                CommonBase.add_ref_from(this, data);
+               CommonBase.add_ref_from(this, update_id);
                return ret_hu_conv;
        }
 
@@ -538,10 +548,12 @@ export class Persist extends CommonBase {
         * Note that update (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public update_persisted_channel(channel_id: OutPoint, update: ChannelMonitorUpdate, data: ChannelMonitor, update_id: MonitorUpdateId): Result_NoneChannelMonitorUpdateErrZ {
-               const ret: number = bindings.Persist_update_persisted_channel(this.ptr, channel_id == null ? 0 : CommonBase.get_ptr_of(channel_id) & ~1, update == null ? 0 : CommonBase.get_ptr_of(update) & ~1, data == null ? 0 : CommonBase.get_ptr_of(data) & ~1, update_id == null ? 0 : CommonBase.get_ptr_of(update_id) & ~1);
+               const ret: bigint = bindings.Persist_update_persisted_channel(this.ptr, channel_id == null ? 0n : CommonBase.get_ptr_of(channel_id), update == null ? 0n : CommonBase.get_ptr_of(update), data == null ? 0n : CommonBase.get_ptr_of(data), update_id == null ? 0n : CommonBase.get_ptr_of(update_id));
                const ret_hu_conv: Result_NoneChannelMonitorUpdateErrZ = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
+               CommonBase.add_ref_from(this, channel_id);
                CommonBase.add_ref_from(this, update);
                CommonBase.add_ref_from(this, data);
+               CommonBase.add_ref_from(this, update_id);
                return ret_hu_conv;
        }