lightningdevkit
Version:
Lightning Development Kit
62 lines (61 loc) • 2.13 kB
text/typescript
import { ChannelId } from '../structs/ChannelId.mjs';
import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* An [`update_fulfill_htlc`] message to be sent to or received from a peer.
*
* [`update_fulfill_htlc`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#removing-an-htlc-update_fulfill_htlc-update_fail_htlc-and-update_fail_malformed_htlc
*/
export declare class UpdateFulfillHTLC extends CommonBase {
/**
* The channel ID
*/
get_channel_id(): ChannelId;
/**
* The channel ID
*/
set_channel_id(val: ChannelId): void;
/**
* The HTLC ID
*/
get_htlc_id(): bigint;
/**
* The HTLC ID
*/
set_htlc_id(val: bigint): void;
/**
* The pre-image of the payment hash, allowing HTLC redemption
*/
get_payment_preimage(): Uint8Array;
/**
* The pre-image of the payment hash, allowing HTLC redemption
*/
set_payment_preimage(val: Uint8Array): void;
/**
* Constructs a new UpdateFulfillHTLC given each field
*/
static constructor_new(channel_id_arg: ChannelId, htlc_id_arg: bigint, payment_preimage_arg: Uint8Array): UpdateFulfillHTLC;
clone_ptr(): bigint;
/**
* Creates a copy of the UpdateFulfillHTLC
*/
clone(): UpdateFulfillHTLC;
/**
* Generates a non-cryptographic 64-bit hash of the UpdateFulfillHTLC.
*/
hash(): bigint;
/**
* Checks if two UpdateFulfillHTLCs 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: UpdateFulfillHTLC): boolean;
/**
* Serialize the UpdateFulfillHTLC object into a byte array which can be read by UpdateFulfillHTLC_read
*/
write(): Uint8Array;
/**
* Read a UpdateFulfillHTLC from a byte array, created by UpdateFulfillHTLC_write
*/
static constructor_read(ser: Uint8Array): Result_UpdateFulfillHTLCDecodeErrorZ;
}