Function pk2id
Source pub fn pk2id(pk: &PublicKey) -> PeerId
Available on crate feature secp256k1 only.
Expand description
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.