lightningdevkit
Version:
Lightning Development Kit
58 lines (57 loc) • 1.96 kB
text/typescript
import { TxOut } from '../structs/TxOut.mjs';
import { OutPoint } from '../structs/OutPoint.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* An input that must be included in a transaction when performing coin selection through
* [`CoinSelectionSource::select_confirmed_utxos`]. It is guaranteed to be a SegWit input, so it
* must have an empty [`TxIn::script_sig`] when spent.
*/
export declare class Input extends CommonBase {
/**
* The unique identifier of the input.
*/
get_outpoint(): OutPoint;
/**
* The unique identifier of the input.
*/
set_outpoint(val: OutPoint): void;
/**
* The UTXO being spent by the input.
*/
get_previous_utxo(): TxOut;
/**
* The UTXO being spent by the input.
*/
set_previous_utxo(val: TxOut): void;
/**
* The upper-bound weight consumed by the input's full [`TxIn::script_sig`] and
* [`TxIn::witness`], each with their lengths included, required to satisfy the output's
* script.
*/
get_satisfaction_weight(): bigint;
/**
* The upper-bound weight consumed by the input's full [`TxIn::script_sig`] and
* [`TxIn::witness`], each with their lengths included, required to satisfy the output's
* script.
*/
set_satisfaction_weight(val: bigint): void;
/**
* Constructs a new Input given each field
*/
static constructor_new(outpoint_arg: OutPoint, previous_utxo_arg: TxOut, satisfaction_weight_arg: bigint): Input;
clone_ptr(): bigint;
/**
* Creates a copy of the Input
*/
clone(): Input;
/**
* Generates a non-cryptographic 64-bit hash of the Input.
*/
hash(): bigint;
/**
* Checks if two Inputs 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: Input): boolean;
}