Creates an instance of CoreApi.
Configuration object for the API
API configuration options. Contains settings for connecting to the Conflux Core Scanner API.
Target network environment
Optional
apiKey?: stringAPI key for authentication
Optional
host?: stringCustom API host URL
Protected
baseBase URL for the API endpoints
Protected
Optional
apiOptional API key for authenticated requests
Protected
loggerLogger instance for debugging and error tracking
Protected
fetchProtected
Makes an API request with the given parameters. Handles parameter sanitization, API key inclusion, and error handling.
API endpoint to call
Query parameters
Promise resolving to the API response
Base API class for making HTTP requests to the Conflux Core API. Provides common functionality for API endpoints including request handling and error management.
CoreApi