@solana/web3.js
    Preparing search index...

    Function clusterApiUrl

    • Retrieves the RPC API URL for the mainnet cluster

      Parameters

      • cluster: "mainnet-beta"
      • Optionaltls: boolean

        Use TLS (https). Pass false for http.

      Returns string

      URL string of the RPC endpoint

      'mainnet-beta' is kept for compatibility; use 'mainnet' instead.

    • Retrieves the RPC API URL for the specified cluster

      Parameters

      • Optionalcluster: Cluster

        The cluster name of the RPC API URL to use. Possible options: 'devnet' | 'testnet' | 'mainnet' | 'mainnet-beta'

      • Optionaltls: boolean

        Use TLS (https). Pass false for http.

      Returns string

      URL string of the RPC endpoint