lightningdevkit
Version:
Lightning Development Kit
49 lines (48 loc) • 1.5 kB
text/typescript
import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* A [`pong`] message to be sent to or received from a peer.
*
* [`pong`]: https://github.com/lightning/bolts/blob/master/01-messaging.md#the-ping-and-pong-messages
*/
export declare class Pong extends CommonBase {
/**
* The pong packet size.
*
* This field is not sent on the wire. byteslen zeros are sent.
*/
get_byteslen(): number;
/**
* The pong packet size.
*
* This field is not sent on the wire. byteslen zeros are sent.
*/
set_byteslen(val: number): void;
/**
* Constructs a new Pong given each field
*/
static constructor_new(byteslen_arg: number): Pong;
clone_ptr(): bigint;
/**
* Creates a copy of the Pong
*/
clone(): Pong;
/**
* Generates a non-cryptographic 64-bit hash of the Pong.
*/
hash(): bigint;
/**
* Checks if two Pongs 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: Pong): boolean;
/**
* Serialize the Pong object into a byte array which can be read by Pong_read
*/
write(): Uint8Array;
/**
* Read a Pong from a byte array, created by Pong_write
*/
static constructor_read(ser: Uint8Array): Result_PongDecodeErrorZ;
}