Commit Graph

9 Commits

Author SHA1 Message Date
Marcin Rataj
2a28e1d32f
fix: switch to go-multicodec mappings (#240)
The mappings in go-cid were maintained by hand and are invalid.
More details in https://github.com/ipfs/go-cid/pull/137

This is switching to go-multicodec which has correct mappings
that are generated, not written by hand.

Co-authored-by: Daniel Martí <mvdan@mvdan.cc>
2022-03-31 16:04:14 +02:00
Eclésio Junior
4a03a820b3
chore: add String() method to IDSlice type (#238) 2022-03-20 22:35:19 -07:00
Marten Seemann
d28ef6339a
remove deprecated Bytes method from the Key interface (#204) 2021-07-22 12:18:09 -07:00
Marten Seemann
6cef973b92
remove deprecated functions in the peer package (#205) 2021-07-22 12:17:36 -07:00
Marten Seemann
ea8b36912f
fix staticcheck errors (#191)
* run go mod tidy

* omit receiver name if unused

* remove unused type testkey in tests

* fix duplicate import of go-multiaddr

* fix use of deprecated peer.IDB58{Encode,Decode}

* use bytes.Equal instead of bytes.Compare

* fix unnecessary assigments to blank identifier

* use time.Until instead of t.Sub(time.Now())

* fix use of deprecated go-multihash.ID

* add missing error check in envelope test

* fix error check in tests
2021-03-30 16:13:36 -07:00
Vasco Santos
43f10f2288 docs: uniform comment sentences 2020-03-03 18:16:38 +01:00
Steven Allen
dc718fa4da feat: support encoding/decoding peer IDs as CIDs _in text_ 2019-10-02 08:45:33 -07:00
Alex Stokes
686c1736fd
Compare multihash Code to IDENTITY when extracting public key
This PR is a non-substantive change with the goal of making this method
`ExtractPublicKey` from a `peer.ID` clearer to the reader. This goal is
accomplished by using the full name of the identity hash code `IDENTITY` instead
of the deprecated `ID` code. This change makes its clearer to the reader that
there is a trivial way to compute the public key given the digest. Without this
change it is easy to confuse `ID` with a concept relating to peer IDs (and thus
implying this function somehow computes a hash pre-image to get the
corrresponding public key.
2019-08-14 14:27:04 -07:00
Raúl Kripalani
6e566d10f4
Absorb go-libp2p abstractions and core types into this module (#1) 2019-05-22 18:31:11 +01:00