@aptos-labs/ts-sdk - v5.1.4
    Preparing search index...

    Function aptosRequest

    • The main function to use when making an API request, returning the response or throwing an AptosApiError on failure.

      Type Parameters

      • Req extends {}
      • Res extends {}

      Parameters

      • aptosRequestOpts: AptosRequest

        Options for the Aptos request, including the URL and path.

      • aptosConfig: AptosConfig

        The configuration information for the SDK client instance.

      • apiType: AptosApiType

        The type of API being accessed, which determines how the response is handled.

      Returns Promise<AptosResponse<Req, Res>>

      The response from the API request or throws an AptosApiError if the request fails.