261 Commits

Author SHA1 Message Date
Vasco Santos
3598a433dc chore: release version v0.13.11 v0.13.11 2020-03-26 09:07:55 +01:00
Vasco Santos
5ec88281e2 chore: update contributors 2020-03-26 09:07:55 +01:00
dependabot-preview[bot]
a80c481146
chore(deps): bump cids from 0.7.5 to 0.8.0 (#121)
Bumps [cids](https://github.com/multiformats/js-cid) from 0.7.5 to 0.8.0.
- [Release notes](https://github.com/multiformats/js-cid/releases)
- [Changelog](https://github.com/multiformats/js-cid/blob/master/CHANGELOG.md)
- [Commits](https://github.com/multiformats/js-cid/compare/v0.7.5...v0.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-26 09:05:51 +01:00
Vasco Santos
efc96106a4 chore: release version v0.13.10 v0.13.10 2020-03-18 17:38:41 +01:00
Vasco Santos
16e1c74e9a chore: update contributors 2020-03-18 17:38:40 +01:00
Hugo Dias
c305c36b26
fix: add buffer (#120)
related to this https://github.com/ipfs/js-ipfs/issues/2924
2020-03-18 17:33:29 +01:00
dependabot-preview[bot]
7e985b127f
chore(deps-dev): bump @types/mocha from 5.2.7 to 7.0.2 (#119)
Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 5.2.7 to 7.0.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-04 14:23:01 +01:00
dependabot-preview[bot]
40d68cb512 chore(deps-dev): bump aegir from 20.6.1 to 21.2.0
Bumps [aegir](https://github.com/ipfs/aegir) from 20.6.1 to 21.2.0.
- [Release notes](https://github.com/ipfs/aegir/releases)
- [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ipfs/aegir/compare/v20.6.1...v21.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-20 08:14:43 -05:00
Vasco Santos
1d86506c64 chore: release version v0.13.9 v0.13.9 2020-02-19 12:06:43 -05:00
Vasco Santos
9dc7ce5f5e chore: update contributors 2020-02-19 12:06:42 -05:00
Robert Kiel
f775e3509b
chore: update index.d.ts (#115)
Tell Typescript that `isPeerId(id)` returns true if, and only if, `id` is of type `PeerId`.

See https://www.typescriptlang.org/docs/handbook/advanced-types.html#using-type-predicates
2020-02-19 11:51:59 -05:00
Robert Kiel
00819ba4eb
chore: update index.d.ts (#116)
This tells Typescript that `id` is immutable.
2020-02-19 09:17:30 -05:00
Vasco Santos
6870c8c4d7 chore: release version v0.13.8 v0.13.8 2020-02-18 08:44:53 -05:00
Vasco Santos
71d3a100c9 chore: update contributors 2020-02-18 08:44:52 -05:00
Alex Potsides
f44645ef7e
fix: remove use of assert module (#117)
The polyfill is big, we can simulate it by throwing an Error and it doesn't work under React Native.
2020-02-18 08:42:39 -05:00
Jacob Heun
a68855a5d2
chore: release version v0.13.7 v0.13.7 2020-01-27 12:10:00 +01:00
Jacob Heun
d8c307a44f
chore: update contributors 2020-01-27 12:09:59 +01:00
Carson Farmer
a5070aea6e feat: adds typescript types + type tests (#110)
* feat: adds typescript types + type tests

Signed-off-by: Carson Farmer <carson.farmer@gmail.com>

* feat: updates to latest cids release

Signed-off-by: Carson Farmer <carson.farmer@gmail.com>
2020-01-27 12:07:52 +01:00
Vasco Santos
fc9698476f chore: release version v0.13.6 v0.13.6 2019-12-18 10:43:10 +00:00
Vasco Santos
ffe04c12a0 chore: update contributors 2019-12-18 10:43:10 +00:00
Jacob Heun
65e0b746a5 fix: catch errors thrown by multihash decode (#109) 2019-12-18 10:17:59 +00:00
Christian Paul
74cdb24544 chore: typo publick -> public (#108) 2019-11-28 11:39:55 +01:00
Vasco Santos
b5335cd4ee chore: release version v0.13.5 v0.13.5 2019-11-12 15:06:13 +01:00
Vasco Santos
519052693d chore: update contributors 2019-11-12 15:06:13 +01:00
Jacob Heun
bbf0416f08 feat: deprecate isEqual in favor of equals (#107) 2019-11-12 15:00:11 +01:00
Vasco Santos
4fbf859efc chore: release version v0.13.4 v0.13.4 2019-11-04 19:15:07 +01:00
Vasco Santos
52bd949b43 chore: update contributors 2019-11-04 19:15:07 +01:00
Marcin Rataj
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
Maciej Krüger
11d4ec10bd fix: bang in bin.js (#106) 2019-11-04 12:26:50 +01:00
Nate Foss
4d5bb2cfff chore: include marshalPubKey and example (#104) 2019-09-29 19:54:45 +02:00
Nate Foss
a2ac32ac0f chore: fix docs typo (#103) 2019-09-28 11:33:57 +02:00
Vasco Santos
ed211a943b chore: release version v0.13.3 v0.13.3 2019-09-25 16:30:21 +02:00
Vasco Santos
8ea480a3b0 chore: update contributors 2019-09-25 16:30:21 +02:00
Topper Bowers
f39fb24321 feat: allow nested PeerIds to support pubKey function when using identity encoding (#101) 2019-09-25 15:39:24 +02:00
Vasco Santos
911aa634d3
chore: lead maintainer update (#98) 2019-07-30 21:17:24 +02:00
Jacob Heun
94aa3483b3
chore: release version v0.13.2 v0.13.2 2019-07-12 18:43:04 +01:00
Jacob Heun
1f1f86f576
chore: update contributors 2019-07-12 18:43:04 +01:00
Maciej Krüger
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
Jacob Heun
f50b2ac016
chore: release version v0.13.1 v0.13.1 2019-07-11 20:38:24 +01:00
Jacob Heun
6754752b05
chore: update contributors 2019-07-11 20:38:23 +01:00
Arve Knudsen
17440a3f9a feat(peerid): support creating from secp256k1; harmonize algo with Go (#95) 2019-07-11 20:31:39 +01:00
Jacob Heun
989b413a96
chore: release version v0.13.0 v0.13.0 2019-07-11 18:26:18 +01:00
Jacob Heun
52ed9c58a5
chore: update contributors 2019-07-11 18:26:18 +01:00
Henrique Dias
c3463c7421 feat: async await (#87)
BREAKING CHANGE: API refactored to use async/await
2019-07-11 18:09:21 +01:00
Vasco Santos
bbabd7451e chore: add discourse badge (#93) 2019-04-18 19:32:14 +02:00
Pedro Teixeira
1624b0f70a chore: release version v0.12.2 v0.12.2 2019-01-09 15:14:15 +00:00
Pedro Teixeira
ce8a6ff77e chore: update contributors 2019-01-09 15:14:15 +00:00
Hugo Dias
41ce1d4671 chore: fix lint 2019-01-09 15:03:49 +00:00
Hugo Dias
231e553a22 chore: fix lint 2019-01-09 15:03:49 +00:00
Hugo Dias
cd2099305e fix: clean repo and bundle size reduction 2019-01-09 15:03:49 +00:00