UNPKG

lightningdevkit

Version:
78 lines (77 loc) 2.94 kB
import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs'; import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs'; import { CommonBase } from './CommonBase.mjs'; /** * A [`channel_announcement`] message to be sent to or received from a peer. * * [`channel_announcement`]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-channel_announcement-message */ export declare class ChannelAnnouncement extends CommonBase { /** * Authentication of the announcement by the first public node */ get_node_signature_1(): Uint8Array; /** * Authentication of the announcement by the first public node */ set_node_signature_1(val: Uint8Array): void; /** * Authentication of the announcement by the second public node */ get_node_signature_2(): Uint8Array; /** * Authentication of the announcement by the second public node */ set_node_signature_2(val: Uint8Array): void; /** * Proof of funding UTXO ownership by the first public node */ get_bitcoin_signature_1(): Uint8Array; /** * Proof of funding UTXO ownership by the first public node */ set_bitcoin_signature_1(val: Uint8Array): void; /** * Proof of funding UTXO ownership by the second public node */ get_bitcoin_signature_2(): Uint8Array; /** * Proof of funding UTXO ownership by the second public node */ set_bitcoin_signature_2(val: Uint8Array): void; /** * The actual announcement */ get_contents(): UnsignedChannelAnnouncement; /** * The actual announcement */ set_contents(val: UnsignedChannelAnnouncement): void; /** * Constructs a new ChannelAnnouncement given each field */ static constructor_new(node_signature_1_arg: Uint8Array, node_signature_2_arg: Uint8Array, bitcoin_signature_1_arg: Uint8Array, bitcoin_signature_2_arg: Uint8Array, contents_arg: UnsignedChannelAnnouncement): ChannelAnnouncement; clone_ptr(): bigint; /** * Creates a copy of the ChannelAnnouncement */ clone(): ChannelAnnouncement; /** * Generates a non-cryptographic 64-bit hash of the ChannelAnnouncement. */ hash(): bigint; /** * Checks if two ChannelAnnouncements contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. * Two objects with NULL inner values will be considered "equal" here. */ eq(b: ChannelAnnouncement): boolean; /** * Serialize the ChannelAnnouncement object into a byte array which can be read by ChannelAnnouncement_read */ write(): Uint8Array; /** * Read a ChannelAnnouncement from a byte array, created by ChannelAnnouncement_write */ static constructor_read(ser: Uint8Array): Result_ChannelAnnouncementDecodeErrorZ; }