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';
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 { 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';
* Used to put an error message in a LightningError
*/
export class ErrorAction extends CommonBase {
- protected constructor(_dummy: object, ptr: number) { super(ptr, bindings.ErrorAction_free); }
+ protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.ErrorAction_free); }
/* @internal */
- public static constr_from_ptr(ptr: number): ErrorAction {
+ public static constr_from_ptr(ptr: bigint): ErrorAction {
const raw_ty: number = bindings.LDKErrorAction_ty_from_ptr(ptr);
switch (raw_ty) {
case 0: return new ErrorAction_DisconnectPeer(ptr);
}
}
- public clone_ptr(): number {
- const ret: number = bindings.ErrorAction_clone_ptr(this.ptr);
+ public clone_ptr(): bigint {
+ const ret: bigint = bindings.ErrorAction_clone_ptr(this.ptr);
return ret;
}
* Creates a copy of the ErrorAction
*/
public clone(): ErrorAction {
- const ret: number = bindings.ErrorAction_clone(this.ptr);
+ const ret: bigint = bindings.ErrorAction_clone(this.ptr);
const ret_hu_conv: ErrorAction = ErrorAction.constr_from_ptr(ret);
CommonBase.add_ref_from(ret_hu_conv, this);
return ret_hu_conv;
* Utility method to constructs a new DisconnectPeer-variant ErrorAction
*/
public static constructor_disconnect_peer(msg: ErrorMessage): ErrorAction {
- const ret: number = bindings.ErrorAction_disconnect_peer(msg == null ? 0 : CommonBase.get_ptr_of(msg) & ~1);
+ const ret: bigint = bindings.ErrorAction_disconnect_peer(msg == null ? 0n : CommonBase.get_ptr_of(msg));
const ret_hu_conv: ErrorAction = ErrorAction.constr_from_ptr(ret);
CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ CommonBase.add_ref_from(ret_hu_conv, msg);
return ret_hu_conv;
}
* Utility method to constructs a new IgnoreError-variant ErrorAction
*/
public static constructor_ignore_error(): ErrorAction {
- const ret: number = bindings.ErrorAction_ignore_error();
+ const ret: bigint = bindings.ErrorAction_ignore_error();
const ret_hu_conv: ErrorAction = ErrorAction.constr_from_ptr(ret);
CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
return ret_hu_conv;
* Utility method to constructs a new IgnoreAndLog-variant ErrorAction
*/
public static constructor_ignore_and_log(a: Level): ErrorAction {
- const ret: number = bindings.ErrorAction_ignore_and_log(a);
+ const ret: bigint = bindings.ErrorAction_ignore_and_log(a);
const ret_hu_conv: ErrorAction = ErrorAction.constr_from_ptr(ret);
CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
return ret_hu_conv;
* Utility method to constructs a new IgnoreDuplicateGossip-variant ErrorAction
*/
public static constructor_ignore_duplicate_gossip(): ErrorAction {
- const ret: number = bindings.ErrorAction_ignore_duplicate_gossip();
+ const ret: bigint = bindings.ErrorAction_ignore_duplicate_gossip();
const ret_hu_conv: ErrorAction = ErrorAction.constr_from_ptr(ret);
CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
return ret_hu_conv;
* Utility method to constructs a new SendErrorMessage-variant ErrorAction
*/
public static constructor_send_error_message(msg: ErrorMessage): ErrorAction {
- const ret: number = bindings.ErrorAction_send_error_message(msg == null ? 0 : CommonBase.get_ptr_of(msg) & ~1);
+ const ret: bigint = bindings.ErrorAction_send_error_message(msg == null ? 0n : CommonBase.get_ptr_of(msg));
const ret_hu_conv: ErrorAction = ErrorAction.constr_from_ptr(ret);
CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ CommonBase.add_ref_from(ret_hu_conv, msg);
return ret_hu_conv;
}
* Utility method to constructs a new SendWarningMessage-variant ErrorAction
*/
public static constructor_send_warning_message(msg: WarningMessage, log_level: Level): ErrorAction {
- const ret: number = bindings.ErrorAction_send_warning_message(msg == null ? 0 : CommonBase.get_ptr_of(msg) & ~1, log_level);
+ const ret: bigint = bindings.ErrorAction_send_warning_message(msg == null ? 0n : CommonBase.get_ptr_of(msg), log_level);
const ret_hu_conv: ErrorAction = ErrorAction.constr_from_ptr(ret);
CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ CommonBase.add_ref_from(ret_hu_conv, msg);
return ret_hu_conv;
}
*/
public msg: ErrorMessage;
/* @internal */
- public constructor(ptr: number) {
+ public constructor(ptr: bigint) {
super(null, ptr);
- const msg: number = bindings.LDKErrorAction_DisconnectPeer_get_msg(ptr);
+ const msg: bigint = bindings.LDKErrorAction_DisconnectPeer_get_msg(ptr);
const msg_hu_conv: ErrorMessage = new ErrorMessage(null, msg);
CommonBase.add_ref_from(msg_hu_conv, this);
this.msg = msg_hu_conv;
/** A ErrorAction of type IgnoreError */
export class ErrorAction_IgnoreError extends ErrorAction {
/* @internal */
- public constructor(ptr: number) {
+ public constructor(ptr: bigint) {
super(null, ptr);
}
}
export class ErrorAction_IgnoreAndLog extends ErrorAction {
public ignore_and_log: Level;
/* @internal */
- public constructor(ptr: number) {
+ public constructor(ptr: bigint) {
super(null, ptr);
this.ignore_and_log = bindings.LDKErrorAction_IgnoreAndLog_get_ignore_and_log(ptr);
}
/** A ErrorAction of type IgnoreDuplicateGossip */
export class ErrorAction_IgnoreDuplicateGossip extends ErrorAction {
/* @internal */
- public constructor(ptr: number) {
+ public constructor(ptr: bigint) {
super(null, ptr);
}
}
*/
public msg: ErrorMessage;
/* @internal */
- public constructor(ptr: number) {
+ public constructor(ptr: bigint) {
super(null, ptr);
- const msg: number = bindings.LDKErrorAction_SendErrorMessage_get_msg(ptr);
+ const msg: bigint = bindings.LDKErrorAction_SendErrorMessage_get_msg(ptr);
const msg_hu_conv: ErrorMessage = new ErrorMessage(null, msg);
CommonBase.add_ref_from(msg_hu_conv, this);
this.msg = msg_hu_conv;
*/
public log_level: Level;
/* @internal */
- public constructor(ptr: number) {
+ public constructor(ptr: bigint) {
super(null, ptr);
- const msg: number = bindings.LDKErrorAction_SendWarningMessage_get_msg(ptr);
+ const msg: bigint = bindings.LDKErrorAction_SendWarningMessage_get_msg(ptr);
const msg_hu_conv: WarningMessage = new WarningMessage(null, msg);
CommonBase.add_ref_from(msg_hu_conv, this);
this.msg = msg_hu_conv;