lightningdevkit
Version:
Lightning Development Kit
79 lines (78 loc) • 2.8 kB
text/typescript
import { ChannelId } from '../structs/ChannelId.mjs';
import { CommitmentSignedBatch } from '../structs/CommitmentSignedBatch.mjs';
import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* A [`commitment_signed`] message to be sent to or received from a peer.
*
* [`commitment_signed`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#committing-updates-so-far-commitment_signed
*/
export declare class CommitmentSigned extends CommonBase {
/**
* The channel ID
*/
get_channel_id(): ChannelId;
/**
* The channel ID
*/
set_channel_id(val: ChannelId): void;
/**
* A signature on the commitment transaction
*/
get_signature(): Uint8Array;
/**
* A signature on the commitment transaction
*/
set_signature(val: Uint8Array): void;
/**
* Signatures on the HTLC transactions
*
* Returns a copy of the field.
*/
get_htlc_signatures(): Uint8Array[];
/**
* Signatures on the HTLC transactions
*/
set_htlc_signatures(val: Uint8Array[]): void;
/**
* Optional batch size and other parameters
*
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
get_batch(): CommitmentSignedBatch;
/**
* Optional batch size and other parameters
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
set_batch(val: CommitmentSignedBatch | null): void;
/**
* Constructs a new CommitmentSigned given each field
*
* Note that batch_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
static constructor_new(channel_id_arg: ChannelId, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[], batch_arg: CommitmentSignedBatch | null): CommitmentSigned;
clone_ptr(): bigint;
/**
* Creates a copy of the CommitmentSigned
*/
clone(): CommitmentSigned;
/**
* Generates a non-cryptographic 64-bit hash of the CommitmentSigned.
*/
hash(): bigint;
/**
* Checks if two CommitmentSigneds 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: CommitmentSigned): boolean;
/**
* Serialize the CommitmentSigned object into a byte array which can be read by CommitmentSigned_read
*/
write(): Uint8Array;
/**
* Read a CommitmentSigned from a byte array, created by CommitmentSigned_write
*/
static constructor_read(ser: Uint8Array): Result_CommitmentSignedDecodeErrorZ;
}