Helius SDK - v5.0.0
    Preparing search index...

    Interface HeliusRpcOptions

    Options for creating a Helius RPC client.

    interface HeliusRpcOptions {
        apiKey?: string;
        baseUrl?: string;
        mevProtect?: boolean;
        network?: "mainnet" | "devnet";
        parsedEventsTimeoutMs?: number;
        parsedEventsUrl?: string;
        rebateAddress?: string;
        senderUrl?: string;
        transport?: TransportHook;
        userAgent?: string;
    }
    Index

    Properties

    apiKey?: string

    Helius API key. Required for Sender, webhooks, Parsed Events, enhanced transactions, the Wallet API, and the Admin API.

    baseUrl?: string

    Custom RPC base URL. When provided, network is ignored.

    mevProtect?: boolean

    Opt in to MEV Protect: route transactions away from validators statistically linked to sandwich attacks. Appends mev-protect=true to the RPC URL, so it covers every send through this client (sendTransaction, tx.sendSmartTransaction, tx.broadcastTransaction, tx.sendTransaction), and it is the default for the Sender helpers (tx.sendTransactionWithSender, tx.sendBundleWithSender), which can override it per call. Defaults to false.

    network?: "mainnet" | "devnet"

    Solana network to connect to. Defaults to "mainnet".

    parsedEventsTimeoutMs?: number

    Time limit for each Parsed Events request, in milliseconds, including reading the response. A request that runs over rejects with an Error named "TimeoutError". Unset, 0 or negative: no limit. Per-call signals work alongside it.

    parsedEventsUrl?: string

    Parsed Events base URL, up to and including /v1/parsed-events, e.g. a proxy or another Helius host. The method's path goes after it, and the API key is added as an api-key query parameter beside any of its own. Defaults to https://mainnet.helius-rpc.com/v1/parsed-events. A devnet network or baseUrl still makes Parsed Events methods reject.

    rebateAddress?: string

    Wallet address that receives rebates for RPC usage. Appended as a query parameter.

    senderUrl?: string

    Full URL the Sender helpers (tx.sendTransactionWithSender, tx.sendBundleWithSender) POST to instead of https://mainnet.helius-rpc.com/fast, such as your own proxy. With it, apiKey is optional: leave it out and have the proxy add api-key server-side, so browser apps never ship the key. If apiKey is set, it is still appended. swqos_only and mev-protect are appended either way, beside the URL's own query string. Sender stays mainnet-only: a devnet network or baseUrl still makes the Sender helpers throw.

    transport?: TransportHook

    Augment or replace the default RPC transport. Receives the SDK's fully configured transport (Helius URL with API key, SDK headers, request-id stamping) and returns the transport used for all JSON-RPC calls — standard Solana RPC and DAS/Helius methods alike. Enables retries, failover, logging, etc. Does not affect WebSocket subscriptions or REST sub-clients (webhooks, parsedEvents, enhanced, wallet, admin, auth).

    userAgent?: string

    Custom User-Agent string appended to outgoing HTTP requests.