Supported Networks
The SDK includes a built-in map of EVM chain IDs to human-readable network names. When you pass a chainId, the widget displays the correct network name in its approval screens.
Built-in chains
Section titled “Built-in chains”| Chain | Chain ID |
|---|---|
| Ethereum | 1 |
| BNB Chain | 56 |
| Polygon | 137 |
| Moonbeam | 1284 |
| Metis | 1088 |
| Base | 8453 |
| Avalanche | 43114 |
| Avalanche | 43113 |
| Sepolia (testnet) | 11155111 |
Using a chain ID
Section titled “Using a chain ID”const auth = new OxGasAuth({ apiKey: 'your-api-key', chainId: 8453, // Resolved to "Base" automatically});Custom networks
Section titled “Custom networks”If your chain is not in the list, pass the name directly using the network option:
const auth = new OxGasAuth({ apiKey: 'your-api-key', network: 'Blast', // Displayed as-is in the widget});The network option takes precedence over chainId. If you pass both, network wins.
Accessing the network map
Section titled “Accessing the network map”You can import the NETWORK_NAMES map if you need it in your own code:
import { NETWORK_NAMES } from '0xgas-auth';
const name = NETWORK_NAMES[42161]; // "Arbitrum One"