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

    RPC client configuration.

    interface BtxClientOpts {
        methodTimeouts?: Record<string, number>;
        retry?: RetryOptions;
        rpcAuth: { pass: string; user: string };
        rpcUrl: string;
        timeoutMs?: number;
    }
    Index

    Properties

    methodTimeouts?: Record<string, number>

    Per-method timeout overrides (ms). Falls back to timeoutMs, then 30000. Values ≤ 0 are treated as "no override" — fall through to the next layer (audit M-1 2026-05-23).

    Keys may be either the raw btxd RPC method name or a semantic shortcut (added 0.3.0, audit L-4):

    semantic raw RPC method
    issue getmatmulservicechallenge
    verify verifymatmulserviceproof
    redeem redeemmatmulserviceproof
    verifyBatch verifymatmulserviceproofs
    redeemBatch redeemmatmulserviceproofs
    solve solvematmulservicechallenge

    Precedence: a raw-method key always wins over the semantic alias for the same method (raw is more specific). A ≤ 0 value at either level is skipped and resolution continues to the next layer.

    Useful because RPCs have very different time profiles: solvematmulservicechallenge on a mining-loaded btxd can take 15+ minutes (see btxd-solver-mining-contention), while getmatmulservicechallenge finishes in ~50 ms. Set { solve: 1_000_000 } (or the raw { solvematmulservicechallenge: 1_000_000 }) to give the solver a long runway without bloating the client-wide default.

    Audit ref: D-4 in BTX/audits/btx-challenges-sdk-audit-2026-05-22.md; semantic shortcuts L-4 in …-audit-2026-05-23.md.

    retry?: RetryOptions

    Retry policy. Default { max: 0 } (off). See RetryOptions.

    Audit ref: D-3 in BTX/audits/btx-challenges-sdk-audit-2026-05-22.md.

    rpcAuth: { pass: string; user: string }

    Basic-auth credentials matching btxd's rpcauth / rpcuser+rpcpassword.

    rpcUrl: string

    Full JSON-RPC endpoint of a BTX node (btxd), e.g. http://127.0.0.1:19332. This is a node you (or a shared operator) run — there is no default/hosted endpoint. For rpc-mode solving it must be a non-mining node. See BtxChallengeClient for who needs a node.

    Security: use HTTPS (or a localhost-only deployment) when the RPC endpoint is not on 127.0.0.1. Basic auth over plaintext exposes credentials. Terminate TLS at stunnel/nginx/Caddy in front of btxd; do NOT expose btxd's RPC port directly to the public internet.

    timeoutMs?: number

    Client-wide request timeout in ms (default 30000). Overridden per-method by methodTimeouts. Values ≤ 0 are treated as "no override" and fall through to the 30000 ms default.