lightningdevkit
Version:
Lightning Development Kit
72 lines (71 loc) • 2.83 kB
text/typescript
import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs';
import { ChannelId } from '../structs/ChannelId.mjs';
import { Result_TrackedSpendableOutputDecodeErrorZ } from '../structs/Result_TrackedSpendableOutputDecodeErrorZ.mjs';
import { OutputSpendStatus } from '../structs/OutputSpendStatus.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* The state of a spendable output currently tracked by an [`OutputSweeper`].
*/
export declare class TrackedSpendableOutput extends CommonBase {
/**
* The tracked output descriptor.
*/
get_descriptor(): SpendableOutputDescriptor;
/**
* The tracked output descriptor.
*/
set_descriptor(val: SpendableOutputDescriptor): void;
/**
* The channel this output belongs to.
*
* Will be `None` if no `channel_id` was given to [`OutputSweeper::track_spendable_outputs`]
*
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
get_channel_id(): ChannelId;
/**
* The channel this output belongs to.
*
* Will be `None` if no `channel_id` was given to [`OutputSweeper::track_spendable_outputs`]
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
set_channel_id(val: ChannelId | null): void;
/**
* The current status of the output spend.
*/
get_status(): OutputSpendStatus;
/**
* The current status of the output spend.
*/
set_status(val: OutputSpendStatus): void;
/**
* Constructs a new TrackedSpendableOutput given each field
*
* Note that channel_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
static constructor_new(descriptor_arg: SpendableOutputDescriptor, channel_id_arg: ChannelId | null, status_arg: OutputSpendStatus): TrackedSpendableOutput;
clone_ptr(): bigint;
/**
* Creates a copy of the TrackedSpendableOutput
*/
clone(): TrackedSpendableOutput;
/**
* Checks if two TrackedSpendableOutputs 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: TrackedSpendableOutput): boolean;
/**
* Returns whether the output is spent in the given transaction.
*/
is_spent_in(tx: Uint8Array): boolean;
/**
* Serialize the TrackedSpendableOutput object into a byte array which can be read by TrackedSpendableOutput_read
*/
write(): Uint8Array;
/**
* Read a TrackedSpendableOutput from a byte array, created by TrackedSpendableOutput_write
*/
static constructor_read(ser: Uint8Array): Result_TrackedSpendableOutputDecodeErrorZ;
}