lightningdevkit
Version:
Lightning Development Kit
56 lines (55 loc) • 2.11 kB
text/typescript
import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs';
import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* An [`accept_channel`] message to be sent to or received from a peer.
*
* Used in V1 channel establishment
*
* [`accept_channel`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-accept_channel-message
*/
export declare class AcceptChannel extends CommonBase {
/**
* Common fields of `accept_channel(2)`-like messages
*/
get_common_fields(): CommonAcceptChannelFields;
/**
* Common fields of `accept_channel(2)`-like messages
*/
set_common_fields(val: CommonAcceptChannelFields): void;
/**
* The minimum value unencumbered by HTLCs for the counterparty to keep in the channel
*/
get_channel_reserve_satoshis(): bigint;
/**
* The minimum value unencumbered by HTLCs for the counterparty to keep in the channel
*/
set_channel_reserve_satoshis(val: bigint): void;
/**
* Constructs a new AcceptChannel given each field
*/
static constructor_new(common_fields_arg: CommonAcceptChannelFields, channel_reserve_satoshis_arg: bigint): AcceptChannel;
clone_ptr(): bigint;
/**
* Creates a copy of the AcceptChannel
*/
clone(): AcceptChannel;
/**
* Generates a non-cryptographic 64-bit hash of the AcceptChannel.
*/
hash(): bigint;
/**
* Checks if two AcceptChannels 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: AcceptChannel): boolean;
/**
* Serialize the AcceptChannel object into a byte array which can be read by AcceptChannel_read
*/
write(): Uint8Array;
/**
* Read a AcceptChannel from a byte array, created by AcceptChannel_write
*/
static constructor_read(ser: Uint8Array): Result_AcceptChannelDecodeErrorZ;
}