Table of Contents
Introduction
This is a libp2p-backed daemon wrapping the functionalities of go-libp2p for use in Nim.
For more information about the go daemon, check out this repository.
Required only for running the tests.
Prerequisites
Go with version 1.15.15
.
You will likely be able to build
go-libp2p-daemon
with different Go versions, but they haven't been tested.
Installation
Follow one of the methods below:
Script
Run the build script while having the go
command pointing to the correct Go version.
We recommend using 1.15.15
, as previously stated.
p2pd
) should be built and placed in the correct directory.
If you find any issues, please head into our discord and ask for our assistance.
After successfully building the binary, remember to add it to your path so it can be found. You can do that by running:
Tip: To make this change permanent, add the command above to your
.bashrc
file.
Usage
Example
Examples can be found in the examples folder
Getting Started
Try out the chat example. Full code can be found here:
This will output a peer ID such as QmbmHfVvouKammmQDJck4hz33WvVktNEe7pasxz2HgseRu
which you can use in another instance to connect to it.
You can now chat between the instances!