@aptos-labs/ts-sdk - v7.3.1
    Preparing search index...

    Function aptosRequest

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

      A Node API read of pruned data answers 410 Gone with an archival_endpoint. Such requests are replayed once against that endpoint and the result returned transparently. Opt out with archivalFallback: false.

      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.