lightningdevkit
Version:
Lightning Development Kit
72 lines (71 loc) • 2.31 kB
text/typescript
import { ChannelId } from '../structs/ChannelId.mjs';
import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* A [`tx_add_output`] message for adding an output during interactive transaction construction.
*
* [`tx_add_output`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-tx_add_output-message
*/
export declare class TxAddOutput extends CommonBase {
/**
* The channel ID
*/
get_channel_id(): ChannelId;
/**
* The channel ID
*/
set_channel_id(val: ChannelId): void;
/**
* A randomly chosen unique identifier for this output, which is even for initiators and odd for
* non-initiators.
*/
get_serial_id(): bigint;
/**
* A randomly chosen unique identifier for this output, which is even for initiators and odd for
* non-initiators.
*/
set_serial_id(val: bigint): void;
/**
* The satoshi value of the output
*/
get_sats(): bigint;
/**
* The satoshi value of the output
*/
set_sats(val: bigint): void;
/**
* The scriptPubKey for the output
*/
get_script(): Uint8Array;
/**
* The scriptPubKey for the output
*/
set_script(val: Uint8Array): void;
/**
* Constructs a new TxAddOutput given each field
*/
static constructor_new(channel_id_arg: ChannelId, serial_id_arg: bigint, sats_arg: bigint, script_arg: Uint8Array): TxAddOutput;
clone_ptr(): bigint;
/**
* Creates a copy of the TxAddOutput
*/
clone(): TxAddOutput;
/**
* Generates a non-cryptographic 64-bit hash of the TxAddOutput.
*/
hash(): bigint;
/**
* Checks if two TxAddOutputs 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: TxAddOutput): boolean;
/**
* Serialize the TxAddOutput object into a byte array which can be read by TxAddOutput_read
*/
write(): Uint8Array;
/**
* Read a TxAddOutput from a byte array, created by TxAddOutput_write
*/
static constructor_read(ser: Uint8Array): Result_TxAddOutputDecodeErrorZ;
}