pub fn pk2id(pk: &PublicKey) -> PeerId
secp256k1
Converts a [secp256k1::PublicKey] to a PeerId by stripping the SECP256K1_TAG_PUBKEY_UNCOMPRESSED tag and storing the rest of the slice in the PeerId.
secp256k1::PublicKey
PeerId
SECP256K1_TAG_PUBKEY_UNCOMPRESSED