This class holds the config information for the SDK client instance.

const aptosConfig = new AptosConfig({network:Network.TESTNET})

Constructors

  • Parameters

    Returns AptosConfig

Properties

client: Client

The client instance the SDK uses. Defaults to `@aptos-labs/aptos-client

clientConfig?: ClientConfig

Optional client configurations

faucet?: string

The optional hardcoded faucet URL to send requests to instead of using the network

faucetConfig?: FaucetConfig

Optional specific Faucet configurations

fullnode?: string

The optional hardcoded fullnode URL to send requests to instead of using the network

fullnodeConfig?: ClientHeadersType

Optional specific Fullnode configurations

indexer?: string

The optional hardcoded indexer URL to send requests to instead of using the network

indexerConfig?: ClientHeadersType

Optional specific Indexer configurations

network: Network

The Network that this SDK is associated with. Defaults to DEVNET

pepper?: string

The optional hardcoded pepper service URL to send requests to instead of using the network

prover?: string

The optional hardcoded prover service URL to send requests to instead of using the network

Methods

  • Internal

    Returns the URL endpoint to send the request to. If a custom URL was provided in the config, that URL is returned. If a custom URL was provided but not URL endpoints, an error is thrown. Otherwise, the URL endpoint is derived from the network.

    Parameters

    • apiType: AptosApiType

      The type of Aptos API to get the URL for.

    Returns string

  • Internal

    Checks if the URL is a known pepper service endpoint

    Parameters

    • url: string

    Returns boolean

  • Internal

    Checks if the URL is a known prover service endpoint

    Parameters

    • url: string

    Returns boolean