Quickstart
Connecting to the Network
Learn how to connect to the Trunk network
Connecting to the Network
This guide explains how to connect your application or validator to the Trunk network.
Network Overview
The Trunk network consists of multiple nodes working together to validate and process data. There are two main networks:
- Mainnet: The production network
- Testnet: For development and testing
Connection Methods
1. HTTP API
Connect via our REST API:
2. WebSocket Connection
For real-time updates:
Authentication
- Get your API key from the Trunk Dashboard
- Add it to your environment:
Network Configuration
Configure your connection in trunk.config.js
:
Best Practices
- Error Handling
- Keep-Alive
Troubleshooting
Common connection issues:
Network Timeouts
- Check your internet connection
- Verify API key is valid
- Ensure endpoints are correct
Authentication Errors
- Regenerate API key
- Check key permissions
- Verify network environment