@btx-tools SDK — BTX service-challenge admission control
    Preparing search index...

    Per-call options accepted by every public method on BtxChallengeClient.

    Added in 0.2.0. Optional. Defaults preserve 0.1.x behavior — no change for callers that don't pass an opts arg.

    interface RpcCallOpts {
        signal?: AbortSignal;
    }
    Index

    Properties

    Properties

    signal?: AbortSignal

    Optional AbortSignal to cancel the request. When the signal fires abort:

    • If the signal is already aborted before the call starts, the method throws BtxNetworkError immediately without sending a request.
    • If the signal fires mid-fetch, the underlying fetch is aborted and the call throws BtxNetworkError (distinguishable from BtxTimeoutError — see cause for the underlying CallerAbortError).
    • If the signal fires during a retry backoff sleep, the retry loop exits immediately without sending another request.

    Honored across the full retry pipeline.

    Caveat for BtxChallengeClient.redeem and BtxChallengeClient.redeemBatch: if the abort fires AFTER btxd has consumed the challenge (the RPC completed server-side before the local fetch was aborted), the redemption stands — the local promise rejects but btxd has already marked the proof spent. Callers handling cancellation should verify via a separate BtxChallengeClient.verify call if the post-abort state matters.