mirror of
https://github.com/libp2p/go-libp2p-core.git
synced 2025-03-14 11:10:05 +08:00
Interfaces and abstractions that make up go-libp2p
What: 1. Supports decoding CIDs (of libp2p keys) as peer IDs (https://github.com/libp2p/specs/issues/216) 2. Continues to encode peer IDs as base58 multihashes by default. 3. Adds functions for converting between peer IDs and CIDs. 4. Deprecates IDB58{Decode,Encode}, replacing them with {Decode,Encode}. Why: 1. We _need_ to support multibase somehow, so we can put peer IDs in domains. 2. This makes peer IDs fully self describing. That is, the CID itself indicates that it's a hash of a libp2p public key. 3. It's much easier to upgrade wire protocols than text. This change punts pids-as-cids on the wire down the road but that's something we can revisit if it ever becomes relevant. See https://github.com/libp2p/specs/issues/111 for context. Deviations from that issue: * This _retains_ the current peer ID inlining of ed25519 keys. That turned out to be a nightmare, one I'd like to punt a bit more down the road. * Likewise, this _punts_ the question of embedding the multi-hash algorithm in the public key. |
||
---|---|---|
connmgr | ||
crypto | ||
discovery | ||
event | ||
helpers | ||
host | ||
metrics | ||
mux | ||
network | ||
peer | ||
peerstore | ||
pnet | ||
protocol | ||
routing | ||
sec | ||
test | ||
transport | ||
.gitignore | ||
.travis.yml | ||
alias.go | ||
compat-check | ||
go.mod | ||
go.sum | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md | ||
tools.go |
go-libp2p-core
Home to the interfaces and abstractions that make up go-libp2p.
Minimum go version: 1.13
Install
go get github.com/libp2p/go-libp2p-core
Usage
Check out the GoDocs.
License
Dual-licensed under MIT and ASLv2, by way of the Permissive License Stack.