lightningdevkit
Version:
Lightning Development Kit
65 lines (64 loc) • 2.41 kB
text/typescript
import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs';
import { OutPoint } from '../structs/OutPoint.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* A transaction output watched by a [`ChannelMonitor`] for spends on-chain.
*
* Used to convey to a [`Filter`] such an output with a given spending condition. Any transaction
* spending the output must be given to [`ChannelMonitor::block_connected`] either directly or via
* [`Confirm::transactions_confirmed`].
*
* If `block_hash` is `Some`, this indicates the output was created in the corresponding block and
* may have been spent there. See [`Filter::register_output`] for details.
*
* Depending on your block source, you may need one or both of either [`Self::outpoint`] or
* [`Self::script_pubkey`].
*
* [`ChannelMonitor`]: channelmonitor::ChannelMonitor
* [`ChannelMonitor::block_connected`]: channelmonitor::ChannelMonitor::block_connected
*/
export declare class WatchedOutput extends CommonBase {
/**
* First block where the transaction output may have been spent.
*/
get_block_hash(): Option_ThirtyTwoBytesZ;
/**
* First block where the transaction output may have been spent.
*/
set_block_hash(val: Option_ThirtyTwoBytesZ): void;
/**
* Outpoint identifying the transaction output.
*/
get_outpoint(): OutPoint;
/**
* Outpoint identifying the transaction output.
*/
set_outpoint(val: OutPoint): void;
/**
* Spending condition of the transaction output.
*/
get_script_pubkey(): Uint8Array;
/**
* Spending condition of the transaction output.
*/
set_script_pubkey(val: Uint8Array): void;
/**
* Constructs a new WatchedOutput given each field
*/
static constructor_new(block_hash_arg: Option_ThirtyTwoBytesZ, outpoint_arg: OutPoint, script_pubkey_arg: Uint8Array): WatchedOutput;
clone_ptr(): bigint;
/**
* Creates a copy of the WatchedOutput
*/
clone(): WatchedOutput;
/**
* Checks if two WatchedOutputs 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: WatchedOutput): boolean;
/**
* Generates a non-cryptographic 64-bit hash of the WatchedOutput.
*/
hash(): bigint;
}