NetworkId
Type-safe Ethereum network identifiers for peer-to-peer network discovery.Overview
Brandednumber type representing Ethereum network IDs. Network IDs are used for peer-to-peer network identification and discovery, distinct from Chain IDs which are used for transaction replay protection.
Quick Start
- Basic Usage
- Network Constants
- RPC Usage
Network Constants
API Reference
Constructors
Methods
NetworkId vs ChainId
Understanding the difference:
For most public networks, NetworkId and ChainId have the same value:
Use Cases
Network Detection
Multi-Network Support
Node Connection Validation
Related
- Chain - Chain configuration with ChainId
- PeerId - Peer identifiers for P2P
- NodeInfo - Node information structure
References
- EIP-155 - Chain ID for replay protection
- devp2p Protocol - Ethereum P2P networking
- JSON-RPC net_version - RPC method

