Why are secp256k1 public keys 37 bytes?

Everywhere I look, between libp2p-peer-id, libp2p-crypto, and noble-secp256k1, it seems like the public key is either [y parity] + [x point] (33 bytes) or the identity multihash version of that (35 bytes). (I’m ignoring the uncompressed versions because nothing seems to use that.)

And yet libp2p’s PublicKey expects 37, and when I create createSecp256k1PeerId().publicKey, it’s indeed 37 bytes. Where are those extra two coming from??

Ah, never mind, I figured it out. Because they’re wrapped in a protobuf to tell you what kind of key it is

…I promise I spent hours trying to figure this out before I posted here :stuck_out_tongue: