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
80 stars 44 forks source link

include `marshalPubKey` and example #104

Closed npfoss closed 4 years ago

npfoss commented 4 years ago

I spent so long trying to get PeerId working with libp2p-crypto and eventually had to use

Reflect.ownKeys(Reflect.getPrototypeOf(Reflect.getPrototypeOf(pid)))

to find this function.

Why was it not included already? It seems pretty useful.