A peer-to-peer node implementation for the Cross-Swap network using libp2p. This node forms part of the decentralized network that enables cross-chain swaps.
- P2P networking using libp2p
- Kademlia DHT for peer discovery
- Automatic peer discovery and connection
- NAT traversal with relay support
- IPv4 and IPv6 support
- Go 1.22 or later
- Clone the repository:
git clone https://github.com/CrossSwap/cross-swap-node.git
cd cross-swap-node- Install dependencies:
go mod tidyTo start a node:
go run main.goThe node will:
- Generate a unique peer ID
- Listen on port 63785 (TCP)
- Connect to bootstrap nodes
- Start discovering other Cross-Swap nodes
- Automatically connect to discovered peers
- Default Port: 63785 (TCP)
- Network ID: "cross-swap-network"
- Discovery: Kademlia DHT with bootstrap nodes
The node is built using:
go-libp2pfor P2P networkinggo-libp2p-kad-dhtfor peer discoverygo-multiaddrfor network addressing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
TBD
Project Link: https://github.com/CrossSwap/cross-swap-node