PeerId
Type-safe Ethereum peer identifiers (enode URLs) for peer-to-peer networking.Overview
Brandedstring type representing an Ethereum peer identifier in enode URL format. Enode URLs uniquely identify Ethereum nodes on the P2P network and contain the node’s public key, IP address, and connection ports.
Quick Start
- Basic Usage
- Parse Enode
- Bootnode Connection
Enode URL Format
| Component | Description | Example |
|---|---|---|
node-id | 128-char hex secp256k1 public key | 6f8a80d14311... |
ip | IPv4 or IPv6 address | 10.3.58.6 |
port | TCP port for RLPx | 30303 |
discport | UDP port for discovery (optional) | 30301 |
Type Definitions
API Reference
Constructors
Methods
Use Cases
Node Discovery
Peer Management
Static Node Configuration
RPC Integration
Common Bootnodes
Mainnet
Sepolia
Related
- PeerInfo - Connected peer information
- NodeInfo - Local node information
- NetworkId - Network identifiers
References
- Ethereum Network Addresses - Enode format
- devp2p Protocol - P2P networking
- Geth admin_addPeer - RPC method

