# Functions
AddrInfoFromP2pAddr converts a Multiaddr to an AddrInfo.
AddrInfoFromString builds an AddrInfo from the string representation of a Multiaddr.
AddrInfosFromP2pAddrs converts a set of Multiaddrs to a set of AddrInfos.
AddrInfosToIDs extracts the peer IDs from the passed AddrInfos and returns them in-order.
AddrInfoToP2pAddrs converts an AddrInfo to a list of Multiaddrs.
Decode accepts an encoded peer ID and returns the decoded ID if the input is valid.
FromCid converts a CID to a peer ID, if possible.
IDFromBytes casts a byte slice to the ID type, and validates the value to make sure it is a multihash.
IDFromP2PAddr extracts the peer ID from a p2p Multiaddr.
IDFromPrivateKey returns the Peer ID corresponding to the secret key sk.
IDFromPublicKey returns the Peer ID corresponding to the public key pk.
NewPeerRecord returns a PeerRecord with a timestamp-based sequence number.
PeerRecordFromAddrInfo creates a PeerRecord from an AddrInfo struct.
PeerRecordFromProtobuf creates a PeerRecord from a protobuf PeerRecord struct.
SplitAddr splits a p2p Multiaddr into a transport multiaddr and a peer ID.
TimestampSeq is a helper to generate a timestamp-based sequence number for a PeerRecord.
ToCid encodes a peer ID as a CID of the public key.
# Constants
PeerRecordEnvelopeDomain is the domain string used for peer records contained in an Envelope.
# Variables
AdvancedEnableInlining enables automatically inlining keys shorter than 42 bytes into the peer ID (using the "identity" multihash function).
ErrEmptyPeerID is an error for empty peer ID.
ErrNoPublicKey is an error for peer IDs that don't embed public keys.
PeerRecordEnvelopePayloadType is the type hint used to identify peer records in an Envelope.
# Structs
AddrInfo is a small struct used to pass around a peer with a set of addresses (and later, keys?).
PeerRecord contains information that is broadly useful to share with other peers, either through a direct exchange (as in the libp2p identify protocol), or through a Peer Routing provider, such as a DHT.