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