UNPKG

lightningdevkit

Version:
69 lines (68 loc) 2.62 kB
import { TxOut } from '../structs/TxOut.mjs'; import { TxIn } from '../structs/TxIn.mjs'; import { OutPoint } from '../structs/OutPoint.mjs'; import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs'; import { EcdsaChannelSigner } from '../structs/EcdsaChannelSigner.mjs'; import { SignerProvider } from '../structs/SignerProvider.mjs'; import { CommonBase } from './CommonBase.mjs'; /** * A descriptor used to sign for a commitment transaction's anchor output. */ export declare class AnchorDescriptor extends CommonBase { /** * The parameters required to derive the signer for the anchor input. */ get_channel_derivation_parameters(): ChannelDerivationParameters; /** * The parameters required to derive the signer for the anchor input. */ set_channel_derivation_parameters(val: ChannelDerivationParameters): void; /** * The transaction input's outpoint corresponding to the commitment transaction's anchor * output. */ get_outpoint(): OutPoint; /** * The transaction input's outpoint corresponding to the commitment transaction's anchor * output. */ set_outpoint(val: OutPoint): void; /** * Constructs a new AnchorDescriptor given each field */ static constructor_new(channel_derivation_parameters_arg: ChannelDerivationParameters, outpoint_arg: OutPoint): AnchorDescriptor; clone_ptr(): bigint; /** * Creates a copy of the AnchorDescriptor */ clone(): AnchorDescriptor; /** * Checks if two AnchorDescriptors 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: AnchorDescriptor): boolean; /** * Returns the UTXO to be spent by the anchor input, which can be obtained via * [`Self::unsigned_tx_input`]. */ previous_utxo(): TxOut; /** * Returns the unsigned transaction input spending the anchor output in the commitment * transaction. */ unsigned_tx_input(): TxIn; /** * Returns the witness script of the anchor output in the commitment transaction. */ witness_script(): Uint8Array; /** * Returns the fully signed witness required to spend the anchor output in the commitment * transaction. */ tx_input_witness(signature: Uint8Array): Uint8Array; /** * Derives the channel signer required to sign the anchor input. */ derive_channel_signer(signer_provider: SignerProvider): EcdsaChannelSigner; }