UNPKG

lightningdevkit

Version:
85 lines (84 loc) 3.54 kB
import { Option_u32Z } from '../structs/Option_u32Z.mjs'; import { Result_OutputSpendStatusDecodeErrorZ } from '../structs/Result_OutputSpendStatusDecodeErrorZ.mjs'; import { CommonBase } from './CommonBase.mjs'; /** * The current status of the output spend. */ export declare class OutputSpendStatus extends CommonBase { protected constructor(_dummy: null, ptr: bigint); clone_ptr(): bigint; /** * Creates a copy of the OutputSpendStatus */ clone(): OutputSpendStatus; /** * Utility method to constructs a new PendingInitialBroadcast-variant OutputSpendStatus */ static constructor_pending_initial_broadcast(delayed_until_height: Option_u32Z): OutputSpendStatus; /** * Utility method to constructs a new PendingFirstConfirmation-variant OutputSpendStatus */ static constructor_pending_first_confirmation(first_broadcast_hash: Uint8Array, latest_broadcast_height: number, latest_spending_tx: Uint8Array): OutputSpendStatus; /** * Utility method to constructs a new PendingThresholdConfirmations-variant OutputSpendStatus */ static constructor_pending_threshold_confirmations(first_broadcast_hash: Uint8Array, latest_broadcast_height: number, latest_spending_tx: Uint8Array, confirmation_height: number, confirmation_hash: Uint8Array): OutputSpendStatus; /** * Checks if two OutputSpendStatuss contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. */ eq(b: OutputSpendStatus): boolean; /** * Serialize the OutputSpendStatus object into a byte array which can be read by OutputSpendStatus_read */ write(): Uint8Array; /** * Read a OutputSpendStatus from a byte array, created by OutputSpendStatus_write */ static constructor_read(ser: Uint8Array): Result_OutputSpendStatusDecodeErrorZ; } /** A OutputSpendStatus of type PendingInitialBroadcast */ export declare class OutputSpendStatus_PendingInitialBroadcast extends OutputSpendStatus { /** * The height at which we will first generate and broadcast a spending transaction. */ delayed_until_height: Option_u32Z; } /** A OutputSpendStatus of type PendingFirstConfirmation */ export declare class OutputSpendStatus_PendingFirstConfirmation extends OutputSpendStatus { /** * The hash of the chain tip when we first broadcast a transaction spending this output. */ first_broadcast_hash: Uint8Array; /** * The best height when we last broadcast a transaction spending this output. */ latest_broadcast_height: number; /** * The transaction spending this output we last broadcasted. */ latest_spending_tx: Uint8Array; } /** A OutputSpendStatus of type PendingThresholdConfirmations */ export declare class OutputSpendStatus_PendingThresholdConfirmations extends OutputSpendStatus { /** * The hash of the chain tip when we first broadcast a transaction spending this output. */ first_broadcast_hash: Uint8Array; /** * The best height when we last broadcast a transaction spending this output. */ latest_broadcast_height: number; /** * The transaction spending this output we saw confirmed on-chain. */ latest_spending_tx: Uint8Array; /** * The height at which the spending transaction was confirmed. */ confirmation_height: number; /** * The hash of the block in which the spending transaction was confirmed. */ confirmation_hash: Uint8Array; }