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

    Interface VirtualCoin

    Virtual output data.

    The canonical facts (isSwept, isPreconfirmed, isSpent, expiresAt, expiresAtHeight, commitmentTxIds) are optional because VirtualCoin is also a construction type: custom IndexerProvider and WalletRepository implementations may hand back coins without them. The SDK normalizes every incoming coin, so coins it returns always carry the facts that are determinable; do not read these fields off a coin the SDK has not returned to you — use canSpendOffchain / canRecoverOnchain / hasTerminalSpend / isPastExpiry, which normalize defensively.

    Coin

    interface VirtualCoin {
        arkTxId?: string;
        assets?: Asset[];
        commitmentTxIds?: string[];
        createdAt: Date;
        expiresAt?: Date;
        expiresAtHeight?: number;
        isPreconfirmed?: boolean;
        isSpent?: boolean;
        isSwept?: boolean;
        isUnrolled: boolean;
        script: string;
        settledBy?: string;
        spentBy?: string;
        status: Status;
        txid: string;
        value: number;
        virtualStatus: VirtualStatus;
        vout: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    arkTxId?: string

    ID of the offchain Arkade transaction that spent the above checkpoint output, if applicable.

    assets?: Asset[]

    Assets carried by this virtual output, if any.

    commitmentTxIds?: string[]

    Batch commitment transaction(s) this virtual output depends on.

    createdAt: Date

    Creation time of the virtual output.

    expiresAt?: Date

    Wall-clock batch expiry, when the server expressed expiry as a timestamp.

    Mutually exclusive with expiresAtHeight; both are absent when there is no expiry.

    expiresAtHeight?: number

    Block-height batch expiry, when the server expressed expiry as a height (regtest-like deployments). Evaluating it needs a chain tip — see isPastExpiry.

    isPreconfirmed?: boolean

    Whether this virtual output is not yet finalized in a batch.

    isSpent?: boolean

    Whether this virtual output is already spent (boolean helper for spentBy). This is not set to true if the virtual output is unrolled or swept, only when it's spent offchain.

    isSwept?: boolean

    Whether the server has swept the batch this virtual output belongs to.

    isUnrolled: boolean

    Whether this virtual output has been broadcasted onchain via an unroll (unilateral exit).

    script: string

    The scriptPubKey (hex) locking this virtual output, as returned by the indexer.

    settledBy?: string

    ID of the onchain commitment transaction that settled this output, if applicable.

    spentBy?: string

    ID of the offchain checkpoint transaction that spent this output.

    The empty string means "not spent by anything" — test truthiness, never presence.

    status: Status

    Onchain output status

    txid: string

    Transaction ID where the output was created

    value: number

    Value of the output in satoshis

    virtualStatus: VirtualStatus

    Virtual output status.

    See VirtualStatus.

    vout: number

    Transaction output index for this output