lightningdevkit
Version:
Lightning Development Kit
73 lines (72 loc) • 2.85 kB
text/typescript
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs';
import { CommonAcceptChannelFields } from '../structs/CommonAcceptChannelFields.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* An [`accept_channel2`] message to be sent by or received from the channel accepter.
*
* Used in V2 channel establishment
*
* [`accept_channel2`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-accept_channel2-message
*/
export declare class AcceptChannelV2 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;
/**
* Part of the channel value contributed by the channel acceptor
*/
get_funding_satoshis(): bigint;
/**
* Part of the channel value contributed by the channel acceptor
*/
set_funding_satoshis(val: bigint): void;
/**
* The second to-be-broadcast-by-channel-acceptor transaction's per commitment point
*/
get_second_per_commitment_point(): Uint8Array;
/**
* The second to-be-broadcast-by-channel-acceptor transaction's per commitment point
*/
set_second_per_commitment_point(val: Uint8Array): void;
/**
* Optionally, a requirement that only confirmed inputs can be added
*/
get_require_confirmed_inputs(): COption_NoneZ;
/**
* Optionally, a requirement that only confirmed inputs can be added
*/
set_require_confirmed_inputs(val: COption_NoneZ): void;
/**
* Constructs a new AcceptChannelV2 given each field
*/
static constructor_new(common_fields_arg: CommonAcceptChannelFields, funding_satoshis_arg: bigint, second_per_commitment_point_arg: Uint8Array, require_confirmed_inputs_arg: COption_NoneZ): AcceptChannelV2;
clone_ptr(): bigint;
/**
* Creates a copy of the AcceptChannelV2
*/
clone(): AcceptChannelV2;
/**
* Generates a non-cryptographic 64-bit hash of the AcceptChannelV2.
*/
hash(): bigint;
/**
* Checks if two AcceptChannelV2s 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: AcceptChannelV2): boolean;
/**
* Serialize the AcceptChannelV2 object into a byte array which can be read by AcceptChannelV2_read
*/
write(): Uint8Array;
/**
* Read a AcceptChannelV2 from a byte array, created by AcceptChannelV2_write
*/
static constructor_read(ser: Uint8Array): Result_AcceptChannelV2DecodeErrorZ;
}