UNPKG

lightningdevkit

Version:
48 lines (47 loc) 1.53 kB
import { ChannelId } from '../structs/ChannelId.mjs'; import { Result_StfuDecodeErrorZ } from '../structs/Result_StfuDecodeErrorZ.mjs'; import { CommonBase } from './CommonBase.mjs'; /** * An `stfu` (quiescence) message to be sent by or received from the stfu initiator. */ export declare class Stfu extends CommonBase { /** * The channel ID where quiescence is intended */ get_channel_id(): ChannelId; /** * The channel ID where quiescence is intended */ set_channel_id(val: ChannelId): void; /** * Initiator flag, 1 if initiating, 0 if replying to an stfu. */ get_initiator(): number; /** * Initiator flag, 1 if initiating, 0 if replying to an stfu. */ set_initiator(val: number): void; /** * Constructs a new Stfu given each field */ static constructor_new(channel_id_arg: ChannelId, initiator_arg: number): Stfu; clone_ptr(): bigint; /** * Creates a copy of the Stfu */ clone(): Stfu; /** * Checks if two Stfus 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: Stfu): boolean; /** * Serialize the Stfu object into a byte array which can be read by Stfu_read */ write(): Uint8Array; /** * Read a Stfu from a byte array, created by Stfu_write */ static constructor_read(ser: Uint8Array): Result_StfuDecodeErrorZ; }