The HTTP method.
The path after the base URL, such as /key/balance.
The key sent in the Authorization header.
Optionalbody: unknown
Sent as JSON when given.
OptionalbaseUrl: string
The API base. Defaults to PHANTOM_BASE_URL, then DEFAULT_BASE_URL. Must be https (httpsOnly).
Extra headers to send.
PhantomApiError when the API answers with an error status.
Calls the Phantom AI API with the key as a Bearer token and returns the JSON answer. Every client function in this file goes through it.