libp2p / js-peer-id

peer-id implementation in JavaScript. Deprecated; use https://github.com/libp2p/js-libp2p-peer-id instead.
https://github.com/libp2p/js-libp2p-peer-id
MIT License
81 stars 44 forks source link

Add setters for the keys #59

Closed daviddias closed 7 years ago

daviddias commented 7 years ago

to fix https://github.com/libp2p/js-peer-book/issues/33

make sure that on set of the priv key, the pubkey still matches.

dryajov commented 7 years ago

@diasdavid I'll add this, as I need them for circuit. Any considerations that I should take into account?

daviddias commented 7 years ago

@dryajov check here: https://github.com/libp2p/js-peer-id/pull/60 needs better checking. It is annoying because we can't really verify on set (all crypto must be async)