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

    Interface PaymentHandle

    An in-flight payment. Observe it — its outcome may also arrive out-of-band (swap monitor / webhook) and surface as a tx in the wallet's history.

    interface PaymentHandle {
        id: string;
        status: PaymentStatus;
        settled(opts?: { timeoutMs?: number }): Promise<RouteResult>;
        subscribe(
            fn: (
                u: { error?: unknown; result?: RouteResult; status: PaymentStatus },
            ) => void,
        ): () => void;
    }
    Index

    Properties

    Methods

    Properties

    id: string

    Methods

    • OPTIONAL await — resolves on a terminal result, rejects on the timeout. Fire-and-forget rails may never resolve it; that is allowed.

      Parameters

      • Optionalopts: { timeoutMs?: number }

      Returns Promise<RouteResult>

    • Progress stream; returns an unsubscribe fn. Replays the latest update. A terminal "failed" update carries the rejection in error (for swap rails a SwapError whose isRefundable/pendingSwap drive recovery).

      Parameters

      Returns () => void