Skip to content
IC Reactor

getNetworkByHostname

getNetworkByHostname(hostname): "local" | "remote" | "ic"

Defined in: core/src/utils/helper.ts:272

Determines the network type based on the provided hostname.

Every loopback address is local, not only the literal 127.0.0.1: a replica on [::1] or 127.0.0.2 classified as “ic” was never asked for its root key, so each certified response from it failed verification against the pinned mainnet key.

string

The hostname to evaluate.

"local" | "remote" | "ic"

A string indicating the network type: “local”, “remote”, or “ic”.