Import
Signature
Resolve a network name, alias, or legacy ID into a canonical CAIP-2 identifier. Accepts aliases (“mainnet”, “testnet”, “algorand-mainnet”, “algorand-testnet”, “algorand”), canonical CAIP-2 strings (“algorand:<32-char-reference>”), or legacy long CAIP-2 strings (“algorand:<full-base64-genesis-hash>”). For LocalNet, query the daemon with networkFromAlgod(algod).

Parameters

string
required
Network name alias or CAIP-2 string.

Returns

string
Canonical CAIP-2 network string.

Throws

  • UnknownNetworkError: If the network name or CAIP-2 string is unrecognized.

Example

Source: src/index.ts