Giter VIP home page Giter VIP logo

go-libp2p-examples's Introduction

go-libp2p examples and tutorials

Discourse posts

In this folder, you can find a variety of examples to help you get started in using go-libp2p. Every example as a specific purpose and some of each incorporate a full tutorial that you can follow through, helping you expand your knowledge about libp2p and p2p networks in general.

Let us know if you find any issue or if you want to contribute and add a new tutorial, feel welcome to submit a pr, thank you!

Examples and Tutorials

For js-libp2p examples, check https://github.com/libp2p/js-libp2p/tree/master/examples

Troubleshooting

When building the examples ensure you have a clean $GOPATH. If you have checked out and built other libp2p repos then you may get errors similar to the one below when building the examples. Note that the use of the gx package manager is not required to run the examples or to use libp2p.

$:~/go/src/github.com/libp2p/go-libp2p-examples/libp2p-host$ go build host.go
# command-line-arguments
./host.go:36:18: cannot use priv (type "github.com/libp2p/go-libp2p-crypto".PrivKey) as type "gx/ipfs/QmNiJiXwWE3kRhZrC5ej3kSjWHm337pYfhjLGSCDNKJP2s/go-libp2p-crypto".PrivKey in argument to libp2p.Identity:
        "github.com/libp2p/go-libp2p-crypto".PrivKey does not implement "gx/ipfs/QmNiJiXwWE3kRhZrC5ej3kSjWHm337pYfhjLGSCDNKJP2s/go-libp2p-crypto".PrivKey (wrong type for Equals method)
                have Equals("github.com/libp2p/go-libp2p-crypto".Key) bool
                want Equals("gx/ipfs/QmNiJiXwWE3kRhZrC5ej3kSjWHm337pYfhjLGSCDNKJP2s/go-libp2p-crypto".Key) bool

To obtain a clean $GOPATH execute the following:

> mkdir /tmp/libp2p-examples
> export GOPATH=/tmp/libp2p/examples

go-libp2p-examples's People

Contributors

anacrolix avatar avive avatar bigs avatar daviddias avatar dependabot-preview[bot] avatar ericxtang avatar hsanjuan avatar jacobheun avatar jorikschellekens avatar jsign avatar justindrake avatar jvsteiner avatar jwoglom avatar kubuxu avatar marten-seemann avatar mortezaalizadeh avatar mvid avatar nuxibyte avatar raulk avatar ssikdar1 avatar stebalien avatar upperwal avatar verysimplyms avatar vyzo avatar whyrusleeping avatar wildmolasses avatar wlwanpan avatar yusefnapora avatar zaibon avatar zippy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.