@arkade-os/sdk Documentation - v0.4.54
    Preparing search index...

    Interface VirtualStatus

    Virtual output status.

    Use the canonical facts on VirtualCoinisSwept, isPreconfirmed, isSpent, expiresAt, expiresAtHeight, commitmentTxIds, spentBy, settledBy — and the capability predicates canSpendOffchain, canRecoverOnchain, hasTerminalSpend, isPastExpiry. state collapses independent facts into one lossy label; this object is retained only as a backward-compatible projection.

    interface VirtualStatus {
        batchExpiry?: number;
        commitmentTxIds?: string[];
        state: "spent" | "swept" | "preconfirmed" | "settled";
    }
    Index

    Properties

    batchExpiry?: number

    The earliest point at which this virtual output stops being safely preconfirmed, in milliseconds.

    Unit-ambiguous: the server returns a single scalar that is either unix seconds or a block height, and both land here multiplied by 1000. Use VirtualCoin.expiresAt and VirtualCoin.expiresAtHeight, which disambiguate the two.

    commitmentTxIds?: string[]

    Which batch commitment transaction(s) this virtual output depends on.

    state: "spent" | "swept" | "preconfirmed" | "settled"

    Extended output status.

    • preconfirmed: not yet finalized in a batch
    • settled: finalized in a batch
    • swept: expired/swept and recoverable in a new batch
    • spent: destroyed by a later transaction

    Lossy: the states are not orthogonal and collapse with precedence spent > swept > preconfirmed > settled, so a spent VTXO that was also swept reports only spent. Read isSpent/isSwept/isPreconfirmed instead, or a capability predicate.