UNPKG

lightningdevkit

Version:
73 lines (72 loc) 2.46 kB
import { SocketAddress } from '../structs/SocketAddress.mjs'; import { NodeAlias } from '../structs/NodeAlias.mjs'; import { NodeFeatures } from '../structs/NodeFeatures.mjs'; import { CommonBase } from './CommonBase.mjs'; /** * Non-relayable information received in the latest node_announcement from this node. */ export declare class NodeAnnouncementDetails extends CommonBase { /** * Protocol features the node announced support for */ get_features(): NodeFeatures; /** * Protocol features the node announced support for */ set_features(val: NodeFeatures): void; /** * When the last known update to the node state was issued. * Value is opaque, as set in the announcement. */ get_last_update(): number; /** * When the last known update to the node state was issued. * Value is opaque, as set in the announcement. */ set_last_update(val: number): void; /** * Color assigned to the node */ get_rgb(): Uint8Array; /** * Color assigned to the node */ set_rgb(val: Uint8Array): void; /** * Moniker assigned to the node. * May be invalid or malicious (eg control chars), * should not be exposed to the user. */ get_alias(): NodeAlias; /** * Moniker assigned to the node. * May be invalid or malicious (eg control chars), * should not be exposed to the user. */ set_alias(val: NodeAlias): void; /** * Internet-level addresses via which one can connect to the node * * Returns a copy of the field. */ get_addresses(): SocketAddress[]; /** * Internet-level addresses via which one can connect to the node */ set_addresses(val: SocketAddress[]): void; /** * Constructs a new NodeAnnouncementDetails given each field */ static constructor_new(features_arg: NodeFeatures, last_update_arg: number, rgb_arg: Uint8Array, alias_arg: NodeAlias, addresses_arg: SocketAddress[]): NodeAnnouncementDetails; clone_ptr(): bigint; /** * Creates a copy of the NodeAnnouncementDetails */ clone(): NodeAnnouncementDetails; /** * Checks if two NodeAnnouncementDetailss 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: NodeAnnouncementDetails): boolean; }