interface APIProvider {
    call(args): Promise<APIResponse>;
}

Implemented by

Methods

Methods

  • Call an API endpoint and return the response. Provider is responsible for JSON encoding the params and decoding the response.

    Parameters

    • args: {
          method?: APIMethods;
          params?: unknown;
          path: string;
      }
      • Optional method?: APIMethods
      • Optional params?: unknown
      • path: string

    Returns Promise<APIResponse>

    Argument

    path The endpoint path, e.g. /v1/chain/get_info

    Argument

    params The request body if any.