lightningdevkit
Version:
Lightning Development Kit
54 lines (53 loc) • 1.85 kB
text/typescript
import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs';
import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* A [`channel_update`] message to be sent to or received from a peer.
*
* [`channel_update`]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-channel_update-message
*/
export declare class ChannelUpdate extends CommonBase {
/**
* A signature of the channel update
*/
get_signature(): Uint8Array;
/**
* A signature of the channel update
*/
set_signature(val: Uint8Array): void;
/**
* The actual channel update
*/
get_contents(): UnsignedChannelUpdate;
/**
* The actual channel update
*/
set_contents(val: UnsignedChannelUpdate): void;
/**
* Constructs a new ChannelUpdate given each field
*/
static constructor_new(signature_arg: Uint8Array, contents_arg: UnsignedChannelUpdate): ChannelUpdate;
clone_ptr(): bigint;
/**
* Creates a copy of the ChannelUpdate
*/
clone(): ChannelUpdate;
/**
* Generates a non-cryptographic 64-bit hash of the ChannelUpdate.
*/
hash(): bigint;
/**
* Checks if two ChannelUpdates 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: ChannelUpdate): boolean;
/**
* Serialize the ChannelUpdate object into a byte array which can be read by ChannelUpdate_read
*/
write(): Uint8Array;
/**
* Read a ChannelUpdate from a byte array, created by ChannelUpdate_write
*/
static constructor_read(ser: Uint8Array): Result_ChannelUpdateDecodeErrorZ;
}