lightningdevkit
Version:
Lightning Development Kit
587 lines (586 loc) • 21.8 kB
text/typescript
import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs';
import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
import { AcceptChannel } from '../structs/AcceptChannel.mjs';
import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs';
import { OpenChannel } from '../structs/OpenChannel.mjs';
import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs';
import { FundingCreated } from '../structs/FundingCreated.mjs';
import { FundingSigned } from '../structs/FundingSigned.mjs';
import { Stfu } from '../structs/Stfu.mjs';
import { SpliceInit } from '../structs/SpliceInit.mjs';
import { SpliceAck } from '../structs/SpliceAck.mjs';
import { SpliceLocked } from '../structs/SpliceLocked.mjs';
import { TxAddInput } from '../structs/TxAddInput.mjs';
import { TxAddOutput } from '../structs/TxAddOutput.mjs';
import { TxRemoveInput } from '../structs/TxRemoveInput.mjs';
import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs';
import { TxComplete } from '../structs/TxComplete.mjs';
import { TxSignatures } from '../structs/TxSignatures.mjs';
import { TxInitRbf } from '../structs/TxInitRbf.mjs';
import { TxAckRbf } from '../structs/TxAckRbf.mjs';
import { TxAbort } from '../structs/TxAbort.mjs';
import { ChannelReady } from '../structs/ChannelReady.mjs';
import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs';
import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs';
import { RevokeAndACK } from '../structs/RevokeAndACK.mjs';
import { ClosingSigned } from '../structs/ClosingSigned.mjs';
import { Shutdown } from '../structs/Shutdown.mjs';
import { ChannelReestablish } from '../structs/ChannelReestablish.mjs';
import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs';
import { ErrorAction } from '../structs/ErrorAction.mjs';
import { QueryChannelRange } from '../structs/QueryChannelRange.mjs';
import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs';
import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* An event generated by ChannelManager which indicates a message should be sent to a peer (or
* broadcast to most peers).
* These events are handled by PeerManager::process_events if you are using a PeerManager.
*/
export declare class MessageSendEvent extends CommonBase {
protected constructor(_dummy: null, ptr: bigint);
clone_ptr(): bigint;
/**
* Creates a copy of the MessageSendEvent
*/
clone(): MessageSendEvent;
/**
* Utility method to constructs a new SendAcceptChannel-variant MessageSendEvent
*/
static constructor_send_accept_channel(node_id: Uint8Array, msg: AcceptChannel): MessageSendEvent;
/**
* Utility method to constructs a new SendAcceptChannelV2-variant MessageSendEvent
*/
static constructor_send_accept_channel_v2(node_id: Uint8Array, msg: AcceptChannelV2): MessageSendEvent;
/**
* Utility method to constructs a new SendOpenChannel-variant MessageSendEvent
*/
static constructor_send_open_channel(node_id: Uint8Array, msg: OpenChannel): MessageSendEvent;
/**
* Utility method to constructs a new SendOpenChannelV2-variant MessageSendEvent
*/
static constructor_send_open_channel_v2(node_id: Uint8Array, msg: OpenChannelV2): MessageSendEvent;
/**
* Utility method to constructs a new SendFundingCreated-variant MessageSendEvent
*/
static constructor_send_funding_created(node_id: Uint8Array, msg: FundingCreated): MessageSendEvent;
/**
* Utility method to constructs a new SendFundingSigned-variant MessageSendEvent
*/
static constructor_send_funding_signed(node_id: Uint8Array, msg: FundingSigned): MessageSendEvent;
/**
* Utility method to constructs a new SendStfu-variant MessageSendEvent
*/
static constructor_send_stfu(node_id: Uint8Array, msg: Stfu): MessageSendEvent;
/**
* Utility method to constructs a new SendSpliceInit-variant MessageSendEvent
*/
static constructor_send_splice_init(node_id: Uint8Array, msg: SpliceInit): MessageSendEvent;
/**
* Utility method to constructs a new SendSpliceAck-variant MessageSendEvent
*/
static constructor_send_splice_ack(node_id: Uint8Array, msg: SpliceAck): MessageSendEvent;
/**
* Utility method to constructs a new SendSpliceLocked-variant MessageSendEvent
*/
static constructor_send_splice_locked(node_id: Uint8Array, msg: SpliceLocked): MessageSendEvent;
/**
* Utility method to constructs a new SendTxAddInput-variant MessageSendEvent
*/
static constructor_send_tx_add_input(node_id: Uint8Array, msg: TxAddInput): MessageSendEvent;
/**
* Utility method to constructs a new SendTxAddOutput-variant MessageSendEvent
*/
static constructor_send_tx_add_output(node_id: Uint8Array, msg: TxAddOutput): MessageSendEvent;
/**
* Utility method to constructs a new SendTxRemoveInput-variant MessageSendEvent
*/
static constructor_send_tx_remove_input(node_id: Uint8Array, msg: TxRemoveInput): MessageSendEvent;
/**
* Utility method to constructs a new SendTxRemoveOutput-variant MessageSendEvent
*/
static constructor_send_tx_remove_output(node_id: Uint8Array, msg: TxRemoveOutput): MessageSendEvent;
/**
* Utility method to constructs a new SendTxComplete-variant MessageSendEvent
*/
static constructor_send_tx_complete(node_id: Uint8Array, msg: TxComplete): MessageSendEvent;
/**
* Utility method to constructs a new SendTxSignatures-variant MessageSendEvent
*/
static constructor_send_tx_signatures(node_id: Uint8Array, msg: TxSignatures): MessageSendEvent;
/**
* Utility method to constructs a new SendTxInitRbf-variant MessageSendEvent
*/
static constructor_send_tx_init_rbf(node_id: Uint8Array, msg: TxInitRbf): MessageSendEvent;
/**
* Utility method to constructs a new SendTxAckRbf-variant MessageSendEvent
*/
static constructor_send_tx_ack_rbf(node_id: Uint8Array, msg: TxAckRbf): MessageSendEvent;
/**
* Utility method to constructs a new SendTxAbort-variant MessageSendEvent
*/
static constructor_send_tx_abort(node_id: Uint8Array, msg: TxAbort): MessageSendEvent;
/**
* Utility method to constructs a new SendChannelReady-variant MessageSendEvent
*/
static constructor_send_channel_ready(node_id: Uint8Array, msg: ChannelReady): MessageSendEvent;
/**
* Utility method to constructs a new SendAnnouncementSignatures-variant MessageSendEvent
*/
static constructor_send_announcement_signatures(node_id: Uint8Array, msg: AnnouncementSignatures): MessageSendEvent;
/**
* Utility method to constructs a new UpdateHTLCs-variant MessageSendEvent
*/
static constructor_update_htlcs(node_id: Uint8Array, updates: CommitmentUpdate): MessageSendEvent;
/**
* Utility method to constructs a new SendRevokeAndACK-variant MessageSendEvent
*/
static constructor_send_revoke_and_ack(node_id: Uint8Array, msg: RevokeAndACK): MessageSendEvent;
/**
* Utility method to constructs a new SendClosingSigned-variant MessageSendEvent
*/
static constructor_send_closing_signed(node_id: Uint8Array, msg: ClosingSigned): MessageSendEvent;
/**
* Utility method to constructs a new SendShutdown-variant MessageSendEvent
*/
static constructor_send_shutdown(node_id: Uint8Array, msg: Shutdown): MessageSendEvent;
/**
* Utility method to constructs a new SendChannelReestablish-variant MessageSendEvent
*/
static constructor_send_channel_reestablish(node_id: Uint8Array, msg: ChannelReestablish): MessageSendEvent;
/**
* Utility method to constructs a new SendChannelAnnouncement-variant MessageSendEvent
*/
static constructor_send_channel_announcement(node_id: Uint8Array, msg: ChannelAnnouncement, update_msg: ChannelUpdate): MessageSendEvent;
/**
* Utility method to constructs a new BroadcastChannelAnnouncement-variant MessageSendEvent
*/
static constructor_broadcast_channel_announcement(msg: ChannelAnnouncement, update_msg: ChannelUpdate): MessageSendEvent;
/**
* Utility method to constructs a new BroadcastChannelUpdate-variant MessageSendEvent
*/
static constructor_broadcast_channel_update(msg: ChannelUpdate): MessageSendEvent;
/**
* Utility method to constructs a new BroadcastNodeAnnouncement-variant MessageSendEvent
*/
static constructor_broadcast_node_announcement(msg: NodeAnnouncement): MessageSendEvent;
/**
* Utility method to constructs a new SendChannelUpdate-variant MessageSendEvent
*/
static constructor_send_channel_update(node_id: Uint8Array, msg: ChannelUpdate): MessageSendEvent;
/**
* Utility method to constructs a new HandleError-variant MessageSendEvent
*/
static constructor_handle_error(node_id: Uint8Array, action: ErrorAction): MessageSendEvent;
/**
* Utility method to constructs a new SendChannelRangeQuery-variant MessageSendEvent
*/
static constructor_send_channel_range_query(node_id: Uint8Array, msg: QueryChannelRange): MessageSendEvent;
/**
* Utility method to constructs a new SendShortIdsQuery-variant MessageSendEvent
*/
static constructor_send_short_ids_query(node_id: Uint8Array, msg: QueryShortChannelIds): MessageSendEvent;
/**
* Utility method to constructs a new SendReplyChannelRange-variant MessageSendEvent
*/
static constructor_send_reply_channel_range(node_id: Uint8Array, msg: ReplyChannelRange): MessageSendEvent;
/**
* Utility method to constructs a new SendGossipTimestampFilter-variant MessageSendEvent
*/
static constructor_send_gossip_timestamp_filter(node_id: Uint8Array, msg: GossipTimestampFilter): MessageSendEvent;
}
/** A MessageSendEvent of type SendAcceptChannel */
export declare class MessageSendEvent_SendAcceptChannel extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: AcceptChannel;
}
/** A MessageSendEvent of type SendAcceptChannelV2 */
export declare class MessageSendEvent_SendAcceptChannelV2 extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: AcceptChannelV2;
}
/** A MessageSendEvent of type SendOpenChannel */
export declare class MessageSendEvent_SendOpenChannel extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: OpenChannel;
}
/** A MessageSendEvent of type SendOpenChannelV2 */
export declare class MessageSendEvent_SendOpenChannelV2 extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: OpenChannelV2;
}
/** A MessageSendEvent of type SendFundingCreated */
export declare class MessageSendEvent_SendFundingCreated extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: FundingCreated;
}
/** A MessageSendEvent of type SendFundingSigned */
export declare class MessageSendEvent_SendFundingSigned extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: FundingSigned;
}
/** A MessageSendEvent of type SendStfu */
export declare class MessageSendEvent_SendStfu extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: Stfu;
}
/** A MessageSendEvent of type SendSpliceInit */
export declare class MessageSendEvent_SendSpliceInit extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: SpliceInit;
}
/** A MessageSendEvent of type SendSpliceAck */
export declare class MessageSendEvent_SendSpliceAck extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: SpliceAck;
}
/** A MessageSendEvent of type SendSpliceLocked */
export declare class MessageSendEvent_SendSpliceLocked extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: SpliceLocked;
}
/** A MessageSendEvent of type SendTxAddInput */
export declare class MessageSendEvent_SendTxAddInput extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: TxAddInput;
}
/** A MessageSendEvent of type SendTxAddOutput */
export declare class MessageSendEvent_SendTxAddOutput extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: TxAddOutput;
}
/** A MessageSendEvent of type SendTxRemoveInput */
export declare class MessageSendEvent_SendTxRemoveInput extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: TxRemoveInput;
}
/** A MessageSendEvent of type SendTxRemoveOutput */
export declare class MessageSendEvent_SendTxRemoveOutput extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: TxRemoveOutput;
}
/** A MessageSendEvent of type SendTxComplete */
export declare class MessageSendEvent_SendTxComplete extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: TxComplete;
}
/** A MessageSendEvent of type SendTxSignatures */
export declare class MessageSendEvent_SendTxSignatures extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: TxSignatures;
}
/** A MessageSendEvent of type SendTxInitRbf */
export declare class MessageSendEvent_SendTxInitRbf extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: TxInitRbf;
}
/** A MessageSendEvent of type SendTxAckRbf */
export declare class MessageSendEvent_SendTxAckRbf extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: TxAckRbf;
}
/** A MessageSendEvent of type SendTxAbort */
export declare class MessageSendEvent_SendTxAbort extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: TxAbort;
}
/** A MessageSendEvent of type SendChannelReady */
export declare class MessageSendEvent_SendChannelReady extends MessageSendEvent {
/**
* The node_id of the node which should receive these message(s)
*/
node_id: Uint8Array;
/**
* The channel_ready message which should be sent.
*/
msg: ChannelReady;
}
/** A MessageSendEvent of type SendAnnouncementSignatures */
export declare class MessageSendEvent_SendAnnouncementSignatures extends MessageSendEvent {
/**
* The node_id of the node which should receive these message(s)
*/
node_id: Uint8Array;
/**
* The announcement_signatures message which should be sent.
*/
msg: AnnouncementSignatures;
}
/** A MessageSendEvent of type UpdateHTLCs */
export declare class MessageSendEvent_UpdateHTLCs extends MessageSendEvent {
/**
* The node_id of the node which should receive these message(s)
*/
node_id: Uint8Array;
/**
* The update messages which should be sent. ALL messages in the struct should be sent!
*/
updates: CommitmentUpdate;
}
/** A MessageSendEvent of type SendRevokeAndACK */
export declare class MessageSendEvent_SendRevokeAndACK extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: RevokeAndACK;
}
/** A MessageSendEvent of type SendClosingSigned */
export declare class MessageSendEvent_SendClosingSigned extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: ClosingSigned;
}
/** A MessageSendEvent of type SendShutdown */
export declare class MessageSendEvent_SendShutdown extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: Shutdown;
}
/** A MessageSendEvent of type SendChannelReestablish */
export declare class MessageSendEvent_SendChannelReestablish extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The message which should be sent.
*/
msg: ChannelReestablish;
}
/** A MessageSendEvent of type SendChannelAnnouncement */
export declare class MessageSendEvent_SendChannelAnnouncement extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The channel_announcement which should be sent.
*/
msg: ChannelAnnouncement;
/**
* The followup channel_update which should be sent.
*/
update_msg: ChannelUpdate;
}
/** A MessageSendEvent of type BroadcastChannelAnnouncement */
export declare class MessageSendEvent_BroadcastChannelAnnouncement extends MessageSendEvent {
/**
* The channel_announcement which should be sent.
*/
msg: ChannelAnnouncement;
/**
* The followup channel_update which should be sent.
*
* Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
update_msg: ChannelUpdate;
}
/** A MessageSendEvent of type BroadcastChannelUpdate */
export declare class MessageSendEvent_BroadcastChannelUpdate extends MessageSendEvent {
/**
* The channel_update which should be sent.
*/
msg: ChannelUpdate;
}
/** A MessageSendEvent of type BroadcastNodeAnnouncement */
export declare class MessageSendEvent_BroadcastNodeAnnouncement extends MessageSendEvent {
/**
* The node_announcement which should be sent.
*/
msg: NodeAnnouncement;
}
/** A MessageSendEvent of type SendChannelUpdate */
export declare class MessageSendEvent_SendChannelUpdate extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The channel_update which should be sent.
*/
msg: ChannelUpdate;
}
/** A MessageSendEvent of type HandleError */
export declare class MessageSendEvent_HandleError extends MessageSendEvent {
/**
* The node_id of the node which should receive this message
*/
node_id: Uint8Array;
/**
* The action which should be taken.
*/
action: ErrorAction;
}
/** A MessageSendEvent of type SendChannelRangeQuery */
export declare class MessageSendEvent_SendChannelRangeQuery extends MessageSendEvent {
/**
* The node_id of this message recipient
*/
node_id: Uint8Array;
/**
* The query_channel_range which should be sent.
*/
msg: QueryChannelRange;
}
/** A MessageSendEvent of type SendShortIdsQuery */
export declare class MessageSendEvent_SendShortIdsQuery extends MessageSendEvent {
/**
* The node_id of this message recipient
*/
node_id: Uint8Array;
/**
* The query_short_channel_ids which should be sent.
*/
msg: QueryShortChannelIds;
}
/** A MessageSendEvent of type SendReplyChannelRange */
export declare class MessageSendEvent_SendReplyChannelRange extends MessageSendEvent {
/**
* The node_id of this message recipient
*/
node_id: Uint8Array;
/**
* The reply_channel_range which should be sent.
*/
msg: ReplyChannelRange;
}
/** A MessageSendEvent of type SendGossipTimestampFilter */
export declare class MessageSendEvent_SendGossipTimestampFilter extends MessageSendEvent {
/**
* The node_id of this message recipient
*/
node_id: Uint8Array;
/**
* The gossip_timestamp_filter which should be sent.
*/
msg: GossipTimestampFilter;
}