Commit Graph

237 Commits

Author SHA1 Message Date
bbf0416f08 feat: deprecate isEqual in favor of equals (#107) 2019-11-12 15:00:11 +01:00
4fbf859efc chore: release version v0.13.4 v0.13.4 2019-11-04 19:15:07 +01:00
52bd949b43 chore: update contributors 2019-11-04 19:15:07 +01:00
544ca7d74b feat: support Peer ID represented as CID (#105)
* feat: support Peer ID represented as CID

This change adds two functions:

- createFromCID accepts CID as String|CID|Buffer
  and creates PeerId from the multihash value inside of it
- toCIDString serializes PeerId multihash into a CIDv1 in Base32,
  as agreed in https://github.com/libp2p/specs/pull/209

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>

* refactor: rename toCIDString to toString

CIDv1 is self describing, and toString was not defined.
Makes sense to use generic toString in this case.

This change also:
- remembers string with CID, so it is lazily generated only once
- switches createFromB58String to createFromCID (b58 is CIDv0),
  making it easier to migrate existing codebases.

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>

* docs: comment tests

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>

* feat: validate CID multicodec

- require CID with 'libp2p-key' (CIDv1) or 'dag-pb' (CIDv0 converted to CIDv1)
- delegate CID validation to CID constructor

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
2019-11-04 18:22:29 +01:00
11d4ec10bd fix: bang in bin.js (#106) 2019-11-04 12:26:50 +01:00
4d5bb2cfff chore: include marshalPubKey and example (#104) 2019-09-29 19:54:45 +02:00
a2ac32ac0f chore: fix docs typo (#103) 2019-09-28 11:33:57 +02:00
ed211a943b chore: release version v0.13.3 v0.13.3 2019-09-25 16:30:21 +02:00
8ea480a3b0 chore: update contributors 2019-09-25 16:30:21 +02:00
f39fb24321 feat: allow nested PeerIds to support pubKey function when using identity encoding (#101) 2019-09-25 15:39:24 +02:00
911aa634d3 chore: lead maintainer update (#98) 2019-07-30 21:17:24 +02:00
94aa3483b3 chore: release version v0.13.2 v0.13.2 2019-07-12 18:43:04 +01:00
1f1f86f576 chore: update contributors 2019-07-12 18:43:04 +01:00
76864184da feat: add compact protobuf format (#76)
* docs: document .createFromProtobuf and .marshal
* fix: lint
* test: verify .marshal() does it's job
2019-07-12 18:35:46 +01:00
f50b2ac016 chore: release version v0.13.1 v0.13.1 2019-07-11 20:38:24 +01:00
6754752b05 chore: update contributors 2019-07-11 20:38:23 +01:00
17440a3f9a feat(peerid): support creating from secp256k1; harmonize algo with Go (#95) 2019-07-11 20:31:39 +01:00
989b413a96 chore: release version v0.13.0 v0.13.0 2019-07-11 18:26:18 +01:00
52ed9c58a5 chore: update contributors 2019-07-11 18:26:18 +01:00
c3463c7421 feat: async await (#87)
BREAKING CHANGE: API refactored to use async/await
2019-07-11 18:09:21 +01:00
bbabd7451e chore: add discourse badge (#93) 2019-04-18 19:32:14 +02:00
1624b0f70a chore: release version v0.12.2 v0.12.2 2019-01-09 15:14:15 +00:00
ce8a6ff77e chore: update contributors 2019-01-09 15:14:15 +00:00
41ce1d4671 chore: fix lint 2019-01-09 15:03:49 +00:00
231e553a22 chore: fix lint 2019-01-09 15:03:49 +00:00
cd2099305e fix: clean repo and bundle size reduction 2019-01-09 15:03:49 +00:00
8e030b24d4 chore: release version v0.12.1 v0.12.1 2019-01-03 17:10:26 +00:00
9f69e1ba74 chore: update contributors 2019-01-03 17:10:26 +00:00
cbc8c5e2ba Merge pull request #91 from libp2p/chore/update-deps-20190103
chore: update dependencies
2019-01-03 17:05:15 +00:00
77000dbd8b chore: update dependencies 2019-01-03 16:46:46 +00:00
eb062759c6 chore: release version v0.12.0 v0.12.0 2018-10-18 11:00:01 +01:00
39e17c0c0b chore: update contributors 2018-10-18 11:00:01 +01:00
e03a4098df chore: update contributors 2018-10-18 10:57:19 +01:00
d7e633a90b Merge pull request #84 from libp2p/feat/add-class-is-module
feat: add class-is module
2018-10-18 10:50:45 +01:00
2e5e666140 fix: add peerIdWithIs to the API functions using the instance 2018-10-17 10:51:42 +01:00
b388257b69 Merge pull request #86 from libp2p/docs/readme-tweaks
docs: various readme tweaks
2018-10-12 19:58:47 +01:00
6ecd9a8cb0 docs: various readme tweaks 2018-10-12 18:01:55 +02:00
6513a02e1e feat: add class-is module 2018-10-04 11:29:31 +01:00
bd1dc9bda0 chore: release version v0.11.0 v0.11.0 2018-07-02 19:28:04 +02:00
31cbb5d94c chore: update contributors 2018-07-02 19:28:03 +02:00
35556c3a37 chore: update deps 2018-07-02 19:26:36 +02:00
e8ab1b9281 feat: change toPrint output to match go implementation 2018-07-02 19:26:03 +02:00
a786018528 chore: remove pre-commit module 2018-06-04 09:48:30 +01:00
417fd330b9 docs: add lead maintainer 2018-06-04 09:48:30 +01:00
d74bdebcc8 chore: update deps 2018-06-04 09:48:30 +01:00
ffed046595 chore: release version v0.10.7 v0.10.7 2018-04-05 16:41:39 +01:00
1727a135aa chore: update contributors 2018-04-05 16:41:39 +01:00
466b3a030d chore: update deps 2018-04-05 16:39:53 +01:00
464c92a53b chore: release version v0.10.6 v0.10.6 2018-02-12 09:34:42 +00:00
8a608def32 chore: update contributors 2018-02-12 09:34:42 +00:00