Skip to main content

Creating the client

Use alphscan(settings?) to create the API client. Settings can be omitted (then env is used), or passed to override.

AlphscanSettings

Environment variables

The SDK reads settings from the environment when you don’t pass them:

Helpers

  • getSettingsFromEnv() — returns a partial AlphscanSettings from process.env.
  • resolveSettings(overrides?) — merges env with overrides (overrides win).
  • getApiBaseUrl(settings) — returns the effective base URL (e.g. https://api.alphscan.io or https://api.alphscan.io/dev).

AlphscanClientApi

The object returned by alphscan(): Accessing keys or payment without an API key throws.

Deprecated

createAlphscanClient({ baseUrl }) — use alphscan({ apiUrl: baseUrl }) instead.