lightningdevkit
Version:
Lightning Development Kit
81 lines (80 loc) • 3.09 kB
text/typescript
import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs';
import { CommonOpenChannelFields } from '../structs/CommonOpenChannelFields.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* An [`open_channel2`] message to be sent by or received from the channel initiator.
*
* Used in V2 channel establishment
*
* [`open_channel2`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-open_channel2-message
*/
export declare class OpenChannelV2 extends CommonBase {
/**
* Common fields of `open_channel(2)`-like messages
*/
get_common_fields(): CommonOpenChannelFields;
/**
* Common fields of `open_channel(2)`-like messages
*/
set_common_fields(val: CommonOpenChannelFields): void;
/**
* The feerate for the funding transaction set by the channel initiator
*/
get_funding_feerate_sat_per_1000_weight(): number;
/**
* The feerate for the funding transaction set by the channel initiator
*/
set_funding_feerate_sat_per_1000_weight(val: number): void;
/**
* The locktime for the funding transaction
*/
get_locktime(): number;
/**
* The locktime for the funding transaction
*/
set_locktime(val: number): void;
/**
* The second to-be-broadcast-by-channel-initiator transaction's per commitment point
*/
get_second_per_commitment_point(): Uint8Array;
/**
* The second to-be-broadcast-by-channel-initiator 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 OpenChannelV2 given each field
*/
static constructor_new(common_fields_arg: CommonOpenChannelFields, funding_feerate_sat_per_1000_weight_arg: number, locktime_arg: number, second_per_commitment_point_arg: Uint8Array, require_confirmed_inputs_arg: COption_NoneZ): OpenChannelV2;
clone_ptr(): bigint;
/**
* Creates a copy of the OpenChannelV2
*/
clone(): OpenChannelV2;
/**
* Generates a non-cryptographic 64-bit hash of the OpenChannelV2.
*/
hash(): bigint;
/**
* Checks if two OpenChannelV2s 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: OpenChannelV2): boolean;
/**
* Serialize the OpenChannelV2 object into a byte array which can be read by OpenChannelV2_read
*/
write(): Uint8Array;
/**
* Read a OpenChannelV2 from a byte array, created by OpenChannelV2_write
*/
static constructor_read(ser: Uint8Array): Result_OpenChannelV2DecodeErrorZ;
}