The addr
module defines data structures for the identities and network
addresses of peers in the network.
MultiAddr | A MultiAddr is used to route messages to a peer over the network. It must
contain the ip4 (or ip6 ), tcp (or udp ), and p2p components. The
p2p component must be the PubAddr of the peer. A MultiAddr should be
verified by a signature of a UNIX timestamp concatenated to the
MultiAddr . The MultiAddr is valid if the PubAddr in the p2p
component can be derived from the PubKey that is derived from the
signature. For more information see
https://github.com/multiformats/multiaddr.
|
PrivKey | A PrivKey is an ECDSA private key that defines an identity in the network.
Anyone with access to the PrivKey can assume the identity. Generally,
every peer in the network will have its own PrivKey that is kept secure.
Peers use their PrivKey to sign messages from which their PubKey can be
derived.
|
PubAddr | A PubAddr uniquely identifies a peer in the network. It is derived from
the PubKey of the peer by taking the last 24 bytes of the SHA3 hash of the
PubKey . It is used in place of a PubKey because it is more compact.
|
PubKey | A PubKey is an ECDSA public key that is associated with exactly one
PrivKey . Peers verify the author of a message by deriving a PubKey from
the signature of message. Only someone with access to a PrivKey is able to
produce a signature from which the associated PubKey can be derived.
|