@arkade-os/sdk Documentation - v0.5.0-rc.11
    Preparing search index...

    Interface PathContext

    Context for path selection decisions.

    interface PathContext {
        blockHeight?: number;
        chainTime?: number;
        collaborative: boolean;
        currentTime: number;
        role?: string;
        vtxo?: VirtualCoin;
        walletDescriptor?: string;
    }
    Index

    Properties

    blockHeight?: number

    Current block height, when known.

    chainTime?: number

    Chain tip timestamp in SECONDS, when known.

    Timelocks mature against chain time, not the machine's clock, so any seconds-typed comparison should prefer this and fall back to currentTime only when it is absent. The two differ by more than pedantry: the server matures absolute locktimes against median-time-past, which trails wall clock, and a host whose clock drifts turns a local decision into a wrong one in whichever direction it drifted.

    collaborative: boolean

    Whether collaborative spending is available through server cooperation.

    currentTime: number

    Current time in milliseconds.

    role?: string

    Explicit role override for multi-party contracts such as VHTLC. If not provided, the handler may derive the role by matching walletDescriptor against the contract's sender/receiver params.

    The specific virtual output being evaluated.

    walletDescriptor?: string

    Wallet's descriptor for signing. Format: tr(pubkey) for static keys, tr([fingerprint/path']xpub/0/{index}) for HD. Used by handlers to determine wallet's role in multi-party contracts.