Helius SDK - v3.4.0
    Preparing search index...

    Interface HeliusRpcOptions

    Options for creating a Helius RPC client.

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

    Properties

    apiKey?: string

    Helius API key. Required for 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".

    rebateAddress?: string

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

    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.