Skip to content

getEnvironment

Returns the config's current network environment.

Import

ts
import { getEnvironment } from "@0xcurvy/curvy-sdk/config";

Usage

ts
const environment = getEnvironment({ config });

Returns

"mainnet" | "testnet"

Parameters

config (optional)

  • Type: CurvyConfig

The config to read. When omitted, the ambient config is used.

ts
const environment = getEnvironment({
  config, 
});